1import{g as Mt,c as bo,r as ne}from"./vendor-react-CF2OuAXi.js";/*! 2 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 3 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 4 * 5 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 6 * Unless required by applicable law or agreed to in writing, software 7 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 8 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 9 * 10 * See the License for the specific language governing permissions and limitations under the License. 11 */var be;(function(t){t.SUCCESS="SUCCESS",t.PENDING="PENDING",t.FAILURE="FAILURE",t.TERMINAL="TERMINAL",t.CANCELED="CANCELED"})(be||(be={}));var se;(function(t){t.OKTA_PASSWORD="okta_password",t.OKTA_EMAIL="okta_email",t.PHONE_NUMBER="phone_number",t.GOOGLE_AUTHENTICATOR="google_otp",t.SECURITY_QUESTION="security_question",t.OKTA_VERIFY="okta_verify",t.WEBAUTHN="webauthn"})(se||(se={}));var he;(function(t){t.PASSWORD_RECOVERY="recover-password",t.REGISTRATION="enroll-profile",t.SOCIAL_IDP="redirect-idp",t.ACCOUNT_UNLOCK="unlock-account"})(he||(he={}));function Pt(t){return t&&(t.key||t.id)}/*! 12 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 13 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 14 * 15 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * 20 * See the License for the specific language governing permissions and limitations under the License. 21 */function So(){return typeof window<"u"?window.console:typeof console<"u"?console:void 0}function $e(){var t=So();return t&&t.log?t:{log:function(){},warn:function(){},group:function(){},groupEnd:function(){}}}function ie(t){$e().warn("[okta-auth-sdk] WARN: "+t)}/*! 22 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 23 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 24 * 25 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 28 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * 30 * See the License for the specific language governing permissions and limitations under the License. 31 */function te(t){var e={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];r!=null&&(e[n]=r)}return e}function Y(t){if(t){var e=JSON.stringify(t);if(e)return JSON.parse(e)}return t}function Ke(t,...e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)==-1&&(n[r]=t[r]);return Y(n)}function tn(t,e){for(var n=t.length;n--;){var r=t[n],i=!0;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&r[o]!==e[o]){i=!1;break}if(i)return r}}function nn(t,e,n){if(!(!t||!t._links)){var r=Y(t._links[e]);if(r&&r.name&&n){if(r.name===n)return r}else return r}}/*! 32 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 33 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 34 * 35 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 36 * Unless required by applicable law or agreed to in writing, software 37 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 38 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 39 * 40 * See the License for the specific language governing permissions and limitations under the License. 41 */class Ne extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}/*! 42 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 43 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 44 * 45 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 46 * Unless required by applicable law or agreed to in writing, softw
46are 47 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 48 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 * 50 * See the License for the specific language governing permissions and limitations under the License. 51 */function je(t){return Object.prototype.toString.call(t)==="[object String]"}function jr(t){return Object.prototype.toString.call(t)==="[object Object]"}function _o(t){return Object.prototype.toString.call(t)==="[object Number]"}function Dr(t){return!!t&&{}.toString.call(t)==="[object Function]"}function Oo(t){return t&&t.finally&&typeof t.finally=="function"}/*! 52 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 53 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 54 * 55 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 56 * Unless required by applicable law or agreed to in writing, software 57 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 58 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 * 60 * See the License for the specific language governing permissions and limitations under the License. 61 */class ee extends Ne{constructor(e,n,r){var i;super((i=n.error)!==null&&i!==void 0?i:ee.UNKNOWN_ERROR),this.name="WWWAuthError",this.resp=null,this.scheme=e,this.parameters=n,r&&(this.resp=r)}get error(){return this.parameters.error}get errorCode(){return this.error}get error_description(){return this.parameters.error_description}get errorDescription(){return this.error_description}get errorSummary(){return this.errorDescription}get realm(){return this.parameters.realm}static parseHeader(e){var n;if(!e)return null;const r=/(?:,|, )?([a-zA-Z0-9!#$%&'*+\-.^_`|~]+)=(?:"([a-zA-Z0-9!#$%&'*+\-.,^_`|~ /:]+)"|([a-zA-Z0-9!#$%&'*+\-.^_`|~/:]+))/g,i=e.indexOf(" "),o=e.slice(0,i),s=e.slice(i+1),a={};let c;for(;(c=r.exec(s))!==null;)a[c[1]]=(n=c[2])!==null&&n!==void 0?n:c[3];return new ee(o,a)}static getWWWAuthenticateHeader(e={}){var n;return Dr(e==null?void 0:e.get)?e.get("WWW-Authenticate"):(n=e["www-authenticate"])!==null&&n!==void 0?n:e["WWW-Authenticate"]}}ee.UNKNOWN_ERROR="UNKNOWN_WWW_AUTH_ERROR";/*! 62 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 63 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 64 * 65 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 66 * Unless required by applicable law or agreed to in writing, software 67 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 68 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 69 * 70 * See the License for the specific language governing permissions and limitations under the License. 71 */function Ur(t){for(var e="abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n="",r=0,i=e.length;r<t;++r)n+=e[Math.floor(Math.random()*i)];return n}function sr(t){return new Promise(function(e){setTimeout(e,t)})}function ko(t,e){const n=t.split(e);return[n[0],n.splice(1,n.length).join(e)]}/*! 72 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 73 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 74 * 75 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 76 * Unless required by applicable law or agreed to in writing, software 77 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 78 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 79 * 80 * See the License for the specific language governing permissions and limitations under the License. 81 */function Rt(t){return/^[a-z][a-z0-9+.-]*:/i.test(t)}function Ao(t="",e){return Rt(t)?t:(e=Q(e),t[0]==="/"?`${e}${t}`:`${e}/${t}`)}function Sd(t="",e){return Rt(t)&&(t=t.substring(e.length)),t[0]==="/"?t:`/${t}`}function le(t){var e=[];if(t!==null)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n]!==void 0&&t[n]!==null&&e.push(n+"="+encodeURIComponent(t[n]));return e.length?"?"+e.join("&"):""}function Q(t){if(t){var e=t.replace(/^\s+|\s+$/gm,"");return e=e.replace(/\/+$/,""),e}}/*! 82 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 83 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 84 * 85 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 86 * Unless required by applicable law or agreed to in writing, softw
86are 87 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 88 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 89 * 90 * See the License for the specific language governing permissions and limitations under the License. 91 */class m extends Ne{constructor(e,n){super(e),this.name="AuthSdkError",this.errorCode="INTERNAL",this.errorSummary=e,this.errorLink="INTERNAL",this.errorId="INTERNAL",this.errorCauses=[],n&&(this.xhr=n)}}/*! 92 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 93 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 94 * 95 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 96 * Unless required by applicable law or agreed to in writing, software 97 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 98 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 99 * 100 * See the License for the specific language governing permissions and limitations under the License. 101 */function Lr(){return Ur(64)}function Eo(){return Ur(64)}function _n(t,e={}){return Q(e.issuer)||t.options.issuer}function Fr(t,e={}){const n=_n(t,e);return n.indexOf("/oauth2")>0?n:n+"/oauth2"}function Po(t,e={}){return _n(t,e).split("/oauth2")[0]}function me(t,e){if(arguments.length>2)throw new m('As of version 3.0, "getOAuthUrls" takes only a single set of options');e=e||{};var n=Q(e.authorizeUrl)||t.options.authorizeUrl,r=_n(t,e),i=Q(e.userinfoUrl)||t.options.userinfoUrl,o=Q(e.tokenUrl)||t.options.tokenUrl,s=Q(e.logoutUrl)||t.options.logoutUrl,a=Q(e.revokeUrl)||t.options.revokeUrl,c=Fr(t,e);return n=n||c+"/v1/authorize",i=i||c+"/v1/userinfo",o=o||c+"/v1/token",a=a||c+"/v1/revoke",s=s||c+"/v1/logout",{issuer:r,authorizeUrl:n,userinfoUrl:i,tokenUrl:o,revokeUrl:a,logoutUrl:s}}/*! 102 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 103 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 104 * 105 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 106 * Unless required by applicable law or agreed to in writing, software 107 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 108 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 109 * 110 * See the License for the specific language governing permissions and limitations under the License. 111 */function Nr(t,e){const n=t.options.issuer,r=me(t,e),i={issuer:n,urls:r,clientId:e.clientId,redirectUri:e.redirectUri,responseType:e.responseType,responseMode:e.responseMode,scopes:e.scopes,state:e.state,nonce:e.nonce,ignoreSignature:e.ignoreSignature,acrValues:e.acrValues,extraParams:e.extraParams};return e.pkce===!1?i:Object.assign(Object.assign({},i),{codeVerifier:e.codeVerifier,codeChallengeMethod:e.codeChallengeMethod,codeChallenge:e.codeChallenge})}function Hr(){}Hr.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,s=r.length;o<s;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}};var Io=Hr;const xo=Mt(Io);/*! js-cookie v3.0.5 | MIT */function pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Co={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function rn(t,e){function n(i,o,s){if(!(typeof document>"u")){s=pt({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decode
vendor: 9,529 bytes, lines 111-116
111URIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),u=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(s[l]=t.read(u,l),i===l)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",pt({},o,{expires:-1}))},withAttributes:function(i){return rn(this.converter,pt({},this.attributes,i))},withConverter:function(i){return rn(pt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var gt=rn(Co,{path:"/"}),on={exports:{}};(function(t,e){var n=typeof self<"u"?self:bo,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&u.indexOf(Object.prototype.toString.call(h))>-1};function f(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function d(h){return typeof h!="string"&&(h=String(h)),h}function g(h){var w={next:function(){var k=h.shift();return{done:k===void 0,value:k}}};return a.iterable&&(w[Symbol.iterator]=function(){return w}),w}function p(h){this.map={},h instanceof p?h.forEach(function(w,k){this.append(k,w)},this):Array.isArray(h)?h.forEach(function(w){this.append(w[0],w[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(w){this.append(w,h[w])},this)}p.prototype.append=function(h,w){h=f(h),w=d(w);var k=this.map[h];this.map[h]=k?k+", "+w:w},p.prototype.delete=function(h){delete this.map[f(h)]},p.prototype.get=function(h){return h=f(h),this.has(h)?this.map[h]:null},p.prototype.has=function(h){return this.map.hasOwnProperty(f(h))},p.prototype.set=function(h,w){this.map[f(h)]=d(w)},p.prototype.forEach=function(h,w){for(var k in this.map)this.map.hasOwnProperty(k)&&h.call(w,this.map[k],k,this)},p.prototype.keys=function(){var h=[];return this.forEach(function(w,k){h.push(k)}),g(h)},p.prototype.values=function(){var h=[];return this.forEach(function(w){h.push(w)}),g(h)},p.prototype.entries=function(){var h=[];return this.forEach(function(w,k){h.push([k,w])}),g(h)},a.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function b(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function O(h){return new Promise(function(w,k){h.onload=function(){w(h.result)},h.onerror=function(){k(h.error)}})}function S(h){var w=new FileReader,k=O(w);return w.readAsArrayBuffer(h),k}function I(h){var w=new FileReader,k=O(w);return w.readAsText(h),k}function P(h){for(var w=new Uint8Array(h),k=new Array(w.length),x=0;x<w.length;x++)k[x]=String.fromCharCode(w[x]);return k.join("")}function N(h){if(h.slice)return h.slice(0);var w=new Uint8Array(h.byteLength);return w.set(new Uint8Array(h)),w.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:a.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:a.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():a.arrayBuffer&&a.blob&&c(h)?(this._bodyArrayBuffer=N(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=N(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var h=b(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var h=b(this);if(h)return h;if(this._bodyBlob)return I(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var F=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function q(h){var w=h.toUpperCase();return F.indexOf(w)>-1?w:h}function H(h,w){w=w||{};var k=w.body;if(h instanceof H){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,w.headers||(this.headers=new p(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!k&&h._bodyInit!=null&&(k=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new p(w.headers)),this.method=q(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&k)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(k)}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function X(h){var w=new FormData;return h.trim().split("&").forEach(function(k){if(k){var x=k.split("="),D=x.shift().replace(/\+/g," "),v=x.join("=").replace(/\+/g," ");w.append(decodeURIComponent(D),decodeURIComponent(v))}}),w}function C(h){var w=new p,k=h.replace(/\r?\n[\t ]+/g," ");return k.split(/\r?\n/).forEach(function(x){var D=x.split(":"),v=D.shift().trim();if(v){var y=D.join(":").trim();w.append(v,y)}}),w}j.call(H.prototype);function L(h,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new p(w.headers),this.url=w.url||"",this._initBody(h)}j.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},L.error=function(){var h=new L(null,{status:0,statusText:""});return h.type="error",h};var Z=[301,302,303,307,308];L.redirect=function(h,w){if(Z.indexOf(w)===-1)throw new RangeError("Invalid status code");return new L(null,{status:w,headers:{location:h}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(w,k){this.message=w,this.name=k;var x=Error(w);this.stack=x.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function W(h,w){return new Promise(function(k,x){var D=new H(h,w);if(D.signal&&D.signal.aborted)return x(new s.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function y(){v.abort()}v.onload=function(){var T={status:v.status,statusText:v.statusText,headers:C(v.getAllResponseHeaders()||"")};T.url="responseURL"in v?v.responseURL:T.headers.get("X-Request-URL");var _="response"in v?v.response:v.responseText;k(new L(_,T))},v.onerror=function(){x(new TypeError("Network request failed"))},v.ontimeout=function(){x(new TypeError("Network request failed"))},v.onabort=function(){x(new s.DOMException("Aborted","AbortError"))},v.open(D.method,D.url,!0),D.credentials==="include"?v.withCredentials=!0:D.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&a.blob&&(v.responseType="blob"),D.headers.forEach(function(T,_){v.setRequestHeader(_,T)}),D.signal&&(D.signal.addEventListener("abort",y),v.onreadystatechange=function(){v.readyState===4&&D.signal.removeEventListener("abort",y)}),v.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return W.polyfill=!0,o.fetch||(o.fetch=W,o.Headers=p,o.Request=H,o.Response=L),s.Headers=p,s.Request=H,s.Response=L,s.fetch=W,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(on,on.exports);var Mo=on.exports;const Ro=Mt(Mo);/*! 112 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 113 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 114 * 115 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 116 * Unless required by applicable law or agreed to in writing, softw
116are 117 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 118 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 119 * 120 * See the License for the specific language governing permissions and limitations under the License. 121 */var sn;(function(t){t.ACCESS="accessToken",t.ID="idToken",t.REFRESH="refreshToken"})(sn||(sn={}));function ae(t){return t&&t.accessToken}function pe(t){return t&&t.idToken}function Se(t){return t&&t.refreshToken}/*! 122 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 123 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 124 * 125 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 126 * Unless required by applicable law or agreed to in writing, software 127 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 128 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 129 * 130 * See the License for the specific language governing permissions and limitations under the License. 131 */async function On(t,e={}){const n=await t.token.prepareTokenParams(e),r=Nr(t,n);let{flow:i="default",withCredentials:o=!0,activationToken:s=void 0,recoveryToken:a=void 0,maxAge:c=void 0,acrValues:u=void 0}=Object.assign(Object.assign({},t.options),e);return Object.assign(Object.assign({},r),{flow:i,withCredentials:o,activationToken:s,recoveryToken:a,maxAge:c,acrValues:u})}function Vr(t,e){const n=ve(t,e);return!!(n!=null&&n.interactionHandle)}function ve(t,e){e=te(e),e=Object.assign(Object.assign({},t.options),e);let n;try{n=t.transactionManager.load(e)}catch{}if(n){if(Br(n,e))return n;ie("Saved transaction meta does not match the current configuration. This may indicate that two apps are sharing a storage key.")}}async function jo(t,e){e=te(e),e=Object.assign(Object.assign({},t.options),e);const n=ve(t,e);return n||On(t,e)}function kn(t,e){t.transactionManager.save(e,{muteWarning:!0})}function Do(t){t.transactionManager.clear()}function Br(t,e={}){if(Lo(t,e,["issuer","clientId","redirectUri","state","codeChallenge","codeChallengeMethod","activationToken","recoveryToken"])===!1)return!1;const{flow:r}=e;return Uo(t,r)!==!1}function Uo(t,e){return!(e&&e!=="default"&&e!=="proceed"&&e!==t.flow)}function Lo(t,e,n){return!n.some(i=>{const o=e[i];if(o&&o!==t[i])return!0})}/*! 132 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 133 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 134 * 135 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 136 * Unless required by applicable law or agreed to in writing, software 137 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 138 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139 * 140 * See the License for the specific language governing permissions and limitations under the License. 141 */const Ge="oktaStateToken",$r=500,qr=300,Wr=86400,An="okta-token-storage",Kr="okta-cache-storage",Fo="okta-pkce-storage",Gr="okta-transaction-storage",zr="okta-shared-transaction-storage",Jr="okta-original-uri-storage",Qr="okta-idx-response-storage",No="accessToken",Ho="idToken",an="refreshToken",wt="referrerPath",cn=43,Yr=128,En="S256",Pn="1.0.0",ar=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_TOKEN_STORAGE_KEY:No,CACHE_STORAGE_NAME:Kr,DEFAULT_CACHE_DURATION:Wr,DEFAULT_CODE_CHALLENGE_METHOD:En,DEFAULT_MAX_CLOCK_SKEW:qr,DEFAULT_POLLING_DELAY:$r,IDX_API_VERSION:Pn,IDX_RESPONSE_STORAGE_NAME:Qr,ID_TOKEN_STORAGE_KEY:Ho,MAX_VERIFIER_LENGTH:Yr,MIN_VERIFIER_LENGTH:cn,ORIGINAL_URI_STORAGE_NAME:Jr,PKCE_STORAGE_NAME:Fo,REFERRER_PATH_STORAGE_KEY:wt,REFRESH_TOKEN_STORAGE_KEY:an,SHARED_TRANSACTION_STORAGE_NAME:zr,STATE_TOKEN_KEY_NAME:Ge,TOKEN_STORAGE_NAME:An,TRANSACTION_STORAGE_NAME:Gr},Symbol.toStringTag,{value:"Module"}));/*! 142 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 143 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 144 * 145 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 146 * Unless required by applicable law or agreed to in writing, softw
146are 147 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 148 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 149 * 150 * See the License for the specific language governing permissions and limitations under the License. 151 */class Ae extends Ne{constructor(e,n,r){const i=e.errorSummary;super(i),this.name="AuthApiError",this.errorSummary=e.errorSummary,this.errorCode=e.errorCode,this.errorLink=e.errorLink,this.errorId=e.errorId,this.errorCauses=e.errorCauses,n&&(this.xhr=n),r&&(this.meta=r)}}/*! 152 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 153 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 154 * 155 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 156 * Unless required by applicable law or agreed to in writing, software 157 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 158 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 159 * 160 * See the License for the specific language governing permissions and limitations under the License. 161 */class De extends Ne{constructor(e,n,r){super(n),this.resp=null,this.name="OAuthError",this.errorCode=e,this.errorSummary=n,this.error=e,this.error_description=n,r&&(this.resp=r)}}/*! 162 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 163 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 164 * 165 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 166 * Unless required by applicable law or agreed to in writing, software 167 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 168 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 169 * 170 * See the License for the specific language governing permissions and limitations under the License. 171 */const Vo=(t,e)=>{var n;if(e instanceof Error)return new Ae({errorSummary:e.message});let r=e,i,o={};if(r.responseText&&je(r.responseText))try{o=JSON.parse(r.responseText)}catch{o={errorSummary:"Unknown error"}}r.status>=500&&(o.errorSummary="Unknown error"),t.options.transformErrorXHR&&(r=t.options.transformErrorXHR(Y(r)));const s=(n=ee.getWWWAuthenticateHeader(r==null?void 0:r.headers))!==null&&n!==void 0?n:"";if(o.error&&o.error_description?i=new De(o.error,o.error_description,r):i=new Ae(o,r,{wwwAuthHeader:s}),s&&(r==null?void 0:r.status)>=400&&(r==null?void 0:r.status)<500){const a=ee.parseHeader(s);if(r.status===403&&(a==null?void 0:a.error)==="insufficient_authentication_context"){const{max_age:c,acr_values:u}=a.parameters;i=new Ae({errorSummary:a.error,errorCauses:[{errorSummary:a.errorDescription}]},r,Object.assign({max_age:+c},u&&{acr_values:u}))}else(a==null?void 0:a.scheme)==="DPoP"&&(i=a)}return i};function oe(t,e){if(e=e||{},t.options.httpRequestInterceptors)for(const I of t.options.httpRequestInterceptors)I(e);var n=e.url,r=e.method,i=e.args,o=e.saveAuthnState,s=e.accessToken,a=e.withCredentials===!0,c=t.options.storageUtil,u=c.storage,l=t.storageManager.getHttpCache(t.options.cookies);if(e.cacheResponse){var f=l.getStorage(),d=f[n];if(d&&Date.now()/1e3<d.expiresAt)return Promise.resolve(d.response)}var g=t._oktaUserAgent.getHttpHeader(),p=Object.assign({Accept:"application/json","Content-Type":"application/json"},g);Object.assign(p,t.options.headers,e.headers),p=te(p),s&&je(s)&&(p.Authorization="Bearer "+s);var b={headers:p,data:i||void 0,withCredentials:a},O,S;return t.options.httpRequestClient(r,n,b).then(function(I){return S=I.responseText,S&&je(S)&&(S=JSON.parse(S),S&&typeof S=="object"&&!S.headers&&(Array.isArray(S)?S.forEach(P=>{P.headers=I.headers}):S.headers=I.headers)),o&&(S.stateToken||u.delete(Ge)),S&&S.stateToken&&S.expiresAt&&u.set(Ge,S.stateToken,S.expiresAt,t.options.cookies),S&&e.cacheResponse&&l.updateStorage(n,{expiresAt:Math.floor(Date.now()/1e3)+Wr,response:S}),S}).catch(function(I){throw O=Vo(t,I),O.errorCode==="E0000011"&&u.delete(Ge),O})}function Ue(t,e,n){e=Rt(e)?e:t.getIssuerOrigin()+e;var r={url:e,method:"GET"};return Object.assign(r,n),oe(t,r)}function ye(t,e,n,r){e=Rt(e)?e:t.getIssuerOrigin()+e;var i={url:e,method:"POST",args:n,saveAuthnState:!0};return Object.assign(i,r),oe(t,i)}/*! 172 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 173 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 174 * 175 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 176 * Unless required by applicable law or agreed to in writing, softw
176are 177 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 178 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 179 * 180 * See the License for the specific language governing permissions and limitations under the License. 181 */function cr(t){return{meta:t,interactionHandle:t.interactionHandle,state:t.state}}async function Xr(t,e={}){e=te(e);let n=ve(t,e);if(n!=null&&n.interactionHandle)return cr(n);n=await On(t,Object.assign(Object.assign({},n),e));const r=Fr(t);let{clientId:i,redirectUri:o,state:s,scopes:a,withCredentials:c,codeChallenge:u,codeChallengeMethod:l,activationToken:f,recoveryToken:d,maxAge:g,acrValues:p,nonce:b}=n;const O=e.clientSecret||t.options.clientSecret;c=c??!0;const S=`${r}/v1/interact`,I=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({client_id:i,scope:a.join(" "),redirect_uri:o,code_challenge:u,code_challenge_method:l,state:s},f&&{activation_token:f}),d&&{recovery_token:d}),O&&{client_secret:O}),g&&{max_age:g}),p&&{acr_values:p}),b&&{nonce:b}),j=(await oe(t,{method:"POST",url:S,headers:{"Content-Type":"application/x-www-form-urlencoded"},withCredentials:c,args:I})).interaction_handle,F=Object.assign(Object.assign({},n),{interactionHandle:j,withCredentials:c,state:s,scopes:a,recoveryToken:d,activationToken:f});return kn(t,F),cr(F)}/*! 182 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 183 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 184 * 185 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 186 * Unless required by applicable law or agreed to in writing, software 187 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 188 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 * 190 * See the License for the specific language governing permissions and limitations under the License. 191 *//*! ***************************************************************************** 192Copyright (c) Microsoft Corporation. 193 194Permission to use, copy, modify, and/or distribute this software for any 195purpose with or without fee is hereby granted. 196 197THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 198REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 199AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 200INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 201LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 202OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 203PERFORMANCE OF THIS SOFTWARE. 204***************************************************************************** */function nt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}/*! 205 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 206 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 207 * 208 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 209 * Unless required by applicable law or agreed to in writing, software 210 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 211 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 212 * 213 * See the License for the specific language governing permissions and limitations under the License. 214 */const Bo=function(e){return e.mutable!==!1},$o=function(e){var n,r;const i={},o=[],s={};if(!e.value)return o.push(e),{defaultParamsForAction:i,neededParamsForAction:o,immutableParamsForAction:s};for(let a of e.value)Bo(a)?(o.push(a),(n=a.value)!==null&&n!==void 0&&n&&(i[a.name]=a.value)):s[a.name]=(r=a.value)!==null&&r!==void 0?r:"";return{defaultParamsForAction:i,neededParamsForAction:o,immutableParamsForAction:s}},qo=function(e){e=Array.isArray(e)?e:[e];const n=[],r={},i={};for(let o of e){const{defaultParamsForAction:s,neededParamsForAction:a,immutableParamsForAction:c}=$o(o);n.push(a),r[o.name]=s,i[o.name]=c}return{defaultParams:r,neededParams:n,immutableParams:i}};/*! 215 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 216 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 217 * 218 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 219 * Unless required by applicable law or agreed to in writing, softw
219are 220 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 221 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 222 * 223 * See the License for the specific language governing permissions and limitations under the License. 224 */const Wo=function(e,{actionDefinition:n,defaultParamsForAction:r={},immutableParamsForAction:i={},toPersist:o={}}){const s=n.href;return async function(a={}){var c;const u={"Content-Type":"application/json",Accept:n.accepts||"application/ion+json"},l=JSON.stringify(Object.assign(Object.assign(Object.assign({},r),a),i));try{const f=await oe(e,{url:s,method:n.method,headers:u,args:l,withCredentials:(c=o==null?void 0:o.withCredentials)!==null&&c!==void 0?c:!0});return e.idx.makeIdxResponse(Object.assign({},f),o,!0)}catch(f){if(!(f instanceof Ae)||!(f!=null&&f.xhr))throw f;const d=f.xhr,g=d.responseJSON||JSON.parse(d.responseText),p=d.headers["WWW-Authenticate"]||d.headers["www-authenticate"],b=e.idx.makeIdxResponse(Object.assign({},g),o,!1);return d.status===401&&p==='Oktadevicejwt realm="Okta Device"'&&(b.stepUp=!0),b}}},un=function(e,n,r){const i=Wo,{defaultParams:o,neededParams:s,immutableParams:a}=qo(n),c=i(e,{actionDefinition:n,defaultParamsForAction:o[n.name],immutableParamsForAction:a[n.name],toPersist:r});return c.neededParams=s,c};/*! 225 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 226 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 227 * 228 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 229 * Unless required by applicable law or agreed to in writing, software 230 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 231 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 232 * 233 * See the License for the specific language governing permissions and limitations under the License. 234 */const Ko=function(e,n,r={}){return n.reduce((i,o)=>Object.assign(Object.assign({},i),{[o.name]:un(e,o,r)}),{})};function re(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?re=function(e){return typeof e}:re=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(t)}function Go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xe(t,e)}function Ye(t){return Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ye(t)}function Xe(t,e){return Xe=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Xe(t,e)}function Zr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ze(t,e,n){return Zr()?ze=Reflect.construct:ze=function(i,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(i,a),u=new c;return s&&Xe(u,s.prototype),u},ze.apply(null,arguments)}function Jo(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ln(t){var e=typeof Map=="function"?new Map:void 0;return ln=function(r){if(r===null||!Jo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return ze(r,arguments,Ye(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Xe(i,r)},ln(t)}function Qo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yo(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:Qo(t)}function Xo(t){var e=Zr();return function(){var r=Ye(t),i;if(e){var o=Ye(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Yo(this,i)}}function ur(t){return Zo(t)||es(t)||ei(t)||ts()}function Zo(t){if(Array.isArray(t))return dn(t)}function es(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ei(t,e){if(t){if(typeof t=="string")return dn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dn(t,e)}}function dn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ts(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 235In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ns(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];
vendor: 8,561 bytes, lines 235-236
235if(!n){if(Array.isArray(t)||(n=ei(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 236In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}var G=Object.prototype.hasOwnProperty;function Be(t,e){return t=t.slice(),t.push(e),t}function Ce(t,e){return e=e.slice(),e.unshift(t),e}var rs=function(t){zo(n,t);var e=Xo(n);function n(r){var i;return Go(this,n),i=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),i.avoidNew=!0,i.value=r,i.name="NewError",i}return n}(ln(Error));function M(t,e,n,r,i){if(!(this instanceof M))try{return new M(t,e,n,r,i)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof t=="string"&&(i=r,r=n,n=e,e=t,t=null);var o=t&&re(t)==="object";if(t=t||{},this.json=t.json||n,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=G.call(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||r||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){var s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=n;var a=this.evaluate(s);if(!a||re(a)!=="object")throw new rs(a);return a}}M.prototype.evaluate=function(t,e,n,r){var i=this,o=this.parent,s=this.parentProperty,a=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&re(t)==="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!G.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var u=t;e=u.json,a=G.call(t,"flatten")?t.flatten:a,this.currResultType=G.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=G.call(t,"sandbox")?t.sandbox:this.currSandbox,c=G.call(t,"wrap")?t.wrap:c,this.currPreventEval=G.call(t,"preventEval")?t.preventEval:this.currPreventEval,n=G.call(t,"callback")?t.callback:n,this.currOtherTypeCallback=G.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=G.call(t,"parent")?t.parent:o,s=G.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(o=o||null,s=s||null,Array.isArray(t)&&(t=M.toPathString(t)),!(!t&&t!==""||!e)){var l=M.toPathArray(t);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;var f=this._trace(l,e,["$"],o,s,n).filter(function(d){return d&&!d.isParentSelector});return f.length?!c&&f.length===1&&!f[0].hasArrExpr?this._getPreferredOutput(f[0]):f.reduce(function(d,g){var p=i._getPreferredOutput(g);return a&&Array.isArray(p)?d=d.concat(p):d.push(p),d},[]):c?[]:void 0}};M.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var n=Array.isArray(t.path)?t.path:M.toPathArray(t.path);return t.pointer=M.toPointer(n),t.path=typeof t.path=="string"?t.path:M.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return M.toPathString(t[e]);case"pointer":return M.toPointer(t.path);default:throw new TypeError("Unknown result type")}};M.prototype._handleCallback=function(t,e,n){if(e){var r=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:M.toPathString(t.path),e(r,n,t)}};M.prototype._trace=function(t,e,n,r,i,o,s,a){var c=this,u;if(!t.length)return u={path:n,value:e,parent:r,parentProperty:i,hasArrExpr:s},this._handleCallback(u,o,"value"),u;var l=t[0],f=t.slice(1),d=[];function g(C){Array.isArray(C)?C.forEach(function(L){d.push(L)}):d.push(C)}if((typeof l!="string"||a)&&e&&G.call(e,l))g(this._trace(f,e[l],Be(n,l),e,l,o,s));else if(l==="*")this._walk(l,f,e,n,r,i,o,function(C,L,Z,W,h,w,k,x){g(c._trace(Ce(C,Z),W,h,w,k,x,!0,!0))});else if(l==="..")g(this._trace(f,e,n,r,i,o,s)),this._walk(l,f,e,n,r,i,o,function(C,L,Z,W,h,w,k,x){re(W[C])==="object"&&g(c._trace(Ce(L,Z),W[C],Be(h,C),W,C,x,!0))});else{if(l==="^")return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:f,isParentSelector:!0};if(l==="~")return u={path:Be(n,l),value:i,parent:r,parentProperty:null},this._handleCallback(u,o,"property"),u;if(l==="$")g(this._trace(f,e,n,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(l))g(this._slice(l,f,e,n,r,i,o));else if(l.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(l,f,e,n,r,i,o,function(C,L,Z,W,h,w,k,x){c._eval(L.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),W[C],C,h,w,k)&&g(c._trace(Ce(C,Z),W,h,w,k,x,!0))})}else if(l[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");g(this._trace(Ce(this._eval(l,e,n[n.length-1],n.slice(0,-1),r,i),f),e,n,r,i,o,s))}else if(l[0]==="@"){var p=!1,b=l.slice(1,-2);switch(b){case"scalar":(!e||!["object","function"].includes(re(e)))&&(p=!0);break;case"boolean":case"string":case"undefined":case"function":re(e)===b&&(p=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(p=!0);break;case"number":Number.isFinite(e)&&(p=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(p=!0);break;case"object":e&&re(e)===b&&(p=!0);break;case"array":Array.isArray(e)&&(p=!0);break;case"other":p=this.currOtherTypeCallback(e,n,r,i);break;case"null":e===null&&(p=!0);break;default:throw new TypeError("Unknown value type "+b)}if(p)return u={path:n,value:e,parent:r,parentProperty:i},this._handleCallback(u,o,"value"),u}else if(l[0]==="`"&&e&&G.call(e,l.slice(1))){var O=l.slice(1);g(this._trace(f,e[O],Be(n,O),e,O,o,s,!0))}else if(l.includes(",")){var S=l.split(","),I=ns(S),P;try{for(I.s();!(P=I.n()).done;){var N=P.value;g(this._trace(Ce(N,f),e,n,r,i,o,!0))}}catch(C){I.e(C)}finally{I.f()}}else!a&&e&&G.call(e,l)&&g(this._trace(f,e[l],Be(n,l),e,l,o,s,!0))}if(this._hasParentSelector)for(var j=0;j<d.length;j++){var F=d[j];if(F&&F.isParentSelector){var q=this._trace(F.expr,e,F.path,r,i,o,s);if(Array.isArray(q)){d[j]=q[0];for(var H=q.length,X=1;X<H;X++)j++,d.splice(j,0,q[X])}else d[j]=q}}return d};M.prototype._walk=function(t,e,n,r,i,o,s,a){if(Array.isArray(n))for(var c=n.length,u=0;u<c;u++)a(u,t,e,n,r,i,o,s);else n&&re(n)==="object"&&Object.keys(n).forEach(function(l){a(l,t,e,n,r,i,o,s)})};M.prototype._slice=function(t,e,n,r,i,o,s){if(Array.isArray(n)){var a=n.length,c=t.split(":"),u=c[2]&&Number.parseInt(c[2])||1,l=c[0]&&Number.parseInt(c[0])||0,f=c[1]&&Number.parseInt(c[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),f=f<0?Math.max(0,f+a):Math.min(a,f);for(var d=[],g=l;g<f;g+=u){var p=this._trace(Ce(g,e),n,r,i,o,s,!0);p.forEach(function(b){d.push(b)})}return d}};M.prototype._eval=function(t,e,n,r,i,o){t.includes("@parentProperty")&&(this.currSandbox._$_parentProperty=o,t=t.replace(/@parentProperty/g,"_$_parentProperty")),t.includes("@parent")&&(this.currSandbox._$_parent=i,t=t.replace(/@parent/g,"_$_parent")),t.includes("@property")&&(this.currSandbox._$_property=n,t=t.replace(/@property/g,"_$_property")),t.includes("@path")&&(this.currSandbox._$_path=M.toPathString(r.concat([n])),t=t.replace(/@path/g,"_$_path")),t.includes("@root")&&(this.currSandbox._$_root=this.json,t=t.replace(/@root/g,"_$_root")),/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/.test(t)&&(this.currSandbox._$_v=e,t=t.replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1"));try{return this.vm.runInNewContext(t,this.currSandbox)}catch(s){throw console.log(s),new Error("jsonPath: "+s.message+": "+t)}};M.cache={};M.toPathString=function(t){for(var e=t,n=e.length,r="$",i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||
236(r+=/^[\*0-9]+$/.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return r};M.toPointer=function(t){for(var e=t,n=e.length,r="",i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(r+="/"+e[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return r};M.toPathArray=function(t){var e=M.cache;if(e[t])return e[t].concat();var n=[],r=t.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,function(o,s){return"[#"+(n.push(s)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,s){return"['"+s.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,s){return";"+s.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=r.split(";").map(function(o){var s=o.match(/#([0-9]+)/);return!s||!s[1]?o:n[s[1]]});return e[t]=i,e[t].concat()};var is=function(e,n,r){for(var i=e.length,o=0;o<i;o++){var s=e[o];r(s)&&n.push(e.splice(o--,1)[0])}};M.prototype.vm={runInNewContext:function(e,n){var r=Object.keys(n),i=[];is(r,i,function(u){return typeof n[u]=="function"});var o=r.map(function(u,l){return n[u]}),s=i.reduce(function(u,l){var f=n[l].toString();return/function/.test(f)||(f="function "+f),"var "+l+"="+f+";"+u},"");e=s+e,!/(["'])use strict\1/.test(e)&&!r.includes("arguments")&&(e="var arguments = undefined;"+e),e=e.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var a=e.lastIndexOf(";"),c=a>-1?e.slice(0,a+1)+" return "+e.slice(a+1):" return "+e;return ze(Function,ur(r).concat([c])).apply(void 0,ur(o))}};/*! 237 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 238 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 239 * 240 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 241 * Unless required by applicable law or agreed to in writing, software 242 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 243 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 244 * 245 * See the License for the specific language governing permissions and limitations under the License. 246 */function os(t){return M(Object.assign({preventEval:!0},t))}/*! 247 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 248 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 249 * 250 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 251 * Unless required by applicable law or agreed to in writing, software 252 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 253 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 254 * 255 * See the License for the specific language governing permissions and limitations under the License. 256 */const ss={remediation:!0,context:!0},as=function(e,n,r={}){const i={},o={};return Object.keys(n).filter(s=>!ss[s]).forEach(s=>{if(!(typeof n[s]=="object"&&!!n[s])){o[s]=n[s];return}if(n[s].rel){i[n[s].name]=un(e,n[s],r);return}const c=n[s],{value:u,type:l}=c,f=nt(c,["value","type"]);if(o[s]=Object.assign({type:l},f),l!=="object"){o[s].value=u;return}o[s].value={},Object.entries(u).forEach(([d,g])=>{g.rel?i[`${s}-${d.name||d}`]=un(e,g,r):o[s].value[d]=g})}),{context:o,actions:i}},ti=(t,e)=>{Object.keys(e).forEach(n=>{if(n==="relatesTo"){const r=Array.isArray(e[n])?e[n][0]:e[n];if(typeof r=="string"){const i=os({path:r,json:t})[0];if(i){e[n]=i;return}else throw new m(`Cannot resolve relatesTo: ${r}`)}}Array.isArray(e[n])&&e[n].forEach(r=>ti(t,r))})},cs=(t,e,n)=>{if(e.rel){const i=Ko(t,[e],n)[e.name];return Object.assign(Object.assign({},e),{action:i})}return e},us=function(e,n,r={}){var i;const o=((i=n.remediation)===null||i===void 0?void 0:i.value)||[];o.forEach(u=>{var l;if(u.name==="launch-authenticator"&&((l=u==null?void 0:u.relatesTo)===null||l===void 0?void 0:l[0])==="authenticatorChallenge"&&!(n!=null&&n.authenticatorChallenge)){delete u.relatesTo;return}return ti(n,u)});const s=o.map(u=>cs(e,u,r)),{context:a,actions:c}=as(e,n,r);return{remediations:s,context:a,actions:c}};/*! 257 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 258 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 259 * 260 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 261 * Unless required by applicable law or agreed to in writing, softw
261are 262 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 263 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 264 * 265 * See the License for the specific language governing permissions and limitations under the License. 266 */function ls(t,e,n,r){var i,o,s;const a=e,{remediations:c,context:u,actions:l}=us(t,e,n),f=[...c],d=async function(b,O={}){const S=c.find(P=>P.name===b);return S?typeof S.action!="function"?Promise.reject(`Current remediation cannot make form submit action: [${b}]`):S.action(O):Promise.reject(`Unknown remediation choice: [${b}]`)},g=b=>b.name==="interaction_code",p=(s=(o=(i=a.successWithInteractionCode)===null||i===void 0?void 0:i.value)===null||o===void 0?void 0:o.find(g))===null||s===void 0?void 0:s.value;return{proceed:d,neededToProceed:f,actions:l,context:u,rawIdxState:a,interactionCode:p,toPersist:n,requestDidSucceed:r}}/*! 267 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 268 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 269 * 270 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 271 * Unless required by applicable law or agreed to in writing, software 272 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 273 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 274 * 275 * See the License for the specific language governing permissions and limitations under the License. 276 */var ds={makeIdxState:ls};/*! 277 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 278 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 279 * 280 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 281 * Unless required by applicable law or agreed to in writing, software 282 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 283 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * 285 * See the License for the specific language governing permissions and limitations under the License. 286 */const ni=function(e){switch(e){case"1.0.0":return ds;case void 0:case null:throw new Error("Api version is required");default:throw new Error(`Unknown api version: ${e}. Use an exact semver version.`)}};function ri(t){if(!t)throw new Error("version is required");if((t??"").replace(/[^0-9a-zA-Z._-]/,"")!==t||!t)throw new Error("invalid version supplied - version is required and uses semver syntax");ni(t)}function ii(t,e,n,r){var i;const o=(i=e==null?void 0:e.version)!==null&&i!==void 0?i:Pn;ri(o);const{makeIdxState:s}=ni(o);return s(t,e,n,r)}/*! 287 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 288 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 289 * 290 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 291 * Unless required by applicable law or agreed to in writing, software 292 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 293 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 294 * 295 * See the License for the specific language governing permissions and limitations under the License. 296 */function oi(t){return t&&t.version}/*! 297 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 298 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 299 * 300 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 301 * Unless required by applicable law or agreed to in writing, software 302 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 303 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 304 * 305 * See the License for the specific language governing permissions and limitations under the License. 306 */function fs(t){return t instanceof Ae}function si(t){return t instanceof De}function hs(t){return t instanceof ee}/*! 307 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 308 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 309 * 310 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 311 * Unless required by applicable law or agreed to in writing, softw
311are 312 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 313 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 314 * 315 * See the License for the specific language governing permissions and limitations under the License. 316 */async function fn(t,e={}){var n;let r,i;const o=t.transactionManager.loadIdxResponse(e);if(o&&(r=o.rawIdxResponse,i=o.requestDidSucceed),!r){const a=e.version||Pn,c=Po(t),{interactionHandle:u,stateHandle:l}=e,f=(n=e.withCredentials)!==null&&n!==void 0?n:!0;try{i=!0,ri(a);const d=`${c}/idp/idx/introspect`,g=l?{stateToken:l}:{interactionHandle:u},p={"Content-Type":`application/ion+json; okta-version=${a}`,Accept:`application/ion+json; okta-version=${a}`};r=await oe(t,{method:"POST",url:d,headers:p,withCredentials:f,args:g})}catch(d){if(fs(d)&&d.xhr&&oi(d.xhr.responseJSON))r=d.xhr.responseJSON,i=!1;else throw d}}const{withCredentials:s}=e;return ii(t,r,{withCredentials:s},i)}/*! 317 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 318 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 319 * 320 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 321 * Unless required by applicable law or agreed to in writing, software 322 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 323 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 324 * 325 * See the License for the specific language governing permissions and limitations under the License. 326 */function ps(t){var e;return(e=t.value)===null||e===void 0?void 0:e.map(n=>n.name)}function gs(t){var e;return(e=t.value)===null||e===void 0?void 0:e.reduce((n,r)=>(r.required&&n.push(r.name),n),[])}function mt(t){return t.charAt(0).toUpperCase()+t.substring(1)}function jt(t){return t.value.find(({name:e})=>e==="authenticator")}/*! 327 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 328 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 329 * 330 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 331 * Unless required by applicable law or agreed to in writing, software 332 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 333 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 334 * 335 * See the License for the specific language governing permissions and limitations under the License. 336 */function lr(t){let e;if(Pt(t))e=t;else if(typeof t=="string")e={key:t};else throw new Error("Invalid format for authenticator");return e}function Me(t,e){return!t||!e?!1:t.id&&e.id?t.id===e.id:t.key&&e.key?t.key===e.key:!1}function ms(t,e){let n;for(let r of t)if(n=e.find(({relatesTo:i})=>i.key&&i.key===r.key),n)break;return n}/*! 337 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 338 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 339 * 340 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 341 * Unless required by applicable law or agreed to in writing, software 342 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 343 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 344 * 345 * See the License for the specific language governing permissions and limitations under the License. 346 */class J{constructor(e,n={},r={}){this.values=Object.assign({},n),this.options=Object.assign({},r),this.formatAuthenticators(),this.remediation=e}formatAuthenticators(){if(this.values.authenticators=this.values.authenticators||[],this.values.authenticators=this.values.authenticators.map(e=>lr(e)),this.values.authenticator){const e=lr(this.values.authenticator);this.values.authenticators.some(r=>Me(e,r))||this.values.authenticators.push(e)}this.values.authenticatorsData=this.values.authenticators.reduce((e,n)=>(typeof n=="object"&&Object.keys(n).length>1&&e.push(n),e),this.values.authenticatorsData||[])}getName(){return this.remediation.name}canRemediate(e){return!gs(this.remediation).find(i=>!this.hasData(i))}getData(e){if(!e)return ps(this.remediation).reduce((i,o)=>(i[o]=this.getData(o),i),{});if(typeof this[`map${mt(e)}`]=="function"){const n=this[`map${mt(e)}`](this.remediation.value.find(({name:r})=>r===e));if(n)return n}if(this.map&&this.map[e]){const n=this.map[e];for(let r=0;r<n.length;r++){let i=this.values[n[r]];if(i)return i}}return this.values[e]}hasData(e){return!!this.getData(e)}getNextStep(e,n){const r=this.getName(),i=this.getInputs(),o=this.getAuthenticator(),s=o==null?void 0:o.type;return Object.assign(Object.assign({name:r,inputs:i},s&&{type:s}),o&&{authenticator:o})}getInputs(){const e=[];
346return(this.remediation.value||[]).forEach(r=>{let i,{name:o,type:s,visible:a,messages:c}=r;if(a!==!1){if(typeof this[`getInput${mt(o)}`]=="function")i=this[`getInput${mt(o)}`](r);else if(s!=="object"){let u;const l=(this.map?this.map[o]:null)||[];l.length===1?u=l[0]:u=l.find(f=>Object.keys(this.values).includes(f)),u&&(i=Object.assign(Object.assign({},r),{name:u}))}i||(i=r),Array.isArray(i)?i.forEach(u=>e.push(u)):(c&&(i.messages=c),e.push(i))}}),e}static getMessages(e){var n,r;if(e.value)return(r=(n=e.value[0])===null||n===void 0?void 0:n.form)===null||r===void 0?void 0:r.value.reduce((i,o)=>(o.messages&&(i=[...i,...o.messages.value]),i),[])}getValuesAfterProceed(){const e=this.remediation.value||[],n=this.getInputs(),r=[...e,...n];for(const i of r)delete this.values[i.name];return this.values}getAuthenticator(){var e,n;const r=(e=this.remediation.relatesTo)===null||e===void 0?void 0:e.value;if(!r)return;const i=jt(this.remediation);if(!i)return r;const o=i.form.value.find(({name:a})=>a==="id").value,s=(n=i.form.value.find(({name:a})=>a==="enrollmentId"))===null||n===void 0?void 0:n.value;return Object.assign(Object.assign({},r),{id:o,enrollmentId:s})}}/*! 347 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 348 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 349 * 350 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 351 * Unless required by applicable law or agreed to in writing, software 352 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 353 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 354 * 355 * See the License for the specific language governing permissions and limitations under the License. 356 */function Tt(t){if(Array.isArray(t))return t.map(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"?n:Tt(n));const e={};for(const[n,r]of Object.entries(t))if(!(r===null||typeof r>"u"))if(typeof r=="object"){const i=Object.keys(r);if(["value","form"].includes(n)&&i.length===1&&["value","form"].includes(i[0])){const o=Tt(r);Object.entries(o).forEach(([s,a])=>{e[s]=a})}else e[n]=Tt(r)}else e[n]=r;return e}/*! 357 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 358 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 359 * 360 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 361 * Unless required by applicable law or agreed to in writing, software 362 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 363 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 364 * 365 * See the License for the specific language governing permissions and limitations under the License. 366 */class In extends J{canRemediate(){return typeof this.remediation.action!="function"?!1:!!(this.remediation.name==="poll"||this.remediation.name.endsWith("-poll")||this.options.step)}getData(){return this.getInputs().reduce((n,{name:r})=>(n[r]=this.values[r],n),{})}getNextStep(e,n){const r=this.getName(),i=this.getInputs(),o=this.remediation,{href:s,method:a,rel:c,accepts:u,produces:l,value:f,action:d}=o,g=nt(o,["href","method","rel","accepts","produces","value","action"]);return d?Object.assign(Object.assign(Object.assign({},g),!!i.length&&{inputs:i}),{action:async p=>e.idx.proceed(Object.assign({step:r},p))}):Object.assign({},this.remediation)}getInputs(){return(this.remediation.value||[]).filter(({name:e})=>e!=="stateHandle").map(Tt).map(e=>(e.type=e.type||"string",e))}}/*! 367 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 368 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 369 * 370 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 371 * Unless required by applicable law or agreed to in writing, software 372 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 373 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 374 * 375 * See the License for the specific language governing permissions and limitations under the License. 376 */const xn={remediators:{},getFlowSpecification:function(t,e="default"){return{remediators:{}}}};function vs(t){Object.assign(xn,t)}function ys(t,e="default"){return xn.getFlowSpecification(t,e)}function It(t){const{neededToProceed:e,interactionCode:n}=t;return!e.length&&!n}
376function ws(t){return t.neededToProceed.some(({name:e})=>e==="skip")}function Ts(t){return Object.keys(t.actions).some(e=>e.includes("resend"))}function hn(t){if(!(!t||!Array.isArray(t)))return t.reduce((e,n)=>{if(n.messages&&(e=[...e,...n.messages.value]),n.form){const r=hn(n.form.value)||[];e=[...e,...r]}if(n.options){let r=[];n.options.forEach(o=>{!o.value||typeof o.value=="string"||(r=[...r,o.value])});const i=hn(r)||[];e=[...e,...i]}return e},[])}function ai(t,e){var n;let r=[];const{rawIdxState:i,neededToProceed:o}=t,s=(n=i.messages)===null||n===void 0?void 0:n.value.map(c=>c);if(s&&(r=[...r,...s]),!e.useGenericRemediator)for(let c of o){const u=hn(c.value);u&&(r=[...r,...u])}const a={};return r=r.reduce((c,u)=>{var l;const f=(l=u.i18n)===null||l===void 0?void 0:l.key;return f&&a[f]&&u.message===a[f].message||(a[f]=u,c=[...c,u]),c},[]),r}function bs(t){const e=[],{actions:n,neededToProceed:r}=t;return n["currentAuthenticator-recover"]&&e.push(he.PASSWORD_RECOVERY),r.some(({name:i})=>i==="select-enroll-profile")&&e.push(he.REGISTRATION),r.some(({name:i})=>i==="redirect-idp")&&e.push(he.SOCIAL_IDP),r.some(({name:i})=>i==="unlock-account")&&e.push(he.ACCOUNT_UNLOCK),e}function Ss(t,e,n){var r;const i=[],o=Object.values(xn.remediators).reduce((s,a)=>(a.remediationName&&(s[a.remediationName]=a),s),{});for(let s of e.neededToProceed){const a=pn(s,{useGenericRemediator:n,remediators:o});if(a){const c=new a(s);i.push(c.getNextStep(t,e.context))}}for(const[s]of Object.entries(e.actions||{})){let a={name:s,action:async c=>t.idx.proceed({actions:[{name:s,params:c}]})};if(s.startsWith("currentAuthenticator")){const[c,u]=ko(s,"-"),l=e.rawIdxState[c].value[u],f=nt(l,["href","method","rel","accepts","produces"]),d=(r=l.value)===null||r===void 0?void 0:r.filter(g=>g.name!=="stateHandle");a=Object.assign(Object.assign(Object.assign({},f),d&&{value:d}),a)}i.push(a)}return i}function _s(t,e,n){const i=(t.neededToProceed||[]).find(s=>s.name===e);return i?i.value.reduce((s,a)=>{const{name:c,value:u}=a;return c==="stateHandle"?s[c]=u:s[c]=n[c],s},{}):(ie(`filterValuesForRemediation: "${e}" did not match any remediations`),n)}function pn(t,e){const{useGenericRemediator:n,remediators:r}=e;if(t)return n?In:r[t.name]}function gn(t,e,n){const r=n.remediators,i=n.useGenericRemediator,{neededToProceed:o,context:s}=t;let a;if(n.step){const u=o.find(({name:l})=>l===n.step);if(u){const l=pn(u,n);return l?new l(u,e,n):void 0}else{ie(`step "${n.step}" did not match any remediations`);return}}const c=[];if(i)c.push(new In(o[0],e,n));else for(let u of o){if(!Object.keys(r).includes(u.name))continue;const f=pn(u,n);if(a=new f(u,e,n),a.canRemediate(s))return a;c.push(a)}return c[0]}function mn(t,e,n){const r=e.getNextStep(t,n.context),i=ws(n),o=Ts(n);return Object.assign(Object.assign(Object.assign({},r),i&&{canSkip:i}),o&&{canResend:o})}function vt(t,e,n={}){const r=It(e),i=ai(e,n);if(r)return{idxResponse:e,terminal:r,messages:i};{const o=gn(e,{},n),s=o&&mn(t,o,e);return Object.assign({idxResponse:e,messages:i},s&&{nextStep:s})}}/*! 377 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 378 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 379 * 380 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 381 * Unless required by applicable law or agreed to in writing, software 382 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 383 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 384 * 385 * See the License for the specific language governing permissions and limitations under the License. 386 */function Os(t,e){return Object.keys(e.actions).find(n=>!!t.resend&&n.includes("-resend"))}function ks(t){return Object.assign(Object.assign({},t),{resend:void 0})}function As(t,e){let n=t.actions||[];return n=n.filter(r=>typeof r=="string"?r!==e:r.name!==e),Object.assign(Object.assign({},t),{actions:n})}async function bt(t,e,n,r){let{neededToProceed:i,interactionCode:o}=e;const{flow:s}=r;if(o)return{idxResponse:e};const a=gn(e,n,r),c=Os(n,e),l=[...r.actions||[],...c&&[c]||[]];if(l)for(let p of l){let b={};typeof p!="string"&&(b=p.params||{},p=p.name);let O=ks(n),S=As(r,p);if(typeof e.actions[p]=="function")return e=await e.actions[p](b),e.requestDidSucceed===!1?vt(t,e,r):p==="cancel"?{idxResponse:e,canceled:!0}:bt(t,e,O,S);if(i.find(({name:P})=>P===p))return e=await e.proceed(p,b),e.requestDidSucceed===!1?vt(t,e,r):bt(t,e,n,S)}const f=It(e);
386if(f)return{idxResponse:e,terminal:f};if(!a){if(r.step)return n=_s(e,r.step,n),e=await e.proceed(r.step,n),e.requestDidSucceed===!1?vt(t,e,r):{idxResponse:e};if(s==="default")return{idxResponse:e};throw new m(` 387 No remediation can match current flow, check policy settings in your org. 388 Remediations: [${i.reduce((p,b)=>p?p+" ,"+b.name:b.name,"")}] 389 `)}if(!a.canRemediate()){const p=mn(t,a,e);return{idxResponse:e,nextStep:p}}const d=a.getName(),g=a.getData();if(e=await e.proceed(d,g),e.requestDidSucceed===!1)return vt(t,e,r);if(n=a.getValuesAfterProceed(),r=Object.assign(Object.assign({},r),{step:void 0}),r.useGenericRemediator&&!e.interactionCode&&!It(e)){const p=gn(e,n,r),b=mn(t,p,e);return{idxResponse:e,nextStep:b}}return bt(t,e,n,r)}/*! 390 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 391 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 392 * 393 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 394 * Unless required by applicable law or agreed to in writing, software 395 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 396 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 397 * 398 * See the License for the specific language governing permissions and limitations under the License. 399 */function Es(t){const e=["flow","remediators","actions","withCredentials","step","useGenericRemediator","exchangeCodeForTokens"],n=Object.assign({},t);return e.forEach(r=>{delete n[r]}),n}function Ps(t,e){var n,r,i,o;let{options:s}=e;s=Object.assign(Object.assign({},t.options.idx),s);let{flow:a,withCredentials:c,remediators:u,actions:l}=s;const f=be.PENDING;if(a=a||((r=(n=t.idx).getFlow)===null||r===void 0?void 0:r.call(n))||"default",a){(o=(i=t.idx).setFlow)===null||o===void 0||o.call(i,a);const d=ys(t,a);c=typeof c<"u"?c:d.withCredentials,u=u||d.remediators,l=l||d.actions}return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},s),{flow:a,withCredentials:c,remediators:u,actions:l}),status:f})}async function Is(t,e){const{options:n}=e,{stateHandle:r,withCredentials:i,version:o,state:s,scopes:a,recoveryToken:c,activationToken:u,maxAge:l,acrValues:f,nonce:d,useGenericRemediator:g}=n;let p,b=ve(t,{state:s,recoveryToken:c,activationToken:u});if(r)p=await fn(t,{withCredentials:i,version:o,stateHandle:r,useGenericRemediator:g});else{let O=b==null?void 0:b.interactionHandle;if(!O){t.transactionManager.clear();const S=await Xr(t,{withCredentials:i,state:s,scopes:a,activationToken:u,recoveryToken:c,maxAge:l,acrValues:f,nonce:d});O=S.interactionHandle,b=S.meta}p=await fn(t,{withCredentials:i,version:o,interactionHandle:O,useGenericRemediator:g})}return Object.assign(Object.assign({},e),{idxResponse:p,meta:b})}async function xs(t,e){let{idxResponse:n,options:r,values:i}=e;const{autoRemediate:o,remediators:s,actions:a,flow:c,step:u,useGenericRemediator:l}=r;if(!(o!==!1&&(s||a||u)))return e;i=Object.assign(Object.assign({},i),{stateHandle:n.rawIdxState.stateHandle});const{idxResponse:d,nextStep:g,canceled:p}=await bt(t,n,i,{remediators:s,actions:a,flow:c,step:u,useGenericRemediator:l});return n=d,Object.assign(Object.assign({},e),{idxResponse:n,nextStep:g,canceled:p})}async function Cs(t,e){let{meta:n,idxResponse:r}=e;const{interactionCode:i}=r,{clientId:o,codeVerifier:s,ignoreSignature:a,redirectUri:c,urls:u,scopes:l}=n;return(await t.token.exchangeCodeForTokens({interactionCode:i,clientId:o,codeVerifier:s,ignoreSignature:a,redirectUri:c,scopes:l},u)).tokens}async function Ms(t,e){let{options:n,idxResponse:r,canceled:i,status:o}=e;const{exchangeCodeForTokens:s}=n;let a=!1,c=!1,u=!0,l,f,d,g,p,b;if(r&&(a=!!(r.requestDidSucceed||r.stepUp),d=bs(r),g=Ss(t,r,n.useGenericRemediator),p=ai(r,n),b=It(r)),b){o=be.TERMINAL;const O=Object.keys(r.actions).length>0,S=!!p.find(P=>P.class==="ERROR");!O&&!S&&r.requestDidSucceed===!0?c=!0:a=!!O,u=!1}else i?(o=be.CANCELED,c=!0):r!=null&&r.interactionCode&&(l=r.interactionCode,s===!1?(o=be.SUCCESS,c=!1):(f=await Cs(t,e),o=be.SUCCESS,c=!0));return Object.assign(Object.assign({},e),{status:o,interactionCode:l,tokens:f,shouldSaveResponse:a,shouldClearTransaction:c,clearSharedStorage:u,enabledFeatures:d,availableSteps:g,messages:p,terminal:b})}async function xe(t,e={}){var n;let r={options:e,values:Es(e)};r=Ps(t,r),r=await Is(t,r),r=await xs(t,r),r=await Ms(t,r);const{idxResponse:i,meta:o,shouldSaveResponse:s,shouldClearTransaction:a,clearSharedStorage:c,status:u,enabledFeatures:l,availableSteps:f,tokens:d,nextStep:g,messages:p,error:b,interactionCode:O}=r;if(a)t.transactionManager.clear({clearSharedStorage:c});else if(kn(t,Object.assign({},o)),s){const{rawIdxState:H,requestDidSucceed:X}=i;t.transactionManager.saveIdxResponse({rawIdxResponse:H,requestDidSucceed:X,stateHandle:(n=i.context)===null||n===void 0?void 0:n.stateHandle,interactionHandle:o==null?void 0:o.interactionHandle})}const{actions:S,context:I,neededToProceed:P,proceed:N,rawIdxState:j,requestDidSucceed:F,stepUp:q}=i||{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({status:u},o&&{meta:o}),l&&{enabledFeatures:l}),f&&{availableSteps:f}),d&&{tokens:d}),g&&{nextStep:g}),p&&p.length&&{messages:p}),b&&{error:b}),q&&{stepUp:q}),{interactionCode:O,actions:S,context:I,neededToProceed:P,proceed:N,rawIdxState:j,requestDidSucceed:F})}/*! 400 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 401 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 402 * 403 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 404 * Unless required by applicable law or agreed to in writing, softw
404are 405 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 406 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 407 * 408 * See the License for the specific language governing permissions and limitations under the License. 409 */async function Rs(t,e={}){return e.password&&!e.authenticator&&(e.authenticator=se.OKTA_PASSWORD),xe(t,Object.assign(Object.assign({},e),{flow:"authenticate"}))}/*! 410 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 411 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 412 * 413 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 414 * Unless required by applicable law or agreed to in writing, software 415 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 416 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 417 * 418 * See the License for the specific language governing permissions and limitations under the License. 419 */class He{constructor(e){this.meta=e}}/*! 420 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 421 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 422 * 423 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 424 * Unless required by applicable law or agreed to in writing, software 425 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 426 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 427 * 428 * See the License for the specific language governing permissions and limitations under the License. 429 */class ci extends He{canVerify(e){return!!(e.credentials||e.verificationCode||e.otp)}mapCredentials(e){const{credentials:n,verificationCode:r,otp:i}=e;if(!(!n&&!r&&!i))return n||{passcode:r||i}}getInputs(e){var n;return Object.assign(Object.assign({},(n=e.form)===null||n===void 0?void 0:n.value[0]),{name:"verificationCode",type:"string",required:e.required})}}/*! 430 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 431 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 432 * 433 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 434 * Unless required by applicable law or agreed to in writing, software 435 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 436 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 437 * 438 * See the License for the specific language governing permissions and limitations under the License. 439 */class js extends ci{mapCredentials(e){const{verificationCode:n}=e;if(n)return{totp:n}}}/*! 440 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 441 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 442 * 443 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 444 * Unless required by applicable law or agreed to in writing, software 445 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 446 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 447 * 448 * See the License for the specific language governing permissions and limitations under the License. 449 */class ui extends He{canVerify(e){return!!(e.credentials||e.password||e.passcode)}mapCredentials(e){const{credentials:n,password:r,passcode:i,revokeSessions:o}=e;if(!(!n&&!r&&!i))return n||{passcode:i||r,revokeSessions:o}}getInputs(e){var n,r;const i=[Object.assign(Object.assign({},(n=e.form)===null||n===void 0?void 0:n.value[0]),{name:"password",type:"string",required:e.required})];return((r=e.form)===null||r===void 0?void 0:r.value.find(s=>s.name==="revokeSessions"))&&i.push({name:"revokeSessions",type:"boolean",label:"Sign me out of all other devices",required:!1}),i}}/*! 450 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 451 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 452 * 453 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 454 * Unless required by applicable law or agreed to in writing, softw
454are 455 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 456 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 457 * 458 * See the License for the specific language governing permissions and limitations under the License. 459 */class Ds extends He{canVerify(e){const{credentials:n}=e;if(n&&n.questionKey&&n.answer)return!0;const{questionKey:r,question:i,answer:o}=e;return!!(r&&o)||!!(i&&o)}mapCredentials(e){const{questionKey:n,question:r,answer:i}=e;if(!(!i||!n&&!r))return{questionKey:r?"custom":n,question:r,answer:i}}getInputs(){return[{name:"questionKey",type:"string",required:!0},{name:"question",type:"string",label:"Create a security question"},{name:"answer",type:"string",label:"Answer",required:!0}]}}/*! 460 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 461 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 462 * 463 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 464 * Unless required by applicable law or agreed to in writing, software 465 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 466 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 467 * 468 * See the License for the specific language governing permissions and limitations under the License. 469 */class Us extends He{canVerify(e){const{credentials:n}=e;if(n&&n.answer)return!0;const{answer:r}=e;return!!r}mapCredentials(e){const{answer:n}=e;if(n)return{questionKey:this.meta.contextualData.enrolledQuestion.questionKey,answer:n}}getInputs(){return[{name:"answer",type:"string",label:"Answer",required:!0}]}}/*! 470 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 471 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 472 * 473 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 474 * Unless required by applicable law or agreed to in writing, software 475 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 476 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 477 * 478 * See the License for the specific language governing permissions and limitations under the License. 479 */class Ls extends He{canVerify(e){const{credentials:n}=e,r=n||e,{clientData:i,attestation:o}=r;return!!(i&&o)}mapCredentials(e){const{credentials:n,clientData:r,attestation:i}=e;if(!(!n&&!r&&!i))return n||{clientData:r,attestation:i}}getInputs(){return[{name:"clientData",type:"string",required:!0,visible:!1,label:"Client Data"},{name:"attestation",type:"string",required:!0,visible:!1,label:"Attestation"}]}}/*! 480 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 481 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 482 * 483 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 484 * Unless required by applicable law or agreed to in writing, software 485 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 486 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 487 * 488 * See the License for the specific language governing permissions and limitations under the License. 489 */class Fs extends He{canVerify(e){const{credentials:n}=e,r=n||e,{clientData:i,authenticatorData:o,signatureData:s}=r;return!!(i&&o&&s)}mapCredentials(e){const{credentials:n,authenticatorData:r,clientData:i,signatureData:o}=e;if(!(!n&&!r&&!i&&!o))return n||{authenticatorData:r,clientData:i,signatureData:o}}getInputs(){return[{name:"authenticatorData",type:"string",label:"Authenticator Data",required:!0,visible:!1},{name:"clientData",type:"string",label:"Client Data",required:!0,visible:!1},{name:"signatureData",type:"string",label:"Signature Data",required:!0,visible:!1}]}}/*! 490 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 491 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 492 * 493 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 494 * Unless required by applicable law or agreed to in writing, softw
494are 495 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 496 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 497 * 498 * See the License for the specific language governing permissions and limitations under the License. 499 */function Ns(t){var e,n;const r=t.relatesTo,i=(r==null?void 0:r.value)||{};switch(i.key){case se.OKTA_PASSWORD:return new ui(i);case se.SECURITY_QUESTION:return!((e=i.contextualData)===null||e===void 0)&&e.enrolledQuestion?new Us(i):new Ds(i);case se.OKTA_VERIFY:return new js(i);case se.WEBAUTHN:return!((n=i.contextualData)===null||n===void 0)&&n.challengeData?new Fs(i):new Ls(i);default:return new ci(i)}}/*! 500 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 501 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 502 * 503 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 504 * Unless required by applicable law or agreed to in writing, software 505 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 506 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 507 * 508 * See the License for the specific language governing permissions and limitations under the License. 509 */class Cn extends J{constructor(e,n={}){super(e,n),this.authenticator=Ns(e)}getNextStep(e,n){var r;const i=super.getNextStep(e,n),o=(r=n==null?void 0:n.authenticatorEnrollments)===null||r===void 0?void 0:r.value;return Object.assign(Object.assign({},i),{authenticatorEnrollments:o})}canRemediate(){return this.authenticator.canVerify(this.values)}mapCredentials(){return this.authenticator.mapCredentials(this.values)}getInputCredentials(e){return this.authenticator.getInputs(e)}getValuesAfterProceed(){return this.values=super.getValuesAfterProceed(),Object.keys(this.values).filter(n=>n!=="credentials").reduce((n,r)=>Object.assign(Object.assign({},n),{[r]:this.values[r]}),{})}}/*! 510 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 511 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 512 * 513 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 514 * Unless required by applicable law or agreed to in writing, software 515 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 516 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 517 * 518 * See the License for the specific language governing permissions and limitations under the License. 519 */class Dt extends Cn{}Dt.remediationName="enroll-authenticator";/*! 520 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 521 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 522 * 523 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 524 * Unless required by applicable law or agreed to in writing, software 525 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 526 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 527 * 528 * See the License for the specific language governing permissions and limitations under the License. 529 */class Ve extends J{canRemediate(){return!!this.values.startPolling||this.options.step==="enroll-poll"}getNextStep(e,n){const r=super.getNextStep(e,n);let i=this.getAuthenticator();return!i&&(n!=null&&n.currentAuthenticator)&&(i=n.currentAuthenticator.value),Object.assign(Object.assign({},r),{authenticator:i,poll:{required:!0,refresh:this.remediation.refresh}})}getValuesAfterProceed(){return Object.keys(this.values).filter(n=>n!=="startPolling").reduce((n,r)=>Object.assign(Object.assign({},n),{[r]:this.values[r]}),{})}}Ve.remediationName="enroll-poll";/*! 530 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 531 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 532 * 533 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 534 * Unless required by applicable law or agreed to in writing, softw
534are 535 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 536 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 537 * 538 * See the License for the specific language governing permissions and limitations under the License. 539 */class Ut extends J{canRemediate(){if(this.values.channel)return!0;if(this.values.authenticator){const{id:e,channel:n}=this.values.authenticator;if(e&&n)return!0}return!1}getNextStep(e,n){const r=super.getNextStep(e,n),i=n.currentAuthenticator.value;return Object.assign(Object.assign({},r),{authenticator:i})}getData(){var e;return{authenticator:{id:this.remediation.value[0].value.form.value[0].value,channel:((e=this.values.authenticator)===null||e===void 0?void 0:e.channel)||this.values.channel},stateHandle:this.values.stateHandle}}getValuesAfterProceed(){this.values=super.getValuesAfterProceed(),delete this.values.authenticators;const e=this.values.channel?"channel":"authenticator";return Object.keys(this.values).filter(r=>r!==e).reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:this.values[i]}),{})}}Ut.remediationName="select-enrollment-channel";/*! 540 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 541 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 542 * 543 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 544 * Unless required by applicable law or agreed to in writing, software 545 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 546 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 547 * 548 * See the License for the specific language governing permissions and limitations under the License. 549 */class Lt extends J{getInputEmail(){return[{name:"email",type:"string",required:!0,label:"Email"}]}getInputPhoneNumber(){return[{name:"phoneNumber",type:"string",required:!0,label:"Phone Number"}]}canRemediate(){return!!(this.values.email||this.values.phoneNumber)}getNextStep(e,n){const r=super.getNextStep(e,n),i=n.currentAuthenticator.value;return Object.assign(Object.assign({},r),{authenticator:i})}getData(){return{stateHandle:this.values.stateHandle,email:this.values.email,phoneNumber:this.values.phoneNumber}}getValuesAfterProceed(){return Object.keys(this.values).filter(n=>!["email","phoneNumber"].includes(n)).reduce((n,r)=>Object.assign(Object.assign({},n),{[r]:this.values[r]}),{})}}Lt.remediationName="enrollment-channel-data";/*! 550 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 551 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 552 * 553 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 554 * Unless required by applicable law or agreed to in writing, software 555 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 556 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 557 * 558 * See the License for the specific language governing permissions and limitations under the License. 559 */class rt extends Cn{}rt.remediationName="challenge-authenticator";/*! 560 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 561 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 562 * 563 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 564 * Unless required by applicable law or agreed to in writing, software 565 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 566 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 567 * 568 * See the License for the specific language governing permissions and limitations under the License. 569 */class Ft extends Ve{canRemediate(){return!!this.values.startPolling||this.options.step==="challenge-poll"}}Ft.remediationName="challenge-poll";/*! 570 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 571 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 572 * 573 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 574 * Unless required by applicable law or agreed to in writing, softw
574are 575 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 576 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 577 * 578 * See the License for the specific language governing permissions and limitations under the License. 579 */class Mn extends Cn{}Mn.remediationName="reset-authenticator";/*! 580 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 581 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 582 * 583 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 584 * Unless required by applicable law or agreed to in writing, software 585 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 586 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 587 * 588 * See the License for the specific language governing permissions and limitations under the License. 589 */class Rn extends J{constructor(e,n={},r={}){super(e,n,r),this.authenticator=null,this.getCredentialsFromRemediation()&&(this.authenticator=this.authenticator=new ui({}))}canRemediate(){if(this.authenticator&&!this.authenticator.canVerify(this.values))return!1;const e=this.getData().userProfile;return e?this.remediation.value.find(({name:r})=>r==="userProfile").form.value.reduce((r,i)=>(i.required&&(r=r&&!!e[i.name]),r),!0):!1}getCredentialsFromRemediation(){return this.remediation.value.find(({name:e})=>e==="credentials")}mapUserProfile({form:{value:e}}){const r=e.map(({name:i})=>i).reduce((i,o)=>this.values[o]?Object.assign(Object.assign({},i),{[o]:this.values[o]}):i,{});if(Object.keys(r).length!==0)return r}mapCredentials(){const e=this.authenticator&&this.authenticator.mapCredentials(this.values);if(e)return e}getInputUserProfile(e){return[...e.form.value]}getInputCredentials(e){return[...e.form.value]}getErrorMessages(e){return e.value[0].form.value.reduce((n,r)=>(r.messages&&n.push(r.messages.value[0].message),n),[])}}Rn.remediationName="enroll-profile";/*! 590 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 591 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 592 * 593 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 594 * Unless required by applicable law or agreed to in writing, software 595 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 596 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 597 * 598 * See the License for the specific language governing permissions and limitations under the License. 599 */class Le extends J{constructor(){super(...arguments),this.map={identifier:["username"]}}canRemediate(){const{identifier:e}=this.getData();return!!e}mapCredentials(){const{credentials:e,password:n}=this.values;if(!(!e&&!n))return e||{passcode:n}}getInputCredentials(e){return Object.assign(Object.assign({},e.form.value[0]),{name:"password",required:e.required})}}Le.remediationName="identify";/*! 600 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 601 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 602 * 603 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 604 * Unless required by applicable law or agreed to in writing, software 605 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 606 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 607 * 608 * See the License for the specific language governing permissions and limitations under the License. 609 */class it extends J{mapCredentials(){const{newPassword:e}=this.values;if(e)return{passcode:e}}getInputCredentials(e){const r=this.getAuthenticator().type==="password"?"newPassword":"verificationCode";return Object.assign(Object.assign({},e.form.value[0]),{name:r})}}it.remediationName="reenroll-authenticator";/*! 610 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 611 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 612 * 613 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 614 * Unless required by applicable law or agreed to in writing, softw
614are 615 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 616 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 617 * 618 * See the License for the specific language governing permissions and limitations under the License. 619 */class ot extends it{}ot.remediationName="reenroll-authenticator-warning";/*! 620 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 621 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 622 * 623 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 624 * Unless required by applicable law or agreed to in writing, software 625 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 626 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 627 * 628 * See the License for the specific language governing permissions and limitations under the License. 629 */class jn extends J{canRemediate(){return!1}getNextStep(){const{name:e,type:n,idp:r,href:i}=this.remediation;return{name:e,type:n,idp:r,href:i}}}jn.remediationName="redirect-idp";/*! 630 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 631 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 632 * 633 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 634 * Unless required by applicable law or agreed to in writing, software 635 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 636 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 637 * 638 * See the License for the specific language governing permissions and limitations under the License. 639 */class Dn extends J{findMatchedOption(e,n){let r;for(let i of e)if(r=n.find(({relatesTo:o})=>o.key&&o.key===i.key),r)break;return r}canRemediate(e){var n,r;const{authenticators:i,authenticator:o}=this.values,s=jt(this.remediation),{options:a}=s;if(!i||!i.length)return!1;if(Pt(o)&&o.id)return!0;const c=this.findMatchedOption(i,a);if(c){const u=(e==null?void 0:e.currentAuthenticator)&&(e==null?void 0:e.currentAuthenticator.value.id)===((n=c.relatesTo)===null||n===void 0?void 0:n.id),l=(e==null?void 0:e.currentAuthenticatorEnrollment)&&(e==null?void 0:e.currentAuthenticatorEnrollment.value.id)===((r=c.relatesTo)===null||r===void 0?void 0:r.id);return!u&&!l}return!1}mapAuthenticator(e){const{authenticators:n,authenticator:r}=this.values;if(Pt(r)&&r.id)return this.selectedAuthenticator=r,r;const{options:i}=e,o=ms(n,i);return this.selectedAuthenticator=o.relatesTo,this.selectedOption=o,{id:o==null?void 0:o.value.form.value.find(({name:s})=>s==="id").value}}getInputAuthenticator(e){return{name:"authenticator",type:"string",options:e.options.map(({label:r,relatesTo:i})=>({label:r,value:i.key}))}}getValuesAfterProceed(){this.values=super.getValuesAfterProceed();const e=this.values.authenticators.filter(n=>Me(n,this.selectedAuthenticator)!==!0);return Object.assign(Object.assign({},this.values),{authenticators:e})}}/*! 640 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 641 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 642 * 643 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 644 * Unless required by applicable law or agreed to in writing, software 645 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 646 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 647 * 648 * See the License for the specific language governing permissions and limitations under the License. 649 */class st extends Dn{constructor(e,n={},r={}){var i;super(e,n,r);const o=this.options.flow==="recoverPassword";((i=jt(e).options)===null||i===void 0?void 0:i.some(({relatesTo:a})=>(a==null?void 0:a.key)===se.OKTA_PASSWORD))&&(o||this.values.password)&&(this.values.authenticators=[...this.values.authenticators||[],{key:se.OKTA_PASSWORD}])}}st.remediationName="select-authenticator-authenticate";/*! 650 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 651 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 652 * 653 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 654 * Unless required by applicable law or agreed to in writing, softw
654are 655 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 656 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 657 * 658 * See the License for the specific language governing permissions and limitations under the License. 659 */class at extends Dn{}at.remediationName="select-authenticator-enroll";/*! 660 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 661 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 662 * 663 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 664 * Unless required by applicable law or agreed to in writing, software 665 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 666 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 667 * 668 * See the License for the specific language governing permissions and limitations under the License. 669 */class Un extends Dn{constructor(){super(...arguments),this.map={identifier:["username"]}}canRemediate(){return!!this.getData("identifier")&&super.canRemediate()}mapAuthenticator(e){var n,r,i;const o=super.mapAuthenticator(e),s=(n=this.selectedOption)===null||n===void 0?void 0:n.value.form.value.find(({name:c})=>c==="methodType"),a=this.values.methodType||(s==null?void 0:s.value)||((i=(r=s==null?void 0:s.options)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.value);return a?Object.assign(Object.assign({},o),{methodType:a}):o}getInputUsername(){return{name:"username",type:"string"}}}Un.remediationName="select-authenticator-unlock-account";/*! 670 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 671 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 672 * 673 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 674 * Unless required by applicable law or agreed to in writing, software 675 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 676 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 677 * 678 * See the License for the specific language governing permissions and limitations under the License. 679 */class Ln extends J{canRemediate(){return!0}}Ln.remediationName="select-enroll-profile";/*! 680 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 681 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 682 * 683 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 684 * Unless required by applicable law or agreed to in writing, software 685 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 686 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 687 * 688 * See the License for the specific language governing permissions and limitations under the License. 689 */class li extends J{constructor(e,n={}){super(e,n),this.authenticator=this.getAuthenticator(),this.formatAuthenticatorData()}formatAuthenticatorData(){if(this.getAuthenticatorData())this.values.authenticatorsData=this.values.authenticatorsData.map(n=>Me(this.authenticator,n)?this.mapAuthenticatorDataFromValues(n):n);else{const n=this.mapAuthenticatorDataFromValues();n&&this.values.authenticatorsData.push(n)}}getAuthenticatorData(){return this.values.authenticatorsData.find(e=>Me(this.authenticator,e))}canRemediate(){return this.values.authenticatorsData.some(e=>Me(this.authenticator,e))}mapAuthenticatorDataFromValues(e){let{methodType:n,authenticator:r}=this.values;!n&&Pt(r)&&(n=r==null?void 0:r.methodType);const{id:i,enrollmentId:o}=this.authenticator,s=Object.assign(Object.assign({id:i,enrollmentId:o},e&&e),n&&{methodType:n});return s.methodType?s:null}getAuthenticatorFromRemediation(){return this.remediation.value.find(({name:n})=>n==="authenticator")}getValuesAfterProceed(){this.values=super.getValuesAfterProceed();const e=this.values.authenticatorsData.filter(n=>Me(this.authenticator,n)!==!0);return Object.assign(Object.assign({},this.values),{authenticatorsData:e})}}/*! 690 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 691 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 692 * 693 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 694 * Unless required by applicable law or agreed to in writing, softw
694are 695 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 696 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 697 * 698 * See the License for the specific language governing permissions and limitations under the License. 699 */class ct extends li{mapAuthenticator(){return this.getAuthenticatorData()}getInputAuthenticator(){const e=this.getAuthenticatorFromRemediation(),n=e.form.value.find(({name:i})=>i==="methodType");return n&&n.options?{name:"methodType",type:"string",required:!0,options:n.options}:[...e.form.value]}getValuesAfterProceed(){return this.values=super.getValuesAfterProceed(),Object.keys(this.values).filter(n=>n!=="authenticator").reduce((n,r)=>Object.assign(Object.assign({},n),{[r]:this.values[r]}),{})}}ct.remediationName="authenticator-verification-data";/*! 700 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 701 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 702 * 703 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 704 * Unless required by applicable law or agreed to in writing, software 705 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 706 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 707 * 708 * See the License for the specific language governing permissions and limitations under the License. 709 */class ut extends li{mapAuthenticator(){const e=this.getAuthenticatorData();return{id:jt(this.remediation).form.value.find(({name:r})=>r==="id").value,methodType:e.methodType,phoneNumber:e.phoneNumber}}getInputAuthenticator(e){return[{name:"methodType",type:"string"},{name:"phoneNumber",label:"Phone Number",type:"string"}].map(n=>{const r=e.form.value.find(i=>i.name===n.name);return Object.assign(Object.assign({},r),n)})}mapAuthenticatorDataFromValues(e){e=super.mapAuthenticatorDataFromValues(e);const{phoneNumber:n}=this.values;if(!(!e&&!n))return Object.assign(Object.assign({},e&&e),n&&{phoneNumber:n})}}ut.remediationName="authenticator-enrollment-data";/*! 710 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 711 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 712 * 713 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 714 * Unless required by applicable law or agreed to in writing, software 715 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 716 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 717 * 718 * See the License for the specific language governing permissions and limitations under the License. 719 */class Nt extends J{canRemediate(){return!!this.values.skip||this.options.step==="skip"}}Nt.remediationName="skip";/*! 720 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 721 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 722 * 723 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 724 * Unless required by applicable law or agreed to in writing, software 725 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 726 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 727 * 728 * See the License for the specific language governing permissions and limitations under the License. 729 */const dr={identify:Le,"select-authenticator-authenticate":st,"select-authenticator-enroll":at,"authenticator-enrollment-data":ut,"authenticator-verification-data":ct,"enroll-authenticator":Dt,"challenge-authenticator":rt,"challenge-poll":Ft,"reenroll-authenticator":it,"reenroll-authenticator-warning":
729ot,"enroll-poll":Ve,"select-enrollment-channel":Ut,"enrollment-channel-data":Lt,"redirect-idp":jn,skip:Nt};/*! 730 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 731 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 732 * 733 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 734 * Unless required by applicable law or agreed to in writing, software 735 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 736 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 737 * 738 * See the License for the specific language governing permissions and limitations under the License. 739 */const Hs={identify:Le,"identify-recovery":Le,"select-authenticator-authenticate":st,"select-authenticator-enroll":at,"challenge-authenticator":rt,"authenticator-verification-data":ct,"authenticator-enrollment-data":ut,"reset-authenticator":Mn,"reenroll-authenticator":it,"reenroll-authenticator-warning":
739ot,"enroll-poll":Ve};/*! 740 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 741 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 742 * 743 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 744 * Unless required by applicable law or agreed to in writing, software 745 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 746 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 747 * 748 * See the License for the specific language governing permissions and limitations under the License. 749 */const Vs={"select-enroll-profile":Ln,"enroll-profile":Rn,"authenticator-enrollment-data":ut,"select-authenticator-enroll":at,"enroll-poll":Ve,"select-enrollment-channel":Ut,"enrollment-channel-data":Lt,"enroll-authenticator":Dt,skip:Nt};/*! 750 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 751 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 752 * 753 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 754 * Unless required by applicable law or agreed to in writing, software 755 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 756 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 757 * 758 * See the License for the specific language governing permissions and limitations under the License. 759 */const Bs={identify:Le,"select-authenticator-unlock-account":Un,"select-authenticator-authenticate":st,"challenge-authenticator":rt,"challenge-poll":Ft,"authenticator-verification-data":ct,"reenroll-authenticator-warning":
759ot};/*! 760 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 761 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 762 * 763 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 764 * Unless required by applicable law or agreed to in writing, software 765 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 766 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 767 * 768 * See the License for the specific language governing permissions and limitations under the License. 769 */function Fn(t,e="default"){let n,r,i=!0;switch(e){case"register":case"signup":case"enrollProfile":n=Vs,i=!1;break;case"recoverPassword":case"resetPassword":n=Hs,r=["currentAuthenticator-recover","currentAuthenticatorEnrollment-recover"],i=!1;break;case"unlockAccount":n=Bs,i=!1,r=["unlock-account"];break;case"authenticate":case"login":case"signin":n=dr;break;default:n=dr;break}return{flow:e,remediators:n,actions:r,withCredentials:i}}/*! 770 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 771 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 772 * 773 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 774 * Unless required by applicable law or agreed to in writing, software 775 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 776 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 777 * 778 * See the License for the specific language governing permissions and limitations under the License. 779 */async function $s(t,e){const n=t.transactionManager.load(),r=Fn(t,n.flow);return xe(t,Object.assign(Object.assign(Object.assign({},e),r),{actions:["cancel"]}))}/*! 780 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 781 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 782 * 783 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 784 * Unless required by applicable law or agreed to in writing, software 785 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 786 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 787 * 788 * See the License for the specific language governing permissions and limitations under the License. 789 */function di(t){var e=/\+/g,n=/([^&=]+)=?([^&]*)/g,r=t||"";r.charAt(0)==="#"&&r.charAt(1)==="/"&&(r=r.substring(2)),(r.charAt(0)==="#"||r.charAt(0)==="?")&&(r=r.substring(1));for(var i={},o;o=n.exec(r),!!o;){var s=o[1],a=o[2];s==="id_token"||s==="access_token"||s==="code"?i[s]=a:i[s]=decodeURIComponent(a.replace(e," "))}return i}/*! 790 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 791 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 792 * 793 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 794 * Unless required by applicable law or agreed to in writing, software 795 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 796 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 797 * 798 * See the License for the specific language governing permissions and limitations under the License. 799 */class qs extends Ne{constructor(e,n){super(`Enter the OTP code in the originating client: ${n}`),this.name="EmailVerifyCallbackError",this.state=e,this.otp=n}}function Ws(t){return t.name==="EmailVerifyCallbackError"}function fi(t){return/(otp=)/i.test(t)&&/(state=)/i.test(t)}function hi(t){return di(t)}async function Ks(t,e){if(fi(e)){const{state:n,otp:r}=hi(e);if(t.idx.canProceed({state:n}))return await t.idx.proceed({state:n,otp:r});throw new qs(n,r)}}/*! 800 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 801 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 802 * 803 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 804 * Unless required by applicable law or agreed to in writing, softw
804are 805 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 806 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 807 * 808 * See the License for the specific language governing permissions and limitations under the License. 809 */function pi(t,e={}){return!!(ve(t,e)||e.stateHandle)}async function gi(t,e={}){if(!pi(t,e))throw new m("Unable to proceed: saved transaction could not be loaded");let{flow:n,state:r}=e;if(!n){const i=ve(t,{state:r});n=i==null?void 0:i.flow}return xe(t,Object.assign(Object.assign({},e),{flow:n}))}/*! 810 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 811 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 812 * 813 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 814 * Unless required by applicable law or agreed to in writing, software 815 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 816 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 817 * 818 * See the License for the specific language governing permissions and limitations under the License. 819 */async function mi(t,e={}){var n;let r=await gi(t,{startPolling:!0});const i=ve(t);let o=(n=i==null?void 0:i.remediations)===null||n===void 0?void 0:n.find(s=>s.includes("poll"));return o!=null&&o.length||ie("No polling remediations available at the current IDX flow stage"),Number.isInteger(e.refresh)?new Promise(function(s,a){setTimeout(async function(){var c,u;try{const l=(u=(c=r.nextStep)===null||c===void 0?void 0:c.poll)===null||u===void 0?void 0:u.refresh;s(l?mi(t,{refresh:l}):r)}catch(l){a(l)}},e.refresh)}):r}/*! 820 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 821 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 822 * 823 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 824 * Unless required by applicable law or agreed to in writing, software 825 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 826 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 827 * 828 * See the License for the specific language governing permissions and limitations under the License. 829 */async function Nn(t,e={}){return t.transactionManager.clear(),xe(t,Object.assign({exchangeCodeForTokens:!1},e))}/*! 830 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 831 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 832 * 833 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 834 * Unless required by applicable law or agreed to in writing, software 835 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 836 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 837 * 838 * See the License for the specific language governing permissions and limitations under the License. 839 */async function Gs(t,e={}){if(!Vr(t)){const{enabledFeatures:n}=await Nn(t,Object.assign(Object.assign({},e),{flow:"register",autoRemediate:!1}));if(!e.activationToken&&n&&!n.includes(he.REGISTRATION))throw new m("Registration is not supported based on your current org configuration.")}return xe(t,Object.assign(Object.assign({},e),{flow:"register"}))}/*! 840 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 841 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 842 * 843 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 844 * Unless required by applicable law or agreed to in writing, software 845 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 846 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 847 * 848 * See the License for the specific language governing permissions and limitations under the License. 849 */async function zs(t,e={}){const n=Fn(t,"recoverPassword");return xe(t,Object.assign(Object.assign({},e),n))}/*! 850 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 851 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 852 * 853 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 854 * Unless required by applicable law or agreed to in writing, softw
854are 855 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 856 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 857 * 858 * See the License for the specific language governing permissions and limitations under the License. 859 */async function Js(t,e){const n=t.transactionManager.load();if(!n)throw new m("No transaction data was found in storage");const{codeVerifier:r,state:i}=n,{searchParams:o}=new URL(e),s=o.get("state"),a=o.get("interaction_code"),c=o.get("error");if(c)throw new De(c,o.get("error_description"));if(s!==i)throw new m("State in redirect uri does not match with transaction state");if(!a)throw new m("Unable to parse interaction_code from the url");const{tokens:u}=await t.token.exchangeCodeForTokens({interactionCode:a,codeVerifier:r});t.tokenManager.setTokens(u)}/*! 860 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 861 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 862 * 863 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 864 * Unless required by applicable law or agreed to in writing, software 865 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 866 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 867 * 868 * See the License for the specific language governing permissions and limitations under the License. 869 */async function Qs(t,e={}){if(e.flow="unlockAccount",!Vr(t)){const{enabledFeatures:n}=await Nn(t,Object.assign(Object.assign({},e),{autoRemediate:!1}));if(n&&!n.includes(he.ACCOUNT_UNLOCK))throw new m("Self Service Account Unlock is not supported based on your current org configuration.")}return xe(t,Object.assign({},e))}/*! 870 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 871 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 872 * 873 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 874 * Unless required by applicable law or agreed to in writing, software 875 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 876 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 877 * 878 * See the License for the specific language governing permissions and limitations under the License. 879 */function vi(t){return t.name!=="OAuthError"?!1:t.errorCode==="interaction_required"}function Ys(t){return si(t)&&t.errorCode==="invalid_grant"&&t.errorSummary==="The refresh token is invalid or expired."}/*! 880 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 881 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 882 * 883 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 884 * Unless required by applicable law or agreed to in writing, software 885 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 886 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 887 * 888 * See the License for the specific language governing permissions and limitations under the License. 889 */function Xs(t){return/((id|access)_token=)/i.test(t)}function Zs(t){return/(code=)/i.test(t)}function ea(t){return/(interaction_code=)/i.test(t)}function ta(t){return/(error=)/i.test(t)||/(error_description)/i.test(t)}function na(t,e){var n=e.options;return!t||!n.redirectUri?!1:t.indexOf(n.redirectUri)===0}function yi(t){return t.pkce||t.responseType==="code"||t.responseMode==="query"}function ra(t,e){let n=!1;return Array.isArray(e.responseType)&&e.responseType.length?n=e.responseType.indexOf(t)>=0:n=e.responseType===t,n}function wi(t){var e=yi(t),n=e&&t.responseMode!=="fragment";return n?window.location.search:window.location.hash}function Hn(t){if(!na(window.location.href,t))return!1;var e=yi(t.options),n=wi(t.options);if(ta(n))return!0;if(e){var r=Zs(n)||ea(n);return r}return Xs(window.location.hash)}function ia(t,e){if(!e){if(!Hn(t))return!1;e=wi(t.options)}return/(error=interaction_required)/i.test(e)}/*! 890 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 891 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 892 * 893 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 894 * Unless required by applicable law or agreed to in writing, softw
894are 895 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 896 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 897 * 898 * See the License for the specific language governing permissions and limitations under the License. 899 */const oa=Object.freeze(Object.defineProperty({__proto__:null,AuthenticatorEnrollmentData:ut,AuthenticatorVerificationData:ct,ChallengeAuthenticator:rt,ChallengePoll:Ft,EnrollAuthenticator:Dt,EnrollPoll:Ve,EnrollProfile:Rn,EnrollmentChannelData:Lt,GenericRemediator:In,Identify:Le,ReEnrollAuthenticator:it,ReEnrollAuthenticatorWarning:ot,RedirectIdp:jn,Remediator:J,ResetAuthenticator:Mn,SelectAuthenticatorAuthenticate:st,SelectAuthenticatorEnroll:at,SelectAuthenticatorUnlockAccount:Un,SelectEnrollProfile:Ln,SelectEnrollmentChannel:Ut,Skip:Nt},Symbol.toStringTag,{value:"Module"}));/*! 900 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 901 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 902 * 903 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 904 * Unless required by applicable law or agreed to in writing, software 905 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 906 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 907 * 908 * See the License for the specific language governing permissions and limitations under the License. 909 */function sa(t){vs({remediators:oa,getFlowSpecification:Fn});const e=Nn.bind(null,t);return{interact:Xr.bind(null,t),introspect:fn.bind(null,t),makeIdxResponse:ii.bind(null,t),authenticate:Rs.bind(null,t),register:Gs.bind(null,t),start:e,startTransaction:e,poll:mi.bind(null,t),proceed:gi.bind(null,t),cancel:$s.bind(null,t),recoverPassword:zs.bind(null,t),handleInteractionCodeRedirect:Js.bind(null,t),isInteractionRequired:ia.bind(null,t),isInteractionRequiredError:vi,handleEmailVerifyCallback:Ks.bind(null,t),isEmailVerifyCallback:fi,parseEmailVerifyCallback:hi,isEmailVerifyCallbackError:Ws,getSavedTransactionMeta:ve.bind(null,t),createTransactionMeta:On.bind(null,t),getTransactionMeta:jo.bind(null,t),saveTransactionMeta:kn.bind(null,t),clearTransactionMeta:Do.bind(null,t),isTransactionMetaValid:Br,setFlow:r=>{t.options.flow=r},getFlow:()=>t.options.flow,canProceed:pi.bind(null,t),unlockAccount:Qs.bind(null,t)}}/*! 910 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 911 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 912 * 913 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 914 * Unless required by applicable law or agreed to in writing, software 915 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 916 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 917 * 918 * See the License for the specific language governing permissions and limitations under the License. 919 */const Vn=function(t){return atob(t)},ge=function(t){return btoa(t)},z=typeof crypto>"u"?null:crypto;/*! 920 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 921 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 922 * 923 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 924 * Unless required by applicable law or agreed to in writing, software 925 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 926 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 927 * 928 * See the License for the specific language governing permissions and limitations under the License. 929 */const aa=/windows phone|iemobile|wpdesktop/i;function $(){return typeof document<"u"&&typeof window<"u"}function Ht(){if(!$())return!1;const t=document.documentMode;return!!t&&t<=11}function Ti(){return navigator.userAgent}function bi(){const t=Ti();return t&&!aa.test(t)}function ca(){if(!$())return!1;const t=document.documentMode;var e=t&&t<10;return typeof window.postMessage<"u"&&!e}function Si(){return typeof z<"u"&&z!==null&&typeof z.subtle<"u"&&typeof Uint8Array<"u"}function _i(){return Si()}function Bn(){return typeof TextEncoder<"u"}function ua(){return _i()&&Bn()}function Oi(){return $()?window.location.protocol==="https:":!1}function ki(){return $()&&window.location.hostname==="localhost"}function la(){return!Ht()&&typeof window.indexedDB<"u"&&Bn()&&Si()}const Qt=Object.freeze(Object.defineProperty({__proto__:null,getUserAgent:Ti,hasTextEncoder:Bn,isBrowser:$,isDPoPSupported:la,isFingerprintSupported:bi,isHTTPS:Oi,isIE11OrLess:Ht,isLocalhost:ki,isPKCESupported:ua,isPopupPostMessageSupported:ca,isTokenVerifySupported:_i},Symbol.toStringTag,{value:"Module"}));/*! 930 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 931 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 932 * 933 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 934 * Unless required by applicable law or agreed to in writing, softw
934are 935 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 936 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 937 * 938 * See the License for the specific language governing permissions and limitations under the License. 939 */function Ai(t){class e{constructor(...r){const i=new t(r.length?r[0]||{}:{});this.options=te(i),this.emitter=new xo,this.features=Qt}}return e.features=Qt,e.constants=ar,e.features=e.prototype.features=Qt,Object.assign(e,{constants:ar}),e}/*! 940 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 941 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 942 * 943 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 944 * Unless required by applicable law or agreed to in writing, software 945 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 946 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 947 * 948 * See the License for the specific language governing permissions and limitations under the License. 949 */function Ei(t,e){return class extends t{constructor(...r){super(...r);const{storageManager:i,cookies:o,storageUtil:s}=this.options;this.storageManager=new e(i,o,s)}clearStorage(){}}}/*! 950 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 951 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 952 * 953 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 954 * Unless required by applicable law or agreed to in writing, software 955 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 956 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 957 * 958 * See the License for the specific language governing permissions and limitations under the License. 959 */class da{constructor(){this.environments=["okta-auth-js/7.8.0"],this.maybeAddNodeEnvironment()}addEnvironment(e){this.environments.push(e)}getHttpHeader(){return{"X-Okta-User-Agent-Extended":this.environments.join(" ")}}getVersion(){return"7.8.0"}maybeAddNodeEnvironment(){if($()||!process||!process.versions)return;const{node:e}=process.versions;this.environments.push(`nodejs/${e}`)}}/*! 960 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 961 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 962 * 963 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 964 * Unless required by applicable law or agreed to in writing, software 965 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 966 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 967 * 968 * See the License for the specific language governing permissions and limitations under the License. 969 */function fa(t,e,n){t.options.headers=t.options.headers||{},t.options.headers[e]=n}/*! 970 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 971 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 972 * 973 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 974 * Unless required by applicable law or agreed to in writing, software 975 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 976 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 977 * 978 * See the License for the specific language governing permissions and limitations under the License. 979 */function Pi(t){return class extends t{constructor(...n){super(...n),this._oktaUserAgent=new da,this.http={setRequestHeader:fa.bind(null,this)}}setHeaders(n){this.options.headers=Object.assign({},this.options.headers,n)}getIssuerOrigin(){return this.options.issuer.split("/oauth2/")[0]}webfinger(n){var r="/.well-known/webfinger"+le(n),i={headers:{Accept:"application/jrd+json"}};return Ue(this,r,i)}}}/*! 980 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 981 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 982 * 983 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 984 * Unless required by applicable law or agreed to in writing, softw
984are 985 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 986 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 987 * 988 * See the License for the specific language governing permissions and limitations under the License. 989 */function Ze(t){var e=ge(t);return $n(e)}function $n(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function qn(t){return t.replace(/-/g,"+").replace(/_/g,"/")}function vn(t){var e=qn(t);switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new m("Not a valid Base64Url")}var n=Vn(e);try{return decodeURIComponent(escape(n))}catch{return n}}function xt(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function Wn(t){return Vn(qn(t))}function et(t){return Uint8Array.from(Wn(t),e=>e.charCodeAt(0))}function Ee(t){return ge(new Uint8Array(t).reduce((e,n)=>e+String.fromCharCode(n),""))}/*! 990 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 991 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 992 * 993 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 994 * Unless required by applicable law or agreed to in writing, software 995 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 996 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 997 * 998 * See the License for the specific language governing permissions and limitations under the License. 999 */function Ii(t){var e=new TextEncoder().encode(t);return z.subtle.digest("SHA-256",e).then(function(n){var r=new Uint8Array(n),i=r.slice(0,16),o=String.fromCharCode.apply(null,i),s=Ze(o);return s})}/*! 1000 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1001 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1002 * 1003 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1004 * Unless required by applicable law or agreed to in writing, software 1005 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1006 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1007 * 1008 * See the License for the specific language governing permissions and limitations under the License. 1009 */function xi(t,e){e=Y(e);var n="jwk",r={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=!0,o=["verify"];return delete e.use,z.subtle.importKey(n,e,r,i,o).then(function(s){var a=t.split("."),c=xt(a[0]+"."+a[1]),u=Wn(a[2]),l=xt(u);return z.subtle.verify(r,s,l,c)})}/*! 1010 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1011 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1012 * 1013 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1014 * Unless required by applicable law or agreed to in writing, software 1015 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1016 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1017 * 1018 * See the License for the specific language governing permissions and limitations under the License. 1019 */const ha=Object.freeze(Object.defineProperty({__proto__:null,atob:Vn,base64ToBase64Url:$n,base64UrlDecode:Wn,base64UrlToBase64:qn,base64UrlToBuffer:et,base64UrlToString:vn,btoa:ge,bufferToBase64Url:Ee,getOidcHash:Ii,stringToBase64Url:Ze,stringToBuffer:xt,verifyToken:xi,webcrypto:z},Symbol.toStringTag,{value:"Module"}));/*! 1020 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1021 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1022 * 1023 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1024 * Unless required by applicable law or agreed to in writing, software 1025 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1026 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1027 * 1028 * See the License for the specific language governing permissions and limitations under the License. 1029 */class Kn{constructor(e={quiet:!1}){this.queue=[],this.running=!1,this.options=e}push(e,n,...r){return new Promise((i,o)=>{this.queue.length>0&&this.options.quiet!==!1&&ie("Async method is being called but another async method is already running. The new method will be delayed until the previous method completes."),this.queue.push({method:e,thisObject:n,args:r,resolve:i,reject:o}),this.run()})}run(){if(!this.running&&this.queue.length!==0){this.running=!0;var e=this.queue.shift(),n=e.method.apply(e.thisObject,e.args);Oo(n)?n.then(e.resolve,e.reject).finally(()=>{this.running=!1,this.run()}):(e.resolve(n),this.running=!1,this.run())}}}/*! 1030 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1031 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1032 * 1033 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1034 * Unless required by applicable law or agreed to in writing, softw
1034are 1035 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1036 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1037 * 1038 * See the License for the specific language governing permissions and limitations under the License. 1039 */function pa(t){return("0"+t.toString(16)).substr(-2)}function ga(t){var e=new Uint8Array(Math.ceil(t/2));z.getRandomValues(e);var n=Array.from(e,pa).join("");return n.slice(0,t)}function ma(t){var e=t||"";return e.length<cn&&(e=e+ga(cn-e.length)),encodeURIComponent(e).slice(0,Yr)}function va(t){var e=new TextEncoder().encode(t);return z.subtle.digest("SHA-256",e).then(function(n){var r=String.fromCharCode.apply(null,new Uint8Array(n)),i=Ze(r);return i})}var Je={DEFAULT_CODE_CHALLENGE_METHOD:En,generateVerifier:ma,computeChallenge:va};/*! 1040 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1041 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1042 * 1043 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1044 * Unless required by applicable law or agreed to in writing, software 1045 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1046 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1047 * 1048 * See the License for the specific language governing permissions and limitations under the License. 1049 */function Ci(t){var e=t.split("."),n;try{n={header:JSON.parse(vn(e[0])),payload:JSON.parse(vn(e[1])),signature:e[2]}}catch{throw new m("Malformed token")}return n}/*! 1050 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1051 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1052 * 1053 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1054 * Unless required by applicable law or agreed to in writing, software 1055 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1056 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1057 * 1058 * See the License for the specific language governing permissions and limitations under the License. 1059 */function Vt(t){const{pkce:e,clientId:n,redirectUri:r,responseType:i,responseMode:o,scopes:s,acrValues:a,maxAge:c,state:u,ignoreSignature:l,dpop:f}=t.options,d=$()?window.location.href:void 0;return te({pkce:e,clientId:n,redirectUri:r||d,responseType:i||["token","id_token"],responseMode:o,state:u||Lr(),nonce:Eo(),scopes:s||["openid","email"],acrValues:a,maxAge:c,ignoreSignature:l,dpop:f})}/*! 1060 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1061 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1062 * 1063 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1064 * Unless required by applicable law or agreed to in writing, software 1065 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1066 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1067 * 1068 * See the License for the specific language governing permissions and limitations under the License. 1069 */const ya="OktaAuthJs",Yt="DPoPKeys";function Mi(t){return(si(t)||hs(t))&&t.errorCode==="use_dpop_nonce"}async function wa(t,e,n){const r=Ze(JSON.stringify(t)),i=Ze(JSON.stringify(e)),o=await z.subtle.sign({name:n.algorithm.name},n,xt(`${r}.${i}`));return`${r}.${i}.${$n(Ee(o))}`}function Ri(t=32){return[...z.getRandomValues(new Uint8Array(t))].map(e=>e.toString(16)).join("")}async function Ta(){const t={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};return z.subtle.generateKey(t,!1,["sign","verify"])}async function ba(t){const e=new TextEncoder().encode(t),n=await z.subtle.digest("SHA-256",e);return ge(String.fromCharCode.apply(null,new Uint8Array(n))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Sa(){return new Promise((t,e)=>{try{const r=window.indexedDB.open(ya,1);r.onerror=function(){e(r.error)},r.onupgradeneeded=function(){r.result.createObjectStore(Yt)},r.onsuccess=function(){const i=r.result,o=i.transaction(Yt,"readwrite");o.onerror=function(){e(o.error)};const s=o.objectStore(Yt);t(s),o.oncomplete=function(){i.close()}}}catch(n){e(n)}})}async function Bt(t,...e){const n=await Sa();return new Promise((r,i)=>{const o=n[t](...e);o.onsuccess=function(){r(o)},o.onerror=function(){i(o.error)}})}async function _a(t,e){return await Bt("add",e,t),e}async function Gn(t){if(t){const e=await Bt("get",t);if(e.result)return e.result}
1069throw new m(`Unable to locate dpop key pair required for refresh${t?` (${t})`:""}`)}async function yn(t){await Bt("delete",t)}async function Oa(){await Bt("clear")}async function ka(){const t=Ri(4),e=await Ta();return await _a(t,e),{keyPair:e,keyPairId:t}}async function fr(t,e){var n;let r=!1;const{accessToken:i,refreshToken:o}=e;t==="access"&&i&&i.tokenType==="DPoP"&&!o&&(r=!0),t==="refresh"&&o&&!i&&(r=!0);const s=(n=i==null?void 0:i.dpopPairId)!==null&&n!==void 0?n:o==null?void 0:o.dpopPairId;r&&s&&await yn(s)}async function ji({keyPair:t,url:e,method:n,nonce:r,accessToken:i}){const{kty:o,crv:s,e:a,n:c,x:u,y:l}=await z.subtle.exportKey("jwk",t.publicKey),f={alg:"RS256",typ:"dpop+jwt",jwk:{kty:o,crv:s,e:a,n:c,x:u,y:l}},d={htm:n,htu:e,iat:Math.floor(Date.now()/1e3),jti:Ri()};return r&&(d.nonce=r),i&&(d.ath=await ba(i)),wa(f,d,t.privateKey)}async function Aa({keyPair:t,url:e,method:n,nonce:r}){const i={keyPair:t,url:e,method:n};return r&&(i.nonce=r),ji(i)}/*! 1070 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1071 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1072 * 1073 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1074 * Unless required by applicable law or agreed to in writing, software 1075 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1076 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1077 * 1078 * See the License for the specific language governing permissions and limitations under the License. 1079 */function Ea(t){if(!t.clientId)throw new m("A clientId must be specified in the OktaAuth constructor to get a token");if(!t.redirectUri)throw new m("The redirectUri passed to /authorize must also be passed to /token");if(!t.authorizationCode&&!t.interactionCode)throw new m("An authorization code (returned from /authorize) must be passed to /token");if(!t.codeVerifier)throw new m('The "codeVerifier" (generated and saved by your app) must be passed to /token')}function Pa(t,e){var n=te({client_id:e.clientId,redirect_uri:e.redirectUri,grant_type:e.interactionCode?"interaction_code":"authorization_code",code_verifier:e.codeVerifier});e.interactionCode?n.interaction_code=e.interactionCode:e.authorizationCode&&(n.code=e.authorizationCode);const{clientSecret:r}=t.options;return r&&(n.client_secret=r),le(n).slice(1)}async function zn(t,{url:e,data:n,nonce:r,dpopKeyPair:i}){var o,s;const a="POST",c={"Content-Type":"application/x-www-form-urlencoded"};if(t.options.dpop){if(!i)throw new m("DPoP is configured but no key pair was provided");const u=await Aa({url:e,method:a,nonce:r,keyPair:i});c.DPoP=u}try{return await oe(t,{url:e,method:a,args:n,headers:c})}catch(u){if(Mi(u)&&!r){const l=(o=u.resp)===null||o===void 0?void 0:o.headers["dpop-nonce"];if(!l)throw new Ae({errorSummary:"No `dpop-nonce` header found when required"},(s=u.resp)!==null&&s!==void 0?s:void 0);return zn(t,{url:e,data:n,dpopKeyPair:i,nonce:l})}throw u}}async function Ia(t,e,n){Ea(e);var r=Pa(t,e);const i={url:n.tokenUrl,data:r,dpopKeyPair:e==null?void 0:e.dpopKeyPair};return zn(t,i)}async function xa(t,e,n){const r=Object.entries({client_id:e.clientId,grant_type:"refresh_token",scope:n.scopes.join(" "),refresh_token:n.refreshToken}).map(function([s,a]){return s+"="+encodeURIComponent(a)}).join("&");let i=n.tokenUrl;e.extraParams&&Object.keys(e.extraParams).length>=1&&(i+=le(e.extraParams));const o={url:i,data:r,dpopKeyPair:e==null?void 0:e.dpopKeyPair};return zn(t,o)}/*! 1080 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1081 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1082 * 1083 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1084 * Unless required by applicable law or agreed to in writing, software 1085 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1086 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1087 * 1088 * See the License for the specific language governing permissions and limitations under the License. 1089 */function $t(t,e){var n=e||t.options.issuer;return Ue(t,n+"/.well-known/openid-configuration",{cacheResponse:!0})}function Ca(t,e,n){var r=t.storageManager.getHttpCache(t.options.cookies);return $t(t,e).then(function(i){var o=i.jwks_uri,s=r.getStorage(),a=s[o];if(a&&Date.now()/1e3<a.expiresAt){var c=tn(a.response.keys,{kid:n});if(c)return c}return r.clearStorage(o),Ue(t,o,{cacheResponse:!0}).then(function(u){var l=tn(u.keys,{kid:n});if(l)return l;
1089throw new m("The key id, "+n+", was not found in the server's keys")})})}/*! 1090 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1091 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1092 * 1093 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1094 * Unless required by applicable law or agreed to in writing, software 1095 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1096 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1097 * 1098 * See the License for the specific language governing permissions and limitations under the License. 1099 */function Ma(t,e,n){const r=n.clientId,i=n.issuer,o=n.nonce,s=n.acrValues;if(!e||!i||!r)throw new m("The jwt, iss, and aud arguments are all required");if(o&&e.nonce!==o)throw new m("OAuth flow response nonce doesn't match request nonce");const a=Math.floor(Date.now()/1e3);if(e.iss!==i)throw new m("The issuer ["+e.iss+"] does not match ["+i+"]");if(Array.isArray(e.aud)&&e.aud.indexOf(r)<0||!Array.isArray(e.aud)&&e.aud!==r)throw new m("The audience ["+e.aud+"] does not match ["+r+"]");if(s&&e.acr!==s)throw new m("The acr ["+e.acr+"] does not match acr_values ["+s+"]");if(e.iat>e.exp)throw new m("The JWT expired before it was issued");if(!t.options.ignoreLifetime){if(a-t.options.maxClockSkew>e.exp)throw new m("The JWT expired and is no longer valid");if(e.iat>a+t.options.maxClockSkew)throw new m("The JWT was issued in the future")}}/*! 1100 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1101 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1102 * 1103 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1104 * Unless required by applicable law or agreed to in writing, software 1105 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1106 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1107 * 1108 * See the License for the specific language governing permissions and limitations under the License. 1109 */async function Di(t,e,n){if(!e||!e.idToken)throw new m("Only idTokens may be verified");const r=Ci(e.idToken),i=(n==null?void 0:n.issuer)||t.options.issuer,{issuer:o}=await $t(t,i),s=Object.assign({clientId:t.options.clientId,ignoreSignature:t.options.ignoreSignature},n,{issuer:o});if(Ma(t,r.payload,s),s.ignoreSignature==!0||!t.features.isTokenVerifySupported())return e;const a=await Ca(t,e.issuer,r.header.kid);if(!await xi(e.idToken,a))throw new m("The token signature is not valid");if(n&&n.accessToken&&e.claims.at_hash&&await Ii(n.accessToken)!==e.claims.at_hash)throw new m("Token hash verification failed");return e}/*! 1110 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1111 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1112 * 1113 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1114 * Unless required by applicable law or agreed to in writing, software 1115 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1116 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1117 * 1118 * See the License for the specific language governing permissions and limitations under the License. 1119 */function Ra(t,e){if(t.error&&t.error_description)throw new De(t.error,t.error_description);if(t.state!==e.state)throw new m("OAuth flow response state doesn't match request state");if(e.dpop&&t.token_type!=="DPoP")throw new m('Unable to parse OAuth flow response: DPoP was configured but "token_type" was not DPoP')}async function tt(t,e,n,r){if(t.options.pkce!==!1&&(n.code||n.interaction_code))return t.token.exchangeCodeForTokens(Object.assign({},e,{authorizationCode:n.code,interactionCode:n.interaction_code}),r);e=e||Vt(t),r=r||me(t,e);let o=e.responseType||[];!Array.isArray(o)&&o!=="none"&&(o=[o]);let s;n.scope?s=n.scope.split(" "):s=Y(e.scopes);const a=e.clientId||t.options.clientId;Ra(n,e);const c={},u=n.expires_in,l=n.token_type,f=n.access_token,d=n.id_token,g=n.refresh_token,p=Math.floor(Date.now()/1e3);if(f){const b=t.token.decode(f);c.accessToken={accessToken:f,claims:b.payload,expiresAt:Number(u)+p,tokenType:l,scopes:s,authorizeUrl:r.authorizeUrl,userinfoUrl:r.userinfoUrl},e.dpopPairId&&(c.accessToken.dpopPairId=e.dpopPairId),e.extraParams&&(c.accessToken.extraParams=e.extraParams)}if(g&&(c.refreshToken={refreshToken:g,expiresAt:Number(u)+p,scopes:s,tokenUrl:r.tokenUrl,authorizeUrl:r.authorizeUrl,issuer:r.issuer},e.dpopPairId&&(c.refreshToken.dpopPairId=e.dpopPairId),e.extraParams&&(c.refreshToken.extraParams=e.extraParams)),d){const b=t.token.decode(d),O={i
1119dToken:d,claims:b.payload,expiresAt:b.payload.exp-b.payload.iat+p,scopes:s,authorizeUrl:r.authorizeUrl,issuer:r.issuer,clientId:a};e.extraParams&&(O.extraParams=e.extraParams);const S={clientId:a,issuer:r.issuer,nonce:e.nonce,accessToken:f,acrValues:e.acrValues};e.ignoreSignature!==void 0&&(S.ignoreSignature=e.ignoreSignature),await Di(t,O,S),c.idToken=O}if(o.indexOf("token")!==-1&&!c.accessToken)throw new m('Unable to parse OAuth flow response: response type "token" was requested but "access_token" was not returned.');if(o.indexOf("id_token")!==-1&&!c.idToken)throw new m('Unable to parse OAuth flow response: response type "id_token" was requested but "id_token" was not returned.');return{tokens:c,state:n.state,code:n.code,responseType:o}}/*! 1120 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1121 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1122 * 1123 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1124 * Unless required by applicable law or agreed to in writing, software 1125 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1126 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1127 * 1128 * See the License for the specific language governing permissions and limitations under the License. 1129 */async function ja(t,e,n){n=n||me(t,e),e=Object.assign({},Vt(t),Y(e));const{authorizationCode:r,interactionCode:i,codeVerifier:o,clientId:s,redirectUri:a,scopes:c,ignoreSignature:u,state:l,acrValues:f,dpop:d,dpopPairId:g,extraParams:p}=e,b={clientId:s,redirectUri:a,authorizationCode:r,interactionCode:i,codeVerifier:o,dpop:d},O=["token"];c.indexOf("openid")!==-1&&O.push("id_token");const S={clientId:s,redirectUri:a,scopes:c,responseType:O,ignoreSignature:u,acrValues:f,extraParams:p};try{if(d)if(g){const N=await Gn(g);b.dpopKeyPair=N,S.dpop=d,S.dpopPairId=g}else{const{keyPair:N,keyPairId:j}=await ka();b.dpopKeyPair=N,S.dpop=d,S.dpopPairId=j}const I=await Ia(t,b,n),P=await tt(t,S,I,n);return P.code=r,P.state=l,P}finally{t.transactionManager.clear()}}/*! 1130 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1131 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1132 * 1133 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1134 * Unless required by applicable law or agreed to in writing, software 1135 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1136 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1137 * 1138 * See the License for the specific language governing permissions and limitations under the License. 1139 */async function Da(t,e,n){if(e||(e=(await t.tokenManager.getTokens()).accessToken),n||(n=(await t.tokenManager.getTokens()).idToken),!e||!ae(e))return Promise.reject(new m("getUserInfo requires an access token object"));if(!n||!pe(n))return Promise.reject(new m("getUserInfo requires an ID token object"));const r={url:e.userinfoUrl,method:"GET",accessToken:e.accessToken};if(t.options.dpop){const i=await t.getDPoPAuthorizationHeaders(Object.assign(Object.assign({},r),{accessToken:e}));r.headers=i,delete r.accessToken}return oe(t,r).then(i=>i.sub===n.claims.sub?i:Promise.reject(new m("getUserInfo request was rejected due to token mismatch"))).catch(function(i){var o;if(i instanceof ee&&!t.options.dpop){const{error:s,errorDescription:a}=i;throw new De(s,a)}if(!t.options.dpop){let s=i;if(i instanceof Ae&&(!((o=i==null?void 0:i.meta)===null||o===void 0)&&o.wwwAuthHeader)&&(s=ee.parseHeader(i.meta.wwwAuthHeader)),s instanceof ee){const{error:a,errorDescription:c}=s;throw new De(a,c)}}throw i})}/*! 1140 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1141 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1142 * 1143 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1144 * Unless required by applicable law or agreed to in writing, softw
1144are 1145 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1146 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1147 * 1148 * See the License for the specific language governing permissions and limitations under the License. 1149 */function Ui(t,e,n){t.addEventListener?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function Li(t,e,n){t.removeEventListener?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function Ua(t){var e=document.createElement("iframe");return e.style.display="none",e.src=t,document.body.appendChild(e)}function La(t,e){var n=e.popupTitle||"External Identity Provider User Authentication",r="toolbar=no, scrollbars=yes, resizable=yes, top=100, left=500, width=600, height=600";return window.open(t,n,r)}function hr(t,e,n){var r,i,o=new Promise(function(s,a){r=function(u){if(!(!u.data||u.data.state!==n)){if(u.origin!==t.getIssuerOrigin())return a(new m("The request does not match client configuration"));s(u.data)}},Ui(window,"message",r),i=setTimeout(function(){a(new m("OAuth flow timed out"))},e||12e4)});return o.finally(function(){clearTimeout(i),Li(window,"message",r)})}/*! 1150 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1151 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1152 * 1153 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1154 * Unless required by applicable law or agreed to in writing, software 1155 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1156 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1157 * 1158 * See the License for the specific language governing permissions and limitations under the License. 1159 */function Fa(t){if(!t.features.isPKCESupported()){var e="PKCE requires a modern browser with encryption support running in a secure context.";throw t.features.isHTTPS()||(e+=` 1160The current page is not being served with HTTPS protocol. PKCE requires secure HTTPS protocol.`),t.features.hasTextEncoder()||(e+=` 1161"TextEncoder" is not defined. To use PKCE, you may need to include a polyfill/shim for this browser.`),new m(e)}}async function Na(t,e){e=e||t.options.codeChallengeMethod||En;var r=(await $t(t)).code_challenge_methods_supported||[];if(r.indexOf(e)===-1)throw new m("Invalid code_challenge_method");return e}async function Ha(t,e){let{codeVerifier:n,codeChallenge:r,codeChallengeMethod:i}=e;return r=r||t.options.codeChallenge,r||(Fa(t),n=n||Je.generateVerifier(),r=await Je.computeChallenge(n)),i=await Na(t,i),e=Object.assign(Object.assign({},e),{responseType:"code",codeVerifier:n,codeChallenge:r,codeChallengeMethod:i}),e}async function Jn(t,e={}){const n=Vt(t);if(e=Object.assign(Object.assign({},n),e),e.dpop&&!t.features.isDPoPSupported())throw new m("DPoP has been configured, but is not supported by browser");return e.pkce===!1?e:Ha(t,e)}/*! 1162 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1163 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1164 * 1165 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1166 * Unless required by applicable law or agreed to in writing, software 1167 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1168 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1169 * 1170 * See the License for the specific language governing permissions and limitations under the License. 1171 */function Va(t){if(!t.clientId)throw new m("A clientId must be specified in the OktaAuth constructor to get a token");if(je(t.responseType)&&t.responseType.indexOf(" ")!==-1)throw new m("Multiple OAuth responseTypes must be defined as an array");var e={client_id:t.clientId,code_challenge:t.codeChallenge,code_challenge_method:t.codeChallengeMethod,display:t.display,idp:t.idp,idp_scope:t.idpScope,login_hint:t.loginHint,max_age:t.maxAge,nonce:t.nonce,prompt:t.prompt,redirect_uri:t.redirectUri,response_mode:t.responseMode,response_type:t.responseType,sessionToken:t.sessionToken,state:t.state,acr_values:t.acrValues,enroll_amr_values:t.enrollAmrValues};if(e=te(e),["idp_scope","response_type","enroll_amr_values"].forEach(function(n){Array.isArray(e[n])&&(e[n]=e[n].join(" "))}),t.responseType.indexOf("id_token")!==-1&&t.scopes.indexOf("openid")===-1)throw new m
1171("openid scope must be specified in the scopes argument when requesting an id_token");return t.scopes&&(e.scope=t.scopes.join(" ")),e}function Qn(t){var e=Va(t);return le(Object.assign(Object.assign({},e),t.extraParams&&Object.assign({},t.extraParams)))}/*! 1172 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1173 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1174 * 1175 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1176 * Unless required by applicable law or agreed to in writing, software 1177 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1178 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1179 * 1180 * See the License for the specific language governing permissions and limitations under the License. 1181 */function Fi(t,e){if(arguments.length>2)return Promise.reject(new m('As of version 3.0, "getToken" takes only a single set of options'));e=e||{};const n=e.popupWindow;return e.popupWindow=void 0,Jn(t,e).then(function(r){var i={prompt:"none",responseMode:"okta_post_message",display:null},o={display:"popup"};e.sessionToken?Object.assign(r,i):e.idp&&Object.assign(r,o);var s,a,c;c=me(t,r),a=e.codeVerifier?c.tokenUrl:c.authorizeUrl,s=a+Qn(r);var u;switch(r.sessionToken||r.display===null?u="IFRAME":r.display==="popup"?u="POPUP":u="IMPLICIT",u){case"IFRAME":var l=hr(t,e.timeout,r.state),f=Ua(s);return l.then(function(p){return tt(t,r,p,c)}).finally(function(){var p;document.body.contains(f)&&((p=f.parentElement)===null||p===void 0||p.removeChild(f))});case"POPUP":var d;if(r.responseMode==="okta_post_message"){if(!t.features.isPopupPostMessageSupported())throw new m("This browser doesn't have full postMessage support");d=hr(t,e.timeout,r.state)}n&&n.location.assign(s);var g=new Promise(function(p,b){var O=setInterval(function(){(!n||n.closed)&&(clearInterval(O),b(new m("Unable to parse OAuth flow response")))},100);d.then(function(S){clearInterval(O),p(S)}).catch(function(S){clearInterval(O),b(S)})});return g.then(function(p){return tt(t,r,p,c)}).finally(function(){n&&!n.closed&&n.close()});default:throw new m("The full page redirect flow is not supported")}})}/*! 1182 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1183 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1184 * 1185 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1186 * Unless required by applicable law or agreed to in writing, software 1187 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1188 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1189 * 1190 * See the License for the specific language governing permissions and limitations under the License. 1191 */function Yn(t,e){return arguments.length>2?Promise.reject(new m('As of version 3.0, "getWithoutPrompt" takes only a single set of options')):(e=Y(e)||{},Object.assign(e,{prompt:"none",responseMode:"okta_post_message",display:null}),Fi(t,e))}/*! 1192 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1193 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1194 * 1195 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1196 * Unless required by applicable law or agreed to in writing, software 1197 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1198 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1199 * 1200 * See the License for the specific language governing permissions and limitations under the License. 1201 */function Ba(t,e){if(arguments.length>2)return Promise.reject(new m('As of version 3.0, "getWithPopup" takes only a single set of options'));const n=La("/",e);return e=Y(e)||{},Object.assign(e,{display:"popup",responseMode:"okta_post_message",popupWindow:n}),Fi(t,e)}/*! 1202 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1203 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1204 * 1205 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1206 * Unless required by applicable law or agreed to in writing, softw
1206are 1207 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1208 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1209 * 1210 * See the License for the specific language governing permissions and limitations under the License. 1211 */async function $a(t,e){if(arguments.length>2)return Promise.reject(new m('As of version 3.0, "getWithRedirect" takes only a single set of options'));e=Y(e)||{};const n=await Jn(t,e),r=Nr(t,n),i=r.urls.authorizeUrl+Qn(n);t.transactionManager.save(r),t.options.setLocation?t.options.setLocation(i):window.location.assign(i)}/*! 1212 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1213 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1214 * 1215 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1216 * Unless required by applicable law or agreed to in writing, software 1217 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1218 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1219 * 1220 * See the License for the specific language governing permissions and limitations under the License. 1221 */function qa(t){var e=t.token.parseFromUrl._getHistory(),n=t.token.parseFromUrl._getDocument(),r=t.token.parseFromUrl._getLocation();e&&e.replaceState?e.replaceState(null,n.title,r.pathname+r.search):r.hash=""}function Wa(t){var e=t.token.parseFromUrl._getHistory(),n=t.token.parseFromUrl._getDocument(),r=t.token.parseFromUrl._getLocation();e&&e.replaceState?e.replaceState(null,n.title,r.pathname+r.hash):r.search=""}function Ni(t){var e=t.options.pkce?"query":"fragment",n=t.options.responseMode||e;return n}function Hi(t,e){e=e||{},je(e)?e={url:e}:e=e;var n=e.url,r=e.responseMode||Ni(t),i=t.token.parseFromUrl._getLocation(),o;if(r==="query"?o=n?n.substring(n.indexOf("?")):i.search:o=n?n.substring(n.indexOf("#")):i.hash,!o)throw new m("Unable to parse a token from the url");return di(o)}function Ka(t,e){(e.responseMode||Ni(t))==="query"?Wa(t):qa(t)}async function Ga(t,e){e=e||{},je(e)?e={url:e}:e=e;const n=Hi(t,e),r=n.state,i=t.transactionManager.load({state:r});if(!i)throw t.options.pkce?new m("Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently.",void 0):new m("Unable to retrieve OAuth redirect params from storage");const o=i.urls;return delete i.urls,e.url||Ka(t,e),tt(t,i,n,o).catch(s=>{throw vi(s)||t.transactionManager.clear({state:r}),s}).then(s=>(t.transactionManager.clear({state:r}),s))}/*! 1222 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1223 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1224 * 1225 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1226 * Unless required by applicable law or agreed to in writing, software 1227 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1228 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1229 * 1230 * See the License for the specific language governing permissions and limitations under the License. 1231 */function za(t,e){return t.refreshToken===e.refreshToken}/*! 1232 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1233 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1234 * 1235 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1236 * Unless required by applicable law or agreed to in writing, software 1237 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1238 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1239 * 1240 * See the License for the specific language governing permissions and limitations under the License. 1241 */async function Xn(t,e,n){const{clientId:r,dpop:i}=t.options;if(!r)throw new m("A clientId must be specified in the OktaAuth constructor to renew tokens");try{const o=Object.assign({},e,{clientId:r});n.extraParams&&(o.extraParams=n.extraParams);const s=Object.assign({},o);if(i){const f=await Gn(n==null?void 0:n.dpopPairId);s.dpopKeyPair=f,o.dpop=i,o.dpopPairId=n.dpopPairId}const a=await xa(t,s,n),c=me(t,e),{tokens:u}=await tt(t,o,a,c),{refreshToken:l}=u;return l&&!za(l,n)&&t.tokenManager.updateRefreshToken(l),u}catch(o){throw Ys(o)&&t.tokenManager.removeRefreshToken(),o}}/*! 1242 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1243 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1244 * 1245 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1246 * Unless required by applicable law or agreed to in writing, softw
1246are 1247 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1248 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1249 * 1250 * See the License for the specific language governing permissions and limitations under the License. 1251 */function Vi(){throw new m("Renew must be passed a token with an array of scopes and an accessToken or idToken")}function pr(t,e){if(pe(t))return e.idToken;if(ae(t))return e.accessToken;Vi()}async function Ja(t,e){!pe(e)&&!ae(e)&&Vi();let n=t.tokenManager.getTokensSync();if(n.refreshToken)return n=await Xn(t,{scopes:e.scopes},n.refreshToken),pr(e,n);var r;t.options.pkce?r="code":ae(e)?r="token":r="id_token";const{scopes:i,authorizeUrl:o,userinfoUrl:s,issuer:a,dpopPairId:c,extraParams:u}=e;return Yn(t,{responseType:r,scopes:i,authorizeUrl:o,userinfoUrl:s,issuer:a,dpopPairId:c,extraParams:u}).then(function(l){return pr(e,l.tokens)})}/*! 1252 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1253 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1254 * 1255 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1256 * Unless required by applicable law or agreed to in writing, software 1257 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1258 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1259 * 1260 * See the License for the specific language governing permissions and limitations under the License. 1261 */async function Qa(t,e){var n;const r=(n=e==null?void 0:e.tokens)!==null&&n!==void 0?n:t.tokenManager.getTokensSync();if(r.refreshToken)return Xn(t,e||{},r.refreshToken);if(!r.accessToken&&!r.idToken)throw new m("renewTokens() was called but there is no existing token");const i=r.accessToken||{},o=r.idToken||{},s=i.scopes||o.scopes;if(!s)throw new m("renewTokens: invalid tokens: could not read scopes");const a=i.authorizeUrl||o.authorizeUrl;if(!a)throw new m("renewTokens: invalid tokens: could not read authorizeUrl");const c=i.userinfoUrl||t.options.userinfoUrl,u=o.issuer||t.options.issuer,l=i==null?void 0:i.dpopPairId,f=(i==null?void 0:i.extraParams)||(o==null?void 0:o.extraParams);if(e=Object.assign({scopes:s,authorizeUrl:a,userinfoUrl:c,issuer:u,dpopPairId:l,extraParams:f},e),t.options.pkce)e.responseType="code";else{const{responseType:d}=Vt(t);e.responseType=d}return Yn(t,e).then(d=>d.tokens)}/*! 1262 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1263 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1264 * 1265 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1266 * Unless required by applicable law or agreed to in writing, software 1267 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1268 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1269 * 1270 * See the License for the specific language governing permissions and limitations under the License. 1271 */async function Ya(t,e){let n="",r="";if(e&&(n=e.accessToken,r=e.refreshToken),!n&&!r)throw new m("A valid access or refresh token object is required");var i=t.options.clientId,o=t.options.clientSecret;if(!i)throw new m("A clientId must be specified in the OktaAuth constructor to revoke a token");var s=me(t).revokeUrl,a=le({token_type_hint:r?"refresh_token":"access_token",token:r||n}).slice(1),c=ge(o?`${i}:${o}`:i);return ye(t,s,a,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+c}})}/*! 1272 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1273 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1274 * 1275 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1276 * Unless required by applicable law or agreed to in writing, software 1277 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1278 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1279 * 1280 * See the License for the specific language governing permissions and limitations under the License. 1281 */const Xa={accessToken:"access_token",idToken:"id_token",refreshToken:"refresh_token"};async function Za(t,e,n){var r;
1281let i,o=t.options.clientId,s=t.options.clientSecret;if(n||(n=t.tokenManager.getTokens()[e]),!n)throw new m(`unable to find ${e} in storage or fn params`);if(e!==sn.ACCESS?i=n==null?void 0:n.issuer:i=(r=n==null?void 0:n.claims)===null||r===void 0?void 0:r.iss,i=i||t.options.issuer,!o)throw new m("A clientId must be specified in the OktaAuth constructor to introspect a token");if(!i)throw new m("Unable to find issuer");const{introspection_endpoint:a}=await $t(t,i),c=ge(s?`${o}:${s}`:o),u=le({token_type_hint:Xa[e],token:n[e]}).slice(1);return ye(t,a,u,{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+c}})}/*! 1282 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1283 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1284 * 1285 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1286 * Unless required by applicable law or agreed to in writing, software 1287 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1288 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1289 * 1290 * See the License for the specific language governing permissions and limitations under the License. 1291 */function ec(t,e){const n=t.options.issuer,r=me(t,e);return{issuer:n,urls:r,clientId:e.clientId,redirectUri:e.redirectUri,responseType:e.responseType,responseMode:e.responseMode,state:e.state,acrValues:e.acrValues,enrollAmrValues:e.enrollAmrValues}}/*! 1292 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1293 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1294 * 1295 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1296 * Unless required by applicable law or agreed to in writing, software 1297 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1298 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1299 * 1300 * See the License for the specific language governing permissions and limitations under the License. 1301 */function tc(t){const{clientId:e,redirectUri:n,responseMode:r,state:i}=t.options,o=$()?window.location.href:void 0;return te({clientId:e,redirectUri:n||o,responseMode:r,state:i||Lr(),responseType:"none",prompt:"enroll_authenticator"})}/*! 1302 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1303 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1304 * 1305 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1306 * Unless required by applicable law or agreed to in writing, software 1307 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1308 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1309 * 1310 * See the License for the specific language governing permissions and limitations under the License. 1311 */function nc(t){if(t=Object.assign(Object.assign({},t),{responseType:"none",prompt:"enroll_authenticator",maxAge:0}),!t.enrollAmrValues)throw new m("enroll_amr_values must be specified");if(!t.acrValues)throw new m("acr_values must be specified");return delete t.scopes,delete t.nonce,t}function rc(t,e){return nc(Object.assign(Object.assign({},tc(t)),e))}/*! 1312 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1313 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1314 * 1315 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1316 * Unless required by applicable law or agreed to in writing, software 1317 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1318 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1319 * 1320 * See the License for the specific language governing permissions and limitations under the License. 1321 */function ic(t,e){e=Y(e)||{};const n=rc(t,e),r=ec(t,n),i=r.urls.authorizeUrl+Qn(n);t.transactionManager.save(r),t.options.setLocation?t.options.setLocation(i):window.location.assign(i)}/*! 1322 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1323 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1324 * 1325 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1326 * Unless required by applicable law or agreed to in writing, softw
1326are 1327 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1328 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1329 * 1330 * See the License for the specific language governing permissions and limitations under the License. 1331 */function oc(t,e){const n=c=>Kn.prototype.push.bind(e,c,null),r=n($a.bind(null,t)),i=n(Ga.bind(null,t)),o=Object.assign(i,{_getHistory:function(){return window.history},_getLocation:function(){return window.location},_getDocument:function(){return window.document}}),s={prepareTokenParams:Jn.bind(null,t),exchangeCodeForTokens:ja.bind(null,t),getWithoutPrompt:Yn.bind(null,t),getWithPopup:Ba.bind(null,t),getWithRedirect:r,parseFromUrl:o,decode:Ci,revoke:Ya.bind(null,t),renew:Ja.bind(null,t),renewTokensWithRefresh:Xn.bind(null,t),renewTokens:Qa.bind(null,t),getUserInfo:(c,u)=>Da(t,c,u),verify:Di.bind(null,t),isLoginRedirect:Hn.bind(null,t),introspect:Za.bind(null,t)};return["getWithoutPrompt","getWithPopup","revoke","renew","renewTokensWithRefresh","renewTokens"].forEach(c=>{s[c]=n(s[c])}),s}function sc(t){return{authorize:{enrollAuthenticator:ic.bind(null,t)}}}/*! 1332 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1333 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1334 * 1335 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1336 * Unless required by applicable law or agreed to in writing, software 1337 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1338 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1339 * 1340 * See the License for the specific language governing permissions and limitations under the License. 1341 */function yt(t,e){if(!pe(t)&&!ae(t)&&!Se(t))throw new m("Token must be an Object with scopes, expiresAt, and one of: an idToken, accessToken, or refreshToken property");if(e==="accessToken"&&!ae(t))throw new m("invalid accessToken");if(e==="idToken"&&!pe(t))throw new m("invalid idToken");if(e==="refreshToken"&&!Se(t))throw new m("invalid refreshToken")}/*! 1342 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1343 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1344 * 1345 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1346 * Unless required by applicable law or agreed to in writing, software 1347 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1348 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1349 * 1350 * See the License for the specific language governing permissions and limitations under the License. 1351 */class Zn{constructor(e){this.localOffset=parseInt(e||0)}static create(){var e=0;return new Zn(e)}now(){var e=(Date.now()+this.localOffset)/1e3;return e}}/*! 1352 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1353 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1354 * 1355 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1356 * Unless required by applicable law or agreed to in writing, software 1357 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1358 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1359 * 1360 * See the License for the specific language governing permissions and limitations under the License. 1361 */const wn="expired",qe="renewed",_e="added",Oe="removed",ac="error",We="set_storage";/*! 1362 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1363 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1364 * 1365 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1366 * Unless required by applicable law or agreed to in writing, software 1367 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1368 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1369 * 1370 * See the License for the specific language governing permissions and limitations under the License. 1371 */const gr={autoRenew:!0,autoRemove:!0,syncStorage:!0,clearPendingRemoveTokens:!0,storage:void 0,expireEarlySeconds:30,storageKey:An};function cc(){return{expireTimeouts:{},renewPromise:null}}class uc{constructor(e,n={}){if(this.sdk=e,this.emitter=e.emitter,!this.emitter)throw new m
1371("Emitter should be initialized before TokenManager");n=Object.assign({},gr,te(n)),ki()||(n.expireEarlySeconds=gr.expireEarlySeconds),this.options=n;const r=te({storageKey:n.storageKey,secure:n.secure});typeof n.storage=="object"?r.storageProvider=n.storage:n.storage&&(r.storageType=n.storage),this.storage=e.storageManager.getTokenStorage(Object.assign(Object.assign({},r),{useSeparateCookies:!0})),this.clock=Zn.create(),this.state=cc()}on(e,n,r){r?this.emitter.on(e,n,r):this.emitter.on(e,n)}off(e,n){n?this.emitter.off(e,n):this.emitter.off(e)}start(){this.options.clearPendingRemoveTokens&&this.clearPendingRemoveTokens(),this.setExpireEventTimeoutAll(),this.state.started=!0}stop(){this.clearExpireEventTimeoutAll(),this.state.started=!1}isStarted(){return!!this.state.started}getOptions(){return Y(this.options)}getExpireTime(e){const n=this.options.expireEarlySeconds||0;var r=e.expiresAt-n;return r}hasExpired(e){var n=this.getExpireTime(e);return n<=this.clock.now()}emitExpired(e,n){this.emitter.emit(wn,e,n)}emitRenewed(e,n,r){this.emitter.emit(qe,e,n,r)}emitAdded(e,n){this.emitter.emit(_e,e,n)}emitRemoved(e,n){this.emitter.emit(Oe,e,n)}emitError(e){this.emitter.emit(ac,e)}clearExpireEventTimeout(e){clearTimeout(this.state.expireTimeouts[e]),delete this.state.expireTimeouts[e],this.state.renewPromise=null}clearExpireEventTimeoutAll(){var e=this.state.expireTimeouts;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.clearExpireEventTimeout(n)}setExpireEventTimeout(e,n){if(!Se(n)){var r=this.getExpireTime(n),i=Math.max(r-this.clock.now(),0)*1e3;this.clearExpireEventTimeout(e);var o=setTimeout(()=>{this.emitExpired(e,n)},i);this.state.expireTimeouts[e]=o}}setExpireEventTimeoutAll(){var e=this.storage.getStorage();for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];this.setExpireEventTimeout(n,r)}}resetExpireEventTimeoutAll(){this.clearExpireEventTimeoutAll(),this.setExpireEventTimeoutAll()}add(e,n){var r=this.storage.getStorage();yt(n),r[e]=n,this.storage.setStorage(r),this.emitSetStorageEvent(),this.emitAdded(e,n),this.setExpireEventTimeout(e,n)}getSync(e){var n=this.storage.getStorage();return n[e]}async get(e){return this.getSync(e)}getTokensSync(){const e={},n=this.storage.getStorage();return Object.keys(n).forEach(r=>{const i=n[r];ae(i)?e.accessToken=i:pe(i)?e.idToken=i:Se(i)&&(e.refreshToken=i)}),e}async getTokens(){return this.getTokensSync()}getStorageKeyByType(e){const n=this.storage.getStorage();return Object.keys(n).filter(i=>{const o=n[i];return ae(o)&&e==="accessToken"||pe(o)&&e==="idToken"||Se(o)&&e==="refreshToken"})[0]}getTokenType(e){if(ae(e))return"accessToken";if(pe(e))return"idToken";if(Se(e))return"refreshToken";throw new m("Unknown token type")}emitSetStorageEvent(){if(Ht()){const e=this.storage.getStorage();this.emitter.emit(We,e)}}getStorage(){return this.storage}setTokens(e,n,r,i){const o=(d,g)=>{const p=this.getTokenType(g);p==="accessToken"?n&&n(d,g):p==="idToken"?r&&r(d,g):p==="refreshToken"&&i&&i(d,g)},s=(d,g)=>{this.emitAdded(d,g),this.setExpireEventTimeout(d,g),o(d,g)},a=(d,g,p)=>{this.emitRenewed(d,g,p),this.clearExpireEventTimeout(d),this.setExpireEventTimeout(d,g),o(d,g)},c=(d,g)=>{this.clearExpireEventTimeout(d),this.emitRemoved(d,g),o(d,g)},u=["idToken","accessToken","refreshToken"],l=this.getTokensSync();u.forEach(d=>{const g=e[d];g&&yt(g,d)});const f=u.reduce((d,g)=>{const p=e[g];if(p){const b=this.getStorageKeyByType(g)||g;d[b]=p}return d},{});this.storage.setStorage(f),this.emitSetStorageEvent(),u.forEach(d=>{const g=e[d],p=l[d],b=this.getStorageKeyByType(d)||d;g&&p?(c(b,p),s(b,g),a(b,g,p)):g?s(b,g):p&&c(b,p)})}remove(e){this.clearExpireEventTimeout(e);var n=this.storage.getStorage(),r=n[e];delete n[e],this.storage.setStorage(n),this.emitSetStorageEvent(),this.emitRemoved(e,r)}async renewToken(e){var n;return(n=this.sdk.token)===null||n===void 0?void 0:n.renew(e)}validateToken(e){return yt(e)}renew(e){if(this.state.renewPromise)return this.state.renewPromise;try{var n=this.getSync(e);let i=n!==void 0;if(!n&&e==="accessToken"){const o=this.getStorageKeyByType("refreshToken");i=this.getSync(o)!==void 0}
1371if(!i)throw new m("The tokenManager has no token for the key: "+e)}catch(i){return this.emitError(i),Promise.reject(i)}return this.clearExpireEventTimeout(e),this.state.renewPromise=this.sdk.token.renewTokens().then(i=>{if(this.setTokens(i),!n&&e==="accessToken"){const s=i.accessToken;return this.emitRenewed(e,s,null),s}const o=this.getTokenType(n);return i[o]}).catch(i=>{throw this.remove(e),i.tokenKey=e,this.emitError(i),i}).finally(()=>{this.state.renewPromise=null})}clear(){const e=this.getTokensSync();this.clearExpireEventTimeoutAll(),this.storage.clearStorage(),this.emitSetStorageEvent(),Object.keys(e).forEach(n=>{this.emitRemoved(n,e[n])})}clearPendingRemoveTokens(){const e=this.storage.getStorage(),n={};Object.keys(e).forEach(r=>{e[r].pendingRemove&&(n[r]=e[r],delete e[r])}),this.storage.setStorage(e),this.emitSetStorageEvent(),Object.keys(n).forEach(r=>{this.clearExpireEventTimeout(r),this.emitRemoved(r,n[r])})}updateRefreshToken(e){const n=this.getStorageKeyByType("refreshToken")||an;var r=this.storage.getStorage();yt(e),r[n]=e,this.storage.setStorage(r),this.emitSetStorageEvent()}removeRefreshToken(){const e=this.getStorageKeyByType("refreshToken")||an;this.remove(e)}addPendingRemoveFlags(){const e=this.getTokensSync();Object.keys(e).forEach(n=>{e[n].pendingRemove=!0}),this.setTokens(e)}}/*! 1372 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1373 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1374 * 1375 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1376 * Unless required by applicable law or agreed to in writing, software 1377 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1378 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1379 * 1380 * See the License for the specific language governing permissions and limitations under the License. 1381 */var St={browserHasLocalStorage:function(){try{var t=this.getLocalStorage();return this.testStorage(t)}catch{return!1}},browserHasSessionStorage:function(){try{var t=this.getSessionStorage();return this.testStorage(t)}catch{return!1}},testStorageType:function(t){var e=!1;switch(t){case"sessionStorage":e=this.browserHasSessionStorage();break;case"localStorage":e=this.browserHasLocalStorage();break;case"cookie":case"memory":e=!0;break;default:e=!1;break}return e},getStorageByType:function(t,e){let n;switch(t){case"sessionStorage":n=this.getSessionStorage();break;case"localStorage":n=this.getLocalStorage();break;case"cookie":n=this.getCookieStorage(e);break;case"memory":n=this.getInMemoryStorage();break;default:throw new m(`Unrecognized storage option: ${t}`)}return n},findStorageType:function(t){let e,n;return t=t.slice(),e=t.shift(),n=t.length?t[0]:null,!n||this.testStorageType(e)?e:(ie(`This browser doesn't support ${e}. Switching to ${n}.`),this.findStorageType(t))},getLocalStorage:function(){return Ht()&&!window.onstorage&&(window.onstorage=function(){}),localStorage},getSessionStorage:function(){return sessionStorage},getCookieStorage:function(t){const e=t.secure,n=t.sameSite,r=t.sessionCookie;if(typeof e>"u"||typeof n>"u")throw new m('getCookieStorage: "secure" and "sameSite" options must be provided');const i={getItem:this.storage.get,setItem:(o,s,a="2200-01-01T00:00:00.000Z")=>{a=r?null:a,this.storage.set(o,s,a,{secure:e,sameSite:n})},removeItem:o=>{this.storage.delete(o)}};return t.useSeparateCookies?{getItem:function(o){var s=i.getItem(),a={};return Object.keys(s).forEach(c=>{c.indexOf(o)===0&&(a[c.replace(`${o}_`,"")]=JSON.parse(s[c]))}),JSON.stringify(a)},setItem:function(o,s){var a=JSON.parse(this.getItem(o));s=JSON.parse(s),Object.keys(s).forEach(c=>{var u=o+"_"+c,l=JSON.stringify(s[c]);i.setItem(u,l),delete a[c]}),Object.keys(a).forEach(c=>{i.removeItem(o+"_"+c)})},removeItem:function(o){var s=JSON.parse(this.getItem(o));Object.keys(s).forEach(a=>{i.removeItem(o+"_"+a)})}}:i},inMemoryStore:{},getInMemoryStorage:function(){return{getItem:t=>this.inMemoryStore[t],setItem:(t,e)=>{this.inMemoryStore[t]=e}}},testStorage:function(t){var e="okta-test-storage";try{return t.setItem(e,e),t.removeItem(e),!0}catch{return!1}},storage:{set:function(t,e,n,r){const{sameSite:i,secure:o}=r;if(typeof o>"u"||typeof i>
1381"u")throw new m('storage.set: "secure" and "sameSite" options must be provided');var s={path:r.path||"/",secure:o,sameSite:i};return Date.parse(n)&&(s.expires=new Date(n)),gt.set(t,e,s),this.get(t)},get:function(t){return arguments.length?gt.get(t):gt.get()},delete:function(t){return gt.remove(t,{path:"/"})}}};/*! 1382 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1383 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1384 * 1385 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1386 * Unless required by applicable law or agreed to in writing, software 1387 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1388 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1389 * 1390 * See the License for the specific language governing permissions and limitations under the License. 1391 */function lc(t){return class extends t{setOriginalUri(n,r){St.getSessionStorage().setItem(wt,n),r=r||this.options.state,r&&this.storageManager.getOriginalUriStorage().setItem(r,n)}getOriginalUri(n){if(n=n||this.options.state,n){const o=this.storageManager.getOriginalUriStorage().getItem(n);if(o)return o}const r=St.getSessionStorage();return r&&r.getItem(wt)||void 0}removeOriginalUri(n){if(St.getSessionStorage().removeItem(wt),n=n||this.options.state,n){const i=this.storageManager.getOriginalUriStorage();i.removeItem&&i.removeItem(n)}}}}/*! 1392 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1393 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1394 * 1395 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1396 * Unless required by applicable law or agreed to in writing, software 1397 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1398 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1399 * 1400 * See the License for the specific language governing permissions and limitations under the License. 1401 */function Bi(t,e){var n;const r=lc(t);return n=class extends r{constructor(...o){super(...o),this.transactionManager=new e(Object.assign({storageManager:this.storageManager},this.options.transactionManager)),this.pkce={DEFAULT_CODE_CHALLENGE_METHOD:Je.DEFAULT_CODE_CHALLENGE_METHOD,generateVerifier:Je.generateVerifier,computeChallenge:Je.computeChallenge},this._pending={handleLogin:!1},this._tokenQueue=new Kn,this.token=oc(this,this._tokenQueue),this.tokenManager=new uc(this,this.options.tokenManager),this.endpoints=sc(this)}clearStorage(){super.clearStorage(),this.tokenManager.clear()}async isAuthenticated(o={}){const{autoRenew:s,autoRemove:a}=this.tokenManager.getOptions(),c=o.onExpiredToken?o.onExpiredToken==="renew":s,u=o.onExpiredToken?o.onExpiredToken==="remove":a;let{accessToken:l}=this.tokenManager.getTokensSync();if(l&&this.tokenManager.hasExpired(l))if(l=void 0,c)try{l=await this.tokenManager.renew("accessToken")}catch{}else u&&this.tokenManager.remove("accessToken");let{idToken:f}=this.tokenManager.getTokensSync();if(f&&this.tokenManager.hasExpired(f))if(f=void 0,c)try{f=await this.tokenManager.renew("idToken")}catch{}else u&&this.tokenManager.remove("idToken");return!!(l&&f)}async signInWithRedirect(o={}){const{originalUri:s}=o,a=nt(o,["originalUri"]);if(!this._pending.handleLogin){this._pending.handleLogin=!0;
1401try{s&&this.setOriginalUri(s);const c=Object.assign({scopes:this.options.scopes||["openid","email","profile"]},a);await this.token.getWithRedirect(c)}finally{this._pending.handleLogin=!1}}}async getUser(){const{idToken:o,accessToken:s}=this.tokenManager.getTokensSync();return this.token.getUserInfo(s,o)}getIdToken(){const{idToken:o}=this.tokenManager.getTokensSync();return o?o.idToken:void 0}getAccessToken(){const{accessToken:o}=this.tokenManager.getTokensSync();return o?o.accessToken:void 0}getRefreshToken(){const{refreshToken:o}=this.tokenManager.getTokensSync();return o?o.refreshToken:void 0}async getOrRenewAccessToken(){var o;const{accessToken:s}=this.tokenManager.getTokensSync();if(s&&!this.tokenManager.hasExpired(s))return s.accessToken;try{const a=this.tokenManager.getStorageKeyByType("accessToken"),c=await this.tokenManager.renew(a??"accessToken");return(o=c==null?void 0:c.accessToken)!==null&&o!==void 0?o:null}catch(a){return this.emitter.emit("error",a),null}}async storeTokensFromRedirect(){const{tokens:o,responseType:s}=await this.token.parseFromUrl();s!=="none"&&this.tokenManager.setTokens(o)}isLoginRedirect(){return Hn(this)}isPKCE(){return!!this.options.pkce}hasResponseType(o){return ra(o,this.options)}isAuthorizationCodeFlow(){return this.hasResponseType("code")}async invokeApiMethod(o){if(!o.accessToken){const s=(await this.tokenManager.getTokens()).accessToken;o.accessToken=s==null?void 0:s.accessToken}return oe(this,o)}async revokeAccessToken(o){if(!o){const s=await this.tokenManager.getTokens();o=s.accessToken;const a=this.tokenManager.getStorageKeyByType("accessToken");this.tokenManager.remove(a),this.options.dpop&&await fr("access",s)}return o?this.token.revoke(o):Promise.resolve(null)}async revokeRefreshToken(o){if(!o){const s=await this.tokenManager.getTokens();o=s.refreshToken;const a=this.tokenManager.getStorageKeyByType("refreshToken");this.tokenManager.remove(a),this.options.dpop&&await fr("refresh",s)}return o?this.token.revoke(o):Promise.resolve(null)}getSignOutRedirectUrl(o={}){let{idToken:s,postLogoutRedirectUri:a,state:c}=o;if(s||(s=this.tokenManager.getTokensSync().idToken),!s)return"";a===void 0&&(a=this.options.postLogoutRedirectUri);const u=me(this).logoutUrl,l=s.idToken;let f=u+"?id_token_hint="+encodeURIComponent(l);return a&&(f+="&post_logout_redirect_uri="+encodeURIComponent(a)),c&&(f+="&state="+encodeURIComponent(c)),f}async signOut(o){var s;o=Object.assign({},o);const a=window.location.origin,c=window.location.href,u=o.postLogoutRedirectUri===null?null:o.postLogoutRedirectUri||this.options.postLogoutRedirectUri||a,l=o==null?void 0:o.state;let f=o.accessToken,d=o.refreshToken;const g=o.revokeAccessToken!==!1,p=o.revokeRefreshToken!==!1;p&&typeof d>"u"&&(d=this.tokenManager.getTokensSync().refreshToken),g&&typeof f>"u"&&(f=this.tokenManager.getTokensSync().accessToken),o.idToken||(o.idToken=this.tokenManager.getTokensSync().idToken),p&&d&&await this.revokeRefreshToken(d),g&&f&&await this.revokeAccessToken(f);const b=(s=f==null?void 0:f.dpopPairId)!==null&&s!==void 0?s:d==null?void 0:d.dpopPairId;this.options.dpop&&b&&await yn(b);const O=this.getSignOutRedirectUrl(Object.assign(Object.assign({},o),{postLogoutRedirectUri:u}));if(O)return o.clearTokensBeforeRedirect?this.tokenManager.clear():this.tokenManager.addPendingRemoveFlags(),window.location.assign(O),!0;{const S=await this.closeSession(),I=new URL(u||a);return l&&I.searchParams.append("state",l),u===c?window.location.href=I.href:window.location.assign(I.href),S}}async getDPoPAuthorizationHeaders(o){if(!this.options.dpop)throw new m("DPoP is not configured for this client instance");let{accessToken:s}=o;if(s||(s=this.tokenManager.getTokensSync().accessToken),!s)throw new m("AccessToken is required to generate a DPoP Proof");const a=await Gn(s==null?void 0:s.dpopPairId),c=await ji(Object.assign(Object.assign({},o),{keyPair:a,accessToken:s.accessToken}));return{Authorization:`DPoP ${s.accessToken}`,Dpop:c}}async clearDPoPStorage(o=!1){var s,a;if(o)return Oa();const c=await this.tokenManager.getTokens(),u=((s=c.accessToken)===null||s===void 0?void 0:s.dpopPairId)||
1401((a=c.refreshToken)===null||a===void 0?void 0:a.dpopPairId);u&&await yn(u)}parseUseDPoPNonceError(o){var s;const a=ee.getWWWAuthenticateHeader(o),c=ee.parseHeader(a??"");if(Mi(c)){let u=null;return Dr(o==null?void 0:o.get)&&(u=o.get("DPoP-Nonce")),u=(s=u??o["dpop-nonce"])!==null&&s!==void 0?s:o["DPoP-Nonce"],u}return null}},n.crypto=ha,n}var er={exports:{}};class $i extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}class qt{static fn(e){return(...n)=>new qt((r,i,o)=>{n.push(o),e(...n).then(r,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((n,r)=>{this._reject=r;const i=a=>{(!this._isCanceled||!s.shouldReject)&&(this._isPending=!1,n(a))},o=a=>{this._isPending=!1,r(a)},s=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,o,s)})}then(e,n){return this._promise.then(e,n)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const n of this._cancelHandlers)n()}catch(n){this._reject(n);return}this._rejectOnCancel&&this._reject(new $i(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(qt.prototype,Promise.prototype);er.exports=qt;er.exports.CancelError=$i;var dc=er.exports;const fc=Mt(dc);/*! 1402 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1403 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1404 * 1405 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1406 * Unless required by applicable law or agreed to in writing, software 1407 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1408 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1409 * 1410 * See the License for the specific language governing permissions and limitations under the License. 1411 */const hc=null,mr={updateAuthStatePromise:null,canceledTimes:0},Xt="authStateChange",pc=10,gc=(t,e)=>t?t.isAuthenticated===e.isAuthenticated&&JSON.stringify(t.idToken)===JSON.stringify(e.idToken)&&JSON.stringify(t.accessToken)===JSON.stringify(e.accessToken)&&t.error===e.error:!1;class mc{constructor(e){if(!e.emitter)throw new m("Emitter should be initialized before AuthStateManager");this._sdk=e,this._pending=Object.assign({},mr),this._authState=hc,this._logOptions={},this._prevAuthState=null,this._transformQueue=new Kn({quiet:!0}),e.tokenManager.on(_e,(n,r)=>{this._setLogOptions({event:_e,key:n,token:r}),this.updateAuthState()}),e.tokenManager.on(Oe,(n,r)=>{this._setLogOptions({event:Oe,key:n,token:r}),this.updateAuthState()})}_setLogOptions(e){this._logOptions=e}getAuthState(){return this._authState}getPreviousAuthState(){return this._prevAuthState}async updateAuthState(){const{transformAuthState:e,devMode:n}=this._sdk.options,r=a=>{const{event:c,key:u,token:l}=this._logOptions;$e().group(`OKTA-AUTH-JS:updateAuthState: Event:${c} Status:${a}`),$e().log(u,l),$e().log("Current authState",this._authState),$e().groupEnd(),this._logOptions={}},i=a=>{if(gc(this._authState,a)){n&&r("unchanged");return}this._prevAuthState=this._authState,this._authState=a,this._sdk.emitter.emit(Xt,Object.assign({},a)),n&&r("emitted")},o=a=>this._pending.updateAuthStatePromise.then(()=>{const c=this._pending.updateAuthStatePromise;return c&&c!==a?o(c):this.getAuthState()});if(this._pending.updateAuthStatePromise){if(this._pending.canceledTimes>=pc)return n&&r("terminated"),o(this._pending.updateAuthStatePromise);this._pending.updateAuthStatePromise.cancel()}const s=new fc((a,c,u)=>{u.shouldReject=!1,u(()=>{this._pending.updateAuthStatePromise=null,this._pending.canceledTimes=this._pending.canceledTimes+1,n&&r("canceled")});const l=f=>{if(s.isCanceled){a();return}i(f),a(),this._pending=Object.assign({},mr)};this._sdk.isAuthenticated().then(()=>
1411{if(s.isCanceled){a();return}const{accessToken:f,idToken:d,refreshToken:g}=this._sdk.tokenManager.getTokensSync(),p={accessToken:f,idToken:d,refreshToken:g,isAuthenticated:!!(f&&d)};(e?this._transformQueue.push(e,null,this._sdk,p):Promise.resolve(p)).then(O=>l(O)).catch(O=>l({accessToken:f,idToken:d,refreshToken:g,isAuthenticated:!1,error:O}))})});return this._pending.updateAuthStatePromise=s,o(s)}subscribe(e){this._sdk.emitter.on(Xt,e)}unsubscribe(e){this._sdk.emitter.off(Xt,e)}}/*! 1412 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1413 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1414 * 1415 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1416 * Unless required by applicable law or agreed to in writing, software 1417 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1418 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1419 * 1420 * See the License for the specific language governing permissions and limitations under the License. 1421 */class vc{constructor(e,n={}){this.started=!1,this.tokenManager=e,this.options=n,this.renewTimeQueue=[],this.onTokenExpiredHandler=this.onTokenExpiredHandler.bind(this)}shouldThrottleRenew(){let e=!1;if(this.renewTimeQueue.push(Date.now()),this.renewTimeQueue.length>=10){const n=this.renewTimeQueue.shift();e=this.renewTimeQueue[this.renewTimeQueue.length-1]-n<30*1e3}return e}requiresLeadership(){return!!this.options.syncStorage&&$()}processExpiredTokens(){const n=this.tokenManager.getStorage().getStorage();Object.keys(n).forEach(r=>{const i=n[r];!Se(i)&&this.tokenManager.hasExpired(i)&&this.onTokenExpiredHandler(r)})}onTokenExpiredHandler(e){if(this.options.autoRenew)if(this.shouldThrottleRenew()){const n=new m("Too many token renew requests");this.tokenManager.emitError(n)}else this.tokenManager.renew(e).catch(()=>{});else this.options.autoRemove&&this.tokenManager.remove(e)}canStart(){return(!!this.options.autoRenew||!!this.options.autoRemove)&&!this.started}async start(){this.canStart()&&(this.tokenManager.on(wn,this.onTokenExpiredHandler),this.tokenManager.isStarted()&&this.processExpiredTokens(),this.started=!0)}async stop(){this.started&&(this.tokenManager.off(wn,this.onTokenExpiredHandler),this.renewTimeQueue=[],this.started=!1)}isStarted(){return this.started}}function yc(t){return t&&typeof t.then=="function"}Promise.resolve(!1);var wc=Promise.resolve(!0),ce=Promise.resolve();function ke(t,e){return t||(t=0),new Promise(function(n){return setTimeout(function(){return n(e)},t)})}function Tc(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function lt(){return Math.random().toString(36).substring(2)}var vr=0,Zt=0;function Wt(){var t=new Date().getTime();return t===vr?(Zt++,t*1e3+Zt):(vr=t,Zt=0,t*1e3)}function bc(){return typeof navigator<"u"&&typeof navigator.locks<"u"&&typeof navigator.locks.request=="function"}var Sc=Wt,_c="native";function Oc(t){var e={messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(n){e.messagesCallback&&e.messagesCallback(n.data)},e}function kc(t){t.bc.close(),t.subFns=[]}function Ac(t,e){try{return t.bc.postMessage(e,!1),ce}catch(n){return Promise.reject(n)}}function Ec(t,e){t.messagesCallback=e}function Pc(){if((typeof window<"u"||typeof self<"u")&&typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function Ic(){return 150}var xc={create:Oc,close:kc,onMessage:Ec,postMessage:Ac,canBeUsed:Pc,type:_c,averageResponseTime:Ic,microSeconds:Sc},qi=function(){function t(e){this.ttl=e,this.map=new Map,this._to=!1}return t.prototype.has=function(e){return this.map.has(e)},t.prototype.add=function(e){var n=this;this.map.set(e,Wi()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,Cc(n)},0))},t.prototype.clear=function(){this.map.clear()},t}();function Cc(t){for(var e=Wi()-t.ttl,n=t.map[Symbol.iterator]();;){var r=n.next().value;if(!r)return;var i=r[0],o=r[1];if(o<e)t.map.delete(i);else return}}function Wi(){return new Date().getTime()}function tr(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=JSON.parse(JSON.stringify(t));
1421return typeof e.webWorkerSupport>"u"&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=1e3*45),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&typeof t.idb.onclose=="function"&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=1e3*60),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=1e3*60*2),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),typeof e.node.useFastPath>"u"&&(e.node.useFastPath=!0),e}var Mc=Wt,Rc="pubkey.broadcast-channel-0-",ue="messages",Kt={durability:"relaxed"},jc="idb";function Ki(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function nr(t){t.commit&&t.commit()}function Dc(t){var e=Ki(),n=Rc+t,r=e.open(n);return r.onupgradeneeded=function(i){var o=i.target.result;o.createObjectStore(ue,{keyPath:"id",autoIncrement:!0})},new Promise(function(i,o){r.onerror=function(s){return o(s)},r.onsuccess=function(){i(r.result)}})}function Uc(t,e,n){var r=new Date().getTime(),i={uuid:e,time:r,data:n},o=t.transaction([ue],"readwrite",Kt);return new Promise(function(s,a){o.oncomplete=function(){return s()},o.onerror=function(u){return a(u)};var c=o.objectStore(ue);c.add(i),nr(o)})}function Lc(t,e){var n=t.transaction(ue,"readonly",Kt),r=n.objectStore(ue),i=[],o=IDBKeyRange.bound(e+1,1/0);if(r.getAll){var s=r.getAll(o);return new Promise(function(c,u){s.onerror=function(l){return u(l)},s.onsuccess=function(l){c(l.target.result)}})}function a(){try{return o=IDBKeyRange.bound(e+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(c,u){var l=a();l.onerror=function(f){return u(f)},l.onsuccess=function(f){var d=f.target.result;d?d.value.id<e+1?d.continue(e+1):(i.push(d.value),d.continue()):(nr(n),c(i))}})}function Fc(t,e){if(t.closed)return Promise.resolve([]);var n=t.db.transaction(ue,"readwrite",Kt),r=n.objectStore(ue);return Promise.all(e.map(function(i){var o=r.delete(i);return new Promise(function(s){o.onsuccess=function(){return s()}})}))}function Nc(t,e){var n=new Date().getTime()-e,r=t.transaction(ue,"readonly",Kt),i=r.objectStore(ue),o=[];return new Promise(function(s){i.openCursor().onsuccess=function(a){var c=a.target.result;if(c){var u=c.value;u.time<n?(o.push(u),c.continue()):(nr(r),s(o))}else s(o)}})}function Hc(t){return Nc(t.db,t.options.idb.ttl).then(function(e){return Fc(t,e.map(function(n){return n.id}))})}function Vc(t,e){return e=tr(e),Dc(t).then(function(n){var r={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:lt(),eMIs:new qi(e.idb.ttl*2),writeBlockPromise:ce,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,e.idb.onclose&&e.idb.onclose()},Gi(r),r})}function Gi(t){t.closed||zi(t).then(function(){return ke(t.options.idb.fallbackInterval)}).then(function(){return Gi(t)})}function Bc(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}function zi(t){return t.closed||!t.messagesCallback?ce:Lc(t.db,t.lastCursorId).then(function(e){var n=e.filter(function(r){return!!r}).map(function(r){return r.id>t.lastCursorId&&(t.lastCursorId=r.id),r}).filter(function(r){return Bc(r,t)}).sort(function(r,i){return r.time-i.time});return n.forEach(function(r){t.messagesCallback&&(t.eMIs.add(r.id),t.messagesCallback(r.data))}),ce})}function $c(t){t.closed=!0,t.db.close()}function qc(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return Uc(t.db,t.uuid,e)}).then(function(){Tc(0,10)===0&&Hc(t)}),t.writeBlockPromise}function Wc(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e,zi(t)}function Kc(){return!!Ki()}function Gc(t){return t.idb.fallbackInterval*2}var zc={create:Vc,close:$c,onMessage:Wc,postMessage:qc,canBeUsed:Kc,type:jc,averageResponseTime:Gc,microSeconds:Mc},Jc=Wt,Qc="pubkey.broadcastChannel-",Yc="localstorage";function Ji(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}function Qi(t){return Qc+t}function Xc(t,e){return new Promise(function(n){ke().then(function(){var r=Qi(t.channelName),i={token:lt(),time:new Date().getTime(),data:e,uuid:t.uuid},o=JSON.stringify(i);Ji().setItem(r,o);var s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=r,s.newValue=o,window.dispatchEvent(s),n()})})}function Zc(t,e){var n=Qi(t),r=function(o){o.key===n&&e(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function eu(t){window.removeEventListener("storage",t)}function tu(t,e){if(e=tr(e),!Yi())throw new Error("BroadcastChannel: localstorage c
1421annot be used");var n=lt(),r=new qi(e.localstorage.removeTimeout),i={channelName:t,uuid:n,eMIs:r};return i.listener=Zc(t,function(o){i.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time<i.messagesCallbackTime||(r.add(o.token),i.messagesCallback(o.data)))}),i}function nu(t){eu(t.listener)}function ru(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e}function Yi(){var t=Ji();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}function iu(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}var ou={create:tu,close:nu,onMessage:ru,postMessage:Xc,canBeUsed:Yi,type:Yc,averageResponseTime:iu,microSeconds:Jc},su=Wt,au="simulate",rr=new Set;function cu(t){var e={name:t,messagesCallback:null};return rr.add(e),e}function uu(t){rr.delete(t)}function lu(t,e){return new Promise(function(n){return setTimeout(function(){var r=Array.from(rr);r.filter(function(i){return i.name===t.name}).filter(function(i){return i!==t}).filter(function(i){return!!i.messagesCallback}).forEach(function(i){return i.messagesCallback(e)}),n()},5)})}function du(t,e){t.messagesCallback=e}function fu(){return!0}function hu(){return 5}var pu={create:cu,close:uu,onMessage:du,postMessage:lu,canBeUsed:fu,type:au,averageResponseTime:hu,microSeconds:su},yr=[xc,zc,ou];function gu(t){var e=[].concat(t.methods,yr).filter(Boolean);if(t.type){if(t.type==="simulate")return pu;var n=e.find(function(i){return i.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(i){return i.type!=="idb"}));var r=e.find(function(i){return i.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(yr.map(function(i){return i.type})))}var Xi=new Set,mu=0,Gt=function(e,n){this.id=mu++,Xi.add(this),this.name=e,wr&&(n=wr),this.options=tr(n),this.method=gu(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,vu(this)};Gt._pubkey=!0;var wr;Gt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return Tr(this,"message",e)},postInternal:function(e){return Tr(this,"internal",e)},set onmessage(t){var e=this.method.microSeconds(),n={time:e,fn:t};Sr(this,"message",this._onML),t&&typeof t=="function"?(this._onML=n,br(this,"message",n)):this._onML=null},addEventListener:function(e,n){var r=this.method.microSeconds(),i={time:r,fn:n};br(this,e,i)},removeEventListener:function(e,n){var r=this._addEL[e].find(function(i){return i.fn===n});Sr(this,e,r)},close:function(){var e=this;if(!this.closed){Xi.delete(this),this.closed=!0;var n=this._prepP?this._prepP:ce;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(r){return r()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Tr(t,e,n){var r=t.method.microSeconds(),i={time:r,type:e,data:n},o=t._prepP?t._prepP:ce;return o.then(function(){var s=t.method.postMessage(t._state,i);return t._uMP.add(s),s.catch().then(function(){return t._uMP.delete(s)}),s})}function vu(t){var e=t.method.create(t.name,t.options);yc(e)?(t._prepP=e,e.then(function(n){t._state=n})):t._state=e}function Zi(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function br(t,e,n){t._addEL[e].push(n),yu(t)}function Sr(t,e,n){t._addEL[e]=t._addEL[e].filter(function(r){return r!==n}),wu(t)}function yu(t){if(!t._iL&&Zi(t)){var e=function(i){t._addEL[i.type].forEach(function(o){var s=1e5,a=o.time-s;i.time>=a&&o.fn(i.data)})},n=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,n)}):(t._iL=!0,t.method.onMessage(t._state,e,n))}}function wu(t){if(t._iL&&!Zi(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}function Tu(t){if(typeof WorkerGlobalScope=="function"&&self instanceof WorkerGlobalScope){var e=self.close.bind(self);self.close=function(){return t(),e()}}else{if(typeof window.addEventListener!="function")return;window.addEventListener("beforeunload",function(){t()},!0),window.addEventListener("unload",function(){t()},!0)}}function bu(t){process.on("exit",function(){return t()}
1421),process.on("beforeExit",function(){return t().then(function(){return process.exit()})}),process.on("SIGINT",function(){return t().then(function(){return process.exit()})}),process.on("uncaughtException",function(e){return t().then(function(){console.trace(e),process.exit(101)})})}var Su=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]",_u=Su?bu:Tu,Qe=new Set,_r=!1;function Ou(){_r||(_r=!0,_u(Au))}function ku(t){if(Ou(),typeof t!="function")throw new Error("Listener is no function");Qe.add(t);var e={remove:function(){return Qe.delete(t)},run:function(){return Qe.delete(t),t()}};return e}function Au(){var t=[];return Qe.forEach(function(e){t.push(e()),Qe.delete(e)}),Promise.all(t)}function Pe(t,e){var n={context:"leader",action:e,token:t.token};return t.broadcastChannel.postInternal(n)}function eo(t){t.isLeader=!0,t._hasLeader=!0;var e=ku(function(){return t.die()});t._unl.push(e);var n=function(i){i.context==="leader"&&i.action==="apply"&&Pe(t,"tell"),i.context==="leader"&&i.action==="tell"&&!t._dpLC&&(t._dpLC=!0,t._dpL(),Pe(t,"tell"))};return t.broadcastChannel.addEventListener("internal",n),t._lstns.push(n),Pe(t,"tell")}var to=function(e,n){var r=this;this.broadcastChannel=e,e._befC.push(function(){return r.die()}),this._options=n,this.isLeader=!1,this.isDead=!1,this.token=lt(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name};to.prototype={hasLeader:function(){var e=this;return navigator.locks.query().then(function(n){var r=n.held?n.held.filter(function(i){return i.name===e.lN}):[];return!!(r&&r.length>0)})},awaitLeadership:function(){var e=this;if(!this._wLMP){this._wKMC.c=new AbortController;var n=new Promise(function(r,i){e._wKMC.res=r,e._wKMC.rej=i});this._wLMP=new Promise(function(r){navigator.locks.request(e.lN,{signal:e._wKMC.c.signal},function(){return e._wKMC.c=void 0,eo(e),r(),n}).catch(function(){})})}return this._wLMP},set onduplicate(t){},die:function(){var e=this;return this._lstns.forEach(function(n){return e.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),Pe(this,"death")}};var no=function(e,n){var r=this;this.broadcastChannel=e,this._options=n,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=lt(),this._aplQ=ce,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var i=function(s){s.context==="leader"&&(s.action==="death"&&(r._hasLeader=!1),s.action==="tell"&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",i),this._lstns.push(i)};no.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(e){var n=this;if(this.isLeader)return ke(0,!0);if(this.isDead)return ke(0,!1);if(this._aplQC>1)return this._aplQ;var r=function(){if(n.isLeader)return wc;var o=!1,s,a=new Promise(function(l){s=function(){o=!0,l()}}),c=function(f){f.context==="leader"&&f.token!=n.token&&(f.action==="apply"&&f.token>n.token&&s(),f.action==="tell"&&(s(),n._hasLeader=!0))};n.broadcastChannel.addEventListener("internal",c);var u=e?n._options.responseTime*4:n._options.responseTime;return Pe(n,"apply").then(function(){return Promise.race([ke(u),a.then(function(){return Promise.reject(new Error)})])}).then(function(){return Pe(n,"apply")}).then(function(){return Promise.race([ke(u),a.then(function(){return Promise.reject(new Error)})])}).catch(function(){}).then(function(){return n.broadcastChannel.removeEventListener("internal",c),o?!1:eo(n).then(function(){return!0})})};return this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then(function(){return r()}).then(function(){n._aplQC=n._aplQC-1}),this._aplQ.then(function(){return n.isLeader})},awaitLeadership:function(){return this._aLP||(this._aLP=Eu(this)),this._aLP},set onduplicate(t){this._dpL=t},die:function(){var e=this;return this._lstns.forEach(function(n){return e.broadcastChannel.removeEventListener("internal",n)}),this._lstns=[],this._unl.forEach(function(n){return n.remove()}),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,Pe(this,"death")}};function Eu(t){return t.isLeader?ce:new Promise(function(e){var n=!1;function r(){n||(n=!0,t.broadcastChannel.removeEventListener("internal",o),e(!0))}t.applyOnce().then(function(){t.isLeader&&r()});var i=function s(){return ke(t._options.fallbackInterval).then(function(){if(!(t.isDead||n))if(t.isLeader)r();else return t.applyOnce(!0).then(function(){t.isLeader?r():s()})})};i();var o=function(a){a.context==="leader"&&a.action==="death"&&(t._hasLeader=!1,t.applyOnce().then(function(){t.isLeader&&r()}))};t.broadcastChannel.addEventListener("internal",o),t._lstns.push(o)})}function Pu(t,e){return t||(t={}),t=JSON.parse(JSON.stringify(t)),t.fallbackInterval||(t.fallbackInterval=3e3),t.responseTime||(t.responseTime=e.method.averageResponseTime(e.options)),t}function Iu(t,e){if(t._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");e=Pu(e,t);var n=bc()?new to(t,e):new no(t,e);return t._befC.push(function(){return n.die()}),t._leaderElector=n,n}/*! 1422 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1423 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1424 * 1425 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1426 * Unless required by applicable law or agreed to in writing, softw
1426are 1427 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1428 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1429 * 1430 * See the License for the specific language governing permissions and limitations under the License. 1431 */class xu{constructor(e,n={}){this.started=!1,this.enablePostMessage=!0,this.tokenManager=e,this.options=n,this.onTokenAddedHandler=this.onTokenAddedHandler.bind(this),this.onTokenRemovedHandler=this.onTokenRemovedHandler.bind(this),this.onTokenRenewedHandler=this.onTokenRenewedHandler.bind(this),this.onSetStorageHandler=this.onSetStorageHandler.bind(this),this.onSyncMessageHandler=this.onSyncMessageHandler.bind(this)}requiresLeadership(){return!1}isStarted(){return this.started}canStart(){return!!this.options.syncStorage&&$()&&!this.started}async start(){if(!this.canStart())return;const{syncChannelName:e}=this.options;try{this.channel=new Gt(e)}catch{throw new m("SyncStorageService is not supported in current browser.")}this.tokenManager.on(_e,this.onTokenAddedHandler),this.tokenManager.on(Oe,this.onTokenRemovedHandler),this.tokenManager.on(qe,this.onTokenRenewedHandler),this.tokenManager.on(We,this.onSetStorageHandler),this.channel.addEventListener("message",this.onSyncMessageHandler),this.started=!0}async stop(){var e,n;this.started&&(this.tokenManager.off(_e,this.onTokenAddedHandler),this.tokenManager.off(Oe,this.onTokenRemovedHandler),this.tokenManager.off(qe,this.onTokenRenewedHandler),this.tokenManager.off(We,this.onSetStorageHandler),(e=this.channel)===null||e===void 0||e.removeEventListener("message",this.onSyncMessageHandler),await((n=this.channel)===null||n===void 0?void 0:n.close()),this.channel=void 0,this.started=!1)}onTokenAddedHandler(e,n){var r;this.enablePostMessage&&((r=this.channel)===null||r===void 0||r.postMessage({type:_e,key:e,token:n}))}onTokenRemovedHandler(e,n){var r;this.enablePostMessage&&((r=this.channel)===null||r===void 0||r.postMessage({type:Oe,key:e,token:n}))}onTokenRenewedHandler(e,n,r){var i;this.enablePostMessage&&((i=this.channel)===null||i===void 0||i.postMessage({type:qe,key:e,token:n,oldToken:r}))}onSetStorageHandler(e){var n;(n=this.channel)===null||n===void 0||n.postMessage({type:We,storage:e})}onSyncMessageHandler(e){switch(this.enablePostMessage=!1,e.type){case We:this.tokenManager.getStorage().setStorage(e.storage);break;case _e:this.tokenManager.emitAdded(e.key,e.token),this.tokenManager.setExpireEventTimeout(e.key,e.token);break;case Oe:this.tokenManager.clearExpireEventTimeout(e.key),this.tokenManager.emitRemoved(e.key,e.token);break;case qe:this.tokenManager.emitRenewed(e.key,e.token,e.oldToken);break}this.enablePostMessage=!0}}/*! 1432 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1433 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1434 * 1435 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1436 * Unless required by applicable law or agreed to in writing, software 1437 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1438 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1439 * 1440 * See the License for the specific language governing permissions and limitations under the License. 1441 */class Cu{constructor(e={}){this.started=!1,this.options=e,this.onLeaderDuplicate=this.onLeaderDuplicate.bind(this),this.onLeader=this.onLeader.bind(this)}onLeaderDuplicate(){}async onLeader(){var e,n;await((n=(e=this.options).onLeader)===null||n===void 0?void 0:n.call(e))}isLeader(){var e;return!!(!((e=this.elector)===null||e===void 0)&&e.isLeader)}hasLeader(){var e;return!!(!((e=this.elector)===null||e===void 0)&&e.hasLeader)}async start(){if(this.canStart()){const{electionChannelName:e}=this.options;this.channel=new Gt(e),this.elector=Iu(this.channel),this.elector.onduplicate=this.onLeaderDuplicate,this.elector.awaitLeadership().then(this.onLeader),this.started=!0}}async stop(){this.started&&(this.elector&&(await this.elector.die(),this.elector=void 0),this.channel&&(this.channel.postInternal=()=>Promise.resolve(),await this.channel.close(),this.channel=void 0),this.started=!1)}requiresLeadership(){return!1}isStarted(){return this.started}canStart(){return $()&&!this.started}}/*! 1442 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1443 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1444 * 1445 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1446 * Unless required by applicable law or agreed to in writing, softw
1446are 1447 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1448 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1449 * 1450 * See the License for the specific language governing permissions and limitations under the License. 1451 */const Or=()=>Math.floor(Date.now()/1e3);class Mu{constructor(e,n={}){this.started=!1,this.lastHidden=-1,this.tokenManager=e,this.options=n,this.onPageVisbilityChange=this._onPageVisbilityChange.bind(this)}_onPageVisbilityChange(){if(document.hidden)this.lastHidden=Or();else if(this.lastHidden>0&&Or()-this.lastHidden>=this.options.tabInactivityDuration){const{accessToken:e,idToken:n}=this.tokenManager.getTokensSync();if(e&&this.tokenManager.hasExpired(e)){const r=this.tokenManager.getStorageKeyByType("accessToken");this.tokenManager.renew(r).catch(()=>{})}else if(n&&this.tokenManager.hasExpired(n)){const r=this.tokenManager.getStorageKeyByType("idToken");this.tokenManager.renew(r).catch(()=>{})}}}async start(){this.canStart()&&document&&(document.addEventListener("visibilitychange",this.onPageVisbilityChange),this.started=!0)}async stop(){document&&(document.removeEventListener("visibilitychange",this.onPageVisbilityChange),this.started=!1)}canStart(){return $()&&!!this.options.autoRenew&&!!this.options.renewOnTabActivation&&!this.started}requiresLeadership(){return!1}isStarted(){return this.started}}/*! 1452 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1453 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1454 * 1455 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1456 * Unless required by applicable law or agreed to in writing, software 1457 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1458 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1459 * 1460 * See the License for the specific language governing permissions and limitations under the License. 1461 */const ro="autoRenew",io="syncStorage",_t="leaderElection",oo="renewOnTabActivation";class Fe{constructor(e,n={}){this.sdk=e,this.onLeader=this.onLeader.bind(this);const{autoRenew:r,autoRemove:i,syncStorage:o}=e.tokenManager.getOptions();n.electionChannelName=n.electionChannelName||n.broadcastChannelName,this.options=Object.assign({},Fe.defaultOptions,{autoRenew:r,autoRemove:i,syncStorage:o},{electionChannelName:`${e.options.clientId}-election`,syncChannelName:`${e.options.clientId}-sync`},te(n)),this.started=!1,this.services=new Map,Fe.knownServices.forEach(s=>{const a=this.createService(s);a&&this.services.set(s,a)})}async onLeader(){this.started&&await this.startServices()}isLeader(){var e;return(e=this.getService(_t))===null||e===void 0?void 0:e.isLeader()}isLeaderRequired(){return[...this.services.values()].some(e=>e.canStart()&&e.requiresLeadership())}async start(){this.started||(await this.startServices(),this.started=!0)}async stop(){await this.stopServices(),this.started=!1}getService(e){return this.services.get(e)}async startServices(){for(const[e,n]of this.services.entries())this.canStartService(e,n)&&await n.start()}async stopServices(){for(const e of this.services.values())await e.stop()}canStartService(e,n){let r=n.canStart()&&!n.isStarted();return e===_t?r&&(r=this.isLeaderRequired()):n.requiresLeadership()&&r&&(r=this.isLeader()),r}createService(e){const n=this.sdk.tokenManager;let r;switch(e){case _t:r=new Cu(Object.assign(Object.assign({},this.options),{onLeader:this.onLeader}));break;case ro:r=new vc(n,Object.assign({},this.options));break;case io:r=new xu(n,Object.assign({},this.options));break;case oo:r=new Mu(n,Object.assign({},this.options));break;default:throw new Error(`Unknown service ${e}`)}return r}}Fe.knownServices=[ro,io,_t,oo];Fe.defaultOptions={autoRenew:!0,autoRemove:!0,syncStorage:!0,renewOnTabActivation:!0,tabInactivityDuration:1800};/*! 1462 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1463 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1464 * 1465 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1466 * Unless required by applicable law or agreed to in writing, softw
1466are 1467 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1468 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1469 * 1470 * See the License for the specific language governing permissions and limitations under the License. 1471 */function Ru(t){return class extends t{constructor(...n){super(...n),this.authStateManager=new mc(this),this.serviceManager=new Fe(this,this.options.services)}async start(){await this.serviceManager.start(),this.tokenManager.start(),this.token.isLoginRedirect()||await this.authStateManager.updateAuthState()}async stop(){this.tokenManager.stop(),await this.serviceManager.stop()}async handleRedirect(n){await this.handleLoginRedirect(void 0,n)}async handleLoginRedirect(n,r){let i=this.options.state;if(n)this.tokenManager.setTokens(n),r=r||this.getOriginalUri(this.options.state);else if(this.isLoginRedirect())try{i=(await Hi(this,{})).state,r=r||this.getOriginalUri(i),await this.storeTokensFromRedirect()}catch(s){throw await this.authStateManager.updateAuthState(),s}else return;await this.authStateManager.updateAuthState(),this.removeOriginalUri(i);const{restoreOriginalUri:o}=this.options;o?await o(this,r):r&&window.location.replace(r)}}}/*! 1472 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1473 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1474 * 1475 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1476 * Unless required by applicable law or agreed to in writing, software 1477 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1478 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1479 * 1480 * See the License for the specific language governing permissions and limitations under the License. 1481 */function ju(t){return t.session.get().then(function(e){return e.status==="ACTIVE"}).catch(function(){return!1})}function Du(t){return Ue(t,"/api/v1/sessions/me",{withCredentials:!0}).then(function(e){var n=Ke(e,"_links");return n.refresh=function(){return ye(t,nn(e,"refresh").href,{},{withCredentials:!0})},n.user=function(){return Ue(t,nn(e,"user").href,{withCredentials:!0})},n}).catch(function(){return{status:"INACTIVE"}})}function Uu(t){return oe(t,{url:t.getIssuerOrigin()+"/api/v1/sessions/me",method:"DELETE",withCredentials:!0})}function Lu(t){return ye(t,"/api/v1/sessions/me/lifecycle/refresh",{},{withCredentials:!0})}function Fu(t,e,n){n=n||window.location.href,window.location.assign(t.getIssuerOrigin()+"/login/sessionCookieRedirect"+le({checkAccountSetupComplete:!0,token:e,redirectUrl:n}))}/*! 1482 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1483 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1484 * 1485 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1486 * Unless required by applicable law or agreed to in writing, software 1487 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1488 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1489 * 1490 * See the License for the specific language governing permissions and limitations under the License. 1491 */function Nu(t){return{close:Uu.bind(null,t),exists:ju.bind(null,t),get:Du.bind(null,t),refresh:Lu.bind(null,t),setCookieAndRedirect:Fu.bind(null,t)}}/*! 1492 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1493 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1494 * 1495 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1496 * Unless required by applicable law or agreed to in writing, software 1497 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1498 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1499 * 1500 * See the License for the specific language governing permissions and limitations under the License. 1501 */function so(t){return class extends t{constructor(...n){super(...n),this.session=Nu(this)}closeSession(){return this.session.close().then(async()=>(this.clearStorage(),!0)).catch(function(n){if(n.name==="AuthApiError"&&n.errorCode==="E0000007")return!1;throw n})}}}/*! 1502 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1503 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1504 * 1505 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1506 * Unless required by applicable law or agreed to in writing, softw
1506are 1507 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1508 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1509 * 1510 * See the License for the specific language governing permissions and limitations under the License. 1511 */function Hu(t,e,n){const r=Ai(e),i=Ei(r,t),o=Pi(i),s=so(o),a=Bi(s,n);return Ru(a)}/*! 1512 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1513 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1514 * 1515 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1516 * Unless required by applicable law or agreed to in writing, software 1517 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1518 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1519 * 1520 * See the License for the specific language governing permissions and limitations under the License. 1521 */const Vu=(t,e)=>e.source===t.contentWindow;function ao(t,e){var n;if(!bi())return Promise.reject(new m("Fingerprinting is not supported on this device"));const r=(n=e==null?void 0:e.container)!==null&&n!==void 0?n:document.body;let i,o,s;return new Promise(function(c,u){o=document.createElement("iframe"),o.style.display="none",s=function(f){var d;if(!Vu(o,f)||!f||!f.data||f.origin!==t.getIssuerOrigin())return;let g;try{g=JSON.parse(f.data)}catch{return}if(g){if(g.type==="FingerprintAvailable")return c(g.fingerprint);if(g.type==="FingerprintServiceReady")(d=o==null?void 0:o.contentWindow)===null||d===void 0||d.postMessage(JSON.stringify({type:"GetFingerprint"}),f.origin);else return u(new m("No data"))}},Ui(window,"message",s),o.src=t.getIssuerOrigin()+"/auth/services/devicefingerprint",r.appendChild(o),i=setTimeout(function(){u(new m("Fingerprinting timed out"))},(e==null?void 0:e.timeout)||15e3)}).finally(function(){var c;clearTimeout(i),Li(window,"message",s),r.contains(o)&&((c=o.parentElement)===null||c===void 0||c.removeChild(o))})}/*! 1522 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1523 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1524 * 1525 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1526 * Unless required by applicable law or agreed to in writing, software 1527 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1528 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1529 * 1530 * See the License for the specific language governing permissions and limitations under the License. 1531 */const co=(t=[])=>{const e=[];return t.forEach(n=>{n.key==="webauthn"&&e.push({type:"public-key",id:et(n.credentialId)})}),e},Bu=(t,e)=>({publicKey:{rp:t.rp,user:{id:et(t.user.id),name:t.user.name,displayName:t.user.displayName},challenge:et(t.challenge),pubKeyCredParams:t.pubKeyCredParams,attestation:t.attestation,authenticatorSelection:t.authenticatorSelection,excludeCredentials:co(e)}}),$u=(t,e)=>({publicKey:{challenge:et(t.challenge),userVerification:t.userVerification,allowCredentials:co(e)}}),qu=t=>{const e=t.response,n=t.id,r=Ee(e.clientDataJSON),i=Ee(e.attestationObject);return{id:n,clientData:r,attestation:i}},Wu=t=>{const e=t.response,n=t.id,r=Ee(e.clientDataJSON),i=Ee(e.authenticatorData),o=Ee(e.signature);return{id:n,clientData:r,authenticatorData:i,signatureData:o}},Ku=Object.freeze(Object.defineProperty({__proto__:null,buildCredentialCreationOptions:Bu,buildCredentialRequestOptions:$u,getAssertion:Wu,getAttestation:qu},Symbol.toStringTag,{value:"Module"}));/*! 1532 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1533 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1534 * 1535 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1536 * Unless required by applicable law or agreed to in writing, software 1537 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1538 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1539 * 1540 * See the License for the specific language governing permissions and limitations under the License. 1541 */function Gu(t){var e;return e=class extends t{constructor(...r){super(...r),this.idx=sa(this),this.fingerprint=ao.bind(null,this)}},e.webauthn=Ku,e}/*! 1542 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1543 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1544 * 1545 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1546 * Unless required by applicable law or agreed to in writing, softw
1546are 1547 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1548 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1549 * 1550 * See the License for the specific language governing permissions and limitations under the License. 1551 */function zu(t,e,n){const r=Hu(t,e,n);return Gu(r)}/*! 1552 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1553 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1554 * 1555 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1556 * Unless required by applicable law or agreed to in writing, software 1557 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1558 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1559 * 1560 * See the License for the specific language governing permissions and limitations under the License. 1561 */function Ju(){return class{constructor(e){this.devMode=!!e.devMode}}}/*! 1562 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1563 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1564 * 1565 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1566 * Unless required by applicable law or agreed to in writing, software 1567 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1568 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1569 * 1570 * See the License for the specific language governing permissions and limitations under the License. 1571 */function Qu(){return Object.assign({},St,{inMemoryStore:{}})}const Yu={token:{storageTypes:["localStorage","sessionStorage","cookie"]},cache:{storageTypes:["localStorage","sessionStorage","cookie"]},transaction:{storageTypes:["sessionStorage","localStorage","cookie"]},"shared-transaction":{storageTypes:["localStorage"]},"original-uri":{storageTypes:["localStorage"]}};function Xu(t={},e){var n=t.cookies||{};return typeof n.secure>"u"&&(n.secure=e),typeof n.sameSite>"u"&&(n.sameSite=n.secure?"none":"lax"),n.secure&&!e&&(ie(`The current page is not being served with the HTTPS protocol. 1572For security reasons, we strongly recommend using HTTPS. 1573If you cannot use HTTPS, set "cookies.secure" option to false.`),n.secure=!1),n.sameSite==="none"&&!n.secure&&(n.sameSite="lax"),n}/*! 1574 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1575 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1576 * 1577 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1578 * Unless required by applicable law or agreed to in writing, software 1579 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1580 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1581 * 1582 * See the License for the specific language governing permissions and limitations under the License. 1583 */function Zu(){const t=Ju();return class extends t{constructor(n){super(n),this.cookies=Xu(n,Oi()),this.storageUtil=n.storageUtil||Qu(),this.storageManager=Object.assign(Object.assign({},Yu),n.storageManager)}}}/*! 1584 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1585 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1586 * 1587 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1588 * Unless required by applicable law or agreed to in writing, software 1589 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1590 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1591 * 1592 * See the License for the specific language governing permissions and limitations under the License. 1593 */const el=/application\/\w*\+?json/;function tl(t){return t.headers.get("Content-Type")&&t.headers.get("Content-Type").toLowerCase().indexOf("application/json")>=0?t.json().catch(e=>({error:e,errorSummary:"Could not parse server response"})):t.text()}function nl(t,e,n){const r=typeof e=="object",i={};for(const s of n.headers.entries())i[s[0]]=s[1];const o={responseText:r?JSON.stringify(e):e,status:t,headers:i};return r&&(o.responseType="json",o.responseJSON=e),o}function rl(t,e,n){var r=n.data,i=n.headers||{},o=i["Content-Type"]||i["content-type"]||"";r&&typeof r!="string"&&(el.test(o)?r=JSON.stringify(r):o==="application/x-www-form-urlencoded"&&(r=Object.entries(r).map(([c,u])=>`${c}=${encodeURIComponent(u)}`).join("&")));var s=window.fetch||Ro,a=s(e,{method:t,headers:n.headers,body:r,credentials:n.withCredentials?"include":"omit"});return a.finally||(a=Promise.resolve(a)),a.then(function(c){var u=!c.ok,l=c.status;return tl(c).then(f=>nl(l,f,c)).then(f=>{var d;if(u||!((d=f.responseJSON)===null||d===void 0)&&d.error)throw f;return f})})}/*! 1594 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1595 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1596 * 1597 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1598 * Unless required by applicable law or agreed to in writing, softw
1598are 1599 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1600 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1601 * 1602 * See the License for the specific language governing permissions and limitations under the License. 1603 */function il(){const t=Zu();return class extends t{constructor(n){super(n),this.issuer=n.issuer,this.transformErrorXHR=n.transformErrorXHR,this.headers=n.headers,this.httpRequestClient=n.httpRequestClient||rl,this.httpRequestInterceptors=n.httpRequestInterceptors}}}/*! 1604 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1605 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1606 * 1607 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1608 * Unless required by applicable law or agreed to in writing, software 1609 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1610 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1611 * 1612 * See the License for the specific language governing permissions and limitations under the License. 1613 */const ol=!0;/*! 1614 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1615 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1616 * 1617 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1618 * Unless required by applicable law or agreed to in writing, software 1619 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1620 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1621 * 1622 * See the License for the specific language governing permissions and limitations under the License. 1623 */function sl(t){t=t||{};var e=t.scopes;if(e&&!Array.isArray(e))throw new m('scopes must be a array of strings. Required usage: new OktaAuth({scopes: ["openid", "email"]})');var n=t.issuer;if(!n)throw new m('No issuer passed to constructor. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');var r=new RegExp("^http?s?://.+");if(!r.test(n))throw new m('Issuer must be a valid URL. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');if(n.indexOf("-admin.okta")!==-1)throw new m('Issuer URL passed to constructor contains "-admin" in subdomain. Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com})')}function al(){const t=il();return class extends t{constructor(n){super(n),sl(n),this.issuer=Q(n.issuer),this.tokenUrl=Q(n.tokenUrl),this.authorizeUrl=Q(n.authorizeUrl),this.userinfoUrl=Q(n.userinfoUrl),this.revokeUrl=Q(n.revokeUrl),this.logoutUrl=Q(n.logoutUrl),this.pkce=n.pkce!==!1,this.clientId=n.clientId,this.redirectUri=n.redirectUri,$()&&(this.redirectUri=Ao(n.redirectUri,window.location.origin)),this.responseType=n.responseType,this.responseMode=n.responseMode,this.state=n.state,this.scopes=n.scopes,this.ignoreSignature=!!n.ignoreSignature,this.codeChallenge=n.codeChallenge,this.codeChallengeMethod=n.codeChallengeMethod,this.acrValues=n.acrValues,this.maxAge=n.maxAge,this.dpop=n.dpop===!0,this.tokenManager=n.tokenManager,this.postLogoutRedirectUri=n.postLogoutRedirectUri,this.restoreOriginalUri=n.restoreOriginalUri,this.transactionManager=Object.assign({enableSharedStorage:ol},n.transactionManager),this.clientSecret=n.clientSecret,this.setLocation=n.setLocation,this.ignoreLifetime=!!n.ignoreLifetime,!n.maxClockSkew&&n.maxClockSkew!==0?this.maxClockSkew=qr:this.maxClockSkew=n.maxClockSkew}}}/*! 1624 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1625 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1626 * 1627 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1628 * Unless required by applicable law or agreed to in writing, software 1629 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1630 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1631 * 1632 * See the License for the specific language governing permissions and limitations under the License. 1633 */function cl(){const t=al();return class extends t{constructor(n){super(n),this.services=n.services,this.transformAuthState=n.transformAuthState}}}/*! 1634 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1635 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1636 * 1637 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1638 * Unless required by applicable law or agreed to in writing, softw
1638are 1639 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1640 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1641 * 1642 * See the License for the specific language governing permissions and limitations under the License. 1643 */function ul(){const t=cl();return class extends t{constructor(n){super(n),this.flow=n.flow,this.activationToken=n.activationToken,this.recoveryToken=n.recoveryToken,this.idx=n.idx}}}/*! 1644 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1645 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1646 * 1647 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1648 * Unless required by applicable law or agreed to in writing, software 1649 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1650 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1651 * 1652 * See the License for the specific language governing permissions and limitations under the License. 1653 */class Re{constructor(e,n){if(!e)throw new m('"storage" is required');if(typeof n!="string"||!n.length)throw new m('"storageName" is required');this.storageName=n,this.storageProvider=e}getItem(e){return this.getStorage()[e]}setItem(e,n){return this.updateStorage(e,n)}removeItem(e){return this.clearStorage(e)}getStorage(){var e=this.storageProvider.getItem(this.storageName);e=e||"{}";try{return JSON.parse(e)}catch{throw new m("Unable to parse storage string: "+this.storageName)}}setStorage(e){try{var n=e?JSON.stringify(e):"{}";this.storageProvider.setItem(this.storageName,n)}catch{throw new m("Unable to set storage: "+this.storageName)}}clearStorage(e){if(!e){this.storageProvider.removeItem?this.storageProvider.removeItem(this.storageName):this.setStorage();return}var n=this.getStorage();delete n[e],this.setStorage(n)}updateStorage(e,n){var r=this.getStorage();r[e]=n,this.setStorage(r)}}/*! 1654 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1655 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1656 * 1657 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1658 * Unless required by applicable law or agreed to in writing, software 1659 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1660 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1661 * 1662 * See the License for the specific language governing permissions and limitations under the License. 1663 */function Ot(t){!$()&&!t.storageProvider&&!t.storageKey&&ie("Memory storage can only support simple single user use case on server side, please provide custom storageProvider or storageKey if advanced scenarios need to be supported.")}class ll{constructor(e,n,r){this.storageManagerOptions=e,this.cookieOptions=n,this.storageUtil=r}getOptionsForSection(e,n){return Object.assign({},this.storageManagerOptions[e],n)}getStorage(e){if(e=Object.assign({},this.cookieOptions,e),e.storageProvider)return e.storageProvider;let{storageType:n,storageTypes:r}=e;if(n==="sessionStorage"&&(e.sessionCookie=!0),n&&r){const i=r.indexOf(n);i>=0&&(r=r.slice(i),n=void 0)}return n||(n=this.storageUtil.findStorageType(r)),this.storageUtil.getStorageByType(n,e)}getTokenStorage(e){e=this.getOptionsForSection("token",e),Ot(e);const n=this.getStorage(e),r=e.storageKey||An;return new Re(n,r)}getHttpCache(e){e=this.getOptionsForSection("cache",e);const n=this.getStorage(e),r=e.storageKey||Kr;return new Re(n,r)}}/*! 1664 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1665 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1666 * 1667 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1668 * Unless required by applicable law or agreed to in writing, software 1669 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1670 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1671 * 1672 * See the License for the specific language governing permissions and limitations under the License. 1673 */function dl(){return class extends ll{constructor(e,n,r){super(e,n,r)}getTransactionStorage(e){e=this.getOptionsForSection("transaction",e),Ot(e);const n=this.getStorage(e),r=e.storageKey||Gr;return new Re(n,r)}getSharedTansactionStorage(e){e=this.getOptionsForSection("shared-transaction",e),Ot(e);const n=this.getStorage(e),r=e.storageKey||zr;return new Re(n,r)}getOriginalUriStorage(e){e=this.getOptionsForSection("original-uri",e),Ot(e);const n=this.getStorage(e),r=e.storageKey||Jr;return new Re(n,r)}}}/*! 1674 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1675 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1676 * 1677 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1678 * Unless required by applicable law or agreed to in writing, softw
1678are 1679 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1680 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1681 * 1682 * See the License for the specific language governing permissions and limitations under the License. 1683 */function fl(){return dl()}/*! 1684 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1685 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1686 * 1687 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1688 * Unless required by applicable law or agreed to in writing, software 1689 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1690 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1691 * 1692 * See the License for the specific language governing permissions and limitations under the License. 1693 */function hl(){const t=fl();return class extends t{constructor(n,r,i){super(n,r,i)}getIdxResponseStorage(n){let r;if($())try{r=this.storageUtil.getStorageByType("memory",n)}catch{ie("No response storage found, you may want to provide custom implementation for intermediate idx responses to optimize the network traffic")}else{const i=this.getTransactionStorage(n);i&&(r={getItem:o=>{const s=i.getStorage();return s&&s[o]?s[o]:null},setItem:(o,s)=>{const a=i.getStorage();if(!a)throw new m("Transaction has been cleared, failed to save idxState");a[o]=s,i.setStorage(a)},removeItem:o=>{const s=i.getStorage();s&&(delete s[o],i.setStorage(s))}})}return r?new Re(r,Qr):null}}}/*! 1694 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1695 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1696 * 1697 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1698 * Unless required by applicable law or agreed to in writing, software 1699 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1700 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1701 * 1702 * See the License for the specific language governing permissions and limitations under the License. 1703 */function uo(t){return!(!t||typeof t!="object"||Object.values(t).length===0)}function pl(t){return uo(t)?!!t.redirectUri||!!t.responseType:!1}function gl(t){return uo(t)?Object.values(t).find(n=>typeof n!="string")===void 0:!1}function kt(t){return!!(pl(t)||gl(t))}/*! 1704 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1705 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1706 * 1707 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1708 * Unless required by applicable law or agreed to in writing, software 1709 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1710 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1711 * 1712 * See the License for the specific language governing permissions and limitations under the License. 1713 */const ml=30*60*1e3;function vl(t){const e=t.getSharedTansactionStorage(),n=e.getStorage();Object.keys(n).forEach(r=>{const i=n[r];Date.now()-i.dateCreated>ml&&delete n[r]}),e.setStorage(n)}function yl(t,e,n){const r=t.getSharedTansactionStorage(),i=r.getStorage();i[e]={dateCreated:Date.now(),transaction:n},r.setStorage(i)}function wl(t,e){const i=t.getSharedTansactionStorage().getStorage()[e];return i&&i.transaction&&kt(i.transaction)?i.transaction:null}function Tl(t,e){const n=t.getSharedTansactionStorage(),r=n.getStorage();delete r[e],n.setStorage(r)}/*! 1714 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1715 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1716 * 1717 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1718 * Unless required by applicable law or agreed to in writing, software 1719 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1720 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1721 * 1722 * See the License for the specific language governing permissions and limitations under the License. 1723 */function bl(){return class{constructor(e){this.storageManager=e.storageManager,this.enableSharedStorage=e.enableSharedStorage!==!1,this.saveLastResponse=e.saveLastResponse!==!1,this.options=e}clear(e={}){const n=this.storageManager.getTransactionStorage(),r=n.getStorage();if(n.clearStorage(),this.enableSharedStorage&&e.clearSharedStorage!==!1){const i=e.state||(r==null?void 0:r.state);i&&Tl(this.storageManager,i)}}save(e,n={}){let r=this.storageManager.getTransactionStorage();const i=r.getStorage();kt(i)&&!n.muteWarning&&ie("a saved auth transaction exists in storage. This may indicate another auth flow is already in progress."),r.setStorage(e),this.enableSharedStorage&&e.state&&yl(this.storageManager,e.state,e)}exists(e={}){try{return!!this.load(e)}catch{return!1}}load(e={}){let n;return this.enableSharedStorage&&e.state&&(vl(this.storageManager),n=wl(this.storageManager,e.state),kt(n))||
1723(n=this.storageManager.getTransactionStorage().getStorage(),kt(n))?n:null}}}/*! 1724 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1725 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1726 * 1727 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1728 * Unless required by applicable law or agreed to in writing, software 1729 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1730 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1731 * 1732 * See the License for the specific language governing permissions and limitations under the License. 1733 */function Sl(){const t=bl();return class extends t{constructor(n){super(n)}clear(n={}){super.clear(n),n.clearIdxResponse!==!1&&this.clearIdxResponse()}saveIdxResponse(n){if(!this.saveLastResponse)return;const r=this.storageManager.getIdxResponseStorage();r&&r.setStorage(n)}loadIdxResponse(n){if(!this.saveLastResponse)return null;const r=this.storageManager.getIdxResponseStorage();if(!r)return null;const i=r.getStorage();if(!i||!oi(i.rawIdxResponse))return null;if(n){const{stateHandle:o,interactionHandle:s}=n;if(!n.useGenericRemediator&&o&&i.stateHandle!==o||s&&i.interactionHandle!==s)return null}return i}clearIdxResponse(){if(!this.saveLastResponse)return;const n=this.storageManager.getIdxResponseStorage();n==null||n.clearStorage()}}}/*! 1734 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1735 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1736 * 1737 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1738 * Unless required by applicable law or agreed to in writing, software 1739 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1740 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1741 * 1742 * See the License for the specific language governing permissions and limitations under the License. 1743 */class de{constructor(e,n){const{res:r}=n,{headers:i}=r,o=nt(r,["headers"]);i&&(this.headers=i),Object.keys(o).forEach(s=>{s!=="_links"&&(this[s]=o[s])})}}/*! 1744 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1745 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1746 * 1747 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1748 * Unless required by applicable law or agreed to in writing, software 1749 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1750 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1751 * 1752 * See the License for the specific language governing permissions and limitations under the License. 1753 */async function R(t,e,n=de){const{accessToken:r}=t.tokenManager.getTokensSync(),i=e.accessToken||(r==null?void 0:r.accessToken),o=t.getIssuerOrigin(),{url:s,method:a,payload:c}=e,u=s.startsWith(o)?s:`${o}${s}`;if(!i)throw new m("AccessToken is required to request MyAccount API endpoints.");const l=await oe(t,Object.assign({headers:{Accept:"*/*;okta-version=1.0.0"},accessToken:i,url:u,method:a},c&&{args:c}));let f;return Array.isArray(l)?f=l.map(d=>new n(t,{res:d,accessToken:i})):f=new n(t,{res:l,accessToken:i}),f}function B({oktaAuth:t,accessToken:e,methodName:n,links:r},i=de){for(const s of["GET","POST","PUT","DELETE"])if(s.toLowerCase()===n){const a=r.self;return async c=>R(t,{accessToken:e,url:a.href,method:s,payload:c},i)}const o=r[n];if(!o)throw new m(`No link is found with methodName: ${n}`);return async s=>R(t,{accessToken:e,url:o.href,method:o.hints.allow[0],payload:s},i)}/*! 1754 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1755 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1756 * 1757 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1758 * Unless required by applicable law or agreed to in writing, softw
1758are 1759 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1760 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1761 * 1762 * See the License for the specific language governing permissions and limitations under the License. 1763 */class lo extends de{constructor(e,n){super(e,n);const{createdAt:r,modifiedAt:i,profile:o}=n.res;this.createdAt=r,this.modifiedAt=i,this.profile=o}}/*! 1764 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1765 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1766 * 1767 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1768 * Unless required by applicable law or agreed to in writing, software 1769 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1770 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1771 * 1772 * See the License for the specific language governing permissions and limitations under the License. 1773 */class _l extends de{constructor(e,n){super(e,n),this.properties=n.res.properties}}/*! 1774 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1775 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1776 * 1777 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1778 * Unless required by applicable law or agreed to in writing, software 1779 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1780 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1781 * 1782 * See the License for the specific language governing permissions and limitations under the License. 1783 */var kr;(function(t){t.PRIMARY="PRIMARY",t.SECONDARY="SECONDARY"})(kr||(kr={}));var Ar;(function(t){t.VERIFIED="VERIFIED",t.UNVERIFIED="UNVERIFIED"})(Ar||(Ar={}));var Tn;(function(t){t.NOT_ENROLLED="NOT_ENROLLED",t.ACTIVE="ACTIVE"})(Tn||(Tn={}));/*! 1784 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1785 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1786 * 1787 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1788 * Unless required by applicable law or agreed to in writing, software 1789 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1790 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1791 * 1792 * See the License for the specific language governing permissions and limitations under the License. 1793 */const Ol=async(t,e)=>await R(t,{url:"/idp/myaccount/profile",method:"GET",accessToken:e==null?void 0:e.accessToken},lo),kl=async(t,e)=>{const{payload:n,accessToken:r}=e;return await R(t,{url:"/idp/myaccount/profile",method:"PUT",payload:n,accessToken:r},lo)},Al=async(t,e)=>await R(t,{url:"/idp/myaccount/profile/schema",method:"GET",accessToken:e==null?void 0:e.accessToken},_l);/*! 1794 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1795 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1796 * 1797 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1798 * Unless required by applicable law or agreed to in writing, software 1799 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1800 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1801 * 1802 * See the License for the specific language governing permissions and limitations under the License. 1803 */class fo extends de{constructor(e,n){super(e,n);const{res:r}=n,{id:i,profile:o,expiresAt:s,status:a}=r;this.id=i,this.expiresAt=s,this.profile=o,this.status=a}}/*! 1804 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1805 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1806 * 1807 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1808 * Unless required by applicable law or agreed to in writing, softw
1808are 1809 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1810 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1811 * 1812 * See the License for the specific language governing permissions and limitations under the License. 1813 */class dt extends de{constructor(e,n){super(e,n);const{accessToken:r,res:i}=n,{id:o,expiresAt:s,profile:a,status:c,_links:u}=i;this.id=o,this.expiresAt=s,this.profile=a,this.status=c,this.poll=async()=>await B({oktaAuth:e,accessToken:r,methodName:"poll",links:u},fo)(),this.verify=async l=>await B({oktaAuth:e,accessToken:r,methodName:"verify",links:u},dt)(l)}}/*! 1814 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1815 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1816 * 1817 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1818 * Unless required by applicable law or agreed to in writing, software 1819 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1820 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1821 * 1822 * See the License for the specific language governing permissions and limitations under the License. 1823 */class ft extends de{constructor(e,n){super(e,n);const{accessToken:r,res:i}=n,{id:o,profile:s,roles:a,status:c,_links:u}=i;this.id=o,this.profile=s,this.roles=a,this.status=c,this.get=async()=>await B({oktaAuth:e,accessToken:r,methodName:"get",links:u},ft)(),this.delete=async()=>await B({oktaAuth:e,accessToken:r,methodName:"delete",links:u})(),this.challenge=async()=>await B({oktaAuth:e,accessToken:r,methodName:"challenge",links:u},dt)(),u.poll&&(this.poll=async()=>await B({oktaAuth:e,accessToken:r,methodName:"poll",links:u},fo)()),u.verify&&(this.verify=async l=>await B({oktaAuth:e,accessToken:r,methodName:"verify",links:u})(l))}}/*! 1824 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1825 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1826 * 1827 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1828 * Unless required by applicable law or agreed to in writing, software 1829 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1830 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1831 * 1832 * See the License for the specific language governing permissions and limitations under the License. 1833 */const El=async(t,e)=>await R(t,{url:"/idp/myaccount/emails",method:"GET",accessToken:e==null?void 0:e.accessToken},ft),Pl=async(t,e)=>{const{id:n,accessToken:r}=e;return await R(t,{url:`/idp/myaccount/emails/${n}`,method:"GET",accessToken:r},ft)},Il=async(t,e)=>{const{accessToken:n,payload:r}=e;return await R(t,{url:"/idp/myaccount/emails",method:"POST",payload:r,accessToken:n},ft)},xl=async(t,e)=>{const{id:n,accessToken:r}=e;return await R(t,{url:`/idp/myaccount/emails/${n}`,method:"DELETE",accessToken:r})},Cl=async(t,e)=>{const{id:n,accessToken:r}=e;return await R(t,{url:`/idp/myaccount/emails/${n}/challenge`,method:"POST",accessToken:r},dt)},Ml=async(t,e)=>{const{emailId:n,challengeId:r,accessToken:i}=e;return await R(t,{url:`/idp/myaccount/emails/${n}/challenge/${r}`,method:"POST",accessToken:i},dt)},Rl=async(t,e)=>{const{emailId:n,challengeId:r,payload:i,accessToken:o}=e;return await R(t,{url:`/idp/myaccount/emails/${n}/challenge/${r}/verify`,method:"POST",payload:i,accessToken:o})};/*! 1834 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1835 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1836 * 1837 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1838 * Unless required by applicable law or agreed to in writing, software 1839 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1840 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1841 * 1842 * See the License for the specific language governing permissions and limitations under the License. 1843 */class ht extends de{constructor(e,n){super(e,n);const{res:r,accessToken:i}=n,{id:o,profile:s,status:a,_links:c}=r;this.id=o,this.profile=s,this.status=a,this.get=async()=>await B({oktaAuth:e,accessToken:i,methodName:"get",links:c},ht)(),this.delete=async()=>await B({oktaAuth:e,accessToken:i,methodName:"delete",links:c})(),this.challenge=async u=>await B({oktaAuth:e,accessToken:i,methodName:"challenge",links:c})(u),c.verify&&(this.verify=async u=>await B({oktaAuth:e,accessToken:i,methodName:"verify",links:c})(u))}}/*! 1844 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1845 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1846 * 1847 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1848 * Unless required by applicable law or agreed to in writing, softw
1848are 1849 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1850 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1851 * 1852 * See the License for the specific language governing permissions and limitations under the License. 1853 */const jl=async(t,e)=>await R(t,{url:"/idp/myaccount/phones",method:"GET",accessToken:e==null?void 0:e.accessToken},ht),Dl=async(t,e)=>{const{accessToken:n,id:r}=e;return await R(t,{url:`/idp/myaccount/phones/${r}`,method:"GET",accessToken:n},ht)},Ul=async(t,e)=>{const{accessToken:n,payload:r}=e;return await R(t,{url:"/idp/myaccount/phones",method:"POST",payload:r,accessToken:n},ht)},Ll=async(t,e)=>{const{id:n,accessToken:r}=e;return await R(t,{url:`/idp/myaccount/phones/${n}`,method:"DELETE",accessToken:r})},Fl=async(t,e)=>{const{accessToken:n,id:r,payload:i}=e;return await R(t,{url:`/idp/myaccount/phones/${r}/challenge`,method:"POST",payload:i,accessToken:n})},Nl=async(t,e)=>{const{id:n,payload:r,accessToken:i}=e;return await R(t,{url:`/idp/myaccount/phones/${n}/verify`,method:"POST",payload:r,accessToken:i})};/*! 1854 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1855 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1856 * 1857 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1858 * Unless required by applicable law or agreed to in writing, software 1859 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1860 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1861 * 1862 * See the License for the specific language governing permissions and limitations under the License. 1863 */class Ie extends de{constructor(e,n){super(e,n);const{res:r,accessToken:i}=n,{id:o,status:s,created:a,lastUpdated:c,_links:u}=r;this.id=o,this.status=s,this.created=a,this.lastUpdated=c,this.status==Tn.NOT_ENROLLED?this.enroll=async l=>await B({oktaAuth:e,accessToken:i,methodName:"enroll",links:u},Ie)(l):(this.get=async()=>await B({oktaAuth:e,accessToken:i,methodName:"get",links:u},Ie)(),this.update=async l=>await B({oktaAuth:e,accessToken:i,methodName:"put",links:u},Ie)(l),this.delete=async()=>await B({oktaAuth:e,accessToken:i,methodName:"delete",links:u})())}}/*! 1864 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1865 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1866 * 1867 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1868 * Unless required by applicable law or agreed to in writing, software 1869 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1870 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1871 * 1872 * See the License for the specific language governing permissions and limitations under the License. 1873 */const Hl=async(t,e)=>await R(t,{url:"/idp/myaccount/password",method:"GET",accessToken:e==null?void 0:e.accessToken},Ie),Vl=async(t,e)=>{const{accessToken:n,payload:r}=e;return await R(t,{url:"/idp/myaccount/password",method:"POST",payload:r,accessToken:n},Ie)},Bl=async(t,e)=>{const{accessToken:n,payload:r}=e;return await R(t,{url:"/idp/myaccount/password",method:"PUT",payload:r,accessToken:n},Ie)},$l=async(t,e)=>await R(t,{url:"/idp/myaccount/password",method:"DELETE",accessToken:e==null?void 0:e.accessToken});/*! 1874 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1875 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1876 * 1877 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1878 * Unless required by applicable law or agreed to in writing, software 1879 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1880 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1881 * 1882 * See the License for the specific language governing permissions and limitations under the License. 1883 */const ql=Object.freeze(Object.defineProperty({__proto__:null,addEmail:Il,addPhone:Ul,deleteEmail:xl,deletePassword:$l,deletePhone:Ll,enrollPassword:Vl,getEmail:Pl,getEmailChallenge:Ml,getEmails:El,getPassword:Hl,getPhone:Dl,getPhones:jl,getProfile:Ol,getProfileSchema:Al,sendEmailChallenge:Cl,sendPhoneChallenge:Fl,updatePassword:Bl,updateProfile:kl,verifyEmailChallenge:Rl,verifyPhoneChallenge:Nl},Symbol.toStringTag,{value:"Module"}));/*! 1884 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1885 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1886 * 1887 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1888 * Unless required by applicable law or agreed to in writing, softw
1888are 1889 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1890 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1891 * 1892 * See the License for the specific language governing permissions and limitations under the License. 1893 */function Wl(t){return class extends t{constructor(...n){super(...n),this.myaccount=Object.entries(ql).filter(([r])=>r!=="default").reduce((r,[i,o])=>(r[i]=o.bind(null,this),r),{})}}}/*! 1894 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1895 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1896 * 1897 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1898 * Unless required by applicable law or agreed to in writing, software 1899 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1900 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1901 * 1902 * See the License for the specific language governing permissions and limitations under the License. 1903 */function zt(t,e){var n={};return Object.assign(n,e),!n.stateToken&&t.stateToken&&(n.stateToken=t.stateToken),n}function Kl(t){return zt(t)}/*! 1904 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1905 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1906 * 1907 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1908 * Unless required by applicable law or agreed to in writing, software 1909 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1910 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1911 * 1912 * See the License for the specific language governing permissions and limitations under the License. 1913 */function ho(t,e){return e=zt(t,e),ye(t,t.getIssuerOrigin()+"/api/v1/authn",e,{withCredentials:!0})}function Gl(t,e,n){if(!n||!n.stateToken){var r=ir(t);if(r)n={stateToken:r};else return Promise.reject(new m("No transaction to resume"))}return ho(t,n).then(function(i){return e.createTransaction(i)})}function zl(t,e,n){if(!n||!n.stateToken){var r=ir(t);if(r)n={stateToken:r};else return Promise.reject(new m("No transaction to evaluate"))}return Jl(t,n).then(function(i){return e.createTransaction(i)})}function Jl(t,e){return e=zt(t,e),ye(t,t.getIssuerOrigin()+"/api/v1/authn/introspect",e,{withCredentials:!0})}function Ql(t){return!!ir(t)}function po(t,e,n,r,i){return i=Object.assign({withCredentials:!0},i),ye(t,n,r,i).then(function(o){return e.createTransaction(o)})}function ir(t){return t.options.storageUtil.storage.get(Ge)}/*! 1914 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1915 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1916 * 1917 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1918 * Unless required by applicable law or agreed to in writing, software 1919 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1920 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1921 * 1922 * See the License for the specific language governing permissions and limitations under the License. 1923 */function go(t,e,n,r,i,o){if(Array.isArray(i))return function(a,c){if(!a)throw new m("Must provide a link name");var u=tn(i,{name:a});if(!u)throw new m("No link found for that name");return go(t,e,n,r,u,o)(c)};if(i.hints&&i.hints.allow&&i.hints.allow.length===1){var s=i.hints.allow[0];switch(s){case"GET":return function(){return Ue(t,i.href,{withCredentials:!0})};case"POST":return function(a){o&&o.isPolling&&(o.isPolling=!1);var c=zt(n,a);(n.status==="MFA_ENROLL"||n.status==="FACTOR_ENROLL")&&Object.assign(c,{factorType:r.factorType,provider:r.provider});var u={},l=c.autoPush;if(l!==void 0){if(typeof l=="function")try{u.autoPush=!!l()}catch{return Promise.reject(new m("AutoPush resulted in an error."))}else l!==null&&(u.autoPush=!!l);c=Ke(c,"autoPush")}var f=c.rememberDevice;if(f!==void 0){if(typeof f=="function")try{u.rememberDevice=!!f()}catch{return Promise.reject(new m("RememberDevice resulted in an error."))}else f!==null&&(u.rememberDevice=!!f);c=Ke(c,"rememberDevice")}else c.profile&&c.profile.updatePhone!==void 0&&(c.profile.updatePhone&&(u.updatePhone=!0),c.profile=Ke(c.profile,"updatePhone"));var d=i.href+le(u);return po(t,e,d,c)}}}}/*! 1924 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1925 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1926 * 1927 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1928 * Unless required by applicable law or agreed to in writing, softw
1928are 1929 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1930 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1931 * 1932 * See the License for the specific language governing permissions and limitations under the License. 1933 */class Er extends Ne{constructor(){super("The poll was stopped by the sdk")}}/*! 1934 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1935 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1936 * 1937 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1938 * Unless required by applicable law or agreed to in writing, software 1939 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1940 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1941 * 1942 * See the License for the specific language governing permissions and limitations under the License. 1943 */function Yl(t,e,n){return function(r){var i,o,s,a;_o(r)?i=r:jr(r)&&(r=r,i=r.delay,o=r.rememberDevice,s=r.autoPush,a=r.transactionCallBack),!i&&i!==0&&(i=$r);var c=nn(e,"next","poll");function u(){var d={};if(typeof s=="function")try{d.autoPush=!!s()}catch{return Promise.reject(new m("AutoPush resulted in an error."))}else s!=null&&(d.autoPush=!!s);if(typeof o=="function")try{d.rememberDevice=!!o()}catch{return Promise.reject(new m("RememberDevice resulted in an error."))}else o!=null&&(d.rememberDevice=!!o);var g=c.href+le(d);return ye(t,g,Kl(e),{saveAuthnState:!1,withCredentials:!0})}n.isPolling=!0;var l=0,f=function(){return n.isPolling?u().then(function(d){if(l=0,d.factorResult&&d.factorResult==="WAITING"){if(!n.isPolling)throw new Er;return typeof a=="function"&&a(d),sr(i).then(f)}else return n.isPolling=!1,t.tx.createTransaction(d)}).catch(function(d){if(d.xhr&&(d.xhr.status===0||d.xhr.status===429)&&l<=4){var g=Math.pow(2,l)*1e3;return l++,sr(g).then(f)}throw d}):Promise.reject(new Er)};return f().catch(function(d){throw n.isPolling=!1,d})}}/*! 1944 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1945 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1946 * 1947 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1948 * Unless required by applicable law or agreed to in writing, software 1949 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1950 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1951 * 1952 * See the License for the specific language governing permissions and limitations under the License. 1953 */function Xl(t,e,n,r,i){var o={};for(var s in r._links)if(Object.prototype.hasOwnProperty.call(r._links,s)){var a=r._links[s];if(s==="next"&&(s=a.name),a.type){o[s]=a;continue}switch(s){case"poll":o.poll=Yl(t,n,i);break;default:var c=go(t,e,n,r,a,i);c&&(o[s]=c)}}return o}/*! 1954 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1955 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1956 * 1957 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1958 * Unless required by applicable law or agreed to in writing, software 1959 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1960 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1961 * 1962 * See the License for the specific language governing permissions and limitations under the License. 1963 */function bn(t,e,n,r,i){if(r=r||n,r=Y(r),Array.isArray(r)){for(var o=[],s=0,a=r.length;s<a;s++)o.push(bn(t,e,n,r[s],i));return o}var c=r._embedded||{};for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(jr(c[u])||Array.isArray(c[u]))&&(c[u]=bn(t,e,n,c[u],i));var l=Xl(t,e,n,r,i);return Object.assign(c,l),r=Ke(r,"_embedded","_links"),Object.assign(r,c),r}/*! 1964 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1965 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1966 * 1967 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1968 * Unless required by applicable law or agreed to in writing, softw
1968are 1969 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1970 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1971 * 1972 * See the License for the specific language governing permissions and limitations under the License. 1973 */class Zl{constructor(e,n,r=null){this.data=void 0,this.status=void 0,r&&(this.data=r,Object.assign(this,bn(e,n,r,r,{})),delete this.stateToken,r.status==="RECOVERY_CHALLENGE"&&!r._links&&(this.cancel=function(){return Promise.resolve(n.createTransaction())}))}}/*! 1974 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1975 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1976 * 1977 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1978 * Unless required by applicable law or agreed to in writing, software 1979 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1980 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1981 * 1982 * See the License for the specific language governing permissions and limitations under the License. 1983 */function ed(t){const e={status:ho.bind(null,t),resume(n){return Gl(t,e,n)},exists:Ql.bind(null,t),introspect(n){return zl(t,e,n)},createTransaction:n=>new Zl(t,e,n),postToTransaction:(n,r,i)=>po(t,e,n,r,i)};return e}/*! 1984 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1985 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1986 * 1987 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1988 * Unless required by applicable law or agreed to in writing, software 1989 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 1990 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1991 * 1992 * See the License for the specific language governing permissions and limitations under the License. 1993 */function td(t){return class extends t{constructor(...n){super(...n),this.authn=this.tx=ed(this),this.fingerprint=ao.bind(null,this)}async signIn(n){n=Y(n||{});const r=i=>(delete n.sendFingerprint,this.tx.postToTransaction("/api/v1/authn",n,i));return n.sendFingerprint?this.fingerprint().then(function(i){return r({headers:{"X-Device-Fingerprint":i}})}):r()}async signInWithCredentials(n){return this.signIn(n)}forgotPassword(n){return this.tx.postToTransaction("/api/v1/authn/recovery/password",n)}unlockAccount(n){return this.tx.postToTransaction("/api/v1/authn/recovery/unlock",n)}verifyRecoveryToken(n){return this.tx.postToTransaction("/api/v1/authn/recovery/token",n)}}}/*! 1994 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 1995 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 1996 * 1997 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 1998 * Unless required by applicable law or agreed to in writing, software 1999 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 2000 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2001 * 2002 * See the License for the specific language governing permissions and limitations under the License. 2003 */function Bd(t,e,n){const r=Ai(e),i=Ei(r,t),o=Pi(i),s=so(o);return Bi(s,n)}/*! 2004 * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved. 2005 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 2006 * 2007 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 2008 * Unless required by applicable law or agreed to in writing, software 2009 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 2010 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2011 * 2012 * See the License for the specific language governing permissions and limitations under the License. 2013 */const nd=ul(),rd=hl(),id=Sl(),od=zu(rd,nd,id),sd=Wl(od),ad=td(sd);class $d extends ad{constructor(e){super(e)}}function Pr(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(u){return void n(u)}a.done?e(c):Promise.resolve(c).then(r,i)}function cd(t){return function(){var e=this,n=arguments;
vendor: 9,195 bytes, lines 2013-2014
2013return new Promise(function(r,i){var o=t.apply(e,n);function s(c){Pr(o,r,i,s,a,"next",c)}function a(c){Pr(o,r,i,s,a,"throw",c)}s(void 0)})}}function ud(t){if(Array.isArray(t))return t}function ld(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(l){u=!0,i=l}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function Ir(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function dd(t,e){if(t){if(typeof t=="string")return Ir(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(t,e):void 0}}function fd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2014In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hd(t,e){return ud(t)||ld(t,e)||dd(t,e)||fd()}var mo={exports:{}},vo={exports:{}};(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(vo);var pd=vo.exports;(function(t){var e=pd.default;function n(){t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var r,i={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(v,y,T){v[y]=T.value},c=typeof Symbol=="function"?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(v,y,T){return Object.defineProperty(v,y,{value:T,enumerable:!0,configurable:!0,writable:!0}),v[y]}try{d({},"")}catch{d=function(T,_,E){return T[_]=E}}function g(v,y,T,_){var E=y&&y.prototype instanceof N?y:N,A=Object.create(E.prototype),U=new x(_||[]);return a(A,"_invoke",{value:W(v,T,U)}),A}function p(v,y,T){try{return{type:"normal",arg:v.call(y,T)}}catch(_){return{type:"throw",arg:_}}}i.wrap=g;var b="suspendedStart",O="suspendedYield",S="executing",I="completed",P={};function N(){}function j(){}function F(){}var q={};d(q,u,function(){return this});var H=Object.getPrototypeOf,X=H&&H(H(D([])));X&&X!==o&&s.call(X,u)&&(q=X);var C=F.prototype=N.prototype=Object.create(q);function L(v){["next","throw","return"].forEach(function(y){d(v,y,function(T){return this._invoke(y,T)})})}function Z(v,y){function T(E,A,U,V){var K=p(v[E],v,A);if(K.type!=="throw"){var we=K.arg,fe=we.value;return fe&&e(fe)=="object"&&s.call(fe,"__await")?y.resolve(fe.__await).then(function(Te){T("next",Te,U,V)},function(Te){T("throw",Te,U,V)}):y.resolve(fe).then(function(Te){we.value=Te,U(we)},function(Te){return T("throw",Te,U,V)})}V(K.arg)}var _;a(this,"_invoke",{value:function(A,U){function V(){return new y(function(K,we){T(A,U,K,we)})}return _=_?_.then(V,V):V()}})}function W(v,y,T){var _=b;return function(E,A){if(_===S)throw Error("Generator is already running");if(_===I){if(E==="throw")throw A;return{value:r,done:!0}}for(T.method=E,T.arg=A;;){var U=T.delegate;if(U){var V=h(U,T);if(V){if(V===P)continue;return V}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(_===b)throw _=I,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);_=S;var K=p(v,y,T);if(K.type==="normal"){if(_=T.done?I:O,K.arg===P)continue;return{value:K.arg,done:T.done}}K.type==="throw"&&(_=I,T.method="throw",T.arg=K.arg)}}}function h(v,y){var T=y.method,_=v.iterator[T];if(_===r)return y.delegate=null,T==="throw"&&v.iterator.return&&(y.method="return",y.arg=r,h(v,y),y.method==="throw")||T!=="return"&&(y.method="throw",y.arg=new TypeError("The iterator does not provide a '"+T+"' method")),P;var E=p(_,v.iterator,y.arg);if(E.type==="throw")return y.method="throw",y.arg=E.arg,y.delegate=null,P;var A=E.arg;return A?A.done?(y[v.resultName]=A.value,y.next=v.nextLoc,y.method!=="return"&&(y.method="next",y.arg=r),y.delegate=null,P):A:(y.method="throw",y.arg=new TypeError("iterator result is not an object"),y.delegate=null,P)}function w(v){var y={tryLoc:v[0]};1 in v&&(y.catchLoc=v[1]),2 in v&&(y.finallyLoc=v[2],y.afterLoc=v[3]),this.tryEntries.push(y)}function k(v){var y=v.completion||{};y.type="normal",delete y.arg,v.completion=y}function x(v){this.tryEntries=[{tryLoc:"root"}],v.forEach(w,this),this.reset(!0)}function D(v){if(v||v===""){var y=v[u];if(y)return y.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var T=-1,_=function E(){for(;++T<v.length;)if(s.call(v,T))return E.value=v[T],E.done=!1,E;return E.value=r,E.done=!0,E};return _.next=_}}throw new TypeError(e(v)+" is not iterable")}return j.prototype=F,a(C,"constructor",{value:F,configurable:!0}),a(F,"constructor",{value:j,configurable:!0}),j.displayName=d(F,f,"GeneratorFunction"),i.isGeneratorFunction=function(v){var y=typeof v=="function"&&v.constructor;return!!y&&(y===j||(y.displayName||y.name)==="GeneratorFunction")},i.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,F):(v.__proto__=F,d(v,f,"GeneratorFunction")),v.prototype=Object.create(C),v},i.awrap=function(v){return{__await:v}},L(Z.prototype),d(Z.prototype,l,function(){return this}),i.AsyncIterator=Z,i.async=function(v,y,T,_,E){E===void 0&&(E=Promise);var A=new Z(g(v,y,T,_),E);return i.isGeneratorFunction(y)?A:A.next().then(function(U){return U.done?U.value:A.next()})},L(C),d(C,f,"Generator"),d(C,u,function(){return this}),d(C,"toString",function(){return"[object Generator]"}),i.keys=function(v){var y=Object(v),T=[];for(var _ in y)T.push(_);return T.reverse(),function E(){for(;T.length;){var A=T.pop();if(A in y)return E.value=A,E.done=!1,E}return E.done=!0,E}},i.values=D,x.prototype={constructor:x,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!y)for(var T in this)T.charAt(0)==="t"&&s.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=r)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var T=this;function _(we,fe){return U.type="throw",U.arg=y,T.next=we,fe&&(T.method="next",T.arg=r),!!fe}for(var E=this.tryEntries.length-1;E>=0;--E){var A=this.tryEntries[E],U=A.completion;if(A.tryLoc==="root")return _("end");if(A.tryLoc<=this.prev){var V=s.call(A,"catchLoc"),K=s.call(A,"finallyLoc");if(V&&K){if(this.prev<A.catchLoc)return _(A.catchLoc,!0);if(this.prev<A.finallyLoc)return _(A.finallyLoc)}else if(V){if(this.prev<A.catchLoc)return _(A.catchLoc,!0)}else{if(!K)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return _(A.finallyLoc)}}}},abrupt:function(y,T){for(var _=this.tryEntries.length-1;_>=0;--_){var E=this.tryEntries[_];if(E.tryLoc<=this.prev&&s.call(E,"finallyLoc")&&this.prev<E.finallyLoc){var A=E;break}}A&&(y==="break"||y==="continue")&&A.tryLoc<=T&&T<=A.finallyLoc&&(A=null);var U=A?A.completion:{};return U.type=y,U.arg=T,A?(this.method="next",this.next=A.finallyLoc,P):this.complete(U)},complete:function(y,T){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&T&&(this.next=T),P},finish:function(y){for(var T=this.tryEntries.length-1;T>=0;--T){var _=this.tryEntries[T];if(_.finallyLoc===y)return this.complete(_.completion,_.afterLoc),k(_),P}},catch:function(y){for(var T=this.tryEntries.length-1;T>=0;--T){var _=this.tryEntries[T];if(_.tryLoc===y){var E=_.completion;if(E.type==="throw"){var A=E.arg;k(_)}return A}}throw Error("illegal catch attempt")},delegateYield:function(y,T,_){return this.delegate={iterator:D(y),resultName:T,nextLoc:_},this.method==="next"&&(this.arg=r),P}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(mo);var gd=mo.exports,At=gd(),md=At;try{regeneratorRuntime=At}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=At:Function("r","regeneratorRuntime = r")(At)}const xr=Mt(md);function Jt(t,e){const n=Ct(t),r=Ct(e),i=n.pop(),o=r.pop(),s=Sn(n,r);return s!==0?s:i&&o?Sn(i.split("."),o.split(".")):i||o?i?-1:1:0}const vd=t=>typeof t=="string"&&/^[v\d]/.test(t)&&yo.test(t),or=(t,e,n)=>{Td(n);const r=Jt(t,e);return wo[n].includes(r)},yd=(t,e)=>{const n=e.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return or(t,e,r);const[i,o,s]=Ct(t),[a,c,u]=Ct(e);return Et(i,a)!==0?!1:r==="^"?Sn([o,s],[c,u])>=0:Et(o,c)!==0?!1:Et(s,u)>=0};Jt.validate=vd;Jt.compare=or;Jt.satisfies=yd;const yo=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ct=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const e=t.match(yo);
2014if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},Cr=t=>t==="*"||t==="x"||t==="X",Mr=t=>{const e=parseInt(t,10);return isNaN(e)?t:e},wd=(t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],Et=(t,e)=>{if(Cr(t)||Cr(e))return 0;const[n,r]=wd(Mr(t),Mr(e));return n>r?1:n<r?-1:0},Sn=(t,e)=>{for(let n=0;n<Math.max(t.length,e.length);n++){const r=Et(t[n]||0,e[n]||0);if(r!==0)return r}return 0},wo={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},Rr=Object.keys(wo),Td=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(Rr.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${Rr.join("|")}`)};/*! 2015 * Copyright (c) 2017-Present, Okta, Inc. and/or its affiliates. All rights reserved. 2016 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") 2017 * 2018 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. 2019 * Unless required by applicable law or agreed to in writing, software 2020 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 2021 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2022 * 2023 * See the License for the specific language governing permissions and limitations under the License. 2024 */var To=ne.createContext(null),qd=function(){return ne.useContext(To)},en=function(e){var n=e.error;return n.name&&n.message?ne.createElement("p",null,n.name,": ",n.message):ne.createElement("p",null,"Error: ",n.toString())},Wd=function(e){var n=e.oktaAuth,r=e.restoreOriginalUri,i=e.onAuthRequired,o=e.children,s=ne.useState(function(){return n?n.authStateManager.getAuthState():null}),a=hd(s,2),c=a[0],u=a[1];if(ne.useEffect(function(){!n||!r||(n.options.restoreOriginalUri&&console.warn("Two custom restoreOriginalUri callbacks are detected. The one from the OktaAuth configuration will be overridden by the provided restoreOriginalUri prop from the Security component."),n.options.restoreOriginalUri=function(){var p=cd(xr.mark(function b(O,S){return xr.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",r(O,S));case 1:case"end":return P.stop()}},b)}));return function(b,O){return p.apply(this,arguments)}}())},[]),ne.useEffect(function(){if(n){n._oktaUserAgent?n._oktaUserAgent.addEnvironment("@okta/okta-react".concat("/","6.9.0")):console.warn("_oktaUserAgent is not available on auth SDK instance. Please use okta-auth-js@^5.3.1 .");var p=n.authStateManager.getAuthState();p!==c&&u(p);var b=function(S){u(S)};return n.authStateManager.subscribe(b),n.start(),function(){n.authStateManager.unsubscribe(b)}}},[n]),!n){var l=new m("No oktaAuth instance passed to Security Component.");return ne.createElement(en,{error:l})}if(!r){var f=new m("No restoreOriginalUri callback passed to Security Component.");return ne.createElement(en,{error:f})}if(!n._oktaUserAgent)console.warn("_oktaUserAgent is not available on auth SDK instance. Please use okta-auth-js@^5.3.1 .");else{var d=or(n._oktaUserAgent.getVersion(),"5.3.1",">=");if(!d){var g=new m(` 2025 Passed in oktaAuth is not compatible with the SDK, 2026 minimum supported okta-auth-js version is `.concat("5.3.1",`. 2027 `));return ne.createElement(en,{error:g})}}return ne.createElement(To.Provider,{value:{oktaAuth:n,authState:c,_onAuthRequired:i}},o)};export{be as I,$d as O,Wd as S,ul as a,hl as b,Bd as c,Sl as d,td as e,Ro as f,Sd as g,ae as i,Gu as m,le as t,qd as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.