@slashid/jump-page 0.0.8-package.8 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_astro/app.a42374a9.js +40 -0
- package/dist/_astro/client.a5ffbec0.js +24 -0
- package/dist/_astro/index.03be2d59.js +9 -0
- package/dist/_astro/sdk.080ae68e.css +1 -0
- package/dist/_astro/sdk.35b1e93e.css +1 -0
- package/dist/favicon.png +0 -0
- package/dist/sdk.html +7 -0
- package/package/dist/_astro/app.a42374a9.d.ts +2 -0
- package/package/dist/_astro/client.a5ffbec0.d.ts +7 -0
- package/package/dist/_astro/index.03be2d59.d.ts +3 -0
- package/package/main.js +2348 -909
- package/package/main.js.map +1 -1
- package/package/src/components/card/card.component.d.ts +1 -2
- package/package/src/components/flow/flow.error.d.ts +1 -2
- package/package/src/components/flow/flow.progress.d.ts +1 -3
- package/package/src/components/flow/flow.success.d.ts +1 -3
- package/package/src/components/text/use-i18n.d.ts +1 -1
- package/package/src/main.d.ts +0 -3
- package/package/style.css +1 -1
- package/package.json +7 -13
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{r as x,R as Qr}from"./index.03be2d59.js";/* empty css */var es={exports:{}},lt={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Wo=x,Ko=Symbol.for("react.element"),jo=Symbol.for("react.fragment"),Yo=Object.prototype.hasOwnProperty,Jo=Wo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xo={key:!0,ref:!0,__self:!0,__source:!0};function ts(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Yo.call(t,r)&&!Xo.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Ko,type:e,key:o,ref:i,props:s,_owner:Jo.current}}lt.Fragment=jo;lt.jsx=ts;lt.jsxs=ts;es.exports=lt;var l=es.exports;function N(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var mn={};mn=JSON.parse(`{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.17.4-beta.3","description":"Client SDK for the /id platform","homepage":"https://slashid.dev","author":"SlashID","license":"MIT","main":"./dist/bundle/slashid.js","module":"./dist/esmodule/slashid.esm.js","esmodule":"./dist/esmodule/slashid.esm.js","commonjs":"./dist/commonjs/slashid.cjs.js","bundle":"./dist/bundle/slashid.js","types":"./dist/types/slashid.d.ts","exports":{".":{"require":"./dist/commonjs/slashid.cjs.js","import":"./dist/esmodule/slashid.esm.js","default":"./dist/commonjs/slashid.cjs.js","types":"./dist/types/slashid.d.ts"}},"targets":{"esmodule":{"source":"src/targets/package.ts","context":"browser","isLibrary":true,"outputFormat":"esmodule","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"commonjs":{"source":"src/targets/package.ts","context":"node","isLibrary":true,"outputFormat":"commonjs","engines":{"node":">= 12"}},"bundle":{"source":"src/targets/bundle.ts","context":"browser","outputFormat":"global","engines":{"browsers":["> 0.5%","last 2 versions","not dead"]}},"page":{"source":"static/sdk.html","context":"browser","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"types":{"source":"src/targets/package.ts"}},"files":["dist/esmodule","dist/commonjs","dist/types"],"keywords":["slashid","SlashID","auth","openid","authentication","jwt","browser"],"scripts":{"clean":"rm -rf dist docs","lint":"eslint ./src --ext .ts","format":"prettier --config .prettierrc.json 'src/**/*.ts' --write","test:ts":"tsc --project tsconfig.json --noEmit","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:ci":"jest --ci","test:integration":"playwright test","build":"rm -rf dist && parcel build && cp compat/esmodule/package.json dist/esmodule","docs":"rm -rf docs && typedoc","dist":"npm run lint && npm run build","all":"npm run dist && npm run docs","serve:all":"parcel serve 'static/*.html' --port 8080","serve:example":"parcel serve static/index.html --port 8080","serve:jump":"parcel serve static/sdk.html --port 8080","serve:docs":"parcel serve docs/index.html --port 8081","push:docs":"aws s3 sync docs s3://slashiddoc/sdk/v$(node tools/version.js --major) && (aws cloudfront create-invalidation --distribution-id ETLBNGAAF97EN --paths \\"/*\\")","changeset":"changeset","prepublishOnly":"npm run all","publish:ci":"npm run build && changeset publish"},"devDependencies":{"@parcel/core":"2.9.3","@parcel/packager-ts":"2.9.3","@parcel/transformer-babel":"2.9.3","@parcel/transformer-js":"2.9.3","@parcel/transformer-json":"2.9.3","@parcel/transformer-react-refresh-wrap":"2.9.3","@parcel/transformer-typescript-types":"2.9.3","@playwright/test":"^1.25.0","@types/jest":"^28.1.7","@types/node":"~15.0.2","@types/qrcode":"^1.5.0","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","danger":"^11.2.6","eslint":"^7.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","isomorphic-fetch":"^3.0.0","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","jest-fetch-mock":"^3.0.3","parcel":"^2.7.0","prettier":"^2.7.1","ts-jest":"^28.0.8","typedoc":"^0.23.00","typedoc-plugin-mdn-links":"^2.0.0","typedoc-plugin-missing-exports":"^1.0.0","typescript":"~4.7.0"},"dependencies":{"@changesets/cli":"^2.26.2","@types/uuid":"8.3.4","changeset":"^0.2.6","docdash":"^1.2.0","jwt-decode":"^3.1.2","mitt":"^3.0.0","qrcode":"^1.5.1","querystring-es3":"^0.2.1","regenerator-runtime":"^0.13.9","url":"^0.11.0","uuid":"8.3.2"}}`);const[Zo,Qo,ei]=mn.version.split("."),I={major:Zo,minor:Qo,patch:ei,raw:mn.version},ti="https://api.slashid.com".replace(/\/+$/,"");class xe{set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ti}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||ns}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}constructor(t={}){this.configuration=t}}const $e=new xe;class ae{withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}isJsonMime(t){return t?ae.jsonRegex.test(t):!1}async request(t,n){const{url:r,init:s}=await this.createFetchParams(t,n),o=await this.fetchApi(r,s);if(o&&o.status>=200&&o.status<300)return o;throw new si(o,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const s=Object.assign({},this.configuration.headers,t.headers);Object.keys(s).forEach(d=>s[d]===void 0?delete s[d]:{});const o=typeof n=="function"?n:async()=>n,i={method:t.method,headers:s,body:t.body,credentials:this.configuration.credentials},a={...i,...await o({init:i,context:t})},c={...a,body:ri(a.body)||a.body instanceof URLSearchParams||ni(a.body)?a.body:JSON.stringify(a.body)};return{url:r,init:c}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}constructor(t=$e){this.configuration=t,this.fetchApi=async(n,r)=>{let s={url:n,init:r};for(const i of this.middleware)i.pre&&(s=await i.pre({fetch:this.fetchApi,...s})||s);let o;try{o=await(this.configuration.fetchApi||fetch)(s.url,s.init)}catch(i){for(const a of this.middleware)a.onError&&(o=await a.onError({fetch:this.fetchApi,url:s.url,init:s.init,error:i,response:o?o.clone():void 0})||o);if(o===void 0)throw i instanceof Error?new oi(i,"The request failed and the interceptors did not return an alternative response"):i}for(const i of this.middleware)i.post&&(o=await i.post({fetch:this.fetchApi,url:s.url,init:s.init,response:o.clone()})||o);return o},this.middleware=t.middleware}}ae.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ni(e){return typeof Blob<"u"&&e instanceof Blob}function ri(e){return typeof FormData<"u"&&e instanceof FormData}class si extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class oi extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class v extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const zt={csv:",",ssv:" ",tsv:" ",pipes:"|"};function p(e,t){const n=e[t];return n!=null}function ns(e,t=""){return Object.keys(e).map(n=>rs(n,e[n],t)).filter(n=>n.length>0).join("&")}function rs(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const s=t.map(o=>encodeURIComponent(String(o))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${s}`}if(t instanceof Set){const s=Array.from(t);return rs(e,s,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?ns(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}class E{async value(){return this.transformer(await this.raw.json())}constructor(t,n=r=>r){this.raw=t,this.transformer=n}}class ot{async value(){}constructor(t){this.raw=t}}function ii(e){return ai(e)}function ai(e,t){return e==null?e:{limit:e.limit,offset:e.offset,total_count:e.total_count}}function F(e){return ci(e)}function ci(e,t){return e==null?e:{pagination:p(e,"pagination")?ii(e.pagination):void 0}}function q(e){return di(e)}function di(e,t){return e==null?e:{httpcode:p(e,"httpcode")?e.httpcode:void 0,message:p(e,"message")?e.message:void 0}}function Lt(e){return ui(e)}function ui(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0}}const A={Proxy:"proxy",WebauthnCreate:"webauthn_create",WebauthnGet:"webauthn_get",Nonce:"nonce",Otp:"otp",Oidc:"oidc",Saml:"saml",PasswordSet:"password_set",PasswordVerify:"password_verify",PasswordReset:"password_reset"};function j(e){return li(e)}function li(e,t){return e}function fi(e){if(e!==void 0)return e===null?null:{challenge:e.challenge}}function hi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:fi(e.data)}}function pi(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function gi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:pi(e.data)}}function _i(e){if(e!==void 0)return e===null?null:{password:e.password}}function mi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:_i(e.data)}}function bi(e){if(e!==void 0)return e===null?null:{password:e.password}}function wi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:bi(e.data)}}function yi(e){if(e!==void 0)return e===null?null:{password:e.password}}function xi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:yi(e.data)}}function $i(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function vi(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function Gn(e){if(e!==void 0){if(e===null)return null;switch(e.challenge_type){case"nonce":return hi(e);case"otp":return gi(e);case"password_reset":return mi(e);case"password_set":return wi(e);case"password_verify":return xi(e);case"webauthn_create":return $i(e);case"webauthn_get":return vi(e);default:throw new Error(`No variant of Attestation exists with 'challenge_type=${e.challenge_type}'`)}}}const D={Webauthn:"webauthn",EmailLink:"email_link",SmsLink:"sms_link",OtpViaSms:"otp_via_sms",OtpViaEmail:"otp_via_email",Oidc:"oidc",Saml:"saml",Api:"api",DirectId:"direct_id",Password:"password"};function Y(e){return Si(e)}function Si(e,t){return e}function ss(e){return e}const _e={EmailAddress:"email_address",PhoneNumber:"phone_number"};function Ei(e){return Ci(e)}function Ci(e,t){return e}function os(e){return ki(e)}function ki(e,t){return e==null?e:{type:Ei(e.type),value:e.value}}function ft(e){if(e!==void 0)return e===null?null:{type:e.type,value:e.value}}function Ii(e){return Ri(e)}function Ri(e,t){return e}function Di(e){return Ti(e)}function Ti(e,t){return e==null?e:{challenge:p(e,"challenge")?e.challenge:void 0}}function Oi(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:p(e,"options")?Di(e.options):void 0}}function Ai(e){return zi(e)}function zi(e,t){return e==null?e:{auth_code_url:e.auth_code_url}}function Li(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:Ai(e.options)}}function Pi(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method)}}function Ni(e){return Mi(e)}function Mi(e,t){return e}function Ui(e){return Vi(e)}function Vi(e,t){return e}function Bi(e){return Fi(e)}function Fi(e,t){return e==null?e:{name:Ii(e.name),pattern:e.pattern,match_type:Ni(e.match_type),pattern_qualifiers:p(e,"pattern_qualifiers")?e.pattern_qualifiers.map(Ui):void 0}}function is(e){return qi(e)}function qi(e,t){return e==null?e:{regular_expressions:p(e,"regular_expressions")?e.regular_expressions.map(Bi):void 0}}function Gi(e){return Hi(e)}function Hi(e,t){return e==null?e:{validation_rules:is(e.validation_rules)}}function Wi(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:Gi(e.options)}}function Ki(e){return ji(e)}function ji(e,t){return e==null?e:{validation_rules:is(e.validation_rules)}}function Yi(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:Ki(e.options)}}function Ji(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method)}}function Xi(e){return Zi(e)}function Zi(e,t){return e==null?e:{challenge_id:p(e,"challenge_id")?e.challenge_id:void 0}}function Qi(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:p(e,"options")?Xi(e.options):void 0}}function ea(e){return ta(e)}function ta(e,t){return e==null?e:{start_authentication_url:e.start_authentication_url}}function na(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:ea(e.options)}}function ra(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:p(e,"options")?e.options:void 0}}function sa(e,t){return e==null?e:{id:e.id,type:j(e.type),authentication_method:Y(e.authentication_method),options:p(e,"options")?e.options:void 0}}function oa(e){return ia(e)}function ia(e,t){if(e==null)return e;switch(e.type){case"nonce":return{...Oi(e,!0),type:"nonce"};case"oidc":return{...Li(e,!0),type:"oidc"};case"otp":return{...Pi(e,!0),type:"otp"};case"password_reset":return{...Wi(e,!0),type:"password_reset"};case"password_set":return{...Yi(e,!0),type:"password_set"};case"password_verify":return{...Ji(e,!0),type:"password_verify"};case"proxy":return{...Qi(e,!0),type:"proxy"};case"saml":return{...na(e,!0),type:"saml"};case"webauthn_create":return{...ra(e,!0),type:"webauthn_create"};case"webauthn_get":return{...sa(e,!0),type:"webauthn_get"};default:throw new Error(`No variant of ChallengeListInner exists with 'type=${e.type}'`)}}function aa(e){return ca(e)}function ca(e,t){return e}const me={AuthenticationSucceededV1:"AuthenticationSucceeded_v1",AuthenticationFailedV1:"AuthenticationFailed_v1",PersonCreatedV1:"PersonCreated_v1",PersonDeletedV1:"PersonDeleted_v1",VirtualPageLoadedV1:"VirtualPageLoaded_v1",SlashIdsdkLoadedV1:"SlashIDSDKLoaded_v1",PersonIdentifiedV1:"PersonIdentified_v1",PersonLoggedOutV1:"PersonLoggedOut_v1",TokenMintedV1:"TokenMinted_v1",GateServerStartedV1:"GateServerStarted_v1",GateRequestHandledV1:"GateRequestHandled_v1"};function da(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,authenticated_methods:e.authenticated_methods===void 0?void 0:e.authenticated_methods.map(ss),failed_authn_method:e.failed_authn_method,failure_reason:e.failure_reason,failure_detail:e.failure_detail,handle:ft(e.handle),challenge_id:e.challenge_id}}function ua(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,success_authn_method:e.success_authn_method,authenticated_methods:e.authenticated_methods.map(ss),handle:ft(e.handle)}}function la(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function fa(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function ha(e){if(e!==void 0)return e===null?null:{event_name:e.event_name}}function pa(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function ga(e){if(e!==void 0){if(e===null)return null;switch(e.event_name){case"AuthenticationFailed_v1":return da(e);case"AuthenticationSucceeded_v1":return ua(e);case"PersonIdentified_v1":return la(e);case"PersonLoggedOut_v1":return fa(e);case"SlashIDSDKLoaded_v1":return ha(e);case"VirtualPageLoaded_v1":return pa(e);default:throw new Error(`No variant of EventPostRequestEventData exists with 'event_name=${e.event_name}'`)}}}function Hn(e){if(e!==void 0)return e===null?null:{organization_id:e.organization_id,analytics_correlation_id:e.analytics_correlation_id,window_location:e.window_location,user_agent:e.user_agent,event_data:ga(e.event_data)}}function _a(e){return ma(e)}function ma(e,t){return e==null?e:{params:p(e,"params")?e.params:void 0,type:aa(e.type),label:p(e,"label")?e.label:void 0,id:e.id,last_used:p(e,"last_used")?new Date(e.last_used):void 0}}const ze={Popup:"popup",Redirect:"redirect"};function ba(e){let t=!0;return t=t&&"client_id"in e,t=t&&"provider"in e,t}function wa(e){if(e!==void 0)return e===null?null:{client_id:e.client_id,provider:e.provider,ux_mode:e.ux_mode,redirect_target:e.redirect_target,requires_groups:e.requires_groups,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}const Le={Popup:"popup",Redirect:"redirect"};function ya(e){let t=!0;return t=t&&"provider_credentials_id"in e,t}function xa(e){if(e!==void 0)return e===null?null:{provider_credentials_id:e.provider_credentials_id,ux_mode:e.ux_mode,redirect_target:e.redirect_target,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}const $a={None:"none",Indirect:"indirect",Direct:"direct"};const Wn={Any:"any",Platform:"platform",CrossPlatform:"cross_platform"};const va={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};const Sa={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};function Ea(e){return!0}function Ca(e){if(e!==void 0)return e===null?null:{scope:e.scope,available_credential_ids:e.available_credential_ids,attachment:e.attachment,user_verification:e.user_verification,resident_key:e.resident_key,attestation:e.attestation}}function ka(e){if(e!==void 0)return e===null?null:ba(e)?wa(e):ya(e)?xa(e):Ea(e)?Ca(e):{}}function Ia(e){if(e!==void 0)return e===null?null:{method:e.method,options:ka(e.options)}}function Ra(e){return Da(e)}function Da(e,t){return e}function Ta(e){return e}function Oa(e){return Aa(e)}function Aa(e,t){return e==null?e:{consent_level:Ra(e.consent_level),created_at:new Date(e.created_at)}}function Kn(e){if(e!==void 0)return e===null?null:{consent_levels:e.consent_levels.map(Ta)}}function as(e){return za(e)}function za(e,t){return e==null?e:{consents:e.consents.map(Oa)}}function La(e){return Pa(e)}function Pa(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result:void 0}}function Na(e){return Ma(e)}function Ma(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result:void 0}}function jn(e){return Ua(e)}function Ua(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result:void 0}}function Pt(e){return Va(e)}function Va(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result:void 0}}function Ba(e){return Fa(e)}function Fa(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?as(e.result):void 0}}function qa(e){return Ga(e)}function Ga(e,t){return e==null?e:{id:e.id,org_name:e.org_name,tenant_name:e.tenant_name}}function Ha(e){return Wa(e)}function Wa(e,t){return e==null?e:{id:e.id,org_name:e.org_name,tenant_name:e.tenant_name,managed_organizations:p(e,"managed_organizations")?e.managed_organizations.map(qa):void 0}}function Ka(e){return ja(e)}function ja(e,t){return e==null?e:{active:e.active,person_id:e.person_id,roles:p(e,"roles")?e.roles:void 0,region:e.region,handles:p(e,"handles")?e.handles.map(os):void 0,groups:p(e,"groups")?e.groups:void 0,attributes:p(e,"attributes")?e.attributes:void 0}}function Ya(e){return Ja(e)}function Ja(e,t){return e==null?e:{person:Ka(e.person),organizations:e.organizations.map(Ha),handles:e.handles.map(os),credentials:e.credentials.map(_a)}}function Xa(e){return Za(e)}function Za(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:Ya(e.result)}}function Qa(e){if(e!==void 0)return e===null?null:{handle:ft(e.handle),factor:Ia(e.factor)}}function ec(e){return tc(e)}function tc(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result:void 0}}function Nt(e){return nc(e)}function nc(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?e.result.map(oa):void 0}}function rc(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,code:e.code,pkce_code_verifier:e.pkce_code_verifier}}function sc(e){return oc(e)}function oc(e,t){return e==null?e:{valid:e.valid,invalidity_reason:p(e,"invalidity_reason")?e.invalidity_reason:void 0,expires_in_seconds:p(e,"expires_in_seconds")?e.expires_in_seconds:void 0,expires_at:p(e,"expires_at")?new Date(e.expires_at):void 0}}function ic(e){return ac(e)}function ac(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:p(e,"result")?sc(e.result):void 0}}function Yn(e){return cc(e)}function cc(e,t){return e==null?e:{meta:p(e,"meta")?F(e.meta):void 0,errors:p(e,"errors")?e.errors.map(q):void 0,result:as(e.result)}}function dc(e){if(e!==void 0)return e===null?null:{method:e.method}}function uc(e){if(e!==void 0)return e===null?null:{handle:ft(e.handle),factor:dc(e.factor)}}function lc(e){if(e!==void 0)return e===null?null:{token:e.token}}class Jn extends ae{async deleteAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new v("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling deleteAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(zt.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"DELETE",headers:s,query:r},n);return new E(o,i=>Lt(i))}async deleteAttributesBucketName(t,n){return await(await this.deleteAttributesBucketNameRaw(t,n)).value()}async getAttributesRaw(t,n){const r={};t.buckets&&(r.buckets=t.buckets.join(zt.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes",method:"GET",headers:s,query:r},n);return new E(o,i=>La(i))}async getAttributes(t={},n){return await(await this.getAttributesRaw(t,n)).value()}async getAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new v("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling getAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(zt.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"GET",headers:s,query:r},n);return new E(o,i=>Na(i))}async getAttributesBucketName(t,n){return await(await this.getAttributesBucketNameRaw(t,n)).value()}async putAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new v("body","Required parameter requestParameters.body was null or undefined when calling putAttributes.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes",method:"PUT",headers:s,query:r,body:t.body},n);return new E(o,i=>Lt(i))}async putAttributes(t,n){return await(await this.putAttributesRaw(t,n)).value()}async putAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new v("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling putAttributesBucketName.");if(t.body===null||t.body===void 0)throw new v("body","Required parameter requestParameters.body was null or undefined when calling putAttributesBucketName.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PUT",headers:s,query:r,body:t.body},n);return new E(o,i=>Lt(i))}async putAttributesBucketName(t,n){return await(await this.putAttributesBucketNameRaw(t,n)).value()}}class it extends ae{async getChallengeChallengeIdRaw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new v("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeId.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge/{challenge_id}".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:s,query:r},n);return new E(o,i=>jn(i))}async getChallengeChallengeId(t,n){return await(await this.getChallengeChallengeIdRaw(t,n)).value()}async getChallengeChallengeIdV2Raw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new v("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeIdV2.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge/{challenge_id}/v2".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:s,query:r},n);return new E(o,i=>Pt(i))}async getChallengeChallengeIdV2(t,n){return await(await this.getChallengeChallengeIdV2Raw(t,n)).value()}async getChallengePackChallengePackIdRaw(t,n){if(t.challengePackId===null||t.challengePackId===void 0)throw new v("challengePackId","Required parameter requestParameters.challengePackId was null or undefined when calling getChallengePackChallengePackId.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge_pack/{challenge_pack_id}".replace("{challenge_pack_id}",encodeURIComponent(String(t.challengePackId))),method:"GET",headers:s,query:r},n);return new E(o,i=>Nt(i))}async getChallengePackChallengePackId(t,n){return await(await this.getChallengePackChallengePackIdRaw(t,n)).value()}async getMeRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const o=this.configuration.accessToken,i=await o("Bearer",[]);i&&(r.Authorization=`Bearer ${i}`)}const s=await this.request({path:"/me",method:"GET",headers:r,query:n},t);return new E(s,o=>Xa(o))}async getMe(t){return await(await this.getMeRaw(t)).value()}async getTokenRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new v("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling getToken.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/token",method:"GET",headers:s,query:r},n);return new E(o,i=>Pt(i))}async getToken(t,n){return await(await this.getTokenRaw(t,n)).value()}async postAttestationRaw(t,n){if(t.attestation===null||t.attestation===void 0)throw new v("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestation.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attestation",method:"POST",headers:s,query:r,body:Gn(t.attestation)},n);return new E(o,i=>jn(i))}async postAttestation(t,n){return await(await this.postAttestationRaw(t,n)).value()}async postAttestationV2Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new v("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV2.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attestation/v2",method:"POST",headers:s,query:r,body:Gn(t.attestation)},n);return new E(o,i=>Pt(i))}async postAttestationV2(t,n){return await(await this.postAttestationV2Raw(t,n)).value()}async postDirectIdRaw(t,n){const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/direct-id",method:"POST",headers:s,query:r},n);return new E(o,i=>ec(i))}async postDirectId(t={},n){return await(await this.postDirectIdRaw(t,n)).value()}async postIdRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new v("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postId.");if(t.iDRequest===null||t.iDRequest===void 0)throw new v("iDRequest","Required parameter requestParameters.iDRequest was null or undefined when calling postId.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/id",method:"POST",headers:s,query:r,body:Qa(t.iDRequest)},n);return new E(o,i=>Nt(i))}async postId(t,n){return await(await this.postIdRaw(t,n)).value()}async postRecoverRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new v("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postRecover.");if(t.recoverRequest===null||t.recoverRequest===void 0)throw new v("recoverRequest","Required parameter requestParameters.recoverRequest was null or undefined when calling postRecover.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/recover",method:"POST",headers:s,query:r,body:uc(t.recoverRequest)},n);return new E(o,i=>Nt(i))}async postRecover(t,n){return await(await this.postRecoverRaw(t,n)).value()}async postSsoResolveRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new v("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postSsoResolve.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/sso/resolve",method:"POST",headers:s,query:r,body:rc(t.postSsoResolveRequest)},n);return new ot(o)}async postSsoResolve(t,n){await this.postSsoResolveRaw(t,n)}}class fc extends ae{async postActionsSdkRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new v("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postActionsSdk.");const r={},s={};if(s["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/actions/sdk",method:"POST",headers:s,query:r,body:Hn(t.eventPostRequest)},n);return new ot(o)}async postActionsSdk(t,n){await this.postActionsSdkRaw(t,n)}async postEventsRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new v("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postEvents.");const r={},s={};if(s["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/events",method:"POST",headers:s,query:r,body:Hn(t.eventPostRequest)},n);return new ot(o)}async postEvents(t,n){await this.postEventsRaw(t,n)}}class Xn extends ae{async deleteConsentGdprRaw(t,n){const r={};t.consentLevels&&(r.consent_levels=t.consentLevels),t.deleteAll!==void 0&&(r.deleteAll=t.deleteAll);const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"DELETE",headers:s,query:r},n);return new ot(o)}async deleteConsentGdpr(t={},n){await this.deleteConsentGdprRaw(t,n)}async getConsentGdprRaw(t,n){const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"GET",headers:s,query:r},n);return new E(o,i=>Ba(i))}async getConsentGdpr(t={},n){return await(await this.getConsentGdprRaw(t,n)).value()}async postConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new v("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling postConsentGdpr.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"POST",headers:s,query:r,body:Kn(t.gDPRConsentRequest)},n);return new E(o,i=>Yn(i))}async postConsentGdpr(t,n){return await(await this.postConsentGdprRaw(t,n)).value()}async putConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new v("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling putConsentGdpr.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"PUT",headers:s,query:r,body:Kn(t.gDPRConsentRequest)},n);return new E(o,i=>Yn(i))}async putConsentGdpr(t,n){return await(await this.putConsentGdprRaw(t,n)).value()}}class Zn extends ae{async postTokenValidateRaw(t,n){if(t.validateTokenReq===null||t.validateTokenReq===void 0)throw new v("validateTokenReq","Required parameter requestParameters.validateTokenReq was null or undefined when calling postTokenValidate.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/token/validate",method:"POST",headers:s,query:r,body:lc(t.validateTokenReq)},n);return new E(o,i=>ic(i))}async postTokenValidate(t,n){return await(await this.postTokenValidateRaw(t,n)).value()}}function hc(){const n=window.screenX+(window.innerWidth-400)/2;return`width=400,height=600,top=${window.screenY+(window.innerHeight-600)/2},left=${n},resizable,scrollbars=yes,status=1`}function cs(){const e=hc(),t=window.open(window.location.href,"/id:popup",e);if(!t)throw new Error("SlashId: Popup blocked, please consider redirect instead");const n='<div style="position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);">You will be redirected in a moment...</div>';try{var r;t==null||(r=t.document)===null||r===void 0||r.write(n)}catch(o){console.error(o),t.document&&t.document.body&&(t.document.body.innerHTML=n)}finally{t.blur()}return[t,o=>(t&&(t.location=o,t.focus()),t)]}function pc(e,t){return e.origin+e.pathname===t.origin+t.pathname}function ds(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"}var Xe,gc=new Uint8Array(16);function _c(){if(!Xe&&(Xe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xe(gc)}var mc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function bc(e){return typeof e=="string"&&mc.test(e)}var wc=bc,k=[];for(var Mt=0;Mt<256;++Mt)k.push((Mt+256).toString(16).substr(1));function yc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(k[e[t+0]]+k[e[t+1]]+k[e[t+2]]+k[e[t+3]]+"-"+k[e[t+4]]+k[e[t+5]]+"-"+k[e[t+6]]+k[e[t+7]]+"-"+k[e[t+8]]+k[e[t+9]]+"-"+k[e[t+10]]+k[e[t+11]]+k[e[t+12]]+k[e[t+13]]+k[e[t+14]]+k[e[t+15]]).toLowerCase();if(!wc(n))throw TypeError("Stringified UUID is invalid");return n}var xc=yc;function $c(e,t,n){e=e||{};var r=e.random||(e.rng||_c)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=r[s];return t}return xc(r)}var Pe=$c;function be(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),n=atob(t);return Uint8Array.from(n,r=>r.charCodeAt(0))}function X(e,t=!0){const n=String.fromCharCode(...e),r=btoa(n);return t?r.replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,""):r}const vc="challenges",Sc="sidcp",Kt="@SLASHID/CSRF_TOKEN",jt="@SLASHID/PKCE_CODE_VERIFIER";var P;(function(e){e[e.StorageGetItem=0]="StorageGetItem",e[e.StorageSetItem=1]="StorageSetItem",e[e.Ping=2]="Ping",e[e.ChallengeWebauthnCreate=3]="ChallengeWebauthnCreate",e[e.ChallengeWebauthnGet=4]="ChallengeWebauthnGet",e[e.SSOChallenge=5]="SSOChallenge"})(P||(P={}));class Ec{constructor(){this.id=He(),this.type=P.Ping}}class Qn{constructor(t,n){this.id=t,this.error=n}}class Cc{constructor(t,n){this.type=P.ChallengeWebauthnCreate,this.id=He(),this.slashIDOptions=t,this.challenge=n}}class er{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class kc{constructor(t,n){this.type=P.ChallengeWebauthnGet,this.id=He(),this.slashIDOptions=t,this.challenge=n}}class tr{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class Ic{constructor(t){this.type=P.StorageGetItem,this.id=He(),this.key=t}}class nr{constructor(t,n,r){this.id=t,this.value=n,this.error=r}}class Rc{constructor(t,n){this.id=He(),this.type=P.StorageSetItem,this.key=t,this.value=n}}class rr{constructor(t,n){this.id=t,this.error=n}}function He(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]}function sr(e){const t=new URLSearchParams(e),n=t.get("sso_challenge_id"),r=t.get("sso_code"),s=t.get("csrf_token");return!n||!r||!s?null:{ssoChallengeID:n,ssoCode:r,csrfToken:s}}function Dc(e){return e.type===P.ChallengeWebauthnCreate}function Tc(e){return e.type===P.ChallengeWebauthnGet}function Oc(e){return e&&e.type===P.SSOChallenge}function Ac(e){return e.type===P.Ping}function zc(e){return typeof e=="object"&&!!e.baseURL&&!!e.sdkURL}const Lc=["http:","https:"];function Pc(e){if(!e)throw new TypeError("options cannot be null");if(e.environment){if(typeof e.environment=="string"&&e.environment!=="production"&&e.environment!=="sandbox")throw new TypeError("If 'environment' is set as a string, it must be either 'production' or 'sandbox'");if(typeof e.environment=="object"){if(typeof e.environment.baseURL!="string")throw new TypeError("'environment.baseURL' must be a string");if(typeof e.environment.sdkURL!="string")throw new TypeError("'environment.sdkURL' must be a string")}}if(e.environment&&(e.baseURL||e.sdkURL))throw new TypeError("If 'environment' is set, 'baseURL' and 'sdkURL' cannot be set at the same time. Use a custom environment instead.");if(e.baseURL){if(typeof e.baseURL!="string")throw new TypeError("'baseURL' must be a string");let r;try{r=new URL(e.baseURL)}catch{throw new TypeError("'baseURL' must be a valid URL")}if(Lc.indexOf(r.protocol)===-1)throw new TypeError("'baseURL' must be either an http or https URL")}if(e.sdkURL){if(typeof e.sdkURL!="string")throw new TypeError("'sdkURL' must be a string");try{new URL(e.sdkURL)}catch{throw new TypeError("'sdkURL' must be a valid URL")}}const{analyticsEnabled:t=!0,oid:n}=e;if(t&&!n)throw new Error("Analytics require the 'oid' parameter to be set when instantiating SlashID()")}function Nc(e){return e.environment?Mc(e.environment):{baseURL:e.baseURL||Yt.production.baseURL,sdkURL:e.sdkURL||Yt.production.sdkURL}}const Yt={production:{baseURL:"https://api.slashid.com",sdkURL:"https://cdn.slashid.com/sdk.html"},sandbox:{baseURL:"https://api.sandbox.slashid.com",sdkURL:"https://cdn.sandbox.slashid.com/sdk.html"}};function Mc(e){if(typeof e=="string")return Yt[e];if(zc(e))return{baseURL:e.baseURL,sdkURL:e.sdkURL};throw new TypeError("'environment' must be either a string or an object")}function us(e){const t=Nc(e);var n;return{oid:e.oid,analyticsEnabled:(n=e.analyticsEnabled)!==null&&n!==void 0?n:!0,...t}}class or{constructor(t){this.getOTP=t?.getOTP}}async function ls(){const e=Pe(),t=Pe()+Pe(),n=new TextEncoder().encode(t),r=await window.crypto.subtle.digest("SHA-256",n),s=X(new Uint8Array(r));return window.localStorage.setItem(Kt,e),window.localStorage.setItem(jt,t),{csrf_token:e,pkce_code_challenge:s}}async function Uc(e){if(e.method!=="oidc")throw new Error(`Can't create OIDC extras for method: ${e.method}`);let t={};const{client_id:n,provider:r}=e.options;let{ux_mode:s,redirect_target:o}=e.options;if(s||(s=ze.Popup),o||(o=window.location.href),s===ze.Redirect&&!ds(o))throw new Error(`If OIDC ux_mode was set to "redirect" a "redirect_target" is required, got ${o}`);if(s===ze.Popup){const[c,d]=cs();t={...t,popup:c,setPopupUrl:d}}const{csrf_token:i,pkce_code_challenge:a}=await ls();return{...e,options:{...e.options,client_id:n,provider:r,ux_mode:s,redirect_target:o,csrf_token:i,pkce_code_challenge:a},extras:t}}async function Vc(e){if(e.method!=="saml")throw new Error(`Can't create SAML extras for method: ${e.method}`);let t={},{ux_mode:n,redirect_target:r}=e.options;if(n||(n=Le.Popup),r||(r=window.location.href),n===Le.Redirect&&!ds(r))throw new Error(`If SAML ux_mode was set to "redirect" a "redirect_target" is required, got ${r}`);if(n===Le.Popup){const[i,a]=cs();t={...t,popup:i,setPopupUrl:a}}const{csrf_token:s,pkce_code_challenge:o}=await ls();return{...e,options:{...e.options,ux_mode:n,redirect_target:r,csrf_token:s,pkce_code_challenge:o},extras:t}}function Jt(e){this.message=e}Jt.prototype=new Error,Jt.prototype.name="InvalidCharacterError";var ir=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Jt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)&&(i+=String.fromCharCode(255&n>>(-2*s&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function Bc(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(ir(n).replace(/(.)/g,function(r,s){var o=s.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return ir(t)}}function at(e){this.message=e}function Fc(e,t){if(typeof e!="string")throw new at("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Bc(e.split(".")[n]))}catch(r){throw new at("Invalid token specified: "+r.message)}}at.prototype=new Error,at.prototype.name="InvalidTokenError";var Ut=Fc;const qc={end_user_read_write:"end_user_read_write",end_user_read_only:"end_user_read_only",end_user_no_access:"end_user_no_access","person_pool-end_user_read_write":"person_pool-end_user_read_write","person_pool-end_user_read_only":"person_pool-end_user_read_only","person_pool-end_user_no_access":"person_pool-end_user_no_access"};class Gc{async get(t){const n=await this.user.getAttributesClient().getAttributesBucketName({bucketName:this.bucketName,attributes:t,slashIDSdkVersion:I.raw},{cache:"no-cache"}),r=n.errors;if(r)throw r;return n.result}async set(t){const r=(await this.user.getAttributesClient().putAttributesBucketName({bucketName:this.bucketName,body:t,slashIDSdkVersion:I.raw},{cache:"no-cache"})).errors;if(r)throw r}async delete(t){const r=(await this.user.getAttributesClient().deleteAttributesBucketName({bucketName:this.bucketName,slashIDSdkVersion:I.raw,attributes:t},{cache:"no-cache"})).errors;if(r)throw r}constructor({user:t,bucketName:n}){this.user=t,this.bucketName=n}}function Hc(e){return e?typeof e.user_token=="string":!1}class fs{get decoded(){if(!this._token)throw new Error("Cannot call methods on unauthenticated user");try{return Ut(this._token)}catch(t){throw new TypeError(t.toString())}}get tokenClaims(){return this.decoded}get decodedTokenContainer(){if(this._tokenContainer)try{return Ut(this._tokenContainer)}catch(t){throw new TypeError(t.toString())}}get tokenContainerClaims(){return this.decodedTokenContainer}updateClient(t){var n;this._token=t;const r=new xe({...$e,...((n=this._clientOptions)===null||n===void 0?void 0:n.baseURL)&&{basePath:this._clientOptions.baseURL},accessToken:t});this._apiClient=new it(r),this._attrsClient=new Jn(r),this._tokenClient=new Zn(r),this._personConsentsApi=new Xn(r)}get ID(){return this.decoded.person_id}get token(){var t;return(t=this._token)!==null&&t!==void 0?t:""}get tokenContainer(){return this._tokenContainer||""}get oid(){return this.decoded.oid}get firstLogin(){return this.decoded.first_token}get authentication(){return this.decoded.authenticated_methods||[]}get authentications(){return this.decoded.authentications||[]}async createDirectID(){const{result:t}=await this._apiClient.postDirectId({slashIDSdkVersion:I.raw});return t}async logout(){this.updateClient(void 0),this._tokenContainer=void 0}async validateToken(){var t;const n=await((t=this._tokenClient)===null||t===void 0?void 0:t.postTokenValidate({validateTokenReq:{token:this.token},slashIDSdkVersion:I.raw},{cache:"no-cache"})),r=n.errors;if(r)throw r;return n.result}getGroups(){const t=this.decoded.groups_claim_name||"groups";return this.decoded[t]}getAttributesClient(){return this._attrsClient}getBucket(t=qc.end_user_read_write){return new Gc({user:this,bucketName:t})}async get(t){return this.getBucket().get(t)}async set(t){return this.getBucket().set(t)}async delete(t){return this.getBucket().delete(t)}async getGDPRConsent(){const t=await this._personConsentsApi.getConsentGdpr({slashIDSdkVersion:I.raw}),n=t.errors;if(n)throw n;return t.result}async setGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.putConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:I.raw}),r=n.errors;if(r)throw r;return n.result}async addGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.postConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:I.raw}),r=n.errors;if(r)throw r;return n.result}async removeGDPRConsent({consentLevels:t}){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:I.raw,consentLevels:t})}async removeGDPRConsentAll(){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:I.raw,deleteAll:!0})}async getOrganizations(){const t=await this._apiClient.getMe(),n=t.errors;if(n)throw n;return t.result.organizations}async getHandles(){const{errors:t,result:n}=await this._apiClient.getMe();if(t)throw t;return n.handles}async getTokenForOrganization(t){const n=await this._apiClient.getToken({slashIDOrgID:t,slashIDSdkVersion:I.raw}),r=n.errors;if(r)throw r;return n.result}toString(){var t,n;return(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}toJSON(){var t,n;return`${(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}`}constructor(t,n){try{t=JSON.parse(t)}catch{}if(typeof t!="string")throw new TypeError("token must be a string");try{const s=Ut(t);Hc(s)?(this._token=s.user_token,this._tokenContainer=t):this._token=t}catch(s){throw new TypeError(s.toString())}this._clientOptions=us(n??{});const r=new xe({...$e,...n?.baseURL&&{basePath:n.baseURL},accessToken:this._token});this._apiClient=new it(r),this._attrsClient=new Jn(r),this._tokenClient=new Zn(r),this._personConsentsApi=new Xn(r)}}var T={};N(T,"InvalidAuthenticationMethodError",function(){return de});N(T,"isResponseError",function(){return oe});N(T,"isRateLimitError",function(){return bn});N(T,"isTimeoutError",function(){return hs});N(T,"isBadPasskeyScopeError",function(){return ps});N(T,"isThrownResponse",function(){return Me});N(T,"isTimeoutInPayload",function(){return gs});N(T,"isRateLimitInPayload",function(){return _s});N(T,"RateLimitError",function(){return Ue});N(T,"clientGeneratedErrorSlugs",function(){return ms});N(T,"isClientGeneratedErrorSlug",function(){return Wc});N(T,"ensureError",function(){return Xt});N(T,"createEventFromError",function(){return bs});class de extends Error{constructor(t,n){super(`Authentication method '${t}': ${n}`)}}function oe(e){return e.name==="ResponseError"&&e.response instanceof Response}function bn(e){var t;return((t=e.response)===null||t===void 0?void 0:t.status)===429}async function hs(e){var t,n,r,s;return(((t=e.response)===null||t===void 0?void 0:t.status)===401||((n=e.response)===null||n===void 0?void 0:n.status)===403)&&oe(e)&&((r=(await e.response.clone().json()).errors)===null||r===void 0||(s=r[0])===null||s===void 0?void 0:s.message)==="authentication has expired"}async function ps(e){var t,n,r;const s=/selected scope '(.*?)' is not equal to or a registrable domain suffix of origin '(.*?)'/;return((t=e.response)===null||t===void 0?void 0:t.status)===400&&oe(e)&&s.test((n=(await e.response.clone().json()).errors)===null||n===void 0||(r=n[0])===null||r===void 0?void 0:r.message)}function Me(e){return typeof e=="object"&&Array.isArray(e.errors)&&e.errors.every(t=>typeof t.httpcode=="number"&&typeof t.message=="string")}function gs(e){return e.errors.some(t=>t.message==="authentication has expired")}function _s(e){return e.errors.some(t=>t.httpcode===429)}class Ue extends Error{static async fromResponseError(t){const r=(await t.response.clone().json()).errors.find(s=>s.httpcode===429);return r?new Ue(t,r.message):new Ue(t)}constructor(t,n){super(n||"Too many requests!"),this.name="RateLimitError",this.response=t.response}}const ms=["incorrect_otp_code_via_email","incorrect_otp_code_via_sms","incorrect_otp_code","invalid_password","incorrect_password","bad_passkey_scope","rate_limit_exceeded","timeout","client_side_error","unspecified"],Wc=e=>ms.includes(e);function Xt(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}return new Error(`Non-Error thrown: ${t}`)}async function Kc(e){if(oe(e)||Me(e)){let t;try{return oe(e)?t=await e.response.clone().json():t=e,JSON.stringify(t)}catch{return Xt(e).message}}return Xt(e).message}async function bs(e,{authenticationFactor:t,handle:n,previousToken:r,challengeId:s}){const o=await(async()=>{if(!oe(e)&&!Me(e))return null;if(bn(e))return"rate_limit_exceeded";if(await hs(e))return"timeout";if(await ps(e))return"bad_passkey_scope";if(Me(e)){if(gs(e))return"timeout";if(_s(e))return"rate_limit_exceeded"}return"unspecified"})();return{authenticationFactor:t,handle:n,errorText:o||"client_side_error",previousToken:r,challengeId:s,failureDetail:await Kc(e)}}function Ne(e){return new Promise(t=>setTimeout(t,e))}function jc(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(s){s(n)}),(r=e.get("*"))&&r.slice().map(function(s){s(t,n)})}}}async function ar(){const e=document.hasFocus();for(;!e&&!document.hasFocus();)await Ne(50);return e}const cr={PopupBlocked:"Popup blocked",BadOAuthURL:"Bad OAuth sign in URL"},dr={PopupBlocked:"Popup blocked",BadAuthURL:"Bad authentication URL"};function Yc(e){return e.errorText==="client_side_error"}const Jc=["otpSmsSent","otpCodeSent","otpIncorrectCodeSubmitted","passwordSetReady","passwordResetReady","passwordVerifyReady","invalidPasswordSubmitted","incorrectPasswordSubmitted","oauthFlowStarted","oauthFlowFailed","userAuthenticatedFromURL","idFlowSucceeded","idFlowStarted","idFlowFailed","webAuthnChallengeProcessed"],Xc=["otpCodeSubmitted","passwordSubmitted"],Zc=["clientSideError"];function ur(e){return Jc.includes(e)}function Qc(e){return Xc.includes(e)}function Vt(e){return Zc.includes(e)}function ed(){return jc()}async function Zt(e){return new Promise(async(n,r)=>{const s=new Ec;let o=!1;const i=a=>{const c=a.data;c.id===s.id&&(window.removeEventListener("message",i),c.error?r(c.error):(o=!0,n(e)))};for(window.addEventListener("message",i);!o;)e.postMessage(s,"*"),await Ne(50)})}class td{async getRemoteWindow(){var t;const n=(t=this.remote)===null||t===void 0?void 0:t.contentWindow;if(!n)throw new Error("this context has no remote");return this.remoteReady||(await Zt(n),this.remoteReady=!0),n}async processEvent(t){let n=null;if(window.parent&&t.source===window.parent&&(n=window.parent),!!n)switch(t.data.type){case P.StorageGetItem:{const r=t.data;try{const s=await this.localGetItem(r.key);n.postMessage(new nr(t.data.id,s),"*")}catch(s){n.postMessage(new nr(t.data.id,null,s),"*")}}break;case P.StorageSetItem:{const r=t.data;try{await this.localSetItem(r.key,r.value),n.postMessage(new rr(t.data.id),"*")}catch(s){n.postMessage(new rr(t.data.id,s),"*")}}break}}async localGetItem(t){return window.localStorage.getItem(t)}async remoteGetItem(t){let n=null;return this.remote&&(n=await new Promise((r,s)=>{const o=new Ic(t),i=a=>{const c=a.data;c.id===o.id&&(window.removeEventListener("message",i),c.error?s(c.error):r(c.value))};window.addEventListener("message",i),this.getRemoteWindow().then(a=>{a.postMessage(o,"*")})})),n}async localSetItem(t,n){return window.localStorage.setItem(t,n)}async remoteSetItem(t,n){this.remote&&await new Promise((r,s)=>{const o=new Rc(t,n),i=a=>{const c=a.data;c.id===o.id&&(window.removeEventListener("message",i),c.error?s(c.error):r())};window.addEventListener("message",i),this.getRemoteWindow().then(a=>{a.postMessage(o,"*")})})}constructor(t,n){this.remoteReady=!1,this.remote=t,this.remoteOrigin=n,this.remote||window.addEventListener("message",this.processEvent.bind(this))}}class ws{constructor(t){this.store=t}}class G extends ws{stringify(t){return JSON.stringify(t)}parse(t){return t?JSON.parse(t):[]}async getAll(){const t=this.parse(await this.store.localGetItem(G.LOCAL_STORAGE_IDENTIFIERS_KEY)),n=this.parse(await this.store.remoteGetItem(G.LOCAL_STORAGE_IDENTIFIERS_KEY));return G.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(G.merge(n,[t]));await this.store.localSetItem(G.LOCAL_STORAGE_IDENTIFIERS_KEY,r),await this.store.remoteSetItem(G.LOCAL_STORAGE_IDENTIFIERS_KEY,r)}static identifiersEqual(t,n){return t.type===n.type&&t.value===n.value}static merge(t,n){return t.concat(...n).reduce((r,s)=>{for(const o of r)if(G.identifiersEqual(o,s))return r;return r.push(s),r},[])}}G.LOCAL_STORAGE_IDENTIFIERS_KEY="SLASHID_IDENTIFIERS";class ht extends ws{static identifiersEqual(t,n){return t===n}static merge(t,n){return t.concat(...n).reduce((r,s)=>{for(const o of r)if(ht.identifiersEqual(o,s))return r;return r.push(s),r},[])}}class Q extends ht{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return[];let n=null;try{n=JSON.parse(t)}catch{return[t]}return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}async getAll(){const t=this.parse(await this.store.localGetItem(Q.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY)),n=this.parse(await this.store.remoteGetItem(Q.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY));return Q.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(Q.merge(n,[t]));await this.store.localSetItem(Q.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r),await this.store.remoteSetItem(Q.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r)}}Q.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY="SLASHID_WEBAUTHN_CREDENTIAL_ID";class Ve extends ht{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return{};let n=null;try{n=JSON.parse(t)}catch{return{}}if(typeof n!="object")return{};const r={};for(const s of Object.keys(n)){if(typeof s!="string"||!Array.isArray(n[s]))continue;const o=n[s].filter(i=>typeof i=="string");r[s]=o}return r}async getAll(){return this.parse(await this.store.localGetItem(Ve.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2))}async get(t){return!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)?this.v1Storage.getAll():(await this.getAll())[t]||[]}async add(t,n){if(!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)){this.v1Storage.add(n);return}const r=await this.getAll(),s=r[t]||[];for(const i of s)if(i===n){console.warn(`Attempted to add already present credential ID: scope=${t} credId=${n}`);return}s.push(n),r[t]=s;const o=this.stringify(r);await this.store.localSetItem(Ve.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2,o)}constructor(t){super(t),this.v1Storage=new Q(t)}}Ve.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2="SLASHID_WEBAUTHN_CREDENTIAL_ID_V2";class nd extends fs{async mfa(t,n){let r;if(!t)throw new Error("at least one of PersonHandle or Factor is required");t.type&&t.value&&(r=t),t.method&&(n=t);const s=await this._slashid._id(this.decoded.oid,r,n,this._token);this.updateClient(s._token)}constructor(t,n){super(t,n),this._slashid=n instanceof Be?n:new Be(n),this._slashid.updateClient(this._token)}}const lr="@slashid/EVENTS_CORRELATION_ID";class rd{subscribeToDomainEvents(){this.sdk.subscribe("idFlowSucceeded",n=>this.trackAuthenticationSuccess(n)),this.sdk.subscribe("idFlowFailed",n=>this.trackAuthenticationFailure(n)),this.sdk.subscribe("invalidPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"invalid_password"})),this.sdk.subscribe("incorrectPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"incorrect_password"})),this.sdk.subscribe("otpIncorrectCodeSubmitted",n=>{var r;const s=(()=>{var o,i;return((o=n.factor)===null||o===void 0?void 0:o.method)==="otp_via_email"?"incorrect_otp_code_via_email":((i=n.factor)===null||i===void 0?void 0:i.method)==="otp_via_sms"?"incorrect_otp_code_via_sms":"incorrect_otp_code"})();this.trackAuthenticationFailure({errorText:s,authenticationFactor:{method:(r=n.factor)===null||r===void 0?void 0:r.method},challengeId:n.challengeId})}),vs(this.sdk).subscribe("clientSideError",n=>{this.trackAuthenticationFailure({...n,errorText:"client_side_error"})})}getCorrelationID(){let t=sessionStorage.getItem(lr);return t||(t=Pe(),sessionStorage.setItem(lr,t)),t}getFlowID(){return Pe()}createEventMetadata({location:t=window.location.href}={}){var n,r,s;return{organization_id:(s=(r=this.sdk.oid)!==null&&r!==void 0?r:(n=this.user)===null||n===void 0?void 0:n.oid)!==null&&s!==void 0?s:"",analytics_correlation_id:this.getCorrelationID(),window_location:t,user_agent:navigator.userAgent}}sendEvent(t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(`${this.sdk.baseURL}/actions/sdk`,n)}trackPersonIdentified({user:t}){const n={event_name:me.PersonIdentifiedV1,person_id:t.ID},r={...this.createEventMetadata(),event_data:n};this.sendEvent(r)}trackPersonLoggedOut(t){const n=this.sdk.getUser(t.token),r={event_name:me.PersonLoggedOutV1,person_id:n.ID},s={...this.createEventMetadata(),event_data:r};this.sendEvent(s)}trackAuthenticationSuccess(t){var n;const r=this.sdk.getUser(t.token);this.identify(r);const s={event_name:me.AuthenticationSucceededV1,person_id:r.ID,success_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r.authentication,...t.handle&&{handle:t.handle}},o={...this.createEventMetadata(),event_data:s};this.sendEvent(o)}trackAuthenticationFailure(t){var n,r;const s={event_name:me.AuthenticationFailedV1,failed_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:(r=this.user)===null||r===void 0?void 0:r.authentication,failure_reason:t.errorText,...t.handle&&{handle:t.handle},...t.challengeId&&{challenge_id:t.challengeId},...t.failureDetail&&{failure_detail:t.failureDetail}},o={...this.createEventMetadata({}),event_data:s};this.sendEvent(o)}trackSdkLoaded(){const t={...this.createEventMetadata(),event_data:{event_name:me.SlashIdsdkLoadedV1}};this.sendEvent(t)}identify(t){this.user=t,this.trackPersonIdentified({user:t})}logout(){const t=this.user;t&&(this.trackPersonLoggedOut({token:t.token}),this.user=void 0)}trackVirtualPageView(t){const{url:n=window.location.href}=t,r={event_name:me.VirtualPageLoadedV1},s={...this.createEventMetadata({location:n}),event_data:r};this.sendEvent(s)}constructor(t){this.sdk=t.sdk,this.eventsAPI=new fc(new xe({...$e,basePath:this.sdk.baseURL})),this.user=t.user,this.subscribeToDomainEvents(),this.trackSdkLoaded()}}function sd(e){var t;const n=(t=e.pattern_qualifiers)===null||t===void 0?void 0:t.reduce((s,o)=>o==="case_insensitive"?s+"i":s,"");return new RegExp(e.pattern,n)}function fr(e){const t=e.options.validation_rules.regular_expressions;return t?t.map(r=>{const s=sd(r);return{type:"regex",name:r.name,regexp:s,matchType:r.match_type}}):[]}function hr({password:e,rules:t}){const n=[];return t.forEach(r=>{const s=r.regexp.test(e);(s&&r.matchType==="must_not_match"||!s&&r.matchType==="must_match")&&n.push(r)}),n.length===0?{valid:!0,failedRules:[]}:{valid:!1,failedRules:n}}const pr="__SlashID_iframe",ys=Symbol(),xs=Symbol(),$s=Symbol(),vs=e=>({publish:(t,n)=>e[ys](t,n),subscribe:(t,n)=>e[xs](t,n),unsubscribe:(t,n)=>e[$s](t,n)});class Be{getAnalytics(){if(!this.analytics)throw new Error("Analytics has to be enabled and oid has to be set to use this method");return this.analytics}static async canGetPublicKeyCredentialsInIFrame(){const t=window;return!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)}publish(t,n){if(!Qc(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.emit(t,n)}[ys](t,n){if(!Vt(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.emit(t,n)}subscribe(t,n){if(!ur(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.on(t,n)}[xs](t,n){if(!Vt(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.on(t,n)}unsubscribe(t,n){if(!ur(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.off(t,n)}[$s](t,n){if(!Vt(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.off(t,n)}updateClient(t){this.authnClient=new it(new xe({...$e,basePath:this.baseURL,accessToken:t}))}resetClient(){this.updateClient(void 0)}async getChallengesFromURL(){const t=window.location.search,n=new URLSearchParams(t);let r;const s=n.get(Sc),o=n.get(vc);if(s&&o)throw new Error("found both 'challenges' and 'sidcp' URL query parameters");if(s){const i=await this.authnClient.getChallengePackChallengePackId({challengePackId:s,slashIDSdkVersion:I.raw},{cache:"no-cache"});if(i.errors)throw i;r=i.result}else if(o){const i=be(o),a=new TextDecoder("utf-8").decode(i);r=JSON.parse(a)}return r}async getUserFromURL(){if(!this.urlChallengesUser){let n;try{n=await this.getChallengesFromURL()}catch(r){throw await this.processError(r,{}),r}if(n){var t;const r=sr(window.location.search);r&&this.resolveSSOChallenge(r);let s;for(const o of n){const i=o;try{s=await this.processChallenge(i,void 0)}catch(a){throw await this.processError(a,{challengeId:i.id,authenticationFactor:{method:i.authentication_method}}),a}this.updateClient(s)}if(this.urlChallengesUser=new fs(s,{baseURL:this.baseURL,sdkURL:this.sdkURL}),!((t=this.urlChallengesUser.authentications)===null||t===void 0)&&t.length){const o=this.urlChallengesUser.authentications[this.urlChallengesUser.authentications.length-1];this.emitter.emit("idFlowSucceeded",{token:s,authenticationFactor:{method:o.method},handle:o.handle})}}}return this.urlChallengesUser&&this.emitter.emit("userAuthenticatedFromURL",{token:this.urlChallengesUser.token}),this.urlChallengesUser}async resolveSSOChallenge({ssoChallengeID:t,ssoCode:n,csrfToken:r}){if(!(!t||!n||!r))try{const s=window.localStorage.getItem(Kt);if(!s)throw new Error("no CSRF token stored");if(r!==s)throw new Error("CSRF token mismatch");const o=window.localStorage.getItem(jt);if(!o)throw new Error("no PKCE code verifier stored");await this.authnClient.postSsoResolve({slashIDOrgID:this.oid,postSsoResolveRequest:{challenge_id:t,code:n,pkce_code_verifier:o}})}catch(s){this.processError(s,{})}finally{window.localStorage.removeItem(Kt),window.localStorage.removeItem(jt)}}async processEvent(t){if(Oc(t.data)){if(t.origin!==this.baseURL)return;const r=sr(t.data.urlParams);r&&await this.resolveSSOChallenge(r);return}let n=null;if(window.opener&&t.source===window.opener&&(n=window.opener),window.parent&&t.source===window.parent&&(n=window.parent),!!n){if(Ac(t.data)){const r=t.data;try{n.postMessage(new Qn(r.id),"*")}catch(s){n.postMessage(new Qn(r.id,s.toString()),"*")}}if(Dc(t.data)){const r=t.data;try{const s=await this.processWebAuthnCreateChallenge(r.challenge);n.postMessage(new er(r.id,s),"*")}catch(s){n.postMessage(new er(r.id,null,s.toString()),"*")}}if(Tc(t.data)){const r=t.data;try{const s=await this.processWebAuthnGetChallenge(r.challenge);n.postMessage(new tr(r.id,s),"*")}catch(s){n.postMessage(new tr(r.id,null,s.toString()),"*")}}}}async listenForEvents(){window.addEventListener("message",this.processEvent.bind(this))}setupIFrame(){const t=this.getSDKUrl().toString();if(pc(new URL(window.location.href),new URL(this.sdkURL)))return null;let n=document.getElementById(pr);return n&&n.src!==t&&(n.remove(),n=null),n||(n=document.createElement("iframe"),n.id=pr,n.allow="publickey-credentials-get *",n.src=t,n.style.display="none",document.body.appendChild(n)),n}async getAvailableAuthenticationMethods(t){const n=[D.Password];switch(t){case _e.EmailAddress:n.push(D.EmailLink,D.OtpViaEmail);break;case _e.PhoneNumber:n.push(D.SmsLink,D.OtpViaSms);break;default:throw new Error(`unhandled handle type: ${t}`)}return navigator&&window.PublicKeyCredential&&n.unshift(D.Webauthn),n}getUser(t){return new nd(t,this)}async id(t,n,r){return this._id(t,n,r)}async _id(t,n,r,s){this.resetClient(),s&&this.updateClient(s);try{if(r)switch(r.method){case D.Webauthn.toString():{if(!(navigator&&window.PublicKeyCredential))throw new de(D.Webauthn,"The WebAuthn API is not available in the current environment");let d=r.options;d||(d={}),d.scope||(d.scope=window.location.hostname);const f=await this.credentialStorage.get(d.scope);if(f&&(d.available_credential_ids=f),d.attachment||(d.attachment=Wn.Any),d.user_verification||(d.user_verification=Sa.Preferred),d.resident_key||(d.resident_key=va.Preferred),d.attestation||(d.attestation=$a.None),d.attachment===Wn.Platform&&!await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable())throw new de(D.Webauthn,`This device has no authenticator available with attachment '${d.attachment}'`);r.options=d}break;case D.EmailLink.toString():case D.OtpViaEmail.toString():if(n&&n.type!==_e.EmailAddress)throw new de(r.method,`A handle of type '${_e.EmailAddress}' is required, got '${n.type}' instead`);break;case D.SmsLink.toString():case D.OtpViaSms.toString():if(n&&n.type!==_e.PhoneNumber)throw new de(r.method,`A handle of type '${_e.PhoneNumber}' is required, got '${n.type}' instead`);r.options=new or(r.options);break;case D.Oidc.toString():{if(n)throw new de(r.method,"OIDC should not be used with handles");r=await Uc(r);const d=()=>{var f,u;const h=r;!(h==null||(f=h.extras)===null||f===void 0)&&f.popup&&(h==null||(u=h.extras)===null||u===void 0||u.popup.close()),this.emitter.off("oauthFlowFailed",d)};this.emitter.on("oauthFlowFailed",d)}break;case D.Saml.toString():{if(n)throw new de(r.method,"SAML should not be used with handles");r=await Vc(r);const d=()=>{var f,u;const h=r;!(h==null||(f=h.extras)===null||f===void 0)&&f.popup&&(h==null||(u=h.extras)===null||u===void 0||u.popup.close()),this.emitter.off("popupFailed",d)};this.emitter.on("popupFailed",d)}break;default:break}const o={method:r?.method,options:r?.options};this.emitter.emit("idFlowStarted",{authenticationFactor:r});const i=await this.authnClient.postId({slashIDOrgID:t,slashIDSdkVersion:I.raw,iDRequest:{handle:n,factor:o}},{cache:"no-cache"});if(i.errors)throw i;const a=i.result;if(!a)throw new Error("no challenges in ID response");let c=s;for(const d of a)c=await this.processChallenge(d,r),c&&this.updateClient(c);if(n)try{this.identifiersStorage.add(n)}catch(d){console.warn(d)}return this.emitter.emit("idFlowSucceeded",{token:`${c}`,authenticationFactor:r,handle:n}),this.getUser(c)}catch(o){throw await this.processError(o,{authenticationFactor:r,handle:n,previousToken:s}),oe(o)&&bn(o)?await Ue.fromResponseError(o):o}finally{this.resetClient()}}async getAvailableIdentifiers(){try{return this.identifiersStorage.getAll()}catch(t){return console.warn(t),[]}}async recover({handle:t,factor:n}){if(!this.oid)throw new Error("oid is required - please initialize the SDK with an organization ID");try{const{result:r}=await this.authnClient.postRecover({recoverRequest:{handle:t,factor:n},slashIDSdkVersion:I.raw,slashIDOrgID:this.oid});if(!r)throw new Error("no result in recover response");let s;for(const o of r)s=await this.processChallenge(o,n),s&&this.updateClient(s);if(t)try{this.identifiersStorage.add(t)}catch(o){console.warn(o)}return this.getUser(s)}catch(r){throw this.processError(r,{handle:t}),r}}async processChallenge(t,n){let r;switch(t.type){case A.Proxy:return this.processProxyChallenge(t);case A.Nonce:r=await this.processNonceChallenge(t);break;case A.Otp:{const i=new or(n?.options);r=await this.processOTPChallenge(t,i);break}case A.WebauthnGet:r=await this.processWebAuthnGetChallenge(t);break;case A.WebauthnCreate:r=await this.processWebAuthnCreateChallenge(t);break;case A.Oidc:return this.processOIDCChallenge(t,n);case A.Saml:return this.processSAMLChallenge(t,n);case A.PasswordSet:r=await this.processPasswordSetChallenge(t);break;case A.PasswordVerify:r=await this.processPasswordVerifyChallenge(t);break;case A.PasswordReset:r=await this.processPasswordResetChallenge(t);break;default:throw new Error("unhandled challenge type: "+t.toString())}let s;try{s=await this.authnClient.postAttestationV2({attestation:r,slashIDSdkVersion:I.raw},{cache:"no-cache"})}catch(i){if(oe(i))s=await i.response.json();else throw i}if(Me(s)&&s.errors.length){if(s.errors[0].httpcode===400&&t.type===A.PasswordSet)return this.emitter.emit("invalidPasswordSubmitted",{failedRules:[],authenticationFactor:n,challengeId:t.id,failureDetail:s.errors[0].message}),this.processChallenge(t,n);if(s.errors[0].httpcode===401&&t.type===A.PasswordVerify)return this.emitter.emit("incorrectPasswordSubmitted",{authenticationFactor:n,challengeId:t.id,failureDetail:s.errors[0].message}),this.processChallenge(t,n);if(s.errors[0].httpcode===401&&t.type===A.Otp)return this.emitter.emit("otpIncorrectCodeSubmitted",{factor:n,challengeId:t.id}),this.processChallenge(t,n);throw s}const o=s.result;if(!o)throw new Error("no user token in attestation response");if(t.type===A.WebauthnCreate){const i=t.options;this.credentialStorage.add(i.rp.id,r.data.rawId)}return o}async processProxyChallenge(t){let n;for(;!n;){await Ne(1e3);const r=await this.authnClient.getChallengeChallengeIdV2({challengeId:t.options.challenge_id,slashIDSdkVersion:I.raw},{cache:"no-cache"});if(r.errors&&(r.errors.length!==1||r.errors[0].httpcode!==202))throw r;n=r.result}return n}async processNonceChallenge(t){var n;return{challenge_id:t.id,challenge_type:t.type,data:{challenge:(n=t.options)===null||n===void 0?void 0:n.challenge}}}async processOTPChallenge(t,n){this.emitter.emit("otpSmsSent"),this.emitter.emit("otpCodeSent");const r=new Promise(i=>{const a=c=>{this.emitter.off("otpCodeSubmitted",a),i(c)};this.emitter.on("otpCodeSubmitted",a)});typeof n.getOTP=="function"&&n.getOTP().then(i=>this.emitter.emit("otpCodeSubmitted",i));const s=await r;if(!s)throw new Error("no OTP code provided");return{challenge_id:t.id,challenge_type:t.type,data:{otp:s}}}async processWebAuthnGetChallenge(t){const n=await ar(),r=t.options;if(this.isLocalScope(r.rpId)){const s={challenge:be(r.challenge),extensions:r.extensions,rpId:r.rpId,timeout:r.timeout,userVerification:r.userVerification},o=r.allowCredentials;if(o){s.allowCredentials=new Array(o.length);for(let u=0;u<o.length;u++){const h=o[u];s.allowCredentials[u]={id:be(h.id),type:h.type,transports:h.transports}}}const i=await navigator.credentials.get({publicKey:s});if(!i)throw new Error("could not create assert credential");const a=i.response,c=X(new Uint8Array(i.rawId)),d={id:i.id,rawId:c,type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{clientDataJSON:X(new Uint8Array(a.clientDataJSON)),authenticatorData:X(new Uint8Array(a.authenticatorData)),signature:X(new Uint8Array(a.signature)),userHandle:a.userHandle?X(new Uint8Array(a.userHandle)):null}},f={challenge_id:t.id,challenge_type:t.type,data:d};return this.emitter.emit("webAuthnChallengeProcessed",{credentialId:c}),f}else{const s=this.getSDKUrl();let o;if(await Be.canGetPublicKeyCredentialsInIFrame()){if(o=this.iframe.contentWindow,!o)throw new Error("cannot get global id iframe")}else if(n||await Ne(200),o=window.open(s.toString()),!o)throw new Error("cannot open global id window");return new Promise((a,c)=>{const d=new kc({baseURL:this.baseURL,sdkURL:this.sdkURL},t),f=u=>{const h=u.data;h.id===d.id&&(o.close(),window.removeEventListener("message",f),h.error?c(h.error):a(h.attestation))};window.addEventListener("message",f),Zt(o).then(u=>{u.postMessage(d,s.origin)})})}}async processWebAuthnCreateChallenge(t){const n=await ar(),r=t.options;if(this.isLocalScope(r.rp.id)){const s={challenge:be(r.challenge),rp:r.rp,user:{id:be(r.user.id),name:r.user.name,displayName:r.user.displayName},pubKeyCredParams:r.pubKeyCredParams,authenticatorSelection:r.authenticatorSelection,timeout:r.timeout,extensions:r.extensions,attestation:r.attestation},o=r.excludeCredentials;if(o){s.excludeCredentials=new Array(o.length);for(let u=0;u<o.length;u++){const h=o[u];s.excludeCredentials[u]={id:be(h.id),type:h.type,transports:h.transports}}}const i=await navigator.credentials.create({publicKey:s});if(!i)throw new Error("cannot create credential");const a=i.response,c=X(new Uint8Array(i.rawId)),d={id:i.id,rawId:c,type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{attestationObject:X(new Uint8Array(a.attestationObject)),clientDataJSON:X(new Uint8Array(a.clientDataJSON))}},f={challenge_id:t.id,challenge_type:t.type,data:d};return this.emitter.emit("webAuthnChallengeProcessed",{credentialId:c}),f}else return n||await Ne(200),new Promise((o,i)=>{const a=this.getSDKUrl(),c=window.open(a.toString());if(!c){i(new Error("cannot open global id window"));return}const d=new Cc({baseURL:this.baseURL,sdkURL:this.sdkURL},t),f=u=>{const h=u.data;h.id===d.id&&(c.close(),window.removeEventListener("message",f),h.error?i(h.error):o(h.attestation))};window.addEventListener("message",f),Zt(c).then(u=>{u.postMessage(d,a.origin)})})}async processOIDCChallenge(t,n){if(n.options.ux_mode===ze.Popup){var r;const o=n.extras.setPopupUrl(t.options.auth_code_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.auth_code_url)){var s;throw this.emitter.emit("oauthFlowFailed",{...n.options,reason:cr.BadOAuthURL}),new Error(`Bad OAuth URL - got ${t==null||(s=t.options)===null||s===void 0?void 0:s.auth_code_url}`)}if(!o)throw this.emitter.emit("oauthFlowFailed",{...n.options,reason:cr.PopupBlocked}),new Error("OIDC flow unsuccesful!")}else if(n.options.ux_mode===ze.Redirect)window.location.assign(t.options.auth_code_url);else throw new Error(`Unsupported OAuth ux_mode - got ${n.options.ux_mode}`);return this.emitter.emit("oauthFlowStarted",n.options),""}async processSAMLChallenge(t,n){if(n.options.ux_mode===Le.Popup){var r;const o=n.extras.setPopupUrl(t.options.start_authentication_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.start_authentication_url)){var s;throw this.emitter.emit("popupFailed",{reason:dr.BadAuthURL}),new Error(`Bad authentication URL - got ${t==null||(s=t.options)===null||s===void 0?void 0:s.start_authentication_url}`)}if(!o)throw this.emitter.emit("popupFailed",{reason:dr.PopupBlocked}),new Error("SAML flow unsuccesful!")}else if(n.options.ux_mode===Le.Redirect)window.location.assign(t.options.start_authentication_url);else throw new Error(`Unsupported SAML ux_mode - got ${n.options.ux_mode}`);return""}async processPasswordSetChallenge(t){this.emitter.emit("passwordSetReady");const r=await new Promise(i=>{const a=c=>{this.emitter.off("passwordSubmitted",a),i(c)};this.emitter.on("passwordSubmitted",a)}),s=hr({password:r,rules:fr(t)});return s.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.emitter.emit("invalidPasswordSubmitted",{failedRules:s.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${s.failedRules.map(i=>i.name).join(",")}`}),await this.processPasswordSetChallenge(t))}processPasswordVerifyChallenge(t){return this.emitter.emit("passwordVerifyReady"),new Promise(r=>{const s=o=>{this.emitter.off("passwordSubmitted",s),r(o)};this.emitter.on("passwordSubmitted",s)}).then(r=>{if(!r)throw new Error("No password provided");return{challenge_id:t.id,challenge_type:t.type,data:{password:r}}})}async processPasswordResetChallenge(t){this.emitter.emit("passwordResetReady");const r=await new Promise(i=>{const a=c=>{this.emitter.off("passwordSubmitted",a),i(c)};this.emitter.on("passwordSubmitted",a)}),s=hr({password:r,rules:fr(t)});return s.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.emitter.emit("invalidPasswordSubmitted",{failedRules:s.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${s.failedRules.map(i=>i.name).join(",")}`}),await this.processPasswordSetChallenge(t))}getSDKUrl(){const t=new URL(this.sdkURL);return t.searchParams.append("v",I.raw),t}isLocalScope(t){return window.location.hostname.endsWith(t)}async processError(t,{authenticationFactor:n,handle:r,previousToken:s,challengeId:o}){const i=await bs(t,{authenticationFactor:n,handle:r,previousToken:s,challengeId:o});Yc(i)?vs(this).publish("clientSideError",i):this.emitter.emit("idFlowFailed",i)}constructor(t){t&&Pc(t);const{baseURL:n,sdkURL:r,oid:s,analyticsEnabled:o=!0}=us(t??{});this.baseURL=n,this.sdkURL=r,this.oid=s,this.authnClient=new it(new xe({...$e,basePath:this.baseURL})),this.iframe=this.setupIFrame();const i=new td(this.iframe,this.getSDKUrl().origin);this.identifiersStorage=new G(i),this.credentialStorage=new Ve(i),this.urlChallengesUser=null,this.emitter=ed(),this.analytics=o?new rd({sdk:this}):void 0,this.listenForEvents()}}({...T});({...T});const Ss=Object.prototype.toString;function wn(e){switch(Ss.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ue(e,Error)}}function Ce(e,t){return Ss.call(e)===`[object ${t}]`}function yn(e){return Ce(e,"ErrorEvent")}function gr(e){return Ce(e,"DOMError")}function od(e){return Ce(e,"DOMException")}function te(e){return Ce(e,"String")}function xn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $n(e){return e===null||xn(e)||typeof e!="object"&&typeof e!="function"}function ve(e){return Ce(e,"Object")}function pt(e){return typeof Event<"u"&&ue(e,Event)}function id(e){return typeof Element<"u"&&ue(e,Element)}function ad(e){return Ce(e,"RegExp")}function gt(e){return!!(e&&e.then&&typeof e.then=="function")}function cd(e){return ve(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function dd(e){return typeof e=="number"&&e!==e}function ue(e,t){try{return e instanceof t}catch{return!1}}function Es(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ye(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function _r(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Es(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ud(e,t,n=!1){return te(e)?ad(t)?t.test(e):te(t)?n?e===t:e.includes(t):!1:!1}function _t(e,t=[],n=!1){return t.some(r=>ud(e,r,n))}function ld(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!ue(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=fd(Qt(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function Qt(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(ue(r[s],Error)){mr(i,a);const d=e(t,r[s]),f=c.length;br(d,s,f,a),c=Qt(e,t,n,r[s],s,[d,...c],d,f)}return Array.isArray(r.errors)&&r.errors.forEach((d,f)=>{if(ue(d,Error)){mr(i,a);const u=e(t,d),h=c.length;br(u,`errors[${f}]`,h,a),c=Qt(e,t,n,d,s,[u,...c],u,h)}}),c}function mr(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function br(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function fd(e,t){return e.map(n=>(n.value&&(n.value=ye(n.value,t)),n))}function Ze(e){return e&&e.Math==Math?e:void 0}const b=typeof globalThis=="object"&&Ze(globalThis)||typeof window=="object"&&Ze(window)||typeof self=="object"&&Ze(self)||typeof global=="object"&&Ze(global)||function(){return this}()||{};function vn(){return b}function Cs(e,t,n){const r=n||b,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const Sn=vn(),hd=80;function ks(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let d;const f=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||hd;for(;n&&o++<r&&(d=pd(n,f),!(d==="html"||o>1&&i+s.length*c+d.length>=u));)s.push(d),i+=d.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function pd(e,t){const n=e,r=[];let s,o,i,a,c;if(!n||!n.tagName)return"";if(Sn.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const d=t&&t.length?t.filter(u=>n.getAttribute(u)).map(u=>[u,n.getAttribute(u)]):null;if(d&&d.length)d.forEach(u=>{r.push(`[${u[0]}="${u[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&te(s))for(o=s.split(/\s+/),c=0;c<o.length;c++)r.push(`.${o[c]}`);const f=["aria-label","type","name","title","alt"];for(c=0;c<f.length;c++)i=f[c],a=n.getAttribute(i),a&&r.push(`[${i}="${a}"]`);return r.join("")}function gd(){try{return Sn.document.location.href}catch{return""}}function _d(e){if(!Sn.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const We=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,md="Sentry Logger ",en=["debug","info","warn","error","log","assert","trace"],ct={};function mt(e){if(!("console"in b))return e();const t=b.console,n={},r=Object.keys(ct);r.forEach(s=>{const o=ct[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function bd(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return We?en.forEach(n=>{t[n]=(...r)=>{e&&mt(()=>{b.console[n](`${md}[${n}]:`,...r)})}}):en.forEach(n=>{t[n]=()=>{}}),t}const g=bd(),wd=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function yd(e){return e==="http"||e==="https"}function ke(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function xd(e){const t=wd.exec(e);if(!t){mt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o,i="",a]=t.slice(1);let c="",d=a;const f=d.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),d=f.pop()),d){const u=d.match(/^\d+/);u&&(d=u[0])}return Is({host:o,pass:s,path:c,projectId:d,port:i,protocol:n,publicKey:r})}function Is(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $d(e){if(!We)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?yd(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Rs(e){const t=typeof e=="string"?xd(e):Is(e);if(!(!t||!$d(t)))return t}class H extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function R(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&Ds(s,r),e[t]=s}function Fe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{We&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ds(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Fe(e,"__sentry_original__",t)}catch{}}function En(e){return e.__sentry_original__}function vd(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Ts(e){if(wn(e))return{message:e.message,name:e.name,stack:e.stack,...yr(e)};if(pt(e)){const t={type:e.type,target:wr(e.target),currentTarget:wr(e.currentTarget),...yr(e)};return typeof CustomEvent<"u"&&ue(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function wr(e){try{return id(e)?ks(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function yr(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Sd(e,t=40){const n=Object.keys(Ts(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return ye(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:ye(s,t)}return""}function ee(e){return tn(e,new Map)}function tn(e,t){if(Ed(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=tn(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(tn(s,t))}),r}return e}function Ed(e){if(!ve(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Os=50,xr=/\(error: (.*)\)/,$r=/captureMessage|captureException/;function As(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],o=n.split(`
|
|
10
|
+
`);for(let i=r;i<o.length;i++){const a=o[i];if(a.length>1024)continue;const c=xr.test(a)?a.replace(xr,"$1"):a;if(!c.match(/\S*Error: /)){for(const d of t){const f=d(c);if(f){s.push(f);break}}if(s.length>=Os)break}}return kd(s)}}function Cd(e){return Array.isArray(e)?As(...e):e}function kd(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),$r.test(t[t.length-1].function||"")&&(t.pop(),$r.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Os).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Bt="<anonymous>";function ie(e){try{return!e||typeof e!="function"?Bt:e.name||Bt}catch{return Bt}}const st={},vr={};function pe(e,t){st[e]=st[e]||[],st[e].push(t)}function ge(e,t){vr[e]||(t(),vr[e]=!0)}function B(e,t){const n=e&&st[e];if(n)for(const r of n)try{r(t)}catch(s){We&&g.error(`Error while triggering instrumentation handler.
|
|
11
|
+
Type: ${e}
|
|
12
|
+
Name: ${ie(r)}
|
|
13
|
+
Error:`,s)}}function Id(e){const t="console";pe(t,e),ge(t,Rd)}function Rd(){"console"in b&&en.forEach(function(e){e in b.console&&R(b.console,e,function(t){return ct[e]=t,function(...n){B("console",{args:n,level:e});const s=ct[e];s&&s.apply(b.console,n)}})})}function V(){const e=b,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function zs(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function se(e){const{message:t,event_id:n}=e;if(t)return t;const r=zs(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function nn(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function qe(e,t){const n=zs(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s&&s.data,...t.data};n.mechanism.data=o}}function Sr(e){if(e&&e.__sentry_captured__)return!0;try{Fe(e,"__sentry_captured__",!0)}catch{}return!1}function Ls(e){return Array.isArray(e)?e:[e]}const we=b,Dd=1e3;let Er,rn,sn;function Td(e){const t="dom";pe(t,e),ge(t,Od)}function Od(){if(!we.document)return;const e=B.bind(null,"dom"),t=Cr(e,!0);we.document.addEventListener("click",t,!1),we.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=we[n]&&we[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(R(r,"addEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,d=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=d[o]=d[o]||{refCount:0};if(!f.handler){const u=Cr(e);f.handler=u,s.call(this,o,u,a)}f.refCount++}catch{}return s.call(this,o,i,a)}}),R(r,"removeEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,d=c.__sentry_instrumentation_handlers__||{},f=d[o];f&&(f.refCount--,f.refCount<=0&&(s.call(this,o,f.handler,a),f.handler=void 0,delete d[o]),Object.keys(d).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,a)}}))})}function Ad(e){if(e.type!==rn)return!1;try{if(!e.target||e.target._sentryId!==sn)return!1}catch{}return!0}function zd(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Cr(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Ld(n);if(zd(n.type,r))return;Fe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Fe(r,"_sentryId",V());const s=n.type==="keypress"?"input":n.type;Ad(n)||(e({event:n,name:s,global:t}),rn=n.type,sn=r?r._sentryId:void 0),clearTimeout(Er),Er=we.setTimeout(()=>{sn=void 0,rn=void 0},Dd)}}function Ld(e){try{return e.target}catch{return null}}const on=vn();function Ps(){if(!("fetch"in on))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function an(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Pd(){if(typeof EdgeRuntime=="string")return!0;if(!Ps())return!1;if(an(on.fetch))return!0;let e=!1;const t=on.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=an(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){We&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Nd(e){const t="fetch";pe(t,e),ge(t,Md)}function Md(){Pd()&&R(b,"fetch",function(e){return function(...t){const{method:n,url:r}=Ud(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return B("fetch",{...s}),e.apply(b,t).then(o=>{const i={...s,endTimestamp:Date.now(),response:o};return B("fetch",i),o},o=>{const i={...s,endTimestamp:Date.now(),error:o};throw B("fetch",i),o})}})}function cn(e,t){return!!e&&typeof e=="object"&&!!e[t]}function kr(e){return typeof e=="string"?e:e?cn(e,"url")?e.url:e.toString?e.toString():"":""}function Ud(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:kr(n),method:cn(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:kr(t),method:cn(t,"method")?String(t.method).toUpperCase():"GET"}}let Qe=null;function Vd(e){const t="error";pe(t,e),ge(t,Bd)}function Bd(){Qe=b.onerror,b.onerror=function(e,t,n,r,s){return B("error",{column:r,error:s,line:n,msg:e,url:t}),Qe&&!Qe.__SENTRY_LOADER__?Qe.apply(this,arguments):!1},b.onerror.__SENTRY_INSTRUMENTED__=!0}let et=null;function Fd(e){const t="unhandledrejection";pe(t,e),ge(t,qd)}function qd(){et=b.onunhandledrejection,b.onunhandledrejection=function(e){return B("unhandledrejection",e),et&&!et.__SENTRY_LOADER__?et.apply(this,arguments):!0},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const tt=vn();function Gd(){const e=tt.chrome,t=e&&e.app&&e.app.runtime,n="history"in tt&&!!tt.history.pushState&&!!tt.history.replaceState;return!t&&n}const De=b;let nt;function Ns(e){const t="history";pe(t,e),ge(t,Hd)}function Hd(){if(!Gd())return;const e=De.onpopstate;De.onpopstate=function(...n){const r=De.location.href,s=nt;if(nt=r,B("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const o=nt,i=String(s);nt=i,B("history",{from:o,to:i})}return n.apply(this,r)}}R(De.history,"pushState",t),R(De.history,"replaceState",t)}const Wd=b,Oe="__sentry_xhr_v3__";function Kd(e){const t="xhr";pe(t,e),ge(t,jd)}function jd(){if(!Wd.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;R(e,"open",function(t){return function(...n){const r=Date.now(),s=te(n[0])?n[0].toUpperCase():void 0,o=Yd(n[1]);if(!s||!o)return t.apply(this,n);this[Oe]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const a=this[Oe];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,o],endTimestamp:Date.now(),startTimestamp:r,xhr:this};B("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?R(this,"onreadystatechange",function(a){return function(...c){return i(),a.apply(this,c)}}):this.addEventListener("readystatechange",i),R(this,"setRequestHeader",function(a){return function(...c){const[d,f]=c,u=this[Oe];return u&&te(d)&&te(f)&&(u.request_headers[d.toLowerCase()]=f),a.apply(this,c)}}),t.apply(this,n)}}),R(e,"send",function(t){return function(...n){const r=this[Oe];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return B("xhr",s),t.apply(this,n)}})}function Yd(e){if(te(e))return e;try{return e.toString()}catch{}}function Jd(){return"npm"}function Xd(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let o=0;o<t.length;o++)if(t[o]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let o=0;o<t.length;o++)if(t[o]===s){t.splice(o,1);break}}return[n,r]}function re(e,t=100,n=1/0){try{return dn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ms(e,t=3,n=100*1024){const r=re(e,t);return tu(r)>n?Ms(e,t-1,n):r}function dn(e,t,n=1/0,r=1/0,s=Xd()){const[o,i]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!dd(t))return t;const a=Zd(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const d=t;if(d&&typeof d.toJSON=="function")try{const _=d.toJSON();return dn("",_,c-1,r,s)}catch{}const f=Array.isArray(t)?[]:{};let u=0;const h=Ts(t);for(const _ in h){if(!Object.prototype.hasOwnProperty.call(h,_))continue;if(u>=r){f[_]="[MaxProperties ~]";break}const S=h[_];f[_]=dn(_,S,c-1,r,s),u++}return i(t),f}function Zd(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Es(t))return"[VueViewModel]";if(cd(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${ie(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Qd(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Qd(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function eu(e){return~-encodeURI(e).split(/%..|./).length}function tu(e){return eu(JSON.stringify(e))}var Z;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Z||(Z={}));function Se(e){return new L(t=>{t(e)})}function Cn(e){return new L((t,n)=>{n(e)})}class L{constructor(t){L.prototype.__init.call(this),L.prototype.__init2.call(this),L.prototype.__init3.call(this),L.prototype.__init4.call(this),this._state=Z.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new L((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new L((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(Z.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Z.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Z.PENDING){if(gt(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Z.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Z.RESOLVED&&n[1](this._value),this._state===Z.REJECTED&&n[2](this._value),n[0]=!0)})}}}function nu(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]}function s(i){if(!n())return Cn(new H("Not adding Promise because buffer limit was reached."));const a=i();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new L((a,c)=>{let d=t.length;if(!d)return a(!0);const f=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(u=>{Se(u).then(()=>{--d||(clearTimeout(f),a(!0))},c)})})}return{$:t,add:s,drain:o}}function Ft(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const ru=["fatal","error","warning","log","info","debug"];function su(e){return e==="warn"?"warning":ru.includes(e)?e:"log"}const Us=1e3;function Ke(){return Date.now()/Us}function ou(){const{performance:e}=b;if(!e||!e.now)return Ke;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Us}const Vs=ou();(()=>{const{performance:e}=b;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,d=c<t;return o||d?s<=c?e.timeOrigin:i:r})();function Ie(e,t=[]){return[e,t]}function iu(e,t){const[n,r]=e;return[n,[...r,t]]}function Ir(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function un(e,t){return(t||new TextEncoder).encode(e)}function au(e,t){const[n,r]=e;let s=JSON.stringify(n);function o(i){typeof s=="string"?s=typeof i=="string"?s+i:[un(s,t),i]:s.push(typeof i=="string"?un(i,t):i)}for(const i of r){const[a,c]=i;if(o(`
|
|
14
|
+
${JSON.stringify(a)}
|
|
15
|
+
`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let d;try{d=JSON.stringify(c)}catch{d=JSON.stringify(re(c))}o(d)}}return typeof s=="string"?s:cu(s)}function cu(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function du(e,t){const n=typeof e.data=="string"?un(e.data,t):e.data;return[ee({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const uu={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function Rr(e){return uu[e]}function Bs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function lu(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ke(r)},...s&&{trace:ee({...s})}}}function fu(e,t,n){const r=[{type:"client_report"},{timestamp:n||Ke(),discarded_events:e}];return Ie(t?{dsn:t}:{},[r])}const hu=60*1e3;function pu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?hu:r-t}function gu(e,t){return e[t]||e.all||0}function _u(e,t,n=Date.now()){return gu(e,t)>n}function mu(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,d]=a.split(":",2),f=parseInt(c,10),u=(isNaN(f)?60:f)*1e3;if(!d)s.all=r+u;else for(const h of d.split(";"))s[h]=r+u}else i?s.all=r+pu(i,r):t===429&&(s.all=r+60*1e3);return s}const y=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,bt="production";function kn(){return Cs("globalEventProcessors",()=>[])}function bu(e){kn().push(e)}function dt(e,t,n,r=0){return new L((s,o)=>{const i=e[r];if(t===null||typeof i!="function")s(t);else{const a=i({...t},n);y&&i.id&&a===null&&g.log(`Event processor "${i.id}" dropped event`),gt(a)?a.then(c=>dt(e,c,n,r+1).then(s)).then(null,o):dt(e,a,n,r+1).then(s).then(null,o)}})}function Fs(e){const t=Vs(),n={sid:V(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>wu(n)};return e&&le(n,e),n}function le(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Vs(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:V()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function qs(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),le(e,n)}function wu(e){return ee({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const yu=1;function xu(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,tags:a,origin:c}=Ge(e);return ee({data:r,op:s,parent_span_id:o,span_id:t,status:i,tags:a,trace_id:n,origin:c})}function Ge(e){return $u(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function $u(e){return typeof e.getSpanJSON=="function"}function vu(e){const{traceFlags:t}=e.spanContext();return!!(t&yu)}function Su(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||V(),timestamp:t.timestamp||Ke()},d=n.integrations||e.integrations.map(O=>O.name);Eu(c,e),Iu(c,d),t.type===void 0&&Cu(c,e.stackParser);const f=Du(r,n.captureContext);n.mechanism&&qe(c,n.mechanism);const u=s&&s.getEventProcessors?s.getEventProcessors():[],h=Fu().getScopeData();if(o){const O=o.getScopeData();Ar(h,O)}if(f){const O=f.getScopeData();Ar(h,O)}const _=[...n.attachments||[],...h.attachments];_.length&&(n.attachments=_),Js(c,h);const S=[...u,...kn(),...h.eventProcessors];return dt(S,c,n).then(O=>(O&&ku(O),typeof i=="number"&&i>0?Ru(O,i,a):O))}function Eu(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:bt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=ye(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=ye(i.value,o));const a=e.request;a&&a.url&&(a.url=ye(a.url,o))}const Dr=new WeakMap;function Cu(e,t){const n=b._sentryDebugIds;if(!n)return;let r;const s=Dr.get(t);s?r=s:(r=new Map,Dr.set(t,r));const o=Object.keys(n).reduce((i,a)=>{let c;const d=r.get(a);d?c=d:(c=t(a),r.set(a,c));for(let f=c.length-1;f>=0;f--){const u=c[f];if(u.filename){i[u.filename]=n[a];break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function ku(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function Iu(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ru(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:re(s.data,t,n)}}))},...e.user&&{user:re(e.user,t,n)},...e.contexts&&{contexts:re(e.contexts,t,n)},...e.extra&&{extra:re(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=re(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{const o=Ge(s).data;return o&&(s.data=re(o,t,n)),s})),r}function Du(e,t){if(!t)return e;const n=e?e.clone():new W;return n.update(t),n}function Tu(e){if(e)return Ou(e)?{captureContext:e}:zu(e)?{captureContext:e}:e}function Ou(e){return e instanceof W||typeof e=="function"}const Au=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function zu(e){return Object.keys(e).some(t=>Au.includes(t))}function wt(e,t){return J().captureException(e,Tu(t))}function Gs(e,t){return J().captureEvent(e,t)}function fe(e,t){J().addBreadcrumb(e,t)}function Hs(...e){const t=J();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function z(){return J().getClient()}function je(){return J().getScope()}function Tr(e){const t=z(),n=xt(),r=je(),{release:s,environment:o=bt}=t&&t.getOptions()||{},{userAgent:i}=b.navigator||{},a=Fs({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&c.status==="ok"&&le(c,{status:"exited"}),Ws(),n.setSession(a),r.setSession(a),a}function Ws(){const e=xt(),t=je(),n=t.getSession()||e.getSession();n&&qs(n),Ks(),e.setSession(),t.setSession()}function Ks(){const e=xt(),t=je(),n=z(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Or(e=!1){if(e){Ws();return}Ks()}function js(e){return e.transaction}function Ys(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},i=ee({environment:r.environment||bt,release:r.release,user_segment:o,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",i),i}function Lu(e){const t=z();if(!t)return{};const n=Ys(Ge(e).trace_id||"",t,je()),r=js(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:o,source:i}=r.metadata;o!=null&&(n.sample_rate=`${o}`);const a=Ge(r);return i&&i!=="url"&&(n.transaction=a.description),n.sampled=String(vu(r)),t.emit&&t.emit("createDsc",n),n}function Js(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o,propagationContext:i}=t;Pu(e,t),r&&Uu(e,r),Vu(e,n),Nu(e,s),Mu(e,o,i)}function Ar(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:d,eventProcessors:f,attachments:u,propagationContext:h,transactionName:_,span:S}=t;Te(e,"extra",n),Te(e,"tags",r),Te(e,"user",s),Te(e,"contexts",o),Te(e,"sdkProcessingMetadata",a),i&&(e.level=i),_&&(e.transactionName=_),S&&(e.span=S),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,...h}}function Te(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Pu(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=ee(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const d=ee(r);d&&Object.keys(d).length&&(e.tags={...d,...e.tags});const f=ee(s);f&&Object.keys(f).length&&(e.user={...f,...e.user});const u=ee(o);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts}),i&&(e.level=i),a&&(e.transaction=a)}function Nu(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Mu(e,t,n){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t,propagationContext:n}}function Uu(e,t){e.contexts={trace:xu(t),...e.contexts};const n=js(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Lu(t),...e.sdkProcessingMetadata};const r=Ge(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Vu(e,t){e.fingerprint=e.fingerprint?Ls(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Bu=100;let qt;class W{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zr()}static clone(t){return t?t.clone():new W}clone(){const t=new W;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&le(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof W?n:this}return t instanceof W?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):ve(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=zr(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Bu;if(r<=0)return this;const s={timestamp:Ke(),...t},o=this._breadcrumbs;return o.push(s),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:o,_user:i,_level:a,_fingerprint:c,_eventProcessors:d,_propagationContext:f,_sdkProcessingMetadata:u,_transactionName:h,_span:_}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:o,user:i,level:a,fingerprint:c||[],eventProcessors:d,propagationContext:f,sdkProcessingMetadata:u,transactionName:h,span:_}}applyToEvent(t,n={},r=[]){Js(t,this.getScopeData());const s=[...r,...kn(),...this._eventProcessors];return dt(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:V();if(!this._client)return g.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:V();if(!this._client)return g.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:V();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Fu(){return qt||(qt=new W),qt}function zr(){return{traceId:V(),spanId:V().substring(16)}}const ln="7.95.0",Xs=parseFloat(ln),qu=100;class Zs{constructor(t,n,r,s=Xs){this._version=s;let o;n?o=n:(o=new W,o.setClient(t));let i;r?i=r:(i=new W,i.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let r;try{r=t(n)}catch(s){throw this.popScope(),s}return gt(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:V(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:V(),o=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:V();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=qu}=s.getOptions&&s.getOptions()||{};if(i<=0)return;const c={timestamp:Ke(),...t},d=o?mt(()=>o(c,n)):c;d!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",d,n),r.addBreadcrumb(d,i))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Lr(this);try{t(this)}finally{Lr(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return y&&g.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return y&&!r&&(this.getClient()?g.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
16
|
+
Sentry.addTracingExtensions();
|
|
17
|
+
Sentry.init({...});
|
|
18
|
+
`):g.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&qs(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:o=bt}=r&&r.getOptions()||{},{userAgent:i}=b.navigator||{},a=Fs({release:s,environment:o,user:n.getUser(),...i&&{userAgent:i},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&le(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const s=yt().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);y&&g.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function yt(){return b.__SENTRY__=b.__SENTRY__||{extensions:{},hub:void 0},b}function Lr(e){const t=yt(),n=fn(t);return Qs(t,e),n}function J(){const e=yt();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Gu(e)}function xt(){return J().getIsolationScope()}function Gu(e=yt()){return(!Hu(e)||fn(e).isOlderThan(Xs))&&Qs(e,new Zs),fn(e)}function Hu(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function fn(e){return Cs("hub",()=>new Zs,e)}function Qs(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function Wu(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Ku(e,t,n,r){const s=Bs(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:ke(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ie(o,[i])}function ju(e,t,n,r){const s=Bs(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Wu(e,n&&n.sdk);const i=lu(e,s,r,t);return delete e.sdkProcessingMetadata,Ie(i,[[{type:o},e]])}const Yu="7";function eo(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ju(e){return`${eo(e)}${e.projectId}/envelope/`}function Xu(e,t){return vd({sentry_key:e.publicKey,sentry_version:Yu,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Zu(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Ju(e)}?${Xu(e,r)}`}function Qu(e,t){const n=Rs(e);if(!n)return"";const r=`${eo(n)}embed/error-page/`;let s=`dsn=${ke(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Pr=[];function el(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function tl(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Ls(n(t)):r=t;const s=el(r),o=rl(s,i=>i.name==="Debug");if(o!==-1){const[i]=s.splice(o,1);s.push(i)}return s}function nl(e,t){const n={};return t.forEach(r=>{r&&to(e,r,n)}),n}function to(e,t,n){if(n[t.name]){y&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Pr.indexOf(t.name)===-1&&(t.setupOnce(bu,J),Pr.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}y&&g.log(`Integration installed: ${t.name}`)}function rl(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function ce(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}function sl(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([o,i])=>`${o}:${i}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
|
|
19
|
+
`}return t}function ol(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=ke(t));const o=il(e);return Ie(s,[o])}function il(e){const t=sl(e);return[{type:"statsd",length:t.length},t]}const Nr="Not capturing exception because it's already been captured.";class al{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Rs(t.dsn):y&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=Zu(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Sr(t)){y&&g.log(Nr);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(o=>this._captureEvent(o,n,r)).then(o=>{s=o})),s}captureMessage(t,n,r,s){let o=r&&r.event_id;const i=xn(t)?t:String(t),a=$n(t)?this.eventFromMessage(i,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{o=c})),o}captureEvent(t,n,r){if(n&&n.originalException&&Sr(n.originalException)){y&&g.log(Nr);return}let s=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(o=>{s=o})),s}captureSession(t){typeof t.release!="string"?y&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),le(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Se(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return y&&g.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){to(this,t,this._integrations)}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ju(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=iu(r,du(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const n=Ku(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;y&&g.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(t){y&&g.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=ol(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){this._integrations=nl(this,this._options.integrations),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1;const o=n.exception&&n.exception.values;if(o){s=!0;for(const c of o){const d=c.mechanism;if(d&&d.handled===!1){r=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(le(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new L(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=xt()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),Su(o,t,n,r,this,s).then(a=>{if(a===null)return a;const{propagationContext:c}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:f,spanId:u,parentSpanId:h,dsc:_}=c;a.contexts={trace:{trace_id:f,span_id:u,parent_span_id:h},...a.contexts};const S=_||Ys(f,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:S,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(y){const o=s;o.logLevel==="log"?g.log(o.message):g.warn(o)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=ro(t),a=no(t),c=t.type||"error",d=`before send for type \`${c}\``;if(a&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),Cn(new H(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=c==="replay_event"?"replay":c;return this._prepareEvent(t,n,r).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",f,t),new H("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return u;const _=dl(s,u,n);return cl(_,d)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",f,t),new H(`${d} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!i&&h&&this._updateSessionFromEvent(h,u);const _=u.transaction_info;if(i&&_&&u.transaction!==t.transaction){const S="custom";u.transaction_info={..._,source:S}}return this.sendEvent(u,n),u}).then(null,u=>{throw u instanceof H?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new H(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
20
|
+
Reason: ${u}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{y&&g.error("Error while sending event:",n)});y&&g.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function cl(e,t){const n=`${t} must return \`null\` or a valid event.`;if(gt(e))return e.then(r=>{if(!ve(r)&&r!==null)throw new H(n);return r},r=>{throw new H(`${t} rejected with ${r}`)});if(!ve(e)&&e!==null)throw new H(n);return e}function dl(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return no(t)&&r?r(t,n):ro(t)&&s?s(t,n):t}function no(e){return e.type===void 0}function ro(e){return e.type==="transaction"}function ul(e,t){t.debug===!0&&(y?g.enable():mt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),je().update(t.initialScope);const r=new e(t);ll(r),fl(r)}function ll(e){const n=J().getStackTop();n.client=e,n.scope.setClient(e)}function fl(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const hl=30;function so(e,t,n=nu(e.bufferSize||hl)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(Ir(i,(u,h)=>{const _=Rr(h);if(_u(r,_)){const S=Mr(u,h);e.recordDroppedEvent("ratelimit_backoff",_,S)}else a.push(u)}),a.length===0)return Se();const c=Ie(i[0],a),d=u=>{Ir(c,(h,_)=>{const S=Mr(h,_);e.recordDroppedEvent(u,Rr(_),S)})},f=()=>t({body:au(c,e.textEncoder)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&y&&g.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=mu(r,u),u),u=>{throw d("network_error"),u});return n.add(f).then(u=>u,u=>{if(u instanceof H)return y&&g.error("Skipped sending event because buffer is full."),d("queue_overflow"),Se();throw u})}return o.__sentry__baseTransport__=!0,{send:o,flush:s}}function Mr(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function oo(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:ln})),version:ln}),e._metadata=s}const pl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],gl=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],io="InboundFilters",_l=(e={})=>({name:io,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),o=wl(e,s);return yl(t,o)?null:t}}),ml=_l,bl=ce(io,ml);function wl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:pl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:gl],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function yl(e,t){return t.ignoreInternal&&Cl(e)?(y&&g.warn(`Event dropped due to being internal Sentry Error.
|
|
21
|
+
Event: ${se(e)}`),!0):xl(e,t.ignoreErrors)?(y&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
22
|
+
Event: ${se(e)}`),!0):$l(e,t.ignoreTransactions)?(y&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
23
|
+
Event: ${se(e)}`),!0):vl(e,t.denyUrls)?(y&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
24
|
+
Event: ${se(e)}.
|
|
25
|
+
Url: ${ut(e)}`),!0):Sl(e,t.allowUrls)?!1:(y&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
26
|
+
Event: ${se(e)}.
|
|
27
|
+
Url: ${ut(e)}`),!0)}function xl(e,t){return e.type||!t||!t.length?!1:El(e).some(n=>_t(n,t))}function $l(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?_t(n,t):!1}function vl(e,t){if(!t||!t.length)return!1;const n=ut(e);return n?_t(n,t):!1}function Sl(e,t){if(!t||!t.length)return!0;const n=ut(e);return n?_t(n,t):!0}function El(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),y&&t.length===0&&g.error(`Could not extract message for event ${se(e)}`),t}function Cl(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function kl(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ut(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?kl(t):null}catch{return y&&g.error(`Cannot extract url for event ${se(e)}`),null}}let Ur;const ao="FunctionToString",Il=()=>({name:ao,setupOnce(){Ur=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=En(this)||this;return Ur.apply(t,e)}}catch{}}}),Rl=Il,Dl=ce(ao,Rl),m=b;let hn=0;function co(){return hn>0}function Tl(){hn++,setTimeout(()=>{hn--})}function Ee(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(En(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const o=s.map(i=>Ee(i,t));return e.apply(this,o)}catch(o){throw Tl(),Hs(i=>{i.addEventProcessor(a=>(t.mechanism&&(nn(a,void 0,void 0),qe(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),wt(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Ds(r,e),Fe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const U=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function uo(e,t){const n=In(e,t),r={type:t&&t.name,value:Ll(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ol(e,t,n,r){const s=z(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:pt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ml(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ms(t,o)}};if(n){const a=In(e,n);a.length&&(i.exception.values[0].stacktrace={frames:a})}return i}function Gt(e,t){return{exception:{values:[uo(e,t)]}}}function In(e,t){const n=t.stacktrace||t.stack||"",r=zl(t);try{return e(n,r)}catch{}return[]}const Al=/Minified React error #\d+;/i;function zl(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Al.test(e.message))return 1}return 0}function Ll(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Pl(e,t,n,r){const s=n&&n.syntheticException||void 0,o=Rn(e,t,s,r);return qe(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Se(o)}function Nl(e,t,n="info",r,s){const o=r&&r.syntheticException||void 0,i=pn(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Se(i)}function Rn(e,t,n,r,s){let o;if(yn(t)&&t.error)return Gt(e,t.error);if(gr(t)||od(t)){const i=t;if("stack"in t)o=Gt(e,t);else{const a=i.name||(gr(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=pn(e,c,n,r),nn(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return wn(t)?Gt(e,t):ve(t)||pt(t)?(o=Ol(e,t,n,s),qe(o,{synthetic:!0}),o):(o=pn(e,t,n,r),nn(o,`${t}`,void 0),qe(o,{synthetic:!0}),o)}function pn(e,t,n,r){const s={};if(r&&n){const o=In(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(xn(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function Ml(e,{isUnhandledRejection:t}){const n=Sd(e),r=t?"promise rejection":"exception";return yn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:pt(e)?`Event \`${Ul(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ul(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Vl(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ke(r)}},o=Bl(e);return Ie(s,[o])}function Bl(e){return[{type:"user_report"},e]}class Fl extends al{constructor(t){const n=m.SENTRY_SDK_SOURCE||Jd();oo(t,"browser",["browser"],n),super(t),t.sendClientReports&&m.document&&m.document.addEventListener("visibilitychange",()=>{m.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Pl(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Nl(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){U&&g.warn("SDK not enabled, will not capture user feedback.");return}const n=Vl(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){U&&g.log("No outcomes to send");return}if(!this._dsn){U&&g.log("No dsn provided, will not send outcomes");return}U&&g.log("Sending outcomes:",t);const n=fu(t,this._options.tunnel&&ke(this._dsn));this._sendEnvelope(n)}}let Ae;function ql(){if(Ae)return Ae;if(an(m.fetch))return Ae=m.fetch.bind(m);const e=m.document;let t=m.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){U&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Ae=t.bind(m)}function Gl(){Ae=void 0}function Hl(e,t=ql()){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Gl(),n-=i,r--,Cn(c)}}return so(e,s)}const Wl=4;function Kl(e){function t(n){return new L((r,s)=>{const o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=()=>{o.readyState===Wl&&r({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(n.body)})}return so(e,t)}const $t="?",jl=30,Yl=40,Jl=50;function Dn(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Xl=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zl=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ql=e=>{const t=Xl.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const o=Zl.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}const[r,s]=lo(t[1]||$t,t[2]);return Dn(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},ef=[jl,Ql],tf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rf=e=>{const t=tf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=nf.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||$t;return[s,r]=lo(s,r),Dn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sf=[Jl,rf],of=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,af=e=>{const t=of.exec(e);return t?Dn(t[2],t[1]||$t,+t[3],t[4]?+t[4]:void 0):void 0},cf=[Yl,af],df=[ef,sf,cf],uf=As(...df),lo=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:$t,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},fo="GlobalHandlers",lf=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:fo,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(hf(n),Vr("onerror")),t.onunhandledrejection&&(pf(n),Vr("onunhandledrejection"))}}},ff=ce(fo,lf);function hf(e){Vd(t=>{const{stackParser:n,attachStacktrace:r}=po();if(z()!==e||co())return;const{msg:s,url:o,line:i,column:a,error:c}=t,d=c===void 0&&te(s)?mf(s,o,i,a):ho(Rn(n,c||s,void 0,r,!1),o,i,a);d.level="error",Gs(d,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function pf(e){Fd(t=>{const{stackParser:n,attachStacktrace:r}=po();if(z()!==e||co())return;const s=gf(t),o=$n(s)?_f(s):Rn(n,s,void 0,r,!0);o.level="error",Gs(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function gf(e){if($n(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function _f(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function mf(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=yn(e)?e.message:e,i="Error";const a=o.match(s);return a&&(i=a[1],o=a[2]),ho({exception:{values:[{type:i,value:o}]}},t,n,r)}function ho(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],d=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,u=te(t)&&t.length>0?t:gd();return c.length===0&&c.push({colno:d,filename:u,function:"?",in_app:!0,lineno:f}),e}function Vr(e){U&&g.log(`Global Handler attached: ${e}`)}function po(){const e=z();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const bf=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],go="TryCatch",wf=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:go,setupOnce(){t.setTimeout&&R(m,"setTimeout",Br),t.setInterval&&R(m,"setInterval",Br),t.requestAnimationFrame&&R(m,"requestAnimationFrame",xf),t.XMLHttpRequest&&"XMLHttpRequest"in m&&R(XMLHttpRequest.prototype,"send",$f);const n=t.eventTarget;n&&(Array.isArray(n)?n:bf).forEach(vf)}}},yf=ce(go,wf);function Br(e){return function(...t){const n=t[0];return t[0]=Ee(n,{mechanism:{data:{function:ie(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function xf(e){return function(t){return e.apply(this,[Ee(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ie(e)},handled:!1,type:"instrument"}})])}}function $f(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&R(n,s,function(o){const i={mechanism:{data:{function:s,handler:ie(o)},handled:!1,type:"instrument"}},a=En(o);return a&&(i.mechanism.data.handler=ie(a)),Ee(o,i)})}),e.apply(this,t)}}function vf(e){const t=m,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(R(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ee(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ie(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Ee(o,{mechanism:{data:{function:"addEventListener",handler:ie(o),target:e},handled:!1,type:"instrument"}}),i])}}),R(n,"removeEventListener",function(r){return function(s,o,i){const a=o;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,i)}catch{}return r.call(this,s,a,i)}}))}const rt=1024,_o="Breadcrumbs",Sf=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:_o,setupOnce(){},setup(n){t.console&&Id(If(n)),t.dom&&Td(kf(n,t.dom)),t.xhr&&Kd(Rf(n)),t.fetch&&Nd(Df(n)),t.history&&Ns(Tf(n)),t.sentry&&n.on&&n.on("beforeSendEvent",Cf(n))}}},Ef=ce(_o,Sf);function Cf(e){return function(n){z()===e&&fe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:se(n)},{event:n})}}function kf(e,t){return function(r){if(z()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>rt&&(U&&g.warn(`\`dom.maxStringLength\` cannot exceed ${rt}, but a value of ${a} was configured. Sentry will use ${rt} instead.`),a=rt),typeof i=="string"&&(i=[i]);try{const d=r.event,f=Of(d)?d.target:d;s=ks(f,{keyAttrs:i,maxStringLength:a}),o=_d(f)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),fe(c,{event:r.event,name:r.name,global:r.global})}}function If(e){return function(n){if(z()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:su(n.level),message:_r(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${_r(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;fe(r,{input:n.args,level:n.level})}}function Rf(e){return function(n){if(z()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Oe];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:d}=o,f={method:i,url:a,status_code:c},u={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:s};fe({category:"xhr",data:f,type:"http"},u)}}function Df(e){return function(n){if(z()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};fe({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=n.response,i={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s};fe({category:"fetch",data:i,type:"http"},a)}}}function Tf(e){return function(n){if(z()!==e)return;let r=n.from,s=n.to;const o=Ft(m.location.href);let i=r?Ft(r):void 0;const a=Ft(s);(!i||!i.path)&&(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),fe({category:"navigation",data:{from:r,to:s}})}}function Of(e){return!!e&&!!e.target}const Af="cause",zf=5,mo="LinkedErrors",Lf=(e={})=>{const t=e.limit||zf,n=e.key||Af;return{name:mo,setupOnce(){},preprocessEvent(r,s,o){const i=o.getOptions();ld(uo,i.stackParser,i.maxValueLength,n,t,r,s)}}},Pf=ce(mo,Lf),bo="HttpContext",Nf=()=>({name:bo,setupOnce(){},preprocessEvent(e){if(!m.navigator&&!m.location&&!m.document)return;const t=e.request&&e.request.url||m.location&&m.location.href,{referrer:n}=m.document||{},{userAgent:r}=m.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),Mf=ce(bo,Nf),wo="Dedupe",Uf=()=>{let e;return{name:wo,setupOnce(){},processEvent(t){if(t.type)return t;try{if(Bf(t,e))return U&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Vf=ce(wo,Uf);function Bf(e,t){return t?!!(Ff(e,t)||qf(e,t)):!1}function Ff(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!xo(e,t)||!yo(e,t))}function qf(e,t){const n=Fr(t),r=Fr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!xo(e,t)||!yo(e,t))}function yo(e,t){let n=qr(e),r=qr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function xo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Fr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function qr(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Gf=[new bl,new Dl,new yf,new Ef,new ff,new Pf,new Vf,new Mf];function Hf(e){return[...Gf]}function Wf(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Hf()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),m.SENTRY_RELEASE&&m.SENTRY_RELEASE.id&&(e.release=m.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:Cd(e.stackParser||uf),integrations:tl(e),transport:e.transport||(Ps()?Hl:Kl)};ul(Fl,t),e.autoSessionTracking&&Kf()}const Gr=(e={},t=J())=>{if(!m.document){U&&g.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){U&&g.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const o=m.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Qu(s,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const c=d=>{if(d.data==="__sentry_reportdialog_closed__")try{i()}finally{m.removeEventListener("message",c)}};m.addEventListener("message",c)}const a=m.document.head||m.document.body;a?a.appendChild(o):U&&g.error("Not injecting report dialog. No injection point found in HTML")};function Kf(){if(typeof m.document>"u"){U&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Tr({ignoreDuration:!0}),Or(),Ns(({from:e,to:t})=>{e!==void 0&&e!==t&&(Tr({ignoreDuration:!0}),Or())})}function jf(e){const t={...e};oo(t,"react"),Wf(t)}var $o={exports:{}},w={};/** @license React v16.13.1
|
|
28
|
+
* react-is.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var C=typeof Symbol=="function"&&Symbol.for,Tn=C?Symbol.for("react.element"):60103,On=C?Symbol.for("react.portal"):60106,vt=C?Symbol.for("react.fragment"):60107,St=C?Symbol.for("react.strict_mode"):60108,Et=C?Symbol.for("react.profiler"):60114,Ct=C?Symbol.for("react.provider"):60109,kt=C?Symbol.for("react.context"):60110,An=C?Symbol.for("react.async_mode"):60111,It=C?Symbol.for("react.concurrent_mode"):60111,Rt=C?Symbol.for("react.forward_ref"):60112,Dt=C?Symbol.for("react.suspense"):60113,Yf=C?Symbol.for("react.suspense_list"):60120,Tt=C?Symbol.for("react.memo"):60115,Ot=C?Symbol.for("react.lazy"):60116,Jf=C?Symbol.for("react.block"):60121,Xf=C?Symbol.for("react.fundamental"):60117,Zf=C?Symbol.for("react.responder"):60118,Qf=C?Symbol.for("react.scope"):60119;function M(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Tn:switch(e=e.type,e){case An:case It:case vt:case Et:case St:case Dt:return e;default:switch(e=e&&e.$$typeof,e){case kt:case Rt:case Ot:case Tt:case Ct:return e;default:return t}}case On:return t}}}function vo(e){return M(e)===It}w.AsyncMode=An;w.ConcurrentMode=It;w.ContextConsumer=kt;w.ContextProvider=Ct;w.Element=Tn;w.ForwardRef=Rt;w.Fragment=vt;w.Lazy=Ot;w.Memo=Tt;w.Portal=On;w.Profiler=Et;w.StrictMode=St;w.Suspense=Dt;w.isAsyncMode=function(e){return vo(e)||M(e)===An};w.isConcurrentMode=vo;w.isContextConsumer=function(e){return M(e)===kt};w.isContextProvider=function(e){return M(e)===Ct};w.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tn};w.isForwardRef=function(e){return M(e)===Rt};w.isFragment=function(e){return M(e)===vt};w.isLazy=function(e){return M(e)===Ot};w.isMemo=function(e){return M(e)===Tt};w.isPortal=function(e){return M(e)===On};w.isProfiler=function(e){return M(e)===Et};w.isStrictMode=function(e){return M(e)===St};w.isSuspense=function(e){return M(e)===Dt};w.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vt||e===It||e===Et||e===St||e===Dt||e===Yf||typeof e=="object"&&e!==null&&(e.$$typeof===Ot||e.$$typeof===Tt||e.$$typeof===Ct||e.$$typeof===kt||e.$$typeof===Rt||e.$$typeof===Xf||e.$$typeof===Zf||e.$$typeof===Qf||e.$$typeof===Jf)};w.typeOf=M;$o.exports=w;var eh=$o.exports,So=eh,th={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nh={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Eo={};Eo[So.ForwardRef]=th;Eo[So.Memo]=nh;const rh=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function sh(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Hr={componentStack:null,error:null,eventId:null};function oh(e,t){const n=new WeakMap;function r(s,o){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,o);s.cause=o}}r(e,t)}class zn extends x.Component{constructor(t){super(t),zn.prototype.__init.call(this),this.state=Hr,this._openFallbackReportDialog=!0;const n=z();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&Gr({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:s,showDialog:o,dialogOptions:i}=this.props;Hs(a=>{if(sh(x.version)&&wn(t)){const d=new Error(t.message);d.name=`React ErrorBoundary ${t.name}`,d.stack=n,oh(t,d)}r&&r(a,t,n);const c=wt(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!1}});s&&s(t,n,c),o&&(this._lastEventId=c,this._openFallbackReportDialog&&Gr({...i,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(Hr)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,x.isValidElement(s)?s:(t&&rh&&g.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function Co(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Co(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function K(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Co(e))&&(r&&(r+=" "),r+=t);return r}var Wr="sid-theme-root",ih="y2413r2",ah="y2413r0",ch="y2413r1",dh="y2413r3";function ko(){return typeof window<"u"&&globalThis===window}function Io({theme:e,className:t}){return K(Wr,`${Wr}__${e}`,dh,{[ah]:e==="dark",[ih]:e==="auto",[ch]:e==="light"},t)}function uh({theme:e,className:t}){const n=Io({theme:e,className:t});document.body.classList.add(...n.split(" "))}const Ro=({children:e})=>l.jsx("div",{className:Io({theme:"light"}),children:e}),lh=({children:e,theme:t="light",className:n})=>{const[r,s]=Qr.useState(!1);return x.useLayoutEffect(()=>{r||s(!0)},[n,r,t]),x.useLayoutEffect(()=>{r&&uh({theme:t,className:n})},[n,r,t]),r?l.jsx(l.Fragment,{children:e}):l.jsx(Ro,{children:e})};function fh({children:e,theme:t="light",className:n}){return ko()?l.jsx(lh,{theme:t,className:n,children:e}):l.jsx(Ro,{children:e})}var hh={default:"_92y0ua2 _92y0ua1",short:"_92y0ua3 _92y0ua1"};const Do=({className:e,variant:t="default"})=>l.jsx("div",{className:K(hh[t],e)});var ph={primary:"eccmw2 eccmw0",secondary:"eccmw3 eccmw0",secondaryMd:"eccmw4 eccmw0 eccmw1",neutral:"eccmw5 eccmw0",neutralMd:"eccmw6 eccmw0 eccmw1",ghost:"eccmw7 eccmw0",ghostMd:"eccmw8 eccmw0 eccmw1"},gh="eccmw9",_h="eccmwa",mh={primary:"eccmwb",secondary:"eccmwc",secondaryMd:"eccmwd",neutral:"eccmwe",neutralMd:"eccmwf",ghost:"eccmwg",ghostMd:"eccmwh"};const To=x.forwardRef(({children:e,onClick:t,className:n,type:r="button",variant:s="primary",testId:o,icon:i,disabled:a,loading:c=!1},d)=>l.jsx("button",{ref:d,"data-testid":o,type:r,disabled:a,className:K("sid-button",`sid-button--${s}`,ph[s],{[gh]:a},n),onClick:t,children:c?l.jsx(Do,{variant:"short",className:mh[s]}):l.jsxs(l.Fragment,{children:[i?l.jsx("i",{className:_h,children:i}):null,e]})}));To.displayName="Button";var bh="_1doytsg4",wh="_1doytsg3",yh="_1doytsg0",xh={text:"_1doytsg6 _1doytsg5",email:"_1doytsg7 _1doytsg5",password:"_1doytsg8 _1doytsg5",tel:"_1doytsg9 _1doytsg5"},$h="_1doytsga",vh="_1doytsgc";const Sh=({id:e,name:t,label:n,placeholder:r="",autoComplete:s="",value:o,onChange:i,type:a="text"})=>{const c=x.useCallback(d=>{i(d)},[i]);return l.jsxs("div",{className:xh[a],children:[l.jsx("label",{htmlFor:e,className:$h,children:n}),l.jsx("input",{type:a,id:e,name:t,className:yh,placeholder:r,value:o,onChange:c,autoComplete:s})]})},Ln=`
|
|
35
|
+
@media (prefers-color-scheme: dark) {
|
|
36
|
+
.sid-theme-root__auto path { fill: white; }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.sid-theme-root__dark path { fill: white; }
|
|
40
|
+
`;function Eh(){return l.jsxs("svg",{width:"5",height:"20",viewBox:"0 0 5 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 0C3.32843 1.19209e-07 4 0.671573 4 1.5L4 11.5C4 12.3284 3.32843 13 2.5 13C1.67157 13 1 12.3284 1 11.5L1 1.5C1 0.671573 1.67157 -1.19209e-07 2.5 0Z",fill:"white"}),l.jsx("path",{d:"M4.5 18C4.5 19.1046 3.60457 20 2.5 20C1.39543 20 0.5 19.1046 0.5 18C0.5 16.8954 1.39543 16 2.5 16C3.60457 16 4.5 16.8954 4.5 18Z",fill:"white"})]})}const Ch=()=>l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("style",{children:Ln}),l.jsx("g",{clipPath:"url(#clip0_2610_9920)",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_2610_9920",children:l.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),kh=()=>l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("style",{children:Ln}),l.jsxs("g",{clipPath:"url(#clip0_2610_9933)",children:[l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"}),l.jsx("path",{d:"M2.34314 2.34315L13.6568 13.6569",stroke:"#142049",strokeWidth:"1.5",strokeLinecap:"round"})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_2610_9933",children:l.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Oo=()=>l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("style",{children:Ln}),l.jsx("path",{d:"M12.686 10L2 30.228H5.198L15.884 10H12.686Z",fill:"#2A6AFF"}),l.jsx("path",{d:"M19.7923 15.694C20.9373 15.694 21.8723 14.732 21.8723 13.588C21.8723 12.444 20.9373 11.482 19.7923 11.482C18.6223 11.482 17.6873 12.444 17.6873 13.588C17.6873 14.732 18.6233 15.694 19.7933 15.694H19.7923ZM18.0773 17.514V30.228H21.4573V17.514H18.0773ZM34.1883 10V18.502C33.172 17.6398 31.8809 17.1695 30.5483 17.176C26.8563 17.176 24.0743 20.14 24.0743 23.884C24.0743 27.628 26.8563 30.592 30.5483 30.592C32.0823 30.592 33.4343 30.02 34.4483 29.032V30.228H37.5683V10H34.1883ZM30.9383 27.42C28.9883 27.42 27.5583 25.912 27.5583 23.884C27.5583 21.856 28.9883 20.348 30.9383 20.348C32.8883 20.348 34.3183 21.856 34.3183 23.884C34.3183 25.912 32.8883 27.42 30.9383 27.42Z",fill:"#142049"})]}),Kr=e=>{const[t,n]=x.useState(!1);return l.jsxs("div",{className:K("sid-input","sid-input--password",wh,e.error&&bh,e.className),children:[l.jsx(Sh,{...e,type:t?"text":"password"}),l.jsx("button",{tabIndex:-1,className:vh,type:"button",onClick:()=>n(!t),children:t?l.jsx(kh,{}):l.jsx(Ch,{})})]})};var Ih="_1rf2mux3",Rh="_1rf2muxg",Dh={blue:"_1rf2muxe _1rf2muxc",red:"_1rf2muxf _1rf2muxc"},Th="_1rf2muxd",Oh={blue:"_1rf2muxa _1rf2mux8",red:"_1rf2muxb _1rf2mux8"},Ah="_1rf2mux9",zh={blue:"_1rf2mux6 _1rf2mux4",red:"_1rf2mux7 _1rf2mux4"},Lh="_1rf2mux5";const Pn=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0})=>l.jsxs("div",{className:K(Ih,t),children:[l.jsx("div",{className:K(zh[n],{[Lh]:r})}),l.jsx("div",{className:K(Oh[n],{[Ah]:r})}),l.jsx("div",{className:K(Dh[n],{[Th]:r})}),l.jsx("div",{className:Rh,children:e})]});function Ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Yr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jr(Object(n),!0).forEach(function(r){Ph(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Nh=(e,t,n)=>{for(var r of Object.keys(e)){var s;if(e[r]!==((s=t[r])!==null&&s!==void 0?s:n[r]))return!1}return!0},Ao=e=>t=>{var n=e.defaultClassName,r=Yr(Yr({},e.defaultVariants),t);for(var s in r){var o,i=(o=r[s])!==null&&o!==void 0?o:e.defaultVariants[s];if(i!=null){var a=i;typeof a=="boolean"&&(a=a===!0?"true":"false");var c=e.variantClassNames[s][a];c&&(n+=" "+c)}}for(var[d,f]of e.compoundVariants)Nh(d,r,e.defaultVariants)&&(n+=" "+f);return n},Mh=Ao({defaultClassName:"s3l9sv0",variantClassNames:{direction:{vertical:"s3l9sv1",horizontal:"s3l9sv2"},space:{between:"s3l9sv3",evenly:"s3l9sv4"}},defaultVariants:{direction:"vertical"},compoundVariants:[]});function Uh(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vh(e){var t=Uh(e,"string");return typeof t=="symbol"?t:String(t)}function Bh(e,t,n){return t=Vh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jr(Object(n),!0).forEach(function(r){Bh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Fh=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var s=Object.assign({},...n.map(c=>c.styles)),o=Object.keys(s),i=o.filter(c=>"mappings"in s[c]),a=c=>{var d=[],f={},u=Ht({},c),h=!1;for(var _ of i){var S=c[_];if(S!=null){var Mn=s[_];h=!0;for(var O of Mn.mappings)f[O]=S,u[O]==null&&delete u[O]}}var Un=h?Ht(Ht({},f),u):c,Fo=function(){var ne=Un[Vn],Re=s[Vn];try{if(Re.mappings)return"continue";if(typeof ne=="string"||typeof ne=="number")d.push(Re.values[ne].defaultClass);else if(Array.isArray(ne))for(var Je=0;Je<ne.length;Je++){var Bn=ne[Je];if(Bn!=null){var Go=Re.responsiveArray[Je];d.push(Re.values[Bn].conditions[Go])}}else for(var Fn in ne){var qn=ne[Fn];qn!=null&&d.push(Re.values[qn].conditions[Fn])}}catch(Ho){throw Ho}};for(var Vn in Un)var qo=Fo();return e(d.join(" "))};return Object.assign(a,{properties:new Set(o)})},qh=e=>e,Gh=function(){return Fh(qh)(...arguments)},zo=Gh({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"_1hbz9ox0",darkMode:"_1hbz9ox1"},defaultClass:"_1hbz9ox0"},mute:{conditions:{lightMode:"_1hbz9ox2",darkMode:"_1hbz9ox3"},defaultClass:"_1hbz9ox2"},panel:{conditions:{lightMode:"_1hbz9ox4",darkMode:"_1hbz9ox5"},defaultClass:"_1hbz9ox4"},foreground:{conditions:{lightMode:"_1hbz9ox6",darkMode:"_1hbz9ox7"},defaultClass:"_1hbz9ox6"},contrast:{conditions:{lightMode:"_1hbz9ox8",darkMode:"_1hbz9ox9"},defaultClass:"_1hbz9ox8"},secondary:{conditions:{lightMode:"_1hbz9oxa",darkMode:"_1hbz9oxb"},defaultClass:"_1hbz9oxa"},tertiary:{conditions:{lightMode:"_1hbz9oxc",darkMode:"_1hbz9oxd"},defaultClass:"_1hbz9oxc"},placeholder:{conditions:{lightMode:"_1hbz9oxe",darkMode:"_1hbz9oxf"},defaultClass:"_1hbz9oxe"},smooth:{conditions:{lightMode:"_1hbz9oxg",darkMode:"_1hbz9oxh"},defaultClass:"_1hbz9oxg"},subtle:{conditions:{lightMode:"_1hbz9oxi",darkMode:"_1hbz9oxj"},defaultClass:"_1hbz9oxi"},soft:{conditions:{lightMode:"_1hbz9oxk",darkMode:"_1hbz9oxl"},defaultClass:"_1hbz9oxk"},offset:{conditions:{lightMode:"_1hbz9oxm",darkMode:"_1hbz9oxn"},defaultClass:"_1hbz9oxm"},primary:{conditions:{lightMode:"_1hbz9oxo",darkMode:"_1hbz9oxp"},defaultClass:"_1hbz9oxo"},primaryHover:{conditions:{lightMode:"_1hbz9oxq",darkMode:"_1hbz9oxr"},defaultClass:"_1hbz9oxq"},transparent:{conditions:{lightMode:"_1hbz9oxs",darkMode:"_1hbz9oxt"},defaultClass:"_1hbz9oxs"},error:{conditions:{lightMode:"_1hbz9oxu",darkMode:"_1hbz9oxv"},defaultClass:"_1hbz9oxu"},auxiliary:{conditions:{lightMode:"_1hbz9oxw",darkMode:"_1hbz9oxx"},defaultClass:"_1hbz9oxw"},success:{conditions:{lightMode:"_1hbz9oxy",darkMode:"_1hbz9oxz"},defaultClass:"_1hbz9oxy"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox10",darkMode:"_1hbz9ox11"},defaultClass:"_1hbz9ox10"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox12",darkMode:"_1hbz9ox13"},defaultClass:"_1hbz9ox12"},failure:{conditions:{lightMode:"_1hbz9ox14",darkMode:"_1hbz9ox15"},defaultClass:"_1hbz9ox14"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox16",darkMode:"_1hbz9ox17"},defaultClass:"_1hbz9ox16"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox18",darkMode:"_1hbz9ox19"},defaultClass:"_1hbz9ox18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"_1hbz9ox1a",darkMode:"_1hbz9ox1b"},defaultClass:"_1hbz9ox1a"},mute:{conditions:{lightMode:"_1hbz9ox1c",darkMode:"_1hbz9ox1d"},defaultClass:"_1hbz9ox1c"},panel:{conditions:{lightMode:"_1hbz9ox1e",darkMode:"_1hbz9ox1f"},defaultClass:"_1hbz9ox1e"},foreground:{conditions:{lightMode:"_1hbz9ox1g",darkMode:"_1hbz9ox1h"},defaultClass:"_1hbz9ox1g"},contrast:{conditions:{lightMode:"_1hbz9ox1i",darkMode:"_1hbz9ox1j"},defaultClass:"_1hbz9ox1i"},secondary:{conditions:{lightMode:"_1hbz9ox1k",darkMode:"_1hbz9ox1l"},defaultClass:"_1hbz9ox1k"},tertiary:{conditions:{lightMode:"_1hbz9ox1m",darkMode:"_1hbz9ox1n"},defaultClass:"_1hbz9ox1m"},placeholder:{conditions:{lightMode:"_1hbz9ox1o",darkMode:"_1hbz9ox1p"},defaultClass:"_1hbz9ox1o"},smooth:{conditions:{lightMode:"_1hbz9ox1q",darkMode:"_1hbz9ox1r"},defaultClass:"_1hbz9ox1q"},subtle:{conditions:{lightMode:"_1hbz9ox1s",darkMode:"_1hbz9ox1t"},defaultClass:"_1hbz9ox1s"},soft:{conditions:{lightMode:"_1hbz9ox1u",darkMode:"_1hbz9ox1v"},defaultClass:"_1hbz9ox1u"},offset:{conditions:{lightMode:"_1hbz9ox1w",darkMode:"_1hbz9ox1x"},defaultClass:"_1hbz9ox1w"},primary:{conditions:{lightMode:"_1hbz9ox1y",darkMode:"_1hbz9ox1z"},defaultClass:"_1hbz9ox1y"},primaryHover:{conditions:{lightMode:"_1hbz9ox20",darkMode:"_1hbz9ox21"},defaultClass:"_1hbz9ox20"},transparent:{conditions:{lightMode:"_1hbz9ox22",darkMode:"_1hbz9ox23"},defaultClass:"_1hbz9ox22"},error:{conditions:{lightMode:"_1hbz9ox24",darkMode:"_1hbz9ox25"},defaultClass:"_1hbz9ox24"},auxiliary:{conditions:{lightMode:"_1hbz9ox26",darkMode:"_1hbz9ox27"},defaultClass:"_1hbz9ox26"},success:{conditions:{lightMode:"_1hbz9ox28",darkMode:"_1hbz9ox29"},defaultClass:"_1hbz9ox28"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox2a",darkMode:"_1hbz9ox2b"},defaultClass:"_1hbz9ox2a"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox2c",darkMode:"_1hbz9ox2d"},defaultClass:"_1hbz9ox2c"},failure:{conditions:{lightMode:"_1hbz9ox2e",darkMode:"_1hbz9ox2f"},defaultClass:"_1hbz9ox2e"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox2g",darkMode:"_1hbz9ox2h"},defaultClass:"_1hbz9ox2g"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox2i",darkMode:"_1hbz9ox2j"},defaultClass:"_1hbz9ox2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"_1hbz9ox2k"},1:{defaultClass:"_1hbz9ox2l"},2:{defaultClass:"_1hbz9ox2m"},3:{defaultClass:"_1hbz9ox2n"},4:{defaultClass:"_1hbz9ox2o"},5:{defaultClass:"_1hbz9ox2p"},6:{defaultClass:"_1hbz9ox2q"},7:{defaultClass:"_1hbz9ox2r"},8:{defaultClass:"_1hbz9ox2s"},9:{defaultClass:"_1hbz9ox2t"},10:{defaultClass:"_1hbz9ox2u"},11:{defaultClass:"_1hbz9ox2v"},12:{defaultClass:"_1hbz9ox2w"},13:{defaultClass:"_1hbz9ox2x"},14:{defaultClass:"_1hbz9ox2y"},15:{defaultClass:"_1hbz9ox2z"},16:{defaultClass:"_1hbz9ox30"},20:{defaultClass:"_1hbz9ox31"},24:{defaultClass:"_1hbz9ox32"},28:{defaultClass:"_1hbz9ox33"},32:{defaultClass:"_1hbz9ox34"},36:{defaultClass:"_1hbz9ox35"},40:{defaultClass:"_1hbz9ox36"},44:{defaultClass:"_1hbz9ox37"},48:{defaultClass:"_1hbz9ox38"},52:{defaultClass:"_1hbz9ox39"},56:{defaultClass:"_1hbz9ox3a"},60:{defaultClass:"_1hbz9ox3b"},64:{defaultClass:"_1hbz9ox3c"},68:{defaultClass:"_1hbz9ox3d"},72:{defaultClass:"_1hbz9ox3e"},76:{defaultClass:"_1hbz9ox3f"},80:{defaultClass:"_1hbz9ox3g"},96:{defaultClass:"_1hbz9ox3h"},px:{defaultClass:"_1hbz9ox3i"},"0.25":{defaultClass:"_1hbz9ox3j"},"0.5":{defaultClass:"_1hbz9ox3k"},"0.75":{defaultClass:"_1hbz9ox3l"},"1.5":{defaultClass:"_1hbz9ox3m"},"2.5":{defaultClass:"_1hbz9ox3n"},"3.5":{defaultClass:"_1hbz9ox3o"}}},marginTop:{values:{0:{defaultClass:"_1hbz9ox3p"},1:{defaultClass:"_1hbz9ox3q"},2:{defaultClass:"_1hbz9ox3r"},3:{defaultClass:"_1hbz9ox3s"},4:{defaultClass:"_1hbz9ox3t"},5:{defaultClass:"_1hbz9ox3u"},6:{defaultClass:"_1hbz9ox3v"},7:{defaultClass:"_1hbz9ox3w"},8:{defaultClass:"_1hbz9ox3x"},9:{defaultClass:"_1hbz9ox3y"},10:{defaultClass:"_1hbz9ox3z"},11:{defaultClass:"_1hbz9ox40"},12:{defaultClass:"_1hbz9ox41"},13:{defaultClass:"_1hbz9ox42"},14:{defaultClass:"_1hbz9ox43"},15:{defaultClass:"_1hbz9ox44"},16:{defaultClass:"_1hbz9ox45"},20:{defaultClass:"_1hbz9ox46"},24:{defaultClass:"_1hbz9ox47"},28:{defaultClass:"_1hbz9ox48"},32:{defaultClass:"_1hbz9ox49"},36:{defaultClass:"_1hbz9ox4a"},40:{defaultClass:"_1hbz9ox4b"},44:{defaultClass:"_1hbz9ox4c"},48:{defaultClass:"_1hbz9ox4d"},52:{defaultClass:"_1hbz9ox4e"},56:{defaultClass:"_1hbz9ox4f"},60:{defaultClass:"_1hbz9ox4g"},64:{defaultClass:"_1hbz9ox4h"},68:{defaultClass:"_1hbz9ox4i"},72:{defaultClass:"_1hbz9ox4j"},76:{defaultClass:"_1hbz9ox4k"},80:{defaultClass:"_1hbz9ox4l"},96:{defaultClass:"_1hbz9ox4m"},px:{defaultClass:"_1hbz9ox4n"},"0.25":{defaultClass:"_1hbz9ox4o"},"0.5":{defaultClass:"_1hbz9ox4p"},"0.75":{defaultClass:"_1hbz9ox4q"},"1.5":{defaultClass:"_1hbz9ox4r"},"2.5":{defaultClass:"_1hbz9ox4s"},"3.5":{defaultClass:"_1hbz9ox4t"}}},marginBottom:{values:{0:{defaultClass:"_1hbz9ox4u"},1:{defaultClass:"_1hbz9ox4v"},2:{defaultClass:"_1hbz9ox4w"},3:{defaultClass:"_1hbz9ox4x"},4:{defaultClass:"_1hbz9ox4y"},5:{defaultClass:"_1hbz9ox4z"},6:{defaultClass:"_1hbz9ox50"},7:{defaultClass:"_1hbz9ox51"},8:{defaultClass:"_1hbz9ox52"},9:{defaultClass:"_1hbz9ox53"},10:{defaultClass:"_1hbz9ox54"},11:{defaultClass:"_1hbz9ox55"},12:{defaultClass:"_1hbz9ox56"},13:{defaultClass:"_1hbz9ox57"},14:{defaultClass:"_1hbz9ox58"},15:{defaultClass:"_1hbz9ox59"},16:{defaultClass:"_1hbz9ox5a"},20:{defaultClass:"_1hbz9ox5b"},24:{defaultClass:"_1hbz9ox5c"},28:{defaultClass:"_1hbz9ox5d"},32:{defaultClass:"_1hbz9ox5e"},36:{defaultClass:"_1hbz9ox5f"},40:{defaultClass:"_1hbz9ox5g"},44:{defaultClass:"_1hbz9ox5h"},48:{defaultClass:"_1hbz9ox5i"},52:{defaultClass:"_1hbz9ox5j"},56:{defaultClass:"_1hbz9ox5k"},60:{defaultClass:"_1hbz9ox5l"},64:{defaultClass:"_1hbz9ox5m"},68:{defaultClass:"_1hbz9ox5n"},72:{defaultClass:"_1hbz9ox5o"},76:{defaultClass:"_1hbz9ox5p"},80:{defaultClass:"_1hbz9ox5q"},96:{defaultClass:"_1hbz9ox5r"},px:{defaultClass:"_1hbz9ox5s"},"0.25":{defaultClass:"_1hbz9ox5t"},"0.5":{defaultClass:"_1hbz9ox5u"},"0.75":{defaultClass:"_1hbz9ox5v"},"1.5":{defaultClass:"_1hbz9ox5w"},"2.5":{defaultClass:"_1hbz9ox5x"},"3.5":{defaultClass:"_1hbz9ox5y"}}},marginLeft:{values:{0:{defaultClass:"_1hbz9ox5z"},1:{defaultClass:"_1hbz9ox60"},2:{defaultClass:"_1hbz9ox61"},3:{defaultClass:"_1hbz9ox62"},4:{defaultClass:"_1hbz9ox63"},5:{defaultClass:"_1hbz9ox64"},6:{defaultClass:"_1hbz9ox65"},7:{defaultClass:"_1hbz9ox66"},8:{defaultClass:"_1hbz9ox67"},9:{defaultClass:"_1hbz9ox68"},10:{defaultClass:"_1hbz9ox69"},11:{defaultClass:"_1hbz9ox6a"},12:{defaultClass:"_1hbz9ox6b"},13:{defaultClass:"_1hbz9ox6c"},14:{defaultClass:"_1hbz9ox6d"},15:{defaultClass:"_1hbz9ox6e"},16:{defaultClass:"_1hbz9ox6f"},20:{defaultClass:"_1hbz9ox6g"},24:{defaultClass:"_1hbz9ox6h"},28:{defaultClass:"_1hbz9ox6i"},32:{defaultClass:"_1hbz9ox6j"},36:{defaultClass:"_1hbz9ox6k"},40:{defaultClass:"_1hbz9ox6l"},44:{defaultClass:"_1hbz9ox6m"},48:{defaultClass:"_1hbz9ox6n"},52:{defaultClass:"_1hbz9ox6o"},56:{defaultClass:"_1hbz9ox6p"},60:{defaultClass:"_1hbz9ox6q"},64:{defaultClass:"_1hbz9ox6r"},68:{defaultClass:"_1hbz9ox6s"},72:{defaultClass:"_1hbz9ox6t"},76:{defaultClass:"_1hbz9ox6u"},80:{defaultClass:"_1hbz9ox6v"},96:{defaultClass:"_1hbz9ox6w"},px:{defaultClass:"_1hbz9ox6x"},"0.25":{defaultClass:"_1hbz9ox6y"},"0.5":{defaultClass:"_1hbz9ox6z"},"0.75":{defaultClass:"_1hbz9ox70"},"1.5":{defaultClass:"_1hbz9ox71"},"2.5":{defaultClass:"_1hbz9ox72"},"3.5":{defaultClass:"_1hbz9ox73"}}},marginRight:{values:{0:{defaultClass:"_1hbz9ox74"},1:{defaultClass:"_1hbz9ox75"},2:{defaultClass:"_1hbz9ox76"},3:{defaultClass:"_1hbz9ox77"},4:{defaultClass:"_1hbz9ox78"},5:{defaultClass:"_1hbz9ox79"},6:{defaultClass:"_1hbz9ox7a"},7:{defaultClass:"_1hbz9ox7b"},8:{defaultClass:"_1hbz9ox7c"},9:{defaultClass:"_1hbz9ox7d"},10:{defaultClass:"_1hbz9ox7e"},11:{defaultClass:"_1hbz9ox7f"},12:{defaultClass:"_1hbz9ox7g"},13:{defaultClass:"_1hbz9ox7h"},14:{defaultClass:"_1hbz9ox7i"},15:{defaultClass:"_1hbz9ox7j"},16:{defaultClass:"_1hbz9ox7k"},20:{defaultClass:"_1hbz9ox7l"},24:{defaultClass:"_1hbz9ox7m"},28:{defaultClass:"_1hbz9ox7n"},32:{defaultClass:"_1hbz9ox7o"},36:{defaultClass:"_1hbz9ox7p"},40:{defaultClass:"_1hbz9ox7q"},44:{defaultClass:"_1hbz9ox7r"},48:{defaultClass:"_1hbz9ox7s"},52:{defaultClass:"_1hbz9ox7t"},56:{defaultClass:"_1hbz9ox7u"},60:{defaultClass:"_1hbz9ox7v"},64:{defaultClass:"_1hbz9ox7w"},68:{defaultClass:"_1hbz9ox7x"},72:{defaultClass:"_1hbz9ox7y"},76:{defaultClass:"_1hbz9ox7z"},80:{defaultClass:"_1hbz9ox80"},96:{defaultClass:"_1hbz9ox81"},px:{defaultClass:"_1hbz9ox82"},"0.25":{defaultClass:"_1hbz9ox83"},"0.5":{defaultClass:"_1hbz9ox84"},"0.75":{defaultClass:"_1hbz9ox85"},"1.5":{defaultClass:"_1hbz9ox86"},"2.5":{defaultClass:"_1hbz9ox87"},"3.5":{defaultClass:"_1hbz9ox88"}}}}});const At=e=>l.jsx("div",{className:K("sid-stack",Mh(e.variant),zo({gap:e.space||"2"}),e.className),style:e.style,children:e.children});var Hh=Ao({defaultClassName:"_1wn0ypy0",variantClassNames:{size:{xs:"_1wn0ypy1",sm:"_1wn0ypy2",base:"_1wn0ypy3",xl:"_1wn0ypy4","2xl-title":"_1wn0ypy5"},weight:{medium:"_1wn0ypy6",semibold:"_1wn0ypy7",bold:"_1wn0ypy8"},color:{contrast:"_1wn0ypy9",tertiary:"_1wn0ypya",placeholder:"_1wn0ypyb",white:"_1wn0ypyc",success:"_1wn0ypyd",failure:"_1wn0ypye"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const Wh={text:{}},Nn=x.createContext(Wh);Nn.displayName="SlashIDTextContext";const Kh=({text:e,children:t})=>{const n=x.useMemo(()=>({text:e}),[e]);return l.jsx(Nn.Provider,{value:n,children:t})};function jh(){const{text:e}=Qr.useContext(Nn);return e}const Wt={opening:"{{",closing:"}}"};function Lo(e,t){return e.includes(Wt.opening)?Object.keys(t).reduce((r,s)=>r.replace(`${Wt.opening}${s}${Wt.closing}`,t[s]),e):e}const gn=({as:e,t,tokens:n,variant:r,className:s,children:o})=>{const i=jh(),a=e||"p";return l.jsxs(a,{className:K("sid-text",`sid-text--${e}`,Hh(r),s),children:[n?Lo(i[t],n):i[t],o||null]})};var Yh="iokgmp1";function Xr({width:e,height:t,minHeight:n,maxHeight:r,minWidth:s,maxWidth:o}){return l.jsx("div",{className:Yh,style:{width:e,height:t,minHeight:n,maxHeight:r,minWidth:s,maxWidth:o}})}function Jh(){const e=navigator.language.toLowerCase();return e==="ja"||e.startsWith("ja-")?"ja":"en"}const $={"footer.text":"Top-tier security by SlashID","initial.title":"Logging you in...","initial.details":"Please follow the on-screen instructions.","recover.password.title":"Reset password","recover.password.details":"Enter your new password.","recover.password.input.password.label":"Password","recover.password.input.confirmPassword.label":"Confirm password","recover.password.input.placeholder":"Type your new password","recover.password.submit":"Reset password","recover.password.validation.passwordsDoNotMatch":"Passwords do not match","recover.password.validation.length":"8-256 characters required","recover.password.validation.password_variants":"Contains word 'password'","recover.password.validation.admin_variants":"Contains word 'admin'","recover.password.validation.user_variants":"Contains word 'user'","recover.password.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.common_password_xkcd":"Common password","success.title":"All done!","success.details":"Please return to the website.","error.title":"Something went wrong...","error.detail":"Please log in again."},Po={en:$,ja:{"footer.text":$["footer.text"],"initial.title":"ログイン処理を行っています。","initial.details":"処理完了後、画面は自動で切り替わります。","success.title":"認証が完了しました!","success.details":"このページを閉じて、元のページへ戻ってください。","recover.password.title":$["recover.password.title"],"recover.password.details":$["recover.password.details"],"recover.password.input.password.label":$["recover.password.input.password.label"],"recover.password.input.confirmPassword.label":$["recover.password.input.confirmPassword.label"],"recover.password.input.placeholder":$["recover.password.input.placeholder"],"recover.password.submit":$["recover.password.submit"],"recover.password.validation.passwordsDoNotMatch":$["recover.password.validation.passwordsDoNotMatch"],"recover.password.validation.length":$["recover.password.validation.length"],"recover.password.validation.password_variants":$["recover.password.validation.password_variants"],"recover.password.validation.admin_variants":$["recover.password.validation.admin_variants"],"recover.password.validation.user_variants":$["recover.password.validation.user_variants"],"recover.password.validation.alphanumeric_sequences_1":$["recover.password.validation.alphanumeric_sequences_1"],"recover.password.validation.alphanumeric_sequences_2":$["recover.password.validation.alphanumeric_sequences_2"],"recover.password.validation.numeric_sequences_ascending":$["recover.password.validation.numeric_sequences_ascending"],"recover.password.validation.numeric_subsequences_ascending":$["recover.password.validation.numeric_subsequences_ascending"],"recover.password.validation.numeric_sequences_descending":$["recover.password.validation.numeric_sequences_descending"],"recover.password.validation.numeric_subsequences_descending":$["recover.password.validation.numeric_subsequences_descending"],"recover.password.validation.common_password_xkcd":$["recover.password.validation.common_password_xkcd"],"error.title":$["error.title"],"error.detail":"再度ログインをしてください。"}},Xh=e=>t=>Po[e][t],No={logo:l.jsx(Oo,{}),language:"en",state:"initial",sdk:void 0},Mo=x.createContext(No),Ye=()=>x.useContext(Mo),he=e=>l.jsx(gn,{...e});var Zh="_1vg0oop0",Qh="_1vg0oop2",ep="_1vg0oop1",tp="_1vg0oop3";function np(){const{logo:e}=Ye();return l.jsx("div",{className:tp,children:e})}function rp(){return l.jsx(he,{t:"footer.text",variant:{size:"xs",weight:"semibold",color:"placeholder"}})}function Uo({children:e,header:t=l.jsx(np,{}),footer:n=l.jsx(rp,{})}){return l.jsxs("article",{className:Zh,children:[t&&l.jsx("header",{className:ep,children:t}),l.jsx("div",{children:e}),n&&l.jsx("footer",{className:Qh,children:n})]})}function Vo(){return l.jsx(Pn,{children:l.jsx(Do,{})})}function sp(){return l.jsxs(l.Fragment,{children:[l.jsxs(At,{space:"2",children:[l.jsx(Xr,{width:"75%",height:24}),l.jsx(Xr,{width:"50%",height:16})]}),l.jsx(Vo,{})]})}function op({type:e}){return l.jsx(Pn,{variant:e==="warning"?"blue":"red",shouldAnimate:!1,children:l.jsx(Eh,{})})}function _n({type:e}){return l.jsxs(l.Fragment,{children:[l.jsxs(At,{space:"0.25",children:[l.jsx(he,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"error.title"}),l.jsx(he,{as:"h2",t:"error.detail",variant:{color:"contrast",weight:"semibold"}})]}),l.jsx(op,{type:e})]})}var ip="_8vopmj2",ap="_8vopmj0";function cp(){const{language:e}=Ye();return x.useMemo(()=>Xh(e),[e])}function dp(e){return`recover.password.validation.${e.failedRules[0].name}`}function up({errorEvent:e,password:t}){const n=e.failedRules[0];let r="";if(n.matchType==="must_not_match"){const s=n.regexp.exec(t);r=s!==null?s[0]:""}return r?{ILLEGAL_SEQUENCE:r}:{}}function lp({message:e}){return l.jsx("span",{className:ip,children:e})}function fp(){const e=cp(),{sdk:t}=Ye(),[n,r]=x.useState(""),[s,o]=x.useState(""),[i,a]=x.useState(null),[c,d]=x.useState("initial");x.useEffect(()=>{const _=S=>{a(Lo(e(dp(S)),up({errorEvent:S,password:n}))),d("initial")};return t?.subscribe("invalidPasswordSubmitted",_),()=>{t?.unsubscribe("invalidPasswordSubmitted",_)}},[e,t,n,a]);const f=_=>{if(_.preventDefault(),!!t){if(!n||n!==s){a(e("recover.password.validation.passwordsDoNotMatch"));return}t.publish("passwordSubmitted",n),d("submitting")}},u=_=>{r(_.target.value),a(null)},h=_=>{o(_.target.value),a(null)};return l.jsxs(l.Fragment,{children:[l.jsxs(At,{space:"0.25",children:[l.jsx(gn,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"recover.password.title"}),l.jsx(gn,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"recover.password.details"})]}),l.jsxs("form",{onSubmit:f,children:[l.jsxs("div",{className:ap,children:[l.jsx(Kr,{id:"password-input",label:e("recover.password.input.password.label"),placeholder:e("recover.password.input.placeholder"),name:"password",value:n??"",onChange:u,error:!!i,autoComplete:"new-password"}),l.jsx(Kr,{id:"password-input-confirm",label:e("recover.password.input.confirmPassword.label"),placeholder:e("recover.password.input.placeholder"),name:"passwordConfirm",value:s??"",onChange:h,className:zo({marginTop:"4"}),error:!!i,autoComplete:"new-password"}),i&&l.jsx(lp,{message:i})]}),l.jsx(To,{type:"submit",variant:"primary",testId:"sid-form-initial-submit-button",disabled:c==="submitting",loading:c==="submitting",children:e("recover.password.submit")})]})]})}class hp extends Error{errors;constructor(t){super(t.length>0?t[0].message:"Unknown SlashID error"),this.errors=t}}function pp(e){return!!(typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors))}function Bo(e){if(e instanceof Error)return e;if(pp(e))return new hp(e.errors);let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}return new Error(`This value was thrown as is, not through an Error: ${t}`)}function gp({onSuccess:e,onError:t,flowType:n}){const{sdk:r}=Ye();return x.useEffect(()=>{if(!r)return;async function s(){try{await r?.getUserFromURL(),e()}catch(o){const i=Bo(o);wt(i),t({error:i})}}s()},[n,t,e,r]),n==="password-recovery"?l.jsx(fp,{}):l.jsxs(l.Fragment,{children:[l.jsxs(At,{space:"0.25",children:[l.jsx(he,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"initial.title"}),l.jsx(he,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"initial.details"})]}),l.jsx(Vo,{})]})}const _p=()=>l.jsx(Pn,{children:l.jsx("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.8505 0.705985C20.6342 1.38283 20.7209 2.56684 20.044 3.35055L8.16908 17.1005C7.80192 17.5256 7.2635 17.7637 6.70195 17.7493C6.1404 17.7349 5.61489 17.4695 5.27002 17.0261L0.895049 11.4011C0.259296 10.5837 0.406547 9.4057 1.22394 8.76995C2.04134 8.13419 3.21935 8.28145 3.8551 9.09884L6.82592 12.9185L17.2059 0.89949C17.8828 0.115778 19.0668 0.0291434 19.8505 0.705985Z",fill:"white"})})});function mp(){return l.jsxs("article",{"data-testid":"sid-form-success-state",children:[l.jsx(he,{as:"h1",t:"success.title",variant:{size:"2xl-title",weight:"bold"}}),l.jsx(he,{as:"h2",t:"success.details",variant:{color:"contrast",weight:"semibold"}}),l.jsx(_p,{})]})}function bp(e){return e.some(t=>t.type==="password_reset")}function wp(e){return bp(e)?"password-recovery":"catch-all"}function yp(){const[e,t]=x.useState({state:"initial"}),{sdk:n,state:r}=Ye();x.useEffect(()=>{if(e.state!=="initial")return;async function i(){if(!n)return;t({state:"parsing-url"});let a=[];try{a=await n.getChallengesFromURL()}catch(d){wt(Bo(d))}if(!a){t({state:"no-challenges",challenges:null});return}const c=wp(a);t({state:"progress",challenges:a,flowType:c})}i()},[r,e.state,n]);const s=()=>{e.state==="progress"&&t({state:"success",challenges:e.challenges,flowType:e.flowType})},o=({error:i})=>{e.state==="progress"&&t({state:"error",challenges:e.challenges,flowType:e.flowType,error:i})};return l.jsxs(Uo,{children:[(r!=="ready"||e.state==="parsing-url")&&l.jsx(sp,{}),r==="ready"&&l.jsxs(l.Fragment,{children:[e.state==="progress"&&l.jsx(gp,{onSuccess:s,onError:o,flowType:e.flowType}),e.state==="no-challenges"&&l.jsx(_n,{type:"warning"}),e.state==="success"&&l.jsx(mp,{}),e.state==="error"&&l.jsx(_n,{type:"error"})]})]})}var xp="d0vxn40";const Zr={sdkURL:"https://cdn.valhalla.slashid.dev/sdk.html",baseURL:"https://api.valhalla.slashid.dev"};function Ep(){const e=ko(),[t,n]=x.useState("initial"),r=x.useRef(void 0);x.useEffect(()=>{t==="initial"&&(jf({dsn:"https://6435e8a20ba8b61404fb4621d2aedd4a@o4505317722619904.ingest.sentry.io/4506275681075200"}),r.current=new Be({analyticsEnabled:!1,sdkURL:Zr.sdkURL,baseURL:Zr.baseURL}),n("ready"))},[t]);const s=x.useMemo(()=>!e||t=="initial"?No:{logo:l.jsx(Oo,{}),language:Jh(),state:t,sdk:r.current},[t,e]);return l.jsx(fh,{theme:"light",children:l.jsx(zn,{fallback:l.jsx(Uo,{children:l.jsx(_n,{type:"error"})}),children:l.jsx(Mo.Provider,{value:s,children:l.jsx(Kh,{text:Po[s.language],children:l.jsx("main",{className:xp,children:l.jsx(yp,{})})})})})})}export{Ep as App};
|