/*! For license information please see 836.02b4f1b663494ef27b9e.js.LICENSE.txt */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a6f87a9b-5ac6-4ea0-9406-2db5c8668dbe",e._sentryDebugIdIdentifier="sentry-dbid-a6f87a9b-5ac6-4ea0-9406-2db5c8668dbe")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"e85561a43dd8c4958a2111955ccabc589d21aeac"},(self.webpackChunktadaam_tenant_v3=self.webpackChunktadaam_tenant_v3||[]).push([[836],{8100:(e,t,n)=>{"use strict";n.d(t,{D3:()=>ve,tw:()=>ye});var r=n(7294),o=n(5108),i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){A=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){A=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?setTimeout(n,t):n()}}window.addEventListener("storage",A),e.addToWaiting(A);var s=setTimeout(A,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,i,A;return r(this,(function(r){switch(r.label){case 0:return n=window.localStorage,i=o+"-"+t,null===(A=n.getItem(i))?[2]:(A=JSON.parse(A)).id!==this.id?[3,2]:[4,h.default().lock(A.iat)];case 1:r.sent(),this.acquiredIatSet.delete(A.iat),n.removeItem(i),h.default().unlock(A.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,A=0;ADate.now();class y extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,y.prototype)}static fromPayload({error:e,error_description:t}){return new y(e,t)}}class v extends y{constructor(e,t,n,r=null){super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,v.prototype)}}class w extends y{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,w.prototype)}}class B extends w{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,B.prototype)}}class C extends y{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,C.prototype)}}class b extends y{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,b.prototype)}}class E extends y{constructor(e,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${I(e,["default"])}', scope: '${I(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,E.prototype)}}function I(e,t=[]){return e&&!t.includes(e)?e:""}const x=()=>window.crypto,k=()=>{let e="";return Array.from(x().getRandomValues(new Uint8Array(43))).forEach((t=>e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[t%66])),e},S=e=>btoa(e),Q=e=>{var{clientId:t}=e,n=l(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter((t=>void 0!==e[t])).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]})),{}))(Object.assign({client_id:t},n))).toString()},D=e=>(e=>decodeURIComponent(atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),M=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json()}},F=async(e,t,n,r,o,i,A=1e4)=>o?(async(e,t,n,r,o,i,A)=>{return s={auth:{audience:t,scope:n},timeout:o,fetchUrl:e,fetchOptions:r,useFormData:A},a=i,new Promise((function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},a.postMessage(s,[n.port2])}));var s,a})(e,t,n,r,A,o,i):(async(e,t,n)=>{const r=new AbortController;let o;return t.signal=r.signal,Promise.race([M(e,t),new Promise(((e,t)=>{o=setTimeout((()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((()=>{clearTimeout(o)}))})(e,r,A);async function P(e,t){var{baseUrl:n,timeout:r,audience:o,scope:i,auth0Client:A,useFormData:s}=e,a=l(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const c=s?Q(a):JSON.stringify(a);return await async function(e,t,n,r,o,i,A){let s,a=null;for(let l=0;l<3;l++)try{s=await F(e,n,r,o,i,A,t),a=null;break}catch(e){a=e}if(a)throw a;const c=s.json,{error:u,error_description:d}=c,h=l(c,["error","error_description"]),{ok:g}=s;if(!g){const t=d||`HTTP error. Unable to fetch ${e}`;if("mfa_required"===u)throw new b(u,t,h.mfa_token);if("missing_refresh_token"===u)throw new E(n,r);throw new y(u||"request_error",t)}return h}(`${n}/oauth/token`,r,o||"default",i,{method:"POST",body:c,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(A||p))}},t,s)}const T=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};class Y{constructor(e,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,o]=e.split("::");return new Y({clientId:n,scope:o,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new Y({scope:t,audience:n,clientId:r})}}class R{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter((e=>e.startsWith("@@auth0spajs@@")))}}class j{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class O{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||m}async setIdToken(e,t,n){var r;const o=this.getIdTokenCacheKey(e);await this.cache.set(o,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(o))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0){var n;let r=await this.cache.get(e.toKey());if(!r){const t=await this.getCacheKeys();if(!t)return;const n=this.matchExistingCacheKey(e,t);n&&(r=await this.cache.get(n))}if(!r)return;const o=await this.nowProvider(),i=Math.floor(o/1e3);return r.expiresAt-t!e||t.includes(e))).reduce((async(e,t)=>{await e,await this.cache.remove(t)}),Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new Y({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter((t=>{var n;const r=Y.fromKey(t),o=new Set(r.scope&&r.scope.split(" ")),i=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],A=r.scope&&i.reduce(((e,t)=>e&&o.has(t)),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&A}))[0]}}class L{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const N=e=>"number"==typeof e,H=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var U=d((function(e,t){var n=c&&c.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;nJ.get(e)||J.get(`_legacy_${e}`),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),G(`_legacy_${e}`,JSON.stringify(t),r),J.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),z(e,n),J.remove(e,t),J.remove(`_legacy_${e}`,t)}},V={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var $,K=function(e){return $=$||function(){var e=function(e){var t=atob(e);return t}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9Y29uc3Qgcz1lPT57dmFye2NsaWVudElkOnR9PWUscj1mdW5jdGlvbihlLHQpe3ZhciByPXt9O2Zvcih2YXIgcyBpbiBlKU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLHMpJiZ0LmluZGV4T2Yocyk8MCYmKHJbc109ZVtzXSk7aWYobnVsbCE9ZSYmImZ1bmN0aW9uIj09dHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMpe3ZhciBvPTA7Zm9yKHM9T2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scyhlKTtvPHMubGVuZ3RoO28rKyl0LmluZGV4T2Yoc1tvXSk8MCYmT2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZS5jYWxsKGUsc1tvXSkmJihyW3Nbb11dPWVbc1tvXV0pfXJldHVybiByfShlLFsiY2xpZW50SWQiXSk7cmV0dXJuIG5ldyBVUkxTZWFyY2hQYXJhbXMoKGU9Pk9iamVjdC5rZXlzKGUpLmZpbHRlcigodD0+dm9pZCAwIT09ZVt0XSkpLnJlZHVjZSgoKHQscik9Pk9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSx0KSx7W3JdOmVbcl19KSkse30pKShPYmplY3QuYXNzaWduKHtjbGllbnRfaWQ6dH0scikpKS50b1N0cmluZygpfTtsZXQgbz17fTtjb25zdCBuPShlLHQpPT5gJHtlfXwke3R9YDthZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoYXN5bmMoe2RhdGE6e3RpbWVvdXQ6ZSxhdXRoOnIsZmV0Y2hVcmw6aSxmZXRjaE9wdGlvbnM6Yyx1c2VGb3JtRGF0YTphfSxwb3J0czpbZl19KT0+e2xldCBwO2NvbnN0e2F1ZGllbmNlOmwsc2NvcGU6dX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2NvbnN0IGU9KChlLHQpPT5vW24oZSx0KV0pKGwsdSk7aWYoIWUpdGhyb3cgbmV3IHQobCx1KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjplfSkpfWxldCBkLGc7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGQ9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1kLnNpZ25hbCk7dHJ5e2c9YXdhaXQgUHJvbWlzZS5yYWNlKFsoaD1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsaCkpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIGYucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFnKXJldHVybiBkJiZkLmFib3J0KCksdm9pZCBmLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO3A9YXdhaXQgZy5qc29uKCkscC5yZWZyZXNoX3Rva2VuPygoKGUsdCxyKT0+e29bbih0LHIpXT1lfSkocC5yZWZyZXNoX3Rva2VuLGwsdSksZGVsZXRlIHAucmVmcmVzaF90b2tlbik6KChlLHQpPT57ZGVsZXRlIG9bbihlLHQpXX0pKGwsdSksZi5wb3N0TWVzc2FnZSh7b2s6Zy5vayxqc29uOnB9KX1jYXRjaChlKXtmLnBvc3RNZXNzYWdlKHtvazohMSxqc29uOntlcnJvcjplLmVycm9yLGVycm9yX2Rlc2NyaXB0aW9uOmUubWVzc2FnZX19KX12YXIgaH0pKX0oKTsKCg=="),t=e.indexOf("\n",10)+1,n=e.substring(t)+"",r=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(r)}(),new Worker($,e)};const X={};class Z{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return`@@auth0spajs@@::${e}`}}const q={memory:()=>(new j).enclosedCache,localstorage:()=>new R},ee=e=>q[e],te=e=>{const{openUrl:t,onRedirect:n}=e,r=l(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},ne=new g;class re{constructor(e){let t,n;if(this.userCache=(new j).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await ne.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!x())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===x().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),e.cache&&e.cacheLocation&&o.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!ee(t))throw new Error(`Invalid cache location "${t}"`);n=ee(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?J:W,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(()=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:V;var i;this.scope=T("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new L(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||m,this.cacheManager=new O(n,n.allKeys?void 0:new Z(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:`https://${e}/`:`${t}/`)(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.worker=new K)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||p)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${Q(e)}`)}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,o]=t;if(3!==t.length||!n||!r||!o)throw new Error("ID token could not be decoded");const i=JSON.parse(D(r)),A={__raw:e},s={};return Object.keys(i).forEach((e=>{A[e]=i[e],H.includes(e)||(s[e]=i[e])})),{encoded:{header:n,payload:r,signature:o},header:JSON.parse(D(n)),claims:A,user:s}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!N(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!N(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!N(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(t.claims.exp+n),r>o)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${o})`);if(null!=t.claims.nbf&&N(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),ro)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${o}`)}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_id}"`)}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_name}"`)}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r});var o}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){const r=S(k()),o=S(k()),i=k(),A=(e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(e=>t[e]))})(window.btoa(String.fromCharCode(...Array.from(t))))})(await(async e=>{const t=x().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t})(i)),s=((e,t,n,r,o,i,A,s)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),n),{scope:T(t,n.scope),response_type:"code",response_mode:s||"query",state:r,nonce:o,redirect_uri:A||e.authorizationParams.redirect_uri,code_challenge:i,code_challenge_method:"S256"}))(this.options,this.scope,e,r,o,A,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,null==t?void 0:t.response_mode),a=this._authorizeUrl(s);return{nonce:o,code_verifier:i,scope:s.scope,audience:s.audience||"default",redirect_uri:s.redirect_uri,state:r,url:a}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${e},top=${t},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const o=await(e=>new Promise(((t,n)=>{let r;const o=setInterval((()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new C(e.popup)))}),1e3),i=setTimeout((()=>{clearInterval(o),n(new B(e.popup)),window.removeEventListener("message",r,!1)}),1e3*(e.timeoutInSeconds||60));r=function(A){if(A.data&&"authorization_response"===A.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),A.data.response.error)return n(y.fromPayload(A.data.response));t(A.data.response)}},window.addEventListener("message",r)})))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==o.state)throw new y("state_mismatch","Invalid state");const i=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:i})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(e={}){var t;const n=te(e),{openUrl:r,fragment:o,appState:i}=n,A=l(n,["openUrl","fragment","appState"]),s=(null===(t=A.authorizationParams)||void 0===t?void 0:t.organization)||this.options.authorizationParams.organization,a=await this._prepareAuthorizeUrl(A.authorizationParams||{}),{url:c}=a,u=l(a,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:i}),s&&{organization:s}));const d=o?`${c}#${o}`:c;r?await r(d):window.location.assign(d)}async handleRedirectCallback(e=window.location.href){const t=e.split("?").slice(1);if(0===t.length)throw new Error("There are no query params available for parsing.");const{state:n,code:r,error:o,error_description:i}=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(t.join("")),A=this.transactionManager.get();if(!A)throw new y("missing_transaction","Invalid state");if(this.transactionManager.remove(),o)throw new v(o,i||o,n,A.appState);if(!A.code_verifier||A.state&&A.state!==n)throw new y("state_mismatch","Invalid state");const s=A.organization,a=A.nonce,l=A.redirect_uri;return await this._requestToken(Object.assign({audience:A.audience,scope:A.scope,code_verifier:A.code_verifier,grant_type:"authorization_code",code:r},l?{redirect_uri:l}:{}),{nonceIn:a,organization:s}),{appState:A.appState}}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(e={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:T(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope)})}),r=await((e,t)=>{let n=X[t];return n||(n=e().finally((()=>{delete X[t],n=null})),X[t]=n),n})((()=>this._getTokenSilently(n)),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return e.detailedResponse?r:null==r?void 0:r.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=l(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}if("cache-only"!==t){if(!await(async(e,t=3)=>{for(let n=0;nne.acquireLock("auth0.lock.getTokenSilently",5e3)),10))throw new w;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,access_token:o,oauthTokenScope:i,expires_in:A}=e;return Object.assign(Object.assign({id_token:r,access_token:o},i?{scope:i}:null),{expires_in:A})}finally{await ne.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(e={},t={}){var n;const r=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:T(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope)})});return t=Object.assign(Object.assign({},f),t),await this.loginWithPopup(r,t),(await this.cacheManager.get(new Y({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=l(t,["federated"]),o=n?"&federated":"";return this._url(`/v2/logout?${Q(Object.assign({clientId:e.clientId},r))}`)+o}async logout(e={}){const t=te(e),{openUrl:n}=t,r=l(t,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const o=this._buildLogoutUrl(r);n?await n(o):!1!==n&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:o,nonce:i,code_verifier:A,redirect_uri:s,scope:a,audience:l}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new y("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,c=await((e,t,n=60)=>new Promise(((r,o)=>{const i=window.document.createElement("iframe");i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.display="none";const A=()=>{window.document.body.contains(i)&&(window.document.body.removeChild(i),window.removeEventListener("message",s,!1))};let s;const a=setTimeout((()=>{o(new w),A()}),1e3*n);s=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?o(y.fromPayload(e.data.response)):r(e.data.response),clearTimeout(a),window.removeEventListener("message",s,!1),setTimeout(A,2e3)},window.addEventListener("message",s,!1),window.document.body.appendChild(i),i.setAttribute("src",e)})))(r,this.domainUrl,n);if(o!==c.state)throw new y("state_mismatch","Invalid state");const u=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:A,code:c.code,grant_type:"authorization_code",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:i,organization:t.organization});return Object.assign(Object.assign({},u),{scope:a,oauthTokenScope:u.scope,audience:l})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Y({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new E(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null;try{const o=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}));return Object.assign(Object.assign({},o),{scope:e.authorizationParams.scope,oauthTokenScope:o.scope,audience:e.authorizationParams.audience||"default"})}catch(t){if((t.message.indexOf("Missing Refresh Token")>-1||t.message&&t.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=l(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new Y({clientId:this.options.clientId,audience:e,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:e,audience:t,clientId:n}){const r=await this.cacheManager.get(new Y({scope:e,audience:t,clientId:n}),60);if(r&&r.access_token){const{access_token:e,oauthTokenScope:t,expires_in:n}=r,o=await this._getIdTokenFromCache();return o&&Object.assign(Object.assign({id_token:o.id_token,access_token:e},t?{scope:t}:null),{expires_in:n})}}async _requestToken(e,t){const{nonceIn:n,organization:r}=t||{},o=await P(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},e),this.worker),i=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:i,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||i.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:i})}}var oe={isAuthenticated:!1,isLoading:!0},ie=function(){throw new Error("You forgot to wrap your component in .")},Ae=A(A({},oe),{buildAuthorizeUrl:ie,buildLogoutUrl:ie,getAccessTokenSilently:ie,getAccessTokenWithPopup:ie,getIdTokenClaims:ie,loginWithRedirect:ie,loginWithPopup:ie,logout:ie,handleRedirectCallback:ie}),se=(0,r.createContext)(Ae),ae=function(e){function t(n,r){var o=e.call(this,r||n)||this;return o.error=n,o.error_description=r,Object.setPrototypeOf(o,t.prototype),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),le=/[?&]code=[^&]+/,ce=/[?&]state=[^&]+/,ue=/[?&]error=[^&]+/,de=function(e){return function(t){return t instanceof Error?t:null!==t&&"object"==typeof t&&"error"in t&&"string"==typeof t.error?"error_description"in t&&"string"==typeof t.error_description?new ae(t.error,t.error_description):new ae(t.error):new Error(e)}},he=de("Login failed"),ge=de("Get access token failed"),fe=function(e){var t;(null==e?void 0:e.redirectUri)&&(o.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=e.authorizationParams||{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(t=null==e?void 0:e.authorizationParams)||void 0===t?void 0:t.redirectUri)&&(o.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},pe=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return A(A({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return A(A({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:A(A({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return A(A({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return A(A({},e),{isLoading:!1,error:t.error})}},me=function(e){window.history.replaceState({},document.title,(null==e?void 0:e.returnTo)||window.location.pathname)},ye=function(e){var t=e.children,n=e.skipRedirectCallback,o=e.onRedirectCallback,i=void 0===o?me:o,l=e.context,c=void 0===l?se:l,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{"use strict";n.d(t,{Ep:()=>d,J0:()=>a,LX:()=>k,RQ:()=>P,WK:()=>O,X3:()=>j,Zn:()=>Q,Zq:()=>M,aU:()=>r,cP:()=>h,fp:()=>f,lX:()=>s,pC:()=>F});var r,o=n(5108);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.removeEventListener(A,y),f=null}},createHref:e=>t(s,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){g=r.Push;let o=u(w.location,e,t);n&&n(o,e),p=m()+1;let i=c(o,p),A=w.createHref(o);try{h.pushState(i,"",A)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(A)}l&&f&&f({action:g,location:w.location,delta:1})},replace:function(e,t){g=r.Replace;let o=u(w.location,e,t);n&&n(o,e),p=m();let i=c(o,p),A=w.createHref(o);h.replaceState(i,"",A),l&&f&&f({action:g,location:w.location,delta:0})},go:e=>h.go(e)};return w}((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return u("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:d(t)}),null,e)}function a(e,t){if(!1===e||null==e)throw new Error(t)}function l(e,t){if(!e){void 0!==o&&o.warn(t);try{throw new Error(t)}catch(e){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,r){return void 0===n&&(n=null),i({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?h(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var g;function f(e,t,n){void 0===n&&(n="/");let r=Q(("string"==typeof t?h(t):t).pathname||"/",n);if(null==r)return null;let o=p(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let e=0;null==i&&e{let A={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};A.relativePath.startsWith("/")&&(a(A.relativePath.startsWith(r),'Absolute route path "'+A.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),A.relativePath=A.relativePath.slice(r.length));let s=P([r,A.relativePath]),l=n.concat(A);e.children&&e.children.length>0&&(a(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),p(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:I(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of m(e.path))o(e,t,n);else o(e,t)})),t}function m(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let A=m(r.join("/")),s=[];return s.push(...A.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...A),s.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const y=/^:\w+$/,v=3,w=2,B=1,C=10,b=-2,E=e=>"*"===e;function I(e,t){let n=e.split("/"),r=n.length;return n.some(E)&&(r+=b),t&&(r+=w),n.filter((e=>!E(e))).reduce(((e,t)=>e+(y.test(t)?v:""===t?B:C)),r)}function x(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],A=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";A=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const a=s[n];return e[r]=o&&!a?void 0:function(e,t){try{return decodeURIComponent(e)}catch(n){return l(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(a||"",r),e}),{}),pathname:i,pathnameBase:A,pattern:e}}function S(e){try{return decodeURI(e)}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Q(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function D(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function M(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=h(e):(o=i({},e),a(!o.pathname||!o.pathname.includes("?"),D("?","pathname","search",o)),a(!o.pathname||!o.pathname.includes("#"),D("#","pathname","hash",o)),a(!o.search||!o.search.includes("#"),D("#","search","hash",o)));let A,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(r||null==l)A=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}A=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?h(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Y(r),hash:R(o)}}(o,A),u=l&&"/"!==l&&l.endsWith("/"),d=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}const P=e=>e.join("/").replace(/\/\/+/g,"/"),T=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",R=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class j extends Error{}function O(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const L=["post","put","patch","delete"],N=(new Set(L),["get",...L]);new Set(N),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},5363:(e,t,n)=>{"use strict";n.d(t,{PR:()=>b,to:()=>I,$A:()=>E,_j:()=>x});var r=n(2343),o=n(1738),i=n(7513);const A=(e,t,n)=>{let r,o;return i=>{t.value>=0&&(i||n)&&(o=t.value-(r||0),(o||void 0===r)&&(r=t.value,t.delta=o,e(t)))}};var s=n(3821);const a=()=>s.WINDOW.__WEB_VITALS_POLYFILL__?s.WINDOW.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=s.WINDOW.performance.timing,t=s.WINDOW.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n})()):s.WINDOW.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],l=()=>{const e=a();return e&&e.activationStart||0},c=(e,t)=>{const n=a();let r="navigate";return n&&(r=s.WINDOW.document.prerendering||l()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},u=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{t(e.getEntries())}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}};var d=n(188);const h=e=>{const t=c("CLS",0);let n,r=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const i=o[0],A=o[o.length-1];r&&0!==o.length&&e.startTime-A.startTime<1e3&&e.startTime-i.startTime<5e3?(r+=e.value,o.push(e)):(r=e.value,o=[e]),r>t.value&&(t.value=r,t.entries=o,n&&n())}}))},s=u("layout-shift",i);if(s){n=A(e,t);const r=()=>{i(s.takeRecords()),n(!0)};return(0,d.u)(r),r}};var g=n(5029);const f=e=>{const t=(0,g.Y)(),n=c("FID");let r;const o=e=>{e.startTime{e.forEach(o)},s=u("first-input",i);r=A(e,n),s&&(0,d.u)((()=>{i(s.takeRecords()),s.disconnect()}),!0)},p={},m=e=>{const t=(0,g.Y)(),n=c("LCP");let r;const o=e=>{const o=e[e.length-1];if(o){const e=Math.max(o.startTime-l(),0);e{p[n.id]||(o(i.takeRecords()),i.disconnect(),p[n.id]=!0,r(!0))};return["keydown","click"].forEach((e=>{addEventListener(e,t,{once:!0,capture:!0})})),(0,d.u)(t,!0),t}},y={},v={};let w,B,C;function b(e,t=!1){return M("cls",e,S,w,t)}function E(e,t=!1){return M("lcp",e,D,C,t)}function I(e){return M("fid",e,Q,B)}function x(e,t){return F(e,t),v[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),u(e,(t=>{k(e,{entries:t})}),t)}(e),v[e]=!0),P(e,t)}function k(e,t){const n=y[e];if(n&&n.length)for(const A of n)try{A(t)}catch(t){i.X&&r.kg.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${(0,o.$P)(A)}\nError:`,t)}}function S(){return h((e=>{k("cls",{metric:e}),w=e}))}function Q(){return f((e=>{k("fid",{metric:e}),B=e}))}function D(){return m((e=>{k("lcp",{metric:e}),C=e}))}function M(e,t,n,r,o=!1){let i;return F(e,t),v[e]||(i=n(),v[e]=!0),r&&t({metric:r}),P(e,t,o?i:void 0)}function F(e,t){y[e]=y[e]||[],y[e].push(t)}function P(e,t,n){return()=>{n&&n();const r=y[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}},3821:(e,t,n)=>{"use strict";n.d(t,{WINDOW:()=>r});const r=n(1235).GLOBAL_OBJ},5029:(e,t,n)=>{"use strict";n.d(t,{Y:()=>A});var r=n(3821),o=n(188);let i=-1;const A=()=>(i<0&&(i="hidden"!==r.WINDOW.document.visibilityState||r.WINDOW.document.prerendering?1/0:0,(0,o.u)((({timeStamp:e})=>{i=e}),!0)),{get firstHiddenTime(){return i}})},188:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var r=n(3821);const o=(e,t)=>{const n=o=>{"pagehide"!==o.type&&"hidden"!==r.WINDOW.document.visibilityState||(e(o),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}},7513:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},6891:(e,t,n)=>{"use strict";n.d(t,{Wz:()=>l,m9:()=>s,re:()=>c});var r=n(4487),o=n(1235),i=n(535),A=n(2844);const s=o.GLOBAL_OBJ;let a=0;function l(){return a>0}function c(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if((0,i.HK)(e))return e}catch(t){return e}const o=function(){const o=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const r=o.map((e=>c(e,t)));return e.apply(this,r)}catch(e){throw a++,setTimeout((()=>{a--})),(0,r.$e)((n=>{n.addEventProcessor((e=>(t.mechanism&&((0,A.Db)(e,void 0,void 0),(0,A.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:o},e))),(0,r.Tb)(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}catch(e){}(0,i.$Q)(o,e),(0,i.xp)(e,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:()=>e.name})}catch(e){}return o}},807:(e,t,n)=>{"use strict";n.d(t,{W:()=>v,Q:()=>C});var r=n(292),o=n(2343),i=n(2844),A=n(7597),s=n(6893),a=n(8725),l=n(409),c=n(535);var u=n(1703),d=n(4487),h=n(5659),g=n(2967);var f=n(9015),p=n(454),m=n(8942);const y="Not capturing exception because it's already been captured.";class v{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=(0,r.vK)(e.dsn):u.X&&o.kg.warn("No DSN provided, client will not send events."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return(0,c._j)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,r)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if((0,i.YO)(e))return void(u.X&&o.kg.log(y));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let o=n&&n.event_id;const i=(0,A.Le)(e)?e:String(e),s=(0,A.pt)(e)?this.eventFromMessage(i,t,n):this.eventFromException(e,n);return this._process(s.then((e=>this._captureEvent(e,n,r))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&(0,i.YO)(t.originalException))return void(u.X&&o.kg.log(y));let r=t&&t.event_id;const A=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,A||n).then((e=>{r=e}))),r}captureSession(e){"string"!=typeof e.release?u.X&&o.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,f.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):(0,s.WD)(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return u.X&&o.kg.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];(0,g.m7)(this,e,this._integrations),t||(0,g.uf)(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=(0,a.HY)(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){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,n&&n.sdk);const A=(0,a.Cd)(e,o,r,t);delete e.sdkProcessingMetadata;const s=[{type:i},e];return(0,a.Jd)(A,[s])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=(0,a.BO)(n,(0,a.zQ)(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,o){const i=(0,a.HY)(n),A={sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!o&&t&&{dsn:(0,r.RA)(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return(0,a.Jd)(A,[s])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;u.X&&o.kg.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(e){u.X&&o.kg.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=function(e,t,n,o){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),o&&t&&(i.dsn=(0,r.RA)(t));const A=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map((([e,t])=>`${e}:${t}`)).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return(0,a.Jd)(i,[A])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=(0,g.q4)(this,e),(0,g.uf)(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&((0,f.CT)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new s.cW((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=(0,h.aF)()){const o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),(0,m.R)(o,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if((!e.contexts||!e.contexts.trace)&&t){const{traceId:r,spanId:o,parentSpanId:i,dsc:A}=t;e.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...e.contexts};const s=A||(0,p._)(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(u.X){const t=e;"log"===t.logLevel?o.kg.log(t.message):o.kg.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,i=B(e),a=w(e),c=e.type||"error",u=`before send for type \`${c}\``;if(a&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),(0,s.$2)(new l.b(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d="replay_event"===c?"replay":c,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,h).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",d,e),new l.b("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n){const{beforeSend:r,beforeSendTransaction:o}=e;return w(t)&&r?r(t,n):B(t)&&o?o(t,n):t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if((0,A.J8)(e))return e.then((e=>{if(!(0,A.PO)(e)&&null!==e)throw new l.b(n);return e}),(e=>{throw new l.b(`${t} rejected with ${e}`)}));if(!(0,A.PO)(e)&&null!==e)throw new l.b(n);return e}(o,u)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",d,e),new l.b(`${u} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const A=r.transaction_info;if(i&&A&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...A,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof l.b)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new l.b(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,(e=>{u.X&&o.kg.error("Error while sending event:",e)}));u.X&&o.kg.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function w(e){return void 0===e.type}function B(e){return"transaction"===e.type}function C(e){const t=(0,d.s3)();t&&t.addEventProcessor&&t.addEventProcessor(e)}},1131:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});const r="production"},1703:(e,t,n)=>{"use strict";n.d(t,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},1195:(e,t,n)=>{"use strict";n.d(t,{RP:()=>c,cc:()=>l,fH:()=>a});var r=n(1235),o=n(6893),i=n(2343),A=n(7597),s=n(1703);function a(){return(0,r.Y)("globalEventProcessors",(()=>[]))}function l(e){a().push(e)}function c(e,t,n,r=0){return new o.cW(((o,a)=>{const l=e[r];if(null===t||"function"!=typeof l)o(t);else{const u=l({...t},n);s.X&&l.id&&null===u&&i.kg.log(`Event processor "${l.id}" dropped event`),(0,A.J8)(u)?u.then((t=>c(e,t,n,r+1).then(o))).then(null,a):c(e,u,n,r+1).then(o).then(null,a)}}))}},4487:(e,t,n)=>{"use strict";n.d(t,{$e:()=>d,Tb:()=>a,cg:()=>y,eN:()=>l,nZ:()=>g,n_:()=>c,s3:()=>h,v:()=>u,yj:()=>f});var r=n(1235),o=n(1131),i=n(5659),A=n(9015),s=n(8942);function a(e,t){return(0,i.Gd)().captureException(e,(0,s.U0)(t))}function l(e,t){return(0,i.Gd)().captureEvent(e,t)}function c(e,t){(0,i.Gd)().addBreadcrumb(e,t)}function u(e,t){(0,i.Gd)().setContext(e,t)}function d(...e){const t=(0,i.Gd)();if(2===e.length){const[n,r]=e;return n?t.withScope((()=>(t.getStackTop().scope=n,r(n)))):t.withScope(r)}return t.withScope(e[0])}function h(){return(0,i.Gd)().getClient()}function g(){return(0,i.Gd)().getScope()}function f(e){const t=h(),n=(0,i.aF)(),s=g(),{release:a,environment:l=o.J}=t&&t.getOptions()||{},{userAgent:c}=r.GLOBAL_OBJ.navigator||{},u=(0,A.Hv)({release:a,environment:l,user:s.getUser()||n.getUser(),...c&&{userAgent:c},...e}),d=n.getSession();return d&&"ok"===d.status&&(0,A.CT)(d,{status:"exited"}),p(),n.setSession(u),s.setSession(u),u}function p(){const e=(0,i.aF)(),t=g(),n=t.getSession()||e.getSession();n&&(0,A.RJ)(n),m(),e.setSession(),t.setSession()}function m(){const e=(0,i.aF)(),t=g(),n=h(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function y(e=!1){e?p():m()}},5659:(e,t,n)=>{"use strict";n.d(t,{Gd:()=>y,aF:()=>v,cu:()=>p});var r=n(7597),o=n(2844),i=n(1170),A=n(2343),s=n(1235),a=n(1131),l=n(1703),c=n(350),u=n(9015),d=n(105);const h=parseFloat(d.J),g=100;class f{constructor(e,t,n,r=h){let o,i;this._version=r,t?o=t:(o=new c.sX,o.setClient(e)),n?i=n:(i=new c.sX,i.setClient(e)),this._stack=[{scope:o}],e&&this.bindClient(e),this._isolationScope=i}isOlderThan(e){return this._version(this.popScope(),e)),(e=>{throw this.popScope(),e})):(this.popScope(),n)}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(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:(0,o.DM)(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:(0,o.DM)(),i=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:(0,o.DM)();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=g}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:(0,i.yW)(),...e},l=o?(0,A.Cf)((()=>o(a,t))):a;null!==l&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,s))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=m(this);try{e(this)}finally{m(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return l.X&&A.kg.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return l.X&&!n&&(this.getClient()?A.kg.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):A.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&(0,u.RJ)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:o=a.J}=n&&n.getOptions()||{},{userAgent:i}=s.GLOBAL_OBJ.navigator||{},A=(0,u.Hv)({release:r,environment:o,user:t.getUser(),...i&&{userAgent:i},...e}),l=t.getSession&&t.getSession();return l&&"ok"===l.status&&(0,u.CT)(l,{status:"exited"}),this.endSession(),t.setSession(A),A}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=p().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);l.X&&A.kg.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function p(){return s.GLOBAL_OBJ.__SENTRY__=s.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},s.GLOBAL_OBJ}function m(e){const t=p(),n=w(t);return B(t,e),n}function y(){const e=p();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=p()){return t=e,!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)&&!w(e).isOlderThan(h)||B(e,new f),w(e);var t}(e)}function v(){return y().getIsolationScope()}function w(e){return(0,s.Y)("hub",(()=>new f),e)}function B(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}},2967:(e,t,n)=>{"use strict";n.d(t,{RN:()=>h,_I:()=>g,m7:()=>d,m8:()=>l,q4:()=>c,uf:()=>u});var r=n(2844),o=n(2343),i=n(1703),A=n(1195),s=n(5659);const a=[];function l(e){const t=e.defaultIntegrations||[],n=e.integrations;let o;t.forEach((e=>{e.isDefaultInstance=!0})),o=Array.isArray(n)?[...t,...n]:"function"==typeof n?(0,r.lE)(n(t)):t;const i=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(o),A=function(e){for(let t=0;t{t&&d(e,t,n)})),n}function u(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function d(e,t,n){if(n[t.name])i.X&&o.kg.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===a.indexOf(t.name)&&(t.setupOnce(A.cc,s.Gd),a.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}i.X&&o.kg.log(`Integration installed: ${t.name}`)}}function h(e,t){return Object.assign((function(...e){return t(...e)}),{id:e})}function g(e){return e}},350:(e,t,n)=>{"use strict";n.d(t,{lW:()=>d,sX:()=>u});var r=n(7597),o=n(1170),i=n(2844),A=n(2343),s=n(1195),a=n(9015),l=n(3379);let c;class u{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=h()}static clone(e){return e?e.clone():new u}clone(){const e=new u;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&(0,a.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof u?t:this}return e instanceof u?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):(0,r.PO)(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.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=h(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:(0,o.yW)(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:o,_user:i,_level:A,_fingerprint:s,_eventProcessors:a,_propagationContext:l,_sdkProcessingMetadata:c,_transactionName:u,_span:d}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:o,user:i,level:A,fingerprint:s||[],eventProcessors:a,propagationContext:l,sdkProcessingMetadata:c,transactionName:u,span:d}}applyToEvent(e,t={},n=[]){(0,l.gi)(e,this.getScopeData());const r=[...n,...(0,s.fH)(),...this._eventProcessors];return(0,s.RP)(r,e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:(0,i.DM)();if(!this._client)return A.kg.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:(0,i.DM)();if(!this._client)return A.kg.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:(0,i.DM)();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(A.kg.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}function d(){return c||(c=new u),c}function h(){return{traceId:(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}},6754:(e,t,n)=>{"use strict";n.d(t,{$J:()=>i,S3:()=>A,TE:()=>o,Zj:()=>r});const r="sentry.source",o="sentry.sample_rate",i="sentry.op",A="sentry.origin"},9015:(e,t,n)=>{"use strict";n.d(t,{CT:()=>s,Hv:()=>A,RJ:()=>a});var r=n(1170),o=n(2844),i=n(535);function A(e){const t=(0,r.ph)(),n={sid:(0,o.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return(0,i.Jr)({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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}})}(n)};return e&&s(n,e),n}function s(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||(0,r.ph)(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:(0,o.DM)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t: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),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function a(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),s(e,n)}},454:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,j:()=>l});var r=n(535),o=n(1131),i=n(4487),A=n(5102),s=n(3371);function a(e,t,n){const i=t.getOptions(),{publicKey:A}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=(0,r.Jr)({environment:i.environment||o.J,release:i.release,user_segment:s,public_key:A,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function l(e){const t=(0,i.s3)();if(!t)return{};const n=a((0,s.XU)(e).trace_id||"",t,(0,i.nZ)()),r=(0,A.G)(e);if(!r)return n;const o=r&&r._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:l,source:c}=r.metadata;null!=l&&(n.sample_rate=`${l}`);const u=(0,s.XU)(r);return c&&"url"!==c&&(n.transaction=u.description),n.sampled=String((0,s.Tt)(r)),t.emit&&t.emit("createDsc",n),n}},3379:(e,t,n)=>{"use strict";n.d(t,{gi:()=>a,yo:()=>l});var r=n(535),o=n(2844),i=n(454),A=n(5102),s=n(3371);function a(e,t){const{fingerprint:n,span:a,breadcrumbs:l,sdkProcessingMetadata:c}=t;!function(e,t){const{extra:n,tags:o,user:i,contexts:A,level:s,transactionName:a}=t,l=(0,r.Jr)(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=(0,r.Jr)(o);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const u=(0,r.Jr)(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=(0,r.Jr)(A);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),a&&(e.transaction=a)}(e,t),a&&function(e,t){e.contexts={trace:(0,s.wy)(t),...e.contexts};const n=(0,A.G)(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:(0,i.j)(t),...e.sdkProcessingMetadata};const r=(0,s.XU)(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,a),function(e,t){e.fingerprint=e.fingerprint?(0,o.lE)(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,l),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,c)}function l(e,t){const{extra:n,tags:r,user:o,contexts:i,level:A,sdkProcessingMetadata:s,breadcrumbs:a,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:h,transactionName:g,span:f}=t;c(e,"extra",n),c(e,"tags",r),c(e,"user",o),c(e,"contexts",i),c(e,"sdkProcessingMetadata",s),A&&(e.level=A),g&&(e.transactionName=g),f&&(e.span=f),a.length&&(e.breadcrumbs=[...e.breadcrumbs,...a]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function c(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])}}},5102:(e,t,n)=>{"use strict";function r(e){return e.transaction}n.d(t,{G:()=>r})},8942:(e,t,n)=>{"use strict";n.d(t,{R:()=>h,U0:()=>f});var r=n(2844),o=n(1170),i=n(7321),A=n(1235),s=n(8007),a=n(1131),l=n(1195),c=n(350),u=n(3379),d=n(3371);function h(e,t,n,h,f,p){const{normalizeDepth:m=3,normalizeMaxBreadth:y=1e3}=e,v={...t,event_id:t.event_id||n.event_id||(0,r.DM)(),timestamp:t.timestamp||(0,o.yW)()},w=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:A=250}=t;"environment"in e||(e.environment="environment"in t?n:a.J),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=(0,i.$G)(e.message,A));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=(0,i.$G)(s.value,A));const l=e.request;l&&l.url&&(l.url=(0,i.$G)(l.url,A))}(v,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(v,w),void 0===t.type&&function(e,t){const n=A.GLOBAL_OBJ._sentryDebugIds;if(!n)return;let r;const o=g.get(t);o?r=o:(r=new Map,g.set(t,r));const i=Object.keys(n).reduce(((e,o)=>{let i;const A=r.get(o);A?i=A:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.filename){e[r.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=i[e.filename])}))}))}catch(e){}}(v,e.stackParser);const B=function(e,t){if(!t)return e;const n=e?e.clone():new c.sX;return n.update(t),n}(h,n.captureContext);n.mechanism&&(0,r.EG)(v,n.mechanism);const C=f&&f.getEventProcessors?f.getEventProcessors():[],b=(0,c.lW)().getScopeData();if(p){const e=p.getScopeData();(0,u.yo)(b,e)}if(B){const e=B.getScopeData();(0,u.yo)(b,e)}const E=[...n.attachments||[],...b.attachments];E.length&&(n.attachments=E),(0,u.gi)(v,b);const I=[...C,...(0,l.fH)(),...b.eventProcessors];return(0,l.RP)(I,v,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)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((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof m&&m>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:(0,s.Fv)(e.data,t,n)}})))},...e.user&&{user:(0,s.Fv)(e.user,t,n)},...e.contexts&&{contexts:(0,s.Fv)(e.contexts,t,n)},...e.extra&&{extra:(0,s.Fv)(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=(0,s.Fv)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>{const r=(0,d.XU)(e).data;return r&&(e.data=(0,s.Fv)(r,t,n)),e}))),r}(e,m,y):e)))}const g=new WeakMap;function f(e){if(e)return function(e){return e instanceof c.sX||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>p.includes(e)))}(e)?{captureContext:e}:e}const p=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},3371:(e,t,n)=>{"use strict";n.d(t,{$k:()=>c,Hb:()=>l,Tt:()=>h,XU:()=>d,i0:()=>s,ve:()=>A,wy:()=>a});var r=n(535),o=n(7638),i=n(1170);const A=0,s=1;function a(e){const{spanId:t,traceId:n}=e.spanContext(),{data:o,op:i,parent_span_id:A,status:s,tags:a,origin:l}=d(e);return(0,r.Jr)({data:o,op:i,parent_span_id:A,span_id:t,status:s,tags:a,trace_id:n,origin:l})}function l(e){const{traceId:t,spanId:n}=e.spanContext(),r=h(e);return(0,o.$p)(t,n,r)}function c(e){return"number"==typeof e?u(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?u(e.getTime()):(0,i.ph)()}function u(e){return e>9999999999?e/1e3:e}function d(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function h(e){const{traceFlags:t}=e.spanContext();return Boolean(t&s)}},105:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});const r="7.100.1"},223:(e,t,n)=>{"use strict";n.d(t,{g3:()=>Me,H0:()=>Te});var r,o=n(2343),i=n(1170),A=n(1703),s=n(3371),a=n(2844),l=n(535),c=n(6754),u=n(5102);function d(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);"unknown_error"!==n&&e.setStatus(n)}!function(e){e.Ok="ok",e.DeadlineExceeded="deadline_exceeded",e.Unauthenticated="unauthenticated",e.PermissionDenied="permission_denied",e.NotFound="not_found",e.ResourceExhausted="resource_exhausted",e.InvalidArgument="invalid_argument",e.Unimplemented="unimplemented",e.Unavailable="unavailable",e.InternalError="internal_error",e.UnknownError="unknown_error",e.Cancelled="cancelled",e.AlreadyExists="already_exists",e.FailedPrecondition="failed_precondition",e.Aborted="aborted",e.OutOfRange="out_of_range",e.DataLoss="data_loss"}(r||(r={}));class h{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class g{constructor(e={}){this._traceId=e.traceId||(0,a.DM)(),this._spanId=e.spanId||(0,a.DM)().substring(16),this._startTime=e.startTimestamp||(0,i.ph)(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[c.S3]:e.origin||"manual",[c.$J]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp)}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[c.$J]}set op(e){this.setAttribute(c.$J,e)}get origin(){return this._attributes[c.S3]}set origin(e){this.setAttribute(c.S3,e)}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?s.i0:s.ve}}startChild(e){const t=new g({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);const n=(0,u.G)(this);if(t.transaction=n,A.X&&n){const r=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${(0,s.XU)(t).description||"< unknown name >"}' (${n.spanContext().spanId}).`;o.kg.log(r),this._logMessage=r}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach((t=>this.setAttribute(t,e[t])))}setStatus(e){return this._status=e,this}setHttpStatus(e){return d(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;const t=(0,u.G)(this);if(A.X&&t&&t.spanContext().spanId!==this._spanId){const e=this._logMessage;e&&o.kg.log(e.replace("Starting","Finishing"))}this._endTime=(0,s.$k)(e)}toTraceparent(){return(0,s.Hb)(this)}toContext(){return(0,l.Jr)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return(0,s.wy)(this)}getSpanJSON(){return(0,l.Jr)({data:this._getData(),description:this._name,op:this._attributes[c.$J],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[c.S3]})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(n||r)return n&&r?{...e,...t}:n?e:t}}var f=n(5659),p=n(454),m=n(4487);function y(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=(0,m.s3)(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function v(e){if(!y())return;const t=function(e){if(e.startTime){const t={...e};return t.startTimestamp=(0,s.$k)(e.startTime),delete t.startTime,t}return e}(e),n=(0,f.Gd)(),r=e.scope?e.scope.getSpan():w();if(e.onlyIfParent&&!r)return;const o=(0,f.aF)(),i=(0,m.nZ)();let A;if(r)A=r.startChild(t);else{const{traceId:e,dsc:r,parentSpanId:s,sampled:a}={...o.getPropagationContext(),...i.getPropagationContext()};A=n.startTransaction({traceId:e,parentSpanId:s,parentSampled:a,...t,metadata:{dynamicSamplingContext:r,...t.metadata}})}return function(e,t,n){e&&((0,l.xp)(e,C,n),(0,l.xp)(e,B,t))}(A,i,o),A}function w(){return(0,m.nZ)().getSpan()}const B="_sentryScope",C="_sentryIsolationScope";class b extends g{constructor(e,t){super(e),this._measurements={},this._contexts={},this._hub=t||(0,f.Gd)(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[c.Zj]&&{source:this._attributes[c.Zj]},...this._attributes[c.TE]&&{sampleRate:this._attributes[c.TE]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(c.Zj,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new h(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const t=(0,s.$k)(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){const e=super.toContext();return(0,l.Jr)({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return(0,p.j)(this)}setHub(e){this._hub=e}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(A.X&&o.kg.warn("Transaction has no name, falling back to ``."),this._name=""),super.end(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled)return A.X&&o.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&(0,s.XU)(e).timestamp)):[];if(this._trimEnd&&n.length>0){const e=n.map((e=>(0,s.XU)(e).timestamp)).filter(Boolean);this._endTime=e.reduce(((e,t)=>e>t?e:t))}const{scope:r,isolationScope:i}={scope:this[B],isolationScope:this[C]};const{metadata:a}=this,{source:l}=a,c={contexts:{...this._contexts,trace:(0,s.wy)(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:i,dynamicSamplingContext:(0,p.j)(this)},...l&&{transaction_info:{source:l}}};return Object.keys(this._measurements).length>0&&(A.X&&o.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),A.X&&o.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const E={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},I=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class x extends h{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),void 0===(0,s.XU)(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class k extends b{constructor(e,t,n=E.idleTimeout,r=E.finalTimeout,i=E.heartbeatInterval,s=!1,a=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=I[4],this._autoFinishAllowed=!a,s&&(A.X&&o.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=I[3],this.end())}),this._finalTimeout)}end(e){const t=(0,s.$k)(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){A.X&&o.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;(0,s.XU)(e).timestamp||(e.setStatus("cancelled"),e.end(t),A.X&&o.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const{start_timestamp:n,timestamp:r}=(0,s.XU)(e),i=n&&n{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new x(t,n,this.spanContext().spanId,e),A.X&&o.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=I[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(A.X&&o.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=I[1],this.end(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),A.X&&o.kg.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,A.X&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(A.X&&o.kg.log(`[Tracing] popActivity ${e}`),delete this.activities[e],A.X&&o.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=(0,i.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=I[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(A.X&&o.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=I[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){A.X&&o.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}var S=n(1674),Q=n(7373);function D(e){return(e||(0,f.Gd)()).getScope().getTransaction()}let M=!1;function F(){const e=D();if(e){const t="internal_error";A.X&&o.kg.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}F.tag="sentry_tracingErrorCallback";var P=n(7597);function T(e,t,n){if(!y(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setAttribute(c.TE,Number(e.sampled)),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setAttribute(c.TE,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(c.TE,Number(r))):(r=1,e.setAttribute(c.TE,r)),i=r,((0,P.i2)(i)||"number"!=typeof i&&"boolean"!=typeof i?(A.X&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(A.X&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(e.sampled=Math.random()t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function V(e){return e/1e3}function $(){return U.WINDOW&&U.WINDOW.addEventListener&&U.WINDOW.performance}let K,X,Z=0,q={};function ee(e,t,n,r,o,i){const A=i?t[i]:t[`${n}End`],s=t[`${n}Start`];s&&A&&W(e,{op:"browser",origin:"auto.browser.browser.metrics",description:o||n,startTimestamp:r+V(s),endTimestamp:r+V(A)})}function te(e,t,n,r){const o=t[n];null!=o&&o<2147483647&&(e[r]=o)}var ne=n(1394),re=n(5322),oe=n(7321),ie=n(9181);const Ae=["localhost",/^\/(?!\/)/],se={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Ae,tracePropagationTargets:Ae};function ae(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:o,shouldCreateSpanForRequest:i,enableHTTPTimings:A}={traceFetch:se.traceFetch,traceXHR:se.traceXHR,...e},a="function"==typeof i?i:e=>!0,l=e=>function(e,t){return(0,oe.U0)(e,t||Ae)}(e,r||o),u={};t&&(0,ne.U)((e=>{const t=function(e,t,n,r,o="auto.http.browser"){if(!y()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const t=e.fetchData.__span;if(!t)return;const n=r[t];if(n){if(e.response){d(n,e.response.status);const t=e.response&&e.response.headers&&e.response.headers.get("content-length");if(t){const e=parseInt(t);e>0&&n.setAttribute("http.response_content_length",e)}}else e.error&&n.setStatus("internal_error");n.end(),delete r[t]}return}const A=(0,m.nZ)(),a=(0,m.s3)(),{method:l,url:u}=e.fetchData,h=i?v({name:`${l} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":l,[c.S3]:o},op:"http.client"}):void 0;if(h&&(e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),n(e.fetchData.url)&&a){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,r,o){const i=o||n.getSpan(),A=(0,f.aF)(),{traceId:a,spanId:l,sampled:c,dsc:u}={...A.getPropagationContext(),...n.getPropagationContext()},d=i?(0,s.Hb)(i):(0,O.$p)(a,l,c),h=(0,ie.IQ)(u||(i?(0,p.j)(i):(0,p._)(a,t,n))),g=r.headers||("undefined"!=typeof Request&&(0,P.V9)(e,Request)?e.headers:void 0);if(g){if("undefined"!=typeof Headers&&(0,P.V9)(g,Headers)){const e=new Headers(g);return e.append("sentry-trace",d),h&&e.append(ie.bU,h),e}if(Array.isArray(g)){const e=[...g,["sentry-trace",d]];return h&&e.push([ie.bU,h]),e}{const e="baggage"in g?g.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),h&&t.push(h),{...g,"sentry-trace":d,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":d,baggage:h}}(t,a,A,n,h)}return h}(e,a,l,u);A&&t&&le(t)})),n&&(0,re.UK)((e=>{const t=function(e,t,n,r){const o=e.xhr,i=o&&o[re.xU];if(!y()||!o||o.__sentry_own_request__||!i)return;const A=t(i.url);if(e.endTimestamp&&A){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==i.status_code&&(d(t,i.status_code),t.end(),delete r[e]))}const a=(0,m.nZ)(),l=(0,f.aF)(),u=A?v({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,url:i.url,[c.S3]:"auto.http.browser"},op:"http.client"}):void 0;u&&(o.__sentry_xhr_span_id__=u.spanContext().spanId,r[o.__sentry_xhr_span_id__]=u);const h=(0,m.s3)();if(o.setRequestHeader&&n(i.url)&&h){const{traceId:e,spanId:t,sampled:n,dsc:r}={...l.getPropagationContext(),...a.getPropagationContext()};!function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(ie.bU,n)}catch(e){}}(o,u?(0,s.Hb)(u):(0,O.$p)(e,t,n),(0,ie.IQ)(r||(u?(0,p.j)(u):(0,p._)(e,h,a))))}return u}(e,a,l,u);A&&t&&le(t)}))}function le(e){const{url:t}=(0,s.XU)(e).data||{};if(!t||"string"!=typeof t)return;const n=(0,G._j)("resource",(({entries:r})=>{r.forEach((r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),i.Z1?[...r,["http.request.redirect_start",ce(e.redirectStart)],["http.request.fetch_start",ce(e.fetchStart)],["http.request.domain_lookup_start",ce(e.domainLookupStart)],["http.request.domain_lookup_end",ce(e.domainLookupEnd)],["http.request.connect_start",ce(e.connectStart)],["http.request.secure_connection_start",ce(e.secureConnectionStart)],["http.request.connection_end",ce(e.connectEnd)],["http.request.request_start",ce(e.requestStart)],["http.request.response_start",ce(e.responseStart)],["http.request.response_end",ce(e.responseEnd)]]:r}(r).forEach((t=>e.setAttribute(...t))),setTimeout(n))}))}))}function ce(e=0){return((i.Z1||performance.timeOrigin)+e)/1e3}const ue={...E,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,_experiments:{},...se},de=(e={})=>{const t=!(!H.X||!e.tracePropagationTargets&&!e.tracingOrigins);(function(){const e=(0,f.cu)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=R),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Y),M||(M=!0,(0,S.V)(F),(0,Q.h)(F)))})(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);const n={...ue,...e},r=function(){const e=$();if(e&&i.Z1){e.mark&&U.WINDOW.performance.mark("sentry-tracing-init");const t=(0,G.to)((({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=V(i.Z1),r=V(t.startTime);H.X&&o.kg.log("[Measurements] Adding FID"),q.fid={value:e.value,unit:"millisecond"},q["mark.fid"]={value:n+r,unit:"second"}})),n=(0,G.PR)((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(H.X&&o.kg.log("[Measurements] Adding CLS"),q.cls={value:e.value,unit:""},X=t)}),!0),r=(0,G.$A)((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(H.X&&o.kg.log("[Measurements] Adding LCP"),q.lcp={value:e.value,unit:"millisecond"},K=t)}),!0);return()=>{t(),n(),r()}}return()=>{}}();let A,a;function l(e){const t=(0,f.Gd)(),{beforeStartSpan:l,idleTimeout:u,finalTimeout:d,heartbeatInterval:h}=n,g="pageload"===e.op;let p;if(g){const t=g?fe("sentry-trace"):"",n=g?fe("baggage"):void 0,{traceId:r,dsc:o,parentSpanId:i,sampled:A}=(0,O.pT)(t,n);p={traceId:r,parentSpanId:i,parentSampled:A,...e,metadata:{...e.metadata,dynamicSamplingContext:o},trimEnd:!0}}else p={trimEnd:!0,...e};const m=l?l(p):p;m.metadata=m.name!==p.name?{...m.metadata,source:"custom"}:m.metadata,A=m.name,a=function(e){const t=e.attributes&&e.attributes[c.Zj],n=e.data&&e.data[c.Zj],r=e.metadata&&e.metadata.source;return t||n||r}(m),!1===m.sampled&&H.X&&o.kg.log(`[Tracing] Will not send ${m.op} transaction because of beforeNavigate.`),H.X&&o.kg.log(`[Tracing] Starting ${m.op} transaction on scope`);const{location:y}=U.WINDOW,v=j(t,m,u,d,!0,{location:y},h,g);return g&&(U.WINDOW.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(U.WINDOW.document.readyState)&&v.sendAutoFinishSignal()})),["interactive","complete"].includes(U.WINDOW.document.readyState)&&v.sendAutoFinishSignal()),v.registerBeforeFinishCallback((e=>{r(),function(e){const t=$();if(!t||!U.WINDOW.performance.getEntries||!i.Z1)return;H.X&&o.kg.log("[Tracing] Adding & adjusting spans using Performance API");const n=V(i.Z1),r=t.getEntries();let A,a;const{op:l,start_timestamp:c}=(0,s.XU)(e);if(r.slice(Z).forEach((t=>{const r=V(t.startTime),i=V(t.duration);if(!("navigation"===e.op&&c&&n+r{ee(e,t,r,n)})),ee(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),ee(e,t,"fetch",n,"cache","domainLookupStart"),ee(e,t,"domainLookup",n,"DNS"),function(e,t,n){t.responseEnd&&(W(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+V(t.requestStart),endTimestamp:n+V(t.responseEnd)}),W(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+V(t.responseStart),endTimestamp:n+V(t.responseEnd)}))}(e,t,n)}(e,t,n),A=n+V(t.responseStart),a=n+V(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o){const i=o+n,A=i+r;W(e,{description:t.name,endTimestamp:A,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i})}(e,t,r,i,n);const A=(0,z.Y)(),s=t.startTime{if(!q[e]||!c||n>=c)return;const t=q[e].value,r=n+V(t),i=Math.abs(1e3*(r-c)),A=i-t;H.X&&o.kg.log(`[Measurements] Normalized ${e} from ${t} to ${i} (${A})`),q[e].value=i}));const t=q["mark.fid"];t&&q.fid&&(W(e,{description:"first input delay",endTimestamp:t.value+V(q.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete q["mark.fid"]),"fcp"in q||delete q.cls,Object.keys(q).forEach((e=>{!function(e,t,n){const r=D();r&&r.setMeasurement(e,t,n)}(e,q[e].value,q[e].unit)})),function(e){K&&(H.X&&o.kg.log("[Measurements] Adding LCP Data"),K.element&&e.setTag("lcp.element",(0,N.Rt)(K.element)),K.id&&e.setTag("lcp.id",K.id),K.url&&e.setTag("lcp.url",K.url.trim().slice(0,200)),e.setTag("lcp.size",K.size)),X&&X.sources&&(H.X&&o.kg.log("[Measurements] Adding CLS Data"),X.sources.forEach(((t,n)=>e.setTag(`cls.source.${n+1}`,(0,N.Rt)(t.node)))))}(e)}K=void 0,X=void 0,q={}}(e)})),v}return n.enableLongTask&&(0,G._j)("longtask",(({entries:e})=>{for(const t of e){const e=D();if(!e)return;const n=V(i.Z1+t.startTime),r=V(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})),n._experiments.enableInteractions&&(0,G._j)("event",(({entries:e})=>{for(const t of e){const e=D();if(!e)return;if("click"===t.name){const n=V(i.Z1+t.startTime),r=V(t.duration),o={description:(0,N.Rt)(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},A=(0,N.iY)(t.target);A&&(o.attributes={"ui.component_name":A}),e.startChild(o)}}})),{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){const r=e.getOptions(),{markBackgroundSpan:u,traceFetch:d,traceXHR:h,shouldCreateSpanForRequest:g,enableHTTPTimings:p,_experiments:m}=n,y=r&&r.tracePropagationTargets,v=y||n.tracePropagationTargets;let w;H.X&&t&&y&&o.kg.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let B=U.WINDOW.location.href;if(e.on&&(e.on("startNavigationSpan",(e=>{w&&(H.X&&o.kg.log(`[Tracing] Finishing current transaction with op: ${(0,s.XU)(w).op}`),w.end()),w=l(e)})),e.on("startPageLoadSpan",(e=>{w&&(H.X&&o.kg.log(`[Tracing] Finishing current transaction with op: ${(0,s.XU)(w).op}`),w.end()),w=l(e)}))),n.instrumentPageLoad&&e.emit){const t={name:U.WINDOW.location.pathname,startTimestamp:i.Z1?i.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",attributes:{[c.Zj]:"url"}};he(e,t)}n.instrumentNavigation&&e.emit&&(0,L.a)((({to:t,from:n})=>{if(void 0===n&&B&&-1!==B.indexOf(t))B=void 0;else if(n!==t){B=void 0;const t={name:U.WINDOW.location.pathname,op:"navigation",origin:"auto.navigation.browser",attributes:{[c.Zj]:"url"}};ge(e,t)}})),u&&(U.WINDOW&&U.WINDOW.document?U.WINDOW.document.addEventListener("visibilitychange",(()=>{const e=D();if(U.WINDOW.document.hidden&&e){const t="cancelled",{op:n,status:r}=(0,s.XU)(e);H.X&&o.kg.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}})):H.X&&o.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),m.enableInteractions&&function(e,t,n){let r;const i=()=>{const{idleTimeout:i,finalTimeout:A,heartbeatInterval:s}=e,a="ui.action.click",l=D();if(l&&l.op&&["navigation","pageload"].includes(l.op))return void(H.X&&o.kg.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`));if(r&&(r.setFinishReason("interactionInterrupted"),r.end(),r=void 0),!t)return void(H.X&&o.kg.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`));const{location:u}=U.WINDOW,d={name:t,op:a,trimEnd:!0,data:{[c.Zj]:n||"url"}};r=j((0,f.Gd)(),d,i,A,!0,{location:u},s)};["click"].forEach((e=>{addEventListener(e,i,{once:!1,capture:!0})}))}(n,A,a),ae({traceFetch:d,traceXHR:h,tracePropagationTargets:v,shouldCreateSpanForRequest:g,enableHTTPTimings:p})},options:n}};function he(e,t){e.emit&&e.emit("startPageLoadSpan",t)}function ge(e,t){e.emit&&e.emit("startNavigationSpan",t)}function fe(e){const t=(0,N.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}var pe=n(6891),me=n(8679),ye=n.n(me),ve=n(7294);const we="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Be="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";let Ce,be,Ee,Ie,xe,ke,Se,Qe,De=!1;function Me(e){const t=de({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:A,stripBasename:s,instrumentPageLoad:a=!0,instrumentNavigation:l=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e);const u=pe.m9&&pe.m9.location&&pe.m9.location.pathname;a&&u&&he(e,{name:u,attributes:{[c.Zj]:"url",[c.$J]:"pageload",[c.S3]:"auto.pageload.react.reactrouter_v6"}}),be=n,Ee=r,Ie=o,ke=A,xe=i,De=s||!1,Se=t=>{ge(e,t)},Qe=l}}}function Fe(e,t){if(!t||"/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?e:e.slice(n)||"/"}function Pe(e,t,n,r=""){if(!e||0===e.length)return[De?Fe(t.pathname,r):t.pathname,"url"];let o="";if(n)for(let e=0;e{const r=Ee(),o=Ie();return be((()=>{const e=xe(n.children);t?(function(e,t,n,r,o){const i=Array.isArray(r)?r:ke(n,t,o);if(e&&i){const[r,A]=Pe(n,t,i,o);e.updateName(r),e.setAttribute(c.Zj,A)}}(function(){if(Ce)return Ce;const e=w(),t=e?(0,u.G)(e):void 0;if(!t)return;const n=(0,s.XU)(t).op;return"navigation"===n||"pageload"===n?t:void 0}(),r,e),t=!1):function(e,t,n,r,o){const i=Array.isArray(r)?r:ke(t,e,o);if(Qe&&("PUSH"===n||"POP"===n)&&i){Ce&&Ce.end();const[n,r]=Pe(t,e,i,o);Ce=Se({name:n,attributes:{[c.Zj]:r,[c.$J]:"navigation",[c.S3]:"auto.navigation.react.reactrouter_v6"}})}}(r,e,o)}),[r,o]),ve.createElement(e,{...n,__self:this,__source:{fileName:Be,lineNumber:329}})};return ye()(n,e),n}},5682:(e,t,n)=>{"use strict";n.d(t,{S:()=>Xe});var r=n(2343),o=n(2844),i=n(7321),A=n(1703),s=n(2967);const a=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],l=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],c="InboundFilters",u=(0,s._I)(((e={})=>({name:c,setupOnce(){},processEvent(t,n,s){const c=s.getOptions(),u=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:a],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:l],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,c);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(A.X&&r.kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0,o.jH)(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch(e){}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),A.X&&0===t.length&&r.kg.error(`Could not extract message for event ${(0,o.jH)(e)}`),t}(e).some((e=>(0,i.U0)(e,t)))}(e,t.ignoreErrors)?(A.X&&r.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,o.jH)(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&(0,i.U0)(n,t)}(e,t.ignoreTransactions)?(A.X&&r.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${(0,o.jH)(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=d(e);return!!n&&(0,i.U0)(n,t)}(e,t.denyUrls)?(A.X&&r.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,o.jH)(e)}.\nUrl: ${d(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=d(e);return!n||(0,i.U0)(n,t)}(e,t.allowUrls)&&(A.X&&r.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,o.jH)(e)}.\nUrl: ${d(e)}`),!0)}(t,u)?null:t}})));function d(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return A.X&&r.kg.error(`Cannot extract url for event ${(0,o.jH)(e)}`),null}}(0,s.RN)(c,u);var h=n(535),g=n(4487);let f;const p="FunctionToString",m=new WeakMap,y=(0,s._I)((()=>({name:p,setupOnce(){f=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=(0,h.HK)(this),n=m.has((0,g.s3)())&&void 0!==t?t:this;return f.apply(n,e)}}catch(e){}},setup(e){m.set(e,!0)}})));(0,s.RN)(p,y);var v=n(5659),w=n(5108);var B=n(1738),C=n(8823),b=n(734),E=n(807),I=n(105);function x(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:I.J}))),version:I.J}),e._metadata=o}var k=n(8518),S=n(8725),Q=n(1170),D=n(292);const M="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var F=n(7597),P=n(8007),T=n(6893);function Y(e,t){const n=j(e,t),r={type:t&&t.name,value:L(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function R(e,t){return{exception:{values:[Y(e,t)]}}}function j(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(O.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const O=/Minified React error #\d+;/i;function L(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function N(e,t,n,r,i){let A;if((0,F.VW)(t)&&t.error)return R(e,t.error);if((0,F.TX)(t)||(0,F.fm)(t)){const i=t;if("stack"in t)A=R(e,t);else{const t=i.name||((0,F.TX)(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;A=H(e,s,n,r),(0,o.Db)(A,s)}return"code"in i&&(A.tags={...A.tags,"DOMException.code":`${i.code}`}),A}return(0,F.VZ)(t)?R(e,t):(0,F.PO)(t)||(0,F.cO)(t)?(A=function(e,t,n,r){const o=(0,g.s3)(),i=o&&o.getOptions().normalizeDepth,A={exception:{values:[{type:(0,F.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:U(t,{isUnhandledRejection:r})}]},extra:{__serialized__:(0,P.Qy)(t,i)}};if(n){const t=j(e,n);t.length&&(A.exception.values[0].stacktrace={frames:t})}return A}(e,t,n,i),(0,o.EG)(A,{synthetic:!0}),A):(A=H(e,t,n,r),(0,o.Db)(A,`${t}`,void 0),(0,o.EG)(A,{synthetic:!0}),A)}function H(e,t,n,r){const o={};if(r&&n){const r=j(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]})}if((0,F.Le)(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function U(e,{isUnhandledRejection:t}){const n=(0,h.zf)(e),r=t?"promise rejection":"exception";return(0,F.VW)(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:(0,F.cO)(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var _=n(6891);class G extends E.W{constructor(e){x(e,"browser",["browser"],_.m9.SENTRY_SDK_SOURCE||(0,k.S)()),super(e),e.sendClientReports&&_.m9.document&&_.m9.document.addEventListener("visibilitychange",(()=>{"hidden"===_.m9.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=N(e,t,n&&n.syntheticException||void 0,r);return(0,o.EG)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),(0,T.WD)(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=H(e,t,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),(0,T.WD)(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(M&&r.kg.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={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:(0,D.RA)(r)}},i=function(e){return[{type:"user_report"},e]}(e);return(0,S.Jd)(o,[i])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(M&&r.kg.log("No outcomes to send"));if(!this._dsn)return void(M&&r.kg.log("No dsn provided, will not send outcomes"));M&&r.kg.log("Sending outcomes:",e);const t=function(e,t){const n=[{type:"client_report"},{timestamp:(0,Q.yW)(),discarded_events:e}];return(0,S.Jd)(t?{dsn:t}:{},[n])}(e,this._options.tunnel&&(0,D.RA)(this._dsn));this._sendEnvelope(t)}}var z=n(1235),J=n(9729);function W(){"console"in z.GLOBAL_OBJ&&r.RU.forEach((function(e){e in z.GLOBAL_OBJ.console&&(0,h.hl)(z.GLOBAL_OBJ.console,e,(function(t){return r.LD[e]=t,function(...t){const n={args:t,level:e};(0,J.rK)("console",n);const o=r.LD[e];o&&o.apply(z.GLOBAL_OBJ.console,t)}}))}))}var V=n(5316),$=n(5322),K=n(1394),X=n(8464);const Z=["fatal","error","warning","log","info","debug"];var q=n(6956);const ee="Breadcrumbs",te=(0,s._I)(((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ee,setupOnce(){},setup(e){t.console&&function(e){const t="console";(0,J.Hj)(t,e),(0,J.D2)(t,W)}(function(e){return function(t){if((0,g.s3)()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:(r=t.level,"warn"===r?"warning":Z.includes(r)?r:"log"),message:(0,i.nK)(t.args," ")};var r;if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${(0,i.nK)(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}(0,g.n_)(n,{input:t.args,level:t.level})}}(e)),t.dom&&(0,V.O)(function(e,t){return function(n){if((0,g.s3)()!==e)return;let o,i,A="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>1024&&(M&&r.kg.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=1024),"string"==typeof A&&(A=[A]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;o=(0,X.Rt)(t,{keyAttrs:A,maxStringLength:s}),i=(0,X.iY)(t)}catch(e){o=""}if(0===o.length)return;const a={category:`ui.${n.name}`,message:o};i&&(a.data={"ui.component_name":i}),(0,g.n_)(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&(0,$.UK)(function(e){return function(t){if((0,g.s3)()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[$.xU];if(!n||!r||!o)return;const{method:i,url:A,status_code:s,body:a}=o,l={method:i,url:A,status_code:s},c={xhr:t.xhr,input:a,startTimestamp:n,endTimestamp:r};(0,g.n_)({category:"xhr",data:l,type:"http"},c)}}(e)),t.fetch&&(0,K.U)(function(e){return function(t){if((0,g.s3)()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const e=t.fetchData,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};(0,g.n_)({category:"fetch",data:e,level:"error",type:"http"},o)}else{const e=t.response,o={...t.fetchData,status_code:e&&e.status},i={input:t.args,response:e,startTimestamp:n,endTimestamp:r};(0,g.n_)({category:"fetch",data:o,type:"http"},i)}}}(e)),t.history&&(0,b.a)(function(e){return function(t){if((0,g.s3)()!==e)return;let n=t.from,r=t.to;const o=(0,q.en)(_.m9.location.href);let i=n?(0,q.en)(n):void 0;const A=(0,q.en)(r);i&&i.path||(i=o),o.protocol===A.protocol&&o.host===A.host&&(r=A.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),(0,g.n_)({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){(0,g.s3)()===e&&(0,g.n_)({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,o.jH)(t)},{event:t})}}(e))}}}));(0,s.RN)(ee,te);const ne="Dedupe",re=(0,s._I)((()=>{let e;return{name:ne,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!ie(e,t)&&!!oe(e,t))))}(e,t)||!!function(e,t){const n=Ae(t),r=Ae(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!ie(e,t)&&!!oe(e,t)))}(e,t))}(t,e))return M&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}}));function oe(e,t){let n=se(e),r=se(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ce,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){(0,ae.V)((t=>{const{stackParser:n,attachStacktrace:r}=ge();if((0,g.s3)()!==e||(0,_.Wz)())return;const{msg:o,url:i,line:A,column:s,error:a}=t,l=void 0===a&&(0,F.HD)(o)?function(e,t,n,r){let o=(0,F.VW)(e)?e.message:e,i="Error";const A=o.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);A&&(i=A[1],o=A[2]);return de({exception:{values:[{type:i,value:o}]}},t,n,r)}(o,i,A,s):de(N(n,a||o,void 0,r,!1),i,A,s);l.level="error",(0,g.eN)(l,{originalException:a,mechanism:{handled:!1,type:"onerror"}})}))}(e),he("onerror")),t.onunhandledrejection&&(function(e){(0,le.h)((t=>{const{stackParser:n,attachStacktrace:r}=ge();if((0,g.s3)()!==e||(0,_.Wz)())return;const o=function(e){if((0,F.pt)(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(e){}return e}(t),i=(0,F.pt)(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:N(n,o,void 0,r,!0);i.level="error",(0,g.eN)(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),he("onunhandledrejection"))}}}));function de(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],A=i[0]=i[0]||{},s=A.stacktrace=A.stacktrace||{},a=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,u=(0,F.HD)(t)&&t.length>0?t:(0,X.l4)();return 0===a.length&&a.push({colno:l,filename:u,function:"?",in_app:!0,lineno:c}),e}function he(e){M&&r.kg.log(`Global Handler attached: ${e}`)}function ge(){const e=(0,g.s3)();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}(0,s.RN)(ce,ue);const fe="HttpContext",pe=(0,s._I)((()=>({name:fe,setupOnce(){},preprocessEvent(e){if(!_.m9.navigator&&!_.m9.location&&!_.m9.document)return;const t=e.request&&e.request.url||_.m9.location&&_.m9.location.href,{referrer:n}=_.m9.document||{},{userAgent:r}=_.m9.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}})));function me(e,t,n=250,r,o,A,s){if(!(A.exception&&A.exception.values&&s&&(0,F.V9)(s.originalException,Error)))return;const a=A.exception.values.length>0?A.exception.values[A.exception.values.length-1]:void 0;var l,c;a&&(A.exception.values=(l=ye(e,t,o,s.originalException,r,A.exception.values,a,0),c=n,l.map((e=>(e.value&&(e.value=(0,i.$G)(e.value,c)),e)))))}function ye(e,t,n,r,o,i,A,s){if(i.length>=n+1)return i;let a=[...i];if((0,F.V9)(r[o],Error)){ve(A,s);const i=e(t,r[o]),l=a.length;we(i,o,l,s),a=ye(e,t,n,r[o],o,[i,...a],i,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if((0,F.V9)(r,Error)){ve(A,s);const l=e(t,r),c=a.length;we(l,`errors[${i}]`,c,s),a=ye(e,t,n,r,o,[l,...a],l,c)}})),a}function ve(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function we(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}}(0,s.RN)(fe,pe);const Be="LinkedErrors",Ce=(0,s._I)(((e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:Be,setupOnce(){},preprocessEvent(e,r,o){const i=o.getOptions();me(Y,i.stackParser,i.maxValueLength,n,t,e,r)}}})),be=((0,s.RN)(Be,Ce),["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"]),Ee="TryCatch",Ie=(0,s._I)(((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Ee,setupOnce(){t.setTimeout&&(0,h.hl)(_.m9,"setTimeout",xe),t.setInterval&&(0,h.hl)(_.m9,"setInterval",xe),t.requestAnimationFrame&&(0,h.hl)(_.m9,"requestAnimationFrame",ke),t.XMLHttpRequest&&"XMLHttpRequest"in _.m9&&(0,h.hl)(XMLHttpRequest.prototype,"send",Se);const e=t.eventTarget;e&&(Array.isArray(e)?e:be).forEach(Qe)}}}));function xe(e){return function(...t){const n=t[0];return t[0]=(0,_.re)(n,{mechanism:{data:{function:(0,B.$P)(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function ke(e){return function(t){return e.apply(this,[(0,_.re)(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,B.$P)(e)},handled:!1,type:"instrument"}})])}}function Se(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&(0,h.hl)(n,e,(function(t){const n={mechanism:{data:{function:e,handler:(0,B.$P)(t)},handled:!1,type:"instrument"}},r=(0,h.HK)(t);return r&&(n.mechanism.data.handler=(0,B.$P)(r)),(0,_.re)(t,n)}))})),e.apply(this,t)}}function Qe(e){const t=_.m9,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,h.hl)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,_.re)(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,B.$P)(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,(0,_.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,B.$P)(r),target:e},handled:!1,type:"instrument"}}),o])}})),(0,h.hl)(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,o,r)}})))}(0,s.RN)(Ee,Ie);const De="?";function Me(e,t,n,r){const o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Fe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pe=/\((\S*)(?::(\d+))(?::(\d+))\)/,Te=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ye=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Re=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,je=[[30,e=>{const t=Fe.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=Pe.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Le(t[1]||De,t[2]);return Me(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=Te.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ye.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||De;return[n,e]=Le(n,e),Me(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=Re.exec(e);return t?Me(t[2],t[1]||De,+t[3],t[4]?+t[4]:void 0):void 0}]],Oe=(0,B.pE)(...je),Le=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:De,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Ne=n(409);var He=n(228);const Ue=30;function _e(e,t,n=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new T.cW(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{(0,T.WD)(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}(e.bufferSize||Ue)){let o={};function i(i){const s=[];if((0,S.gv)(i,((t,n)=>{const r=(0,S.mL)(n);if((0,He.Q)(o,r)){const o=Ge(t,n);e.recordDroppedEvent("ratelimit_backoff",r,o)}else s.push(t)})),0===s.length)return(0,T.WD)();const a=(0,S.Jd)(i[0],s),l=t=>{(0,S.gv)(a,((n,r)=>{const o=Ge(n,r);e.recordDroppedEvent(t,(0,S.mL)(r),o)}))};return n.add((()=>t({body:(0,S.V$)(a,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&A.X&&r.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),o=(0,He.WG)(o,e),e)),(e=>{throw l("network_error"),e})))).then((e=>e),(e=>{if(e instanceof Ne.b)return A.X&&r.kg.error("Skipped sending event because buffer is full."),l("queue_overflow"),(0,T.WD)();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function Ge(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let ze;function Je(e,t=function(){if(ze)return ze;if((0,C.Du)(_.m9.fetch))return ze=_.m9.fetch.bind(_.m9);const e=_.m9.document;let t=_.m9.fetch;if(e&&"function"==typeof e.createElement)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(e){M&&r.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return ze=t.bind(_.m9)}()){let n=0,o=0;return _e(e,(function(r){const i=r.body.length;n+=i,o++;const A={body:r.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&o<15,...e.fetchOptions};try{return t(e.url,A).then((e=>(n-=i,o--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return ze=void 0,n-=i,o--,(0,T.$2)(e)}}))}const We=4;function Ve(e){return _e(e,(function(t){return new T.cW(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{o.readyState===We&&n({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 t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&o.setRequestHeader(t,e.headers[t]);o.send(t.body)}))}))}const $e=[u(),y(),Ie(),te(),ue(),Ce(),re(),pe()];function Ke(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...$e]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),_.m9.SENTRY_RELEASE&&_.m9.SENTRY_RELEASE.id&&(e.release=_.m9.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(0,B.Sq)(e.stackParser||Oe),integrations:(0,s.m8)(e),transport:e.transport||((0,C.Ak)()?Je:Ve)};(function(e,t){!0===t.debug&&(A.X?r.kg.enable():(0,r.Cf)((()=>{w.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),(0,g.nZ)().update(t.initialScope);const n=new e(t);!function(e){const t=(0,v.Gd)().getStackTop();t.client=e,t.scope.setClient(e)}(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)})(G,t),e.autoSessionTracking&&(void 0!==_.m9.document?((0,g.yj)({ignoreDuration:!0}),(0,g.cg)(),(0,b.a)((({from:e,to:t})=>{void 0!==e&&e!==t&&((0,g.yj)({ignoreDuration:!0}),(0,g.cg)())}))):M&&r.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."))}function Xe(e){const t={...e};x(t,"react"),Ke(t)}},1165:(e,t,n)=>{"use strict";function r(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}n.d(t,{G:()=>$n});var o=n(4487);function i(e){return"/"===e[e.length-1]?e.slice(0,-1):e}var A=n(807),s=n(8942),a=n(5659),l=n(3371),c=n(6754),u=n(1235),d=n(8007),h=n(535),g=n(8464),f=n(1170),p=n(2343),m=n(2844),y=n(5322),v=n(7321),w=n(1394),B=n(5316),C=n(734),b=n(8725),E=n(228),I=n(1422);function x(){return"undefined"!=typeof window&&(!(0,I.KV)()||void 0!==u.GLOBAL_OBJ.process&&"renderer"===u.GLOBAL_OBJ.process.type)}var k=n(5363),S=n(5108);const Q=u.GLOBAL_OBJ,D="sentryReplaySession",M="Unable to send Replay",F=15e4,P=5e3,T=2e7;function Y(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}var R;function j(e){const t=Y([e,"optionalAccess",e=>e.host]);return Boolean(Y([t,"optionalAccess",e=>e.shadowRoot])===e)}function O(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function L(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,N).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function N(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=L(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(R||(R={}));class H{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return null!=(t=Y([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]))?t:-1;var t}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function U({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function _({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function G(e){return e.toLowerCase()}function z(e){return e.toUpperCase()}const J="__rrweb_original__";function W(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?G(t):null}function V(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let $=1;const K=new RegExp("[^a-z0-9-_:]");function X(){return $++}let Z,q;const ee=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,te=/^(?:[a-z+]+:)?\/\//i,ne=/^www\..*/i,re=/^(data:)([^,]*),(.*)/i;function oe(e,t){return(e||"").replace(ee,((e,n,r,o,i,A)=>{const s=r||i||A,a=n||o||"";if(!s)return e;if(te.test(s)||ne.test(s))return`url(${a}${s}${a})`;if(re.test(s))return`url(${a}${s}${a})`;if("/"===s[0])return`url(${a}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${a})`;const l=t.split("/"),c=s.split("/");l.pop();for(const e of c)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${a}${l.join("/")}${a})`}))}const ie=/^[^ \t\n\r\u000c]+/,Ae=/^[, \t\n\r\u000c]+/;function se(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function ae(){const e=document.createElement("a");return e.href="",e.href}function le(e,t,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?se(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Ae),!(n>=t.length);){let i=r(ie);if(","===i.slice(-1))i=se(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=se(e,i);let A=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(A)")"===e&&(A=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(A=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?oe(r,ae()):"object"===t&&"data"===n?se(e,r):"function"==typeof i?i(n,r,o):r:se(e,r):r}function ce(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ue(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ue(e.parentNode,t,n,r+1):-1}function de(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function he(e,t,n,r,o,i){try{const A=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===A)return!1;if("INPUT"===A.tagName){const e=A.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,a=-1;if(i){if(a=ue(A,de(r,o)),a<0)return!0;s=ue(A,de(t,n),a>=0?a:1/0)}else{if(s=ue(A,de(t,n)),s<0)return!1;a=ue(A,de(r,o),s>=0?s:1/0)}return s>=0?!(a>=0)||s<=a:!(a>=0||!i)}catch(e){}return!!i}function ge(e){return null==e?"":e.toLowerCase()}function fe(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:A,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:g={},maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v={},inlineImages:w=!1,recordCanvas:B=!1,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:E=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:Q=!1}=t;let{preserveWhiteSpace:D=!0}=t;const M=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:A,maskAllText:s,maskAttributeFn:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:g={},maskTextFn:f,maskInputFn:p,dataURLOptions:m={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:B=!1}=t,C=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:R.Document,childNodes:[],compatMode:e.compatMode}:{type:R.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:R.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:A,maskInputOptions:s={},maskAttributeFn:a,maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:g=!1,rootId:f,maskAllText:p,maskTextClass:m,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:w}=t,B=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,i),C=function(e){if(e instanceof HTMLFormElement)return"form";const t=G(e.tagName);return K.test(t)?"div":t}(e);let b={};const E=e.attributes.length;for(let t=0;tt.href===e.href));let r=null;t&&(r=L(t)),r&&(delete b.rel,delete b.href,b._cssText=oe(r,t.href))}if("style"===C&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=L(e.sheet);t&&(b._cssText=oe(t,ae()))}if("input"===C||"textarea"===C||"select"===C||"option"===C){const t=e,n=W(t),r=V(t,z(C),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=he(t,m,v,y,w,U({type:n,tagName:z(C),maskInputOptions:s}));b.value=_({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(b.checked=o)}if("option"===C&&(e.selected&&!s.select?b.selected=!0:delete b.selected),"canvas"===C&&d)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e)))return!1}return!0})(e)||(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height,t!==n.toDataURL(c.type,c.quality)&&(b.rr_dataURL=t)}if("img"===C&&u){Z||(Z=n.createElement("canvas"),q=Z.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const o=()=>{t.removeEventListener("load",o);try{Z.width=t.naturalWidth,Z.height=t.naturalHeight,q.drawImage(t,0,0),b.rr_dataURL=Z.toDataURL(c.type,c.quality)}catch(e){S.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}r?b.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"!==C&&"video"!==C||(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),B){const{width:t,height:n}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${n}px`}}let I;"iframe"!==C||h(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(C)&&(I=!0)}catch(e){}return{type:R.Element,tagName:C,attributes:b,childNodes:[],isSVG:(x=e,Boolean("svg"===x.tagName||x.ownerSVGElement)||void 0),needBlock:B,rootId:f,isCustom:I};var x}(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:A,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:g,maskInputFn:p,dataURLOptions:m,inlineImages:y,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:B,rootId:C,maskAllText:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:A,maskTextFn:s,maskInputOptions:a,maskInputFn:l,rootId:c}=t,u=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const h="STYLE"===u||void 0,g="SCRIPT"===u||void 0,f="TEXTAREA"===u||void 0;if(h&&d){try{e.nextSibling||e.previousSibling||Y([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(d=L(e.parentNode.sheet))}catch(t){S.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}d=oe(d,ae())}g&&(d="SCRIPT_PLACEHOLDER");const p=he(e,r,i,o,A,n);return h||g||f||!d||!p||(d=s?s(d):d.replace(/[\S]/g,"*")),f&&d&&(a.textarea||p)&&(d=l?l(d,e.parentNode):d.replace(/[\S]/g,"*")),"OPTION"===u&&d&&(d=_({isMasked:he(e,r,i,o,A,U({type:null,tagName:u,maskInputOptions:a})),element:e,value:d,maskInputFn:l})),{type:R.Text,textContent:d||"",isStyle:h,rootId:c}}(e,{maskAllText:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,maskTextFn:f,maskInputOptions:g,maskInputFn:p,rootId:C});case e.CDATA_SECTION_NODE:return{type:R.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:R.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:A,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,dataURLOptions:v,inlineImages:w,recordCanvas:B,keepIframeSrcFn:k,newlyAddedElement:Q});if(!M)return S.warn(e,"not serialized"),null;let F;F=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===R.Comment)return!0;if(e.type===R.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ge(e.attributes.name)||"icon"===ge(e.attributes.rel)||"apple-touch-icon"===ge(e.attributes.rel)||"shortcut icon"===ge(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ge(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ge(e.attributes.name)||"googlebot"===ge(e.attributes.name)||"bingbot"===ge(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ge(e.attributes.name)||"generator"===ge(e.attributes.name)||"framework"===ge(e.attributes.name)||"publisher"===ge(e.attributes.name)||"progid"===ge(e.attributes.name)||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ge(e.attributes.name)||"yandex-verification"===ge(e.attributes.name)||"csrf-token"===ge(e.attributes.name)||"p:domain_verify"===ge(e.attributes.name)||"verify-v1"===ge(e.attributes.name)||"verification"===ge(e.attributes.name)||"shopify-checkout-api-token"===ge(e.attributes.name)))return!0}}return!1}(M,y)&&(D||M.type!==R.Text||M.isStyle||M.textContent.replace(/^\s+|\s+$/gm,"").length)?X():-2;const P=Object.assign(M,{id:F});if(r.add(e,P),-2===F)return null;C&&C(e);let T=!d;if(P.type===R.Element){T=T&&!P.needBlock,delete P.needBlock;const t=e.shadowRoot;t&&O(t)&&(P.isShadowHost=!0)}if((P.type===R.Document||P.type===R.Element)&&T){y.headWhitespace&&P.type===R.Element&&"head"===P.tagName&&(D=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:A,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:d,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:w,recordCanvas:B,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k};for(const n of Array.from(e.childNodes)){const e=fe(n,t);e&&P.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=fe(n,t);r&&(O(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return e.parentNode&&j(e.parentNode)&&O(e.parentNode)&&(P.isShadow=!0),P.type===R.Element&&"iframe"===P.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const A="about:blank";if(r.location.href!==A||e.src===A||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&b){const n=fe(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,unblockSelector:A,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:w,recordCanvas:B,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k});n&&b(e,n)}}),E),P.type===R.Element&&"link"===P.tagName&&"stylesheet"===P.attributes.rel&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(I){const t=fe(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:A,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:y,dataURLOptions:v,inlineImages:w,recordCanvas:B,preserveWhiteSpace:D,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k});t&&I(e,t)}}),x),P}function pe(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function me(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ye="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ve={map:{},getId:()=>(S.error(ye),-1),getNode:()=>(S.error(ye),null),removeNodeFromMap(){S.error(ye)},has:()=>(S.error(ye),!1),reset(){S.error(ye)}};function we(e,t,n={}){let r=null,o=0;return function(...i){const A=Date.now();o||!1!==n.leading||(o=A);const s=t-(A-o),a=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=A,e.apply(a,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(a,i)}),s))}}function Be(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Be(e,t,i||{},!0)}function Ce(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ve=new Proxy(ve,{get:(e,t,n)=>("map"===t&&S.error(ye),Reflect.get(e,t,n))}));let be,Ee=Date.now;function Ie(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:pe([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||pe([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||pe([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:pe([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||pe([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||pe([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function xe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ke(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Se(e,t,n,r,o){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;const A=de(t,n);if(!o){const e=r&&i.matches(r);return A(i)&&!e}const s=ue(i,A);let a=-1;return!(s<0)&&(r&&(a=ue(i,de(null,r))),s>-1&&a<0||se.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ee=()=>(new Date).getTime());class Ye{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return null!=(t=this.styleIDMap.get(e))?t:-1;var t}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Re(e){let t=null;return pe([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function je(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Re(n);)n=t;return n}(e);return t.contains(n)}(e))}var Oe=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Oe||{}),Le=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Le||{}),Ne=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ne||{}),He=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(He||{});function Ue(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function _e(e){return"__ln"in e}class Ge{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;ne.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&_e(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&_e(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const ze=(e,t)=>`${e}@${t}`;class Je{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Ge,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!je(o))return;const i=j(o.parentNode)?this.mirror.getId(Re(o)):this.mirror.getId(o.parentNode),A=r(o);if(-1===i||-1===A)return n.addNode(o);const s=fe(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Fe(e,this.mirror)&&this.iframeManager.addIframe(e),Pe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Te(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:i,nextId:A,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Ve(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)Ke(this.droppedSet,e)||Ve(this.removes,e,this.mirror)?Ke(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const A={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(A.texts.length||A.attributes.length||A.removes.length||A.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(A))},this.processMutation=e=>{if(Qe(e.target,this.mirror))return;let t;try{t=document.implementation.createHTMLDocument()}catch(e){t=this.doc}switch(e.type){case"characterData":{const t=e.target.textContent;Se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:he(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){const t=W(n),r=n.tagName;o=V(n,r,t);const i=U({maskInputOptions:this.maskInputOptions,tagName:r,type:t});o=_({isMasked:he(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:n,value:o,maskInputFn:this.maskInputFn})}if(Se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===e.oldValue)return;let i=this.attributes.find((t=>t.node===e.target));if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!ce(n.tagName,r)&&(i.attributes[r]=le(this.doc,G(n.tagName),G(r),o,n,this.maskAttributeFn),"style"===r)){const r=t.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(n.style)){const t=n.style.getPropertyValue(e),o=n.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?t:[t,o]:i._unchangedStyles[e]=[t,o]}for(const e of Array.from(r.style))""===n.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(Se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=j(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Se(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Qe(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(We(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||De(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ze(n,r)]?We(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!j(e.target)||!O(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Qe(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[ze(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Se(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Te(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function We(e,t){e.delete(t),t.childNodes.forEach((t=>We(e,t)))}function Ve(e,t,n){return 0!==e.length&&$e(e,t,n)}function $e(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||$e(e,r,n)}function Ke(e,t){return 0!==e.size&&Xe(e,t)}function Xe(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Xe(e,n))}let Ze;function qe(e){Ze=e}function et(){Ze=void 0}const tt=e=>Ze?(...t)=>{try{return e(...t)}catch(e){if(Ze&&!0===Ze(e))return()=>{};throw e}}:e;function nt(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const rt=[];function ot(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function it(e,t){const n=new Je;rt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=nt([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const i=new r(tt((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function At({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:A}){return me("scroll",tt(we(tt((A=>{const s=ot(A);if(!s||Se(s,r,o,i,!0))return;const a=n.getId(s);if(s===t&&t.defaultView){const n=Ie(t.defaultView);e({id:a,x:n.left,y:n.top})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})})),A.scroll||100)),t)}const st=["INPUT","TEXTAREA","SELECT"],at=new WeakMap;function lt({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:A,ignoreSelector:s,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:f}){function p(e){let n=ot(e);const c=e.isTrusted,p=n&&z(n.tagName);if("OPTION"===p&&(n=n.parentElement),!n||!p||st.indexOf(p)<0||Se(n,r,o,i,!0))return;const y=n;if(y.classList.contains(A)||s&&y.matches(s))return;const v=W(n);let w=V(y,p,v),B=!1;const C=U({maskInputOptions:a,tagName:p,type:v}),b=he(n,d,g,h,f,C);"radio"!==v&&"checkbox"!==v||(B=n.checked),w=_({isMasked:b,element:n,value:w,maskInputFn:l}),m(n,u?{text:w,isChecked:B,userTriggered:c}:{text:w,isChecked:B});const E=n.name;"radio"===v&&E&&B&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach((e=>{if(e!==n){const t=_({isMasked:b,element:e,value:V(e,p,v),maskInputFn:l});m(e,u?{text:t,isChecked:!B,userTriggered:!1}:{text:t,isChecked:!B})}}))}function m(t,r){const o=at.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){at.set(t,r);const o=n.getId(t);tt(e)({...r,id:o})}}const y=("last"===c.input?["change"]:["input","change"]).map((e=>me(e,tt(p),t))),v=t.defaultView;if(!v)return()=>{y.forEach((e=>e()))};const w=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),B=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&y.push(...B.map((e=>Be(e[0],e[1],{set(){tt(p)({target:this,isTrusted:!1})}},!1,v)))),tt((()=>{y.forEach((e=>e()))}))}function ct(e){return function(e,t){if(gt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ut(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function dt({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?nt([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):nt([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),i=nt([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(nt([o,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return nt([i,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=nt([i,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),tt((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function ht(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=it(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let A,s=[];const a=we(tt((t=>{const n=Date.now()-A;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],A=null})),i),l=tt(we(tt((e=>{const t=ot(e),{clientX:n,clientY:o}=Me(e)?e.changedTouches[0]:e;A||(A=Ee()),s.push({x:n,y:o,id:r.getId(t),timeOffset:Ee()-A}),a("undefined"!=typeof DragEvent&&e instanceof DragEvent?Le.Drag:e instanceof MouseEvent?Le.MouseMove:Le.TouchMove)})),o,{trailing:!1})),c=[me("mousemove",l,n),me("touchmove",l,n),me("drag",l,n)];return tt((()=>{c.forEach((e=>e()))}))}(e),i=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:A}){if(!1===A.mouseInteraction)return()=>{};const s=!0===A.mouseInteraction||void 0===A.mouseInteraction?{}:A.mouseInteraction,a=[];let l=null;return Object.keys(Ne).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((A=>{let s=G(A);const c=(t=>A=>{const s=ot(A);if(Se(s,r,o,i,!0))return;let a=null,c=t;if("pointerType"in A){switch(A.pointerType){case"mouse":a=He.Mouse;break;case"touch":a=He.Touch;break;case"pen":a=He.Pen}a===He.Touch?Ne[t]===Ne.MouseDown?c="TouchStart":Ne[t]===Ne.MouseUp&&(c="TouchEnd"):He.Pen}else Me(A)&&(a=He.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===He.Touch||c.startsWith("Mouse")&&a===He.Mouse)&&(a=null)):Ne[t]===Ne.Click&&(a=l,l=null);const u=Me(A)?A.changedTouches[0]:A;if(!u)return;const d=n.getId(s),{clientX:h,clientY:g}=u;tt(e)({type:Ne[c],id:d,x:h,y:g,...null!==a&&{pointerType:a}})})(A);if(window.PointerEvent)switch(Ne[A]){case Ne.MouseDown:case Ne.MouseUp:s=s.replace("mouse","pointer");break;case Ne.TouchStart:case Ne.TouchEnd:return}a.push(me(s,c,t))})),tt((()=>{a.forEach((e=>e()))}))}(e),A=At(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return me("resize",tt(we(tt((()=>{const t=xe(),o=ke();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),a=lt(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:A}){const s=tt((A=>we(tt((i=>{const s=ot(i);if(!s||Se(s,t,n,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u}=s;e({type:A,id:o.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u})})),i.media||500))),a=[me("play",s(0),A),me("pause",s(1),A),me("seeked",s(2),A),me("volumechange",s(3),A),me("ratechange",s(4),A)];return tt((()=>{a.forEach((e=>e()))}))}(e),c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:tt(((r,o,i)=>{const[A,s]=i,{id:a,styleId:l}=ut(o,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,adds:[{rule:A,index:s}]}),r.apply(o,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let A,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:tt(((r,o,i)=>{const[A]=i,{id:s,styleId:a}=ut(o,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,removes:[{index:A}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.replace&&(A=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(A,{apply:tt(((r,o,i)=>{const[A]=i,{id:s,styleId:a}=ut(o,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,replace:A}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:tt(((r,o,i)=>{const[A]=i,{id:s,styleId:a}=ut(o,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,replaceSync:A}),r.apply(o,i)}))}));const a={};ft("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(ft("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),ft("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),ft("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(a).forEach((([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:tt(((r,o,i)=>{const[A,s]=i,{id:a,styleId:l}=ut(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,adds:[{rule:A,index:[...ct(o),s||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:tt(((r,o,i)=>{const[A]=i,{id:s,styleId:a}=ut(o.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,removes:[{index:[...ct(o),A]}]}),r.apply(o,i)}))})})),tt((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,A&&(r.CSSStyleSheet.prototype.replace=A),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(a).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}(e,{win:n}),u=dt(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:tt(((o,A,s)=>{const[a,l,c]=s;if(n.has(a))return i.apply(A,[a,l,c]);const{id:u,styleId:d}=ut(nt([A,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(u&&-1!==u||d&&-1!==d)&&e({id:u,styleId:d,set:{property:a,value:l,priority:c},index:ct(A.parentRule)}),o.apply(A,s)}))});const A=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(A,{apply:tt(((o,i,s)=>{const[a]=s;if(n.has(a))return A.apply(i,[a]);const{id:l,styleId:c}=ut(nt([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,remove:{property:a},index:ct(i.parentRule)}),o.apply(i,s)}))}),tt((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=A}))}(e,{win:n}),h=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const A=Ce(t.fonts,"add",(function(t){return function(n){return setTimeout(tt((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(A),tt((()=>{r.forEach((e=>e()))}))}(e):()=>{},g=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:A}=e;let s=!0;const a=tt((()=>{const e=t.getSelection();if(!e||s&&nt([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t{}}(e),p=[];for(const t of e.plugins)p.push(t.observer(t.callback,n,t.options));return tt((()=>{rt.forEach((e=>e.reset())),r.disconnect(),o(),i(),A(),s(),a(),l(),c(),u(),d(),h(),g(),f(),p.forEach((e=>e()))}))}function gt(e){return void 0!==window[e]}function ft(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pt{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let A=o.get(t);return A||(A=this.generateIdFn(),o.set(t,A),i.set(A,t)),A}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function mt(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class yt{constructor(){this.crossOriginIframeMirror=new pt(X),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class vt{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new pt(X),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),mt([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Oe.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Oe.IncrementalSnapshot,data:{source:Le.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Oe.Meta:case Oe.Load:case Oe.DomContentLoaded:return!1;case Oe.Plugin:return t;case Oe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Oe.IncrementalSnapshot:switch(t.data.source){case Le.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Le.Drag:case Le.TouchMove:case Le.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Le.ViewportResize:return!1;case Le.MediaInteraction:case Le.MouseInteraction:case Le.Scroll:case Le.CanvasMutation:case Le.Input:return this.replaceIds(t.data,e,["id"]),t;case Le.StyleSheetRule:case Le.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Le.Font:return t;case Le.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Le.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),mt([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===R.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class wt{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Bt{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!O(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=it({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(At({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(dt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Ce(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&je(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Ct{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class bt{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ye,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:N(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Et{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){(function(){if(be)return be;const e=window.document;let t=window.requestAnimationFrame;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(t=r.requestAnimationFrame),e.head.removeChild(n)}catch(e){}return be=t.bind(window)})()(...e)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function It(e){const t=e;return t.timestamp=Ee(),t}let xt;const kt=new H;function St(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:A=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:g=null,inlineStylesheet:f=!0,maskAllInputs:p,maskInputOptions:m,slimDOMOptions:y,maskAttributeFn:v,maskInputFn:w,maskTextFn:B,packFn:C,sampling:b={},dataURLOptions:E={},mousemoveWait:I,recordCanvas:x=!1,recordCrossOriginIframes:k=!1,recordAfter:Q=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:D=!1,collectFonts:M=!1,inlineImages:F=!1,plugins:P,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:R,onMutation:j,getCanvasManager:O}=e;qe(R);const L=!k||window.parent===window;let N=!1;if(!L)try{window.parent.document&&(N=!1)}catch(e){N=!0}if(L&&!t)throw new Error("emit function is required");void 0!==I&&void 0===b.mousemove&&(b.mousemove=I),kt.reset();const U=!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==m?m:{},_=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let G;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let z=0;const J=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&!N&&(e=C(e)),e},W=(e,i)=>{if(!r([rt,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||e.type===Oe.FullSnapshot||e.type===Oe.IncrementalSnapshot&&e.data.source===Le.Mutation||rt.forEach((e=>e.unfreeze())),L)r([t,"optionalCall",t=>t(J(e),i)]);else if(N){const t={type:"rrweb",event:J(e),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(e.type===Oe.FullSnapshot)G=e,z=0;else if(e.type===Oe.IncrementalSnapshot){if(e.data.source===Le.Mutation&&e.data.isAttachIframe)return;z++;const t=o&&z>=o,r=n&&e.timestamp-G.timestamp>n;(t||r)&&ne(!0)}},V=e=>{W(It({type:Oe.IncrementalSnapshot,data:{source:Le.Mutation,...e}}))},$=e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.Scroll,...e}})),K=e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.CanvasMutation,...e}})),X=new bt({mutationCb:V,adoptedStyleSheetCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.AdoptedStyleSheet,...e}}))}),Z="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new yt:new vt({mirror:kt,mutationCb:V,stylesheetManager:X,recordCrossOriginIframes:k,wrappedEmit:W});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:kt,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});const q=new Et,ee=function(e,t){try{return e?e(t):new Ct}catch(e){return S.warn("Unable to initialize CanvasManager"),new Ct}}(O,{mirror:kt,win:window,mutationCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.CanvasMutation,...e}})),recordCanvas:x,blockClass:i,blockSelector:A,unblockSelector:s,sampling:b.canvas,dataURLOptions:E,errorHandler:R}),te="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new wt:new Bt({mutationCb:V,scrollCb:$,bypassOptions:{onMutation:j,blockClass:i,blockSelector:A,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:g,inlineStylesheet:f,maskInputOptions:U,dataURLOptions:E,maskAttributeFn:v,maskTextFn:B,maskInputFn:w,recordCanvas:x,inlineImages:F,sampling:b,slimDOMOptions:_,iframeManager:Z,stylesheetManager:X,canvasManager:ee,keepIframeSrcFn:T,processedNodeManager:q},mirror:kt}),ne=(e=!1)=>{W(It({type:Oe.Meta,data:{href:window.location.href,width:ke(),height:xe()}}),e),X.reset(),te.init(),rt.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new H,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:A=!1,maskTextClass:s="rr-mask",unmaskTextClass:a=null,maskTextSelector:l=null,unmaskTextSelector:c=null,inlineStylesheet:u=!0,inlineImages:d=!1,recordCanvas:h=!1,maskAllInputs:g=!1,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOM:y=!1,dataURLOptions:v,preserveWhiteSpace:w,onSerialize:B,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:x=()=>!1}=t||{};return fe(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:A,maskTextClass:s,unmaskTextClass:a,maskTextSelector:l,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===g?{}:g,maskAttributeFn:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:v,inlineImages:d,recordCanvas:h,preserveWhiteSpace:w,onSerialize:B,onIframeLoad:C,iframeLoadTimeout:b,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:x,newlyAddedElement:!1})}(document,{mirror:kt,blockClass:i,blockSelector:A,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:g,inlineStylesheet:f,maskAllInputs:U,maskAttributeFn:v,maskInputFn:w,maskTextFn:B,slimDOM:_,dataURLOptions:E,recordCanvas:x,inlineImages:F,onSerialize:e=>{Fe(e,kt)&&Z.addIframe(e),Pe(e,kt)&&X.trackLinkElement(e),Te(e)&&te.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),te.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{X.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!t)return S.warn("Failed to snapshot the document");W(It({type:Oe.FullSnapshot,data:{node:t,initialOffset:Ie(window)}})),rt.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,kt.getId(document))};xt=ne;try{const e=[],t=e=>tt(ht)({onMutation:j,mutationCb:V,mousemoveCb:(e,t)=>W(It({type:Oe.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.MouseInteraction,...e}})),scrollCb:$,viewportResizeCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.ViewportResize,...e}})),inputCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.Input,...e}})),mediaInteractionCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.MediaInteraction,...e}})),styleSheetRuleCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.StyleSheetRule,...e}})),styleDeclarationCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.StyleDeclaration,...e}})),canvasMutationCb:K,fontCb:e=>W(It({type:Oe.IncrementalSnapshot,data:{source:Le.Font,...e}})),selectionCb:e=>{W(It({type:Oe.IncrementalSnapshot,data:{source:Le.Selection,...e}}))},customElementCb:e=>{W(It({type:Oe.IncrementalSnapshot,data:{source:Le.CustomElement,...e}}))},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:g,maskInputOptions:U,inlineStylesheet:f,sampling:b,recordCanvas:x,inlineImages:F,userTriggeredOnInput:D,collectFonts:M,doc:e,maskAttributeFn:v,maskInputFn:w,maskTextFn:B,keepIframeSrcFn:T,blockSelector:A,unblockSelector:s,slimDOMOptions:_,dataURLOptions:E,mirror:kt,iframeManager:Z,stylesheetManager:X,shadowDomManager:te,processedNodeManager:q,canvasManager:ee,ignoreCSSAttributes:Y,plugins:r([P,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>W(It({type:Oe.Plugin,data:{plugin:e.name,payload:t}}))})))])||[]},{});Z.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){S.warn(e)}}));const n=()=>{ne(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(me("DOMContentLoaded",(()=>{W(It({type:Oe.DomContentLoaded,data:{}})),"DOMContentLoaded"===Q&&n()}))),e.push(me("load",(()=>{W(It({type:Oe.Load,data:{}})),"load"===Q&&n()}),window))),()=>{e.forEach((e=>e())),q.destroy(),xt=void 0,et()}}catch(e){S.warn(e)}}function Qt(e){return e>9999999999?e:1e3*e}function Dt(e){return e>9999999999?e/1e3:e}function Mt(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Oe.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,d.Fv)(t,10,1e3)}}),"console"===t.category))))}function Ft(e){return e.closest("button,a")||e}function Pt(e){const t=Tt(e);return t&&t instanceof Element?Ft(t):t}function Tt(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Yt;St.mirror=kt,St.takeFullSnapshot=function(e){if(!xt)throw new Error("please take full snapshot after start recording");xt(e)};class Rt{constructor(e,t,n=Mt){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=Ot()},Yt||(Yt=[],(0,h.hl)(Q,"open",(function(e){return function(...t){if(Yt)try{Yt.forEach((e=>e()))}catch(e){}return e.apply(Q,t)}}))),Yt.push(t),()=>{const e=Yt?Yt.indexOf(t):-1;e>-1&&Yt.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!jt.includes(e.tagName)||("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||(!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:Dt(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=Dt(e)}registerScroll(e=Date.now()){this._lastScroll=Dt(e)}registerClick(e){const t=Ft(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=Ot();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:A}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:A.message,timestamp:A.timestamp,category:"ui.slowClickDetected",data:{...A.data,url:Q.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,o)}else if(i>1){const e={type:"default",message:A.message,timestamp:A.timestamp,category:"ui.multiClick",data:{...A.data,url:Q.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const jt=["A","BUTTON","INPUT"];function Ot(){return Date.now()/1e3}function Lt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Nt;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Nt||(Nt={}));const Ht=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Ut(e){const t={};for(const n in e)if(Ht.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function _t(e,t){const n=St.mirror.getId(e),r=n&&St.mirror.getNode(n),o=r&&St.mirror.getMeta(r),i=o&&function(e){return e.type===Nt.Element}(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((e=>e.type===Nt.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:Ut(i.attributes)}}:{}}}const Gt={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:A,encodedBodySize:s,responseStatus:a,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Jt(i),end:Jt(o),name:r,data:{size:l,statusCode:a,decodedBodySize:A,encodedBodySize:s}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=Jt(o);return{type:n,name:r,start:i,end:i+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:A,domContentLoadedEventStart:s,domContentLoadedEventEnd:a,domInteractive:l,loadEventStart:c,loadEventEnd:u,redirectCount:d,startTime:h,transferSize:g,type:f}=e;return 0===o?null:{type:`${t}.${f}`,start:Jt(h),end:Jt(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:A,duration:o,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:a,loadEventStart:c,loadEventEnd:u,domComplete:i,redirectCount:d}}}};function zt(e){return Gt[e.entryType]?Gt[e.entryType](e):null}function Jt(e){return((f.Z1||Q.performance.timeOrigin)+e)/1e3}const Wt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Vt(e,t){Wt&&(p.kg.info(e),t&&Kt(e))}function $t(e,t){Wt&&(p.kg.info(e),t&&setTimeout((()=>{Kt(e)}),0))}function Kt(e){(0,o.n_)({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class Xt extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Zt{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>T)throw new Xt;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Qt(e):null}}class qt{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){Vt("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=({data:t})=>{const A=t;if(A.method===e&&A.id===n){if(this._worker.removeEventListener("message",i),!A.success)return Wt&&p.kg.error("[Replay]",A.response),void o(new Error("Error in compression worker"));r(A.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class en{constructor(e){this._worker=new qt(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Qt(e.timestamp);(!this._earliestTimestamp||tT?Promise.reject(new Xt):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{Wt&&p.kg.warn('[Replay] Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class tn{constructor(e){this._fallback=new Zt,this._compression=new en(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void Vt("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){Wt&&p.kg.warn("[Replay] Failed to add events when switching buffers.",e)}}}function nn(){try{return"sessionStorage"in Q&&!!Q.sessionStorage}catch(e){return!1}}function rn(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(Vt(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),1))}function fn(e){return!e.type}function pn(e){return"transaction"===e.type}function mn(e){return"feedback"===e.type}function yn(e){const t=function(){const e=(0,o.s3)();if(!e)return!1;const t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!e.isEnabled()||!fn(n)&&!pn(n))return;const o=r&&r.statusCode;t&&(!o||o<200||o>=300)||(pn(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function vn(e,t){return t.map((({type:t,start:n,end:r,name:o,data:i})=>{const A=e.throttledAddEvent({type:Oe.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof A?Promise.resolve(null):A}))}function wn(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Wt||!e.getOptions()._experiments.traceInternals)&&function(e,t){const n=t&&function(e){return void 0!==e.getClient}(t)?t.getClient():t,r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,r)||function(e,t){return!!t&&i(e)===i(t)}(e,o)}(t,(0,o.s3)())}(e,t.name)||e.addUpdate((()=>(vn(e,[t]),!0))))}function Bn(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Qn(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function Cn(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function bn(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Qn(e)];if(!e)return[void 0]}catch(t){return Wt&&p.kg.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Wt&&p.kg.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function En(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function In(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:A,request:s,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:(0,h.Jr)({method:i,statusCode:A,request:s,response:a})}}function xn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function kn(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>F,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,F);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function Sn(e,t){return Object.keys(e).reduce(((n,r)=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=e[r]),n}),{})}function Qn(e){return new URLSearchParams(e).toString()}function Dn(e,t){const n=function(e,t=Q.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Q.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return(0,v.U0)(n,t)}function Mn(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function Fn(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function Pn(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Fn(n,t):Array.isArray(n)?{}:Sn(n,t):{}}function Tn(e){const t=(0,o.s3)();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:A,networkResponseHeaders:s}=e.getOptions(),a={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:A,networkResponseHeaders:s};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(function(e,t,n){const{xhr:r,input:o}=t;if(!r)return;const i=Bn(o,n.textEncoder),A=r.getResponseHeader("content-length")?Cn(r.getResponseHeader("content-length")):function(e,t,n){try{return Bn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e,n)}catch(e){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(e.data.request_body_size=i),void 0!==A&&(e.data.response_body_size=A)}(t,n,e),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:A,xhr:s}=t,{url:a,method:l,status_code:c=0,request_body_size:u,response_body_size:d}=e.data;if(!a)return null;if(!s||!Dn(a,n.networkDetailAllowUrls)||Dn(a,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:i,url:a,method:l,statusCode:c,request:xn(u),response:xn(d)};const h=s[y.xU],g=h?Sn(h.request_headers,n.networkRequestHeaders):{},f=Sn(function(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e}),{}):{}}(s),n.networkResponseHeaders),[m,v]=n.networkCaptureBodies?bn(A):[void 0],[w,B]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Wt&&p.kg.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Wt&&p.kg.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Wt&&p.kg.warn("[Replay] Failed to get xhr response body",...t),[void 0]}(s):[void 0],C=kn(g,u,m),b=kn(f,d,w);return{startTimestamp:o,endTimestamp:i,url:a,method:l,statusCode:c,request:v?En(C,v):C,response:B?En(b,B):b}}(e,t,n),o=In("resource.xhr",r);wn(n.replay,o)}catch(e){Wt&&p.kg.error("[Replay] Failed to capture xhr breadcrumb",e)}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(function(e,t,n){const{input:r,response:o}=t,i=Bn(r?Mn(r):void 0,n.textEncoder),A=o?Cn(o.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==A&&(e.data.response_body_size=A)}(t,n,e),async function(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:A,method:s,status_code:a=0,request_body_size:l,response_body_size:c}=e.data,u=Dn(A,n.networkDetailAllowUrls)&&!Dn(A,n.networkDetailDenyUrls),d=u?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(A=t,1===(i=n).length&&"string"!=typeof i[0]?Pn(i[0],A):2===i.length?Pn(i[1],A):{}):{};var i,A;if(!e)return kn(o,r,void 0);const s=Mn(n),[a,l]=bn(s),c=kn(o,r,a);return l?En(c,l):c}(n,t.input,l):xn(l),h=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},o,i){if(!e&&void 0!==i)return xn(i);const A=o?Fn(o.headers,r):{};if(!o||!t&&void 0!==i)return kn(A,i,void 0);const[s,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Wt&&p.kg.warn("[Replay] Failed to clone response body",e)}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(e){return Wt&&p.kg.warn("[Replay] Failed to get text body from response",e),[void 0,"BODY_PARSE_ERROR"]}}(o),l=function(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:o,headers:i}){try{const A=e&&e.length&&void 0===r?Bn(e,n):r;return o?kn(i,A,t?e:void 0):xn(A)}catch(e){return Wt&&p.kg.warn("[Replay] Failed to serialize response body",e),kn(i,r,void 0)}}(s,{networkCaptureBodies:t,textEncoder:n,responseBodySize:i,captureDetails:e,headers:A});return a?En(l,a):l}(u,n,t.response,c);return{startTimestamp:o,endTimestamp:i,url:A,method:s,statusCode:a,request:d,response:h}}(e,t,n),o=In("resource.fetch",r);wn(n.replay,o)}catch(e){Wt&&p.kg.error("[Replay] Failed to capture fetch breadcrumb",e)}}(t,n,e))}catch(e){Wt&&p.kg.warn("Error when enriching network breadcrumb")}}(a,e,t))):((0,w.U)(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:r,response:o}=e;if(!n)return null;const{method:i,url:A}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:A,data:{method:i,statusCode:o?o.status:void 0}}}(t);wn(e,n)}}(e)),(0,y.UK)(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:r}=e,o=r[y.xU];if(!t||!n||!o)return null;const{method:i,url:A,status_code:s}=o;return void 0===A?null:{type:"resource.xhr",name:A,start:t/1e3,end:n/1e3,data:{method:i,statusCode:s}}}(t);wn(e,n)}}(e)))}catch(e){}}let Yn=null;function Rn(e){return!(!e||!e.on)}function jn(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function On(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Wt&&p.kg.warn("[Replay] Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(n===Le.Mutation&&e.registerMutation(t.timestamp),n===Le.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===Le.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=St.mirror.getNode(r);o instanceof HTMLElement&&n===Ne.Click&&e.registerClick(o)}}catch(e){}}(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!dn(e,n,o))return!0;if(!o)return!1;if(function(e,t){t&&e.session&&0===e.session.segmentId&&dn(e,function(e){const t=e.getOptions();return{type:Oe.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(Vt(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&An(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}function Ln(e,t,n,r){return(0,b.Jd)((0,b.Cd)(e,(0,b.HY)(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}class Nn extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Hn extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function Un(e,t={count:0,interval:5e3}){const{recordingData:n,options:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:A}){const l=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:d,initialTimestamp:h}=r,g=(0,o.s3)(),f=(0,o.nZ)(),p=g&&g.getTransport(),m=g&&g.getDsn();if(!(g&&p&&m&&A.sampled))return;const y={type:"replay_event",replay_start_timestamp:h/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:c,replay_id:t,segment_id:n,replay_type:A.sampled},v=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,o);const i=await(0,s.R)(e.getOptions(),r,o,t,e,(0,a.aF)());if(!i)return null;i.platform=i.platform||"javascript";const A=e.getSdkMetadata&&e.getSdkMetadata(),{name:l,version:c}=A&&A.sdk||{};return i.sdk={...i.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0"},i}({scope:f,client:g,replayId:t,event:y});if(!v)return g.recordDroppedEvent("event_processor","replay",y),void Vt("An event processor returned `null`, will not send event.");delete v.sdkProcessingMetadata;const w=Ln(v,l,m,g.getOptions().tunnel);let B;try{B=await p.send(w)}catch(e){const t=new Error(M);try{t.cause=e}catch(e){}throw t}if(!B)return B;if("number"==typeof B.statusCode&&(B.statusCode<200||B.statusCode>=300))throw new Nn(B.statusCode);const C=(0,E.WG)({},B);if((0,E.Q)(C,"replay"))throw new Hn(C);return B}(e),!0}catch(n){if(n instanceof Nn||n instanceof Hn)throw n;if((0,o.v)("Replays",{_retryCount:t.count}),Wt&&r._experiments&&r._experiments.captureExceptions&&(0,o.Tb)(n),t.count>=3){const e=new Error(`${M} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Un(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const _n="__THROTTLED";class Gn{constructor({options:e,recordingOptions:t}){Gn.prototype.__init.call(this),Gn.prototype.__init2.call(this),Gn.prototype.__init3.call(this),Gn.prototype.__init4.call(this),Gn.prototype.__init5.call(this),Gn.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,o,i;const A=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return a(),r=e(),r}function a(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function l(){return o&&clearTimeout(o),o=setTimeout(s,t),A&&void 0===i&&(i=setTimeout(s,A)),r}return l.cancel=a,l.flush=function(){return void 0!==o||void 0!==i?s():r},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,n){const r=new Map;let o=!1;return(...i)=>{const A=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{ne+t),0)>=t){const e=o;return o=!0,e?"__SKIPPED":_n}o=!1;const s=r.get(A)||0;return r.set(A,s+1),e(...i)}}(((e,t)=>function(e,t,n){return gn(e,t)?hn(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new Rt(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",$t(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");$t("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const e=un({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");$t("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=un({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=St({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:On(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{Vt("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,n=this,function(){if(nn())try{Q.sessionStorage.removeItem(D)}catch(e){}}(),n.session=void 0}catch(e){this._handleException(e)}}var n}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Vt("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Vt("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();Vt("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&an(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Q.location.pathname}${Q.location.hash}${Q.location.search}`,t=`${Q.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===_n){const e=Lt({category:"replay.throttled"});this.addUpdate((()=>!dn(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||(0,o.nZ)().getTransaction(),t=(e&&(0,l.XU)(e).data||{})[c.Zj];if(e&&t&&["route","custom"].includes(t))return(0,l.XU)(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;Vt("[Replay] Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new tn(n)}catch(e){Vt("[Replay] Failed to create compression worker")}}(t);if(e)return e}return Vt("[Replay] Using simple buffer"),new Zt}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){Wt&&p.kg.error("[Replay]",e),Wt&&this._options._experiments&&this._options._experiments.captureExceptions&&(0,o.Tb)(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=un({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!cn(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Q.document.addEventListener("visibilitychange",this._handleVisibilityChange),Q.addEventListener("blur",this._handleWindowBlur),Q.addEventListener("focus",this._handleWindowFocus),Q.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=(0,o.nZ)(),n=(0,o.s3)();t.addScopeListener((e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return Yn!==t&&t?(Yn=t,!t.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:"console"===t.category?function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return Lt(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>P?(n=!0,`${e.slice(0,P)}…`):e;if("object"==typeof e)try{const t=(0,d.Fv)(e,7);return JSON.stringify(t).length>P?(n=!0,`${JSON.stringify(t,null,2).slice(0,P)}…`):t}catch(e){}return e}));return Lt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t):Lt(t)):null}(t);n&&Mt(e,n)})(e)),(0,B.O)((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?Pt(e.event):Tt(e.event),n=(0,g.Rt)(r,{maxStringLength:200})||""}catch(e){n=""}return{target:r,message:n}}(e);return Lt({category:`ui.${e.name}`,..._t(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,Pt(t.event)),Mt(e,n)})(e)),(0,C.a)(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(vn(e,[n]),!1))))}}(e)),Tn(e);const r=function(e,t=!1){const n=t?yn(e):void 0;return Object.assign(((t,r)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!fn(t)&&!pn(t)&&!mn(t))return t;if(!e.checkAndHandleExpiredSession())return t;if(mn(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:Oe.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,r)&&!e.getOptions()._experiments.captureExceptions)return Wt&&p.kg.log("[Replay] Ignoring error from rrweb internals",t),null;const o=function(e,t){return"buffer"===e.recordingMode&&t.message!==M&&!(!t.exception||t.type)&&rn(e.getOptions().errorSampleRate)}(e,t);return(o||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t}),{id:"Replay"})}(e,!Rn(n));n&&n.addEventProcessor?n.addEventProcessor(r):(0,A.Q)(r),Rn(n)&&(n.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&fn(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;"string"==typeof n&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Mt(e,Lt({category:"replay.hydrate-error"}))}(e,t)}}(e)),n.on("afterSendEvent",yn(e)),n.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})),n.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&(e.flush(),t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r))})))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push((0,k._j)(e,n))})),r.push((0,k.$A)((({metric:t})=>{e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,o=e.value,i=Jt(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?St.mirror.getId(r):void 0}}}(t))}))),()=>{r.forEach((e=>e()))}}(this)}_removeListeners(){try{Q.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Q.removeEventListener("blur",this._handleWindowBlur),Q.removeEventListener("focus",this._handleWindowFocus),Q.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Q.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Lt({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Lt({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:A}=e;if(!A||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(A)||!i)return null;const s=t||r||o,a=1===i.length;if(!s&&a)return null;const l=(0,g.Rt)(A,{maxStringLength:200})||"";return Lt({category:"ui.keyDown",message:l,data:{..._t(A,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(t);n&&Mt(e,n)}(this,e)}}_doChangeToBackgroundTasks(e){this.session&&(ln(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Vt("[Replay] Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Oe.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=(t=this.performanceEntries,t.map(zt).filter(Boolean)).concat(this.replayPerformanceEntries);var t;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(vn(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Un({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=(0,o.s3)();t&&t.recordDroppedEvent("send_error","replay")}}else Wt&&p.kg.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(Wt&&p.kg.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return Vt(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&Vt("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(e){Wt&&p.kg.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&An(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=Lt({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function zn(e,t,n,r){const o=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==n&&("string"==typeof n&&o.push(`.${n}`),(0,p.Cf)((()=>{S.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),o.join(",")}const Jn='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Wn=["content-length","content-type","accept"];let Vn=!1;const $n=e=>new Kn(e);class Kn{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:A,_experiments:s={},sessionSampleRate:a,errorSampleRate:l,maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:h=750,mutationLimit:g=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:p=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:v=!0,networkRequestHeaders:w=[],networkResponseHeaders:B=[],mask:C=[],maskAttributes:b=["title","placeholder"],unmask:E=[],block:I=[],unblock:k=[],ignore:Q=[],maskFn:D,beforeAddRecordingEvent:M,beforeErrorSampling:F,blockClass:P,blockSelector:T,maskInputOptions:Y,maskTextClass:R,maskTextSelector:j,ignoreClass:O}={}){this.name=Kn.id;const L=function({mask:e,unmask:t,block:n,unblock:r,ignore:o,blockClass:i,blockSelector:A,maskTextClass:s,maskTextSelector:a,ignoreClass:l}){const c={maskTextSelector:zn(e,[".sentry-mask","[data-sentry-mask]"],s,a),unmaskTextSelector:zn(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:zn(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,A),unblockSelector:zn(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:zn(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return i instanceof RegExp&&(c.blockClass=i),s instanceof RegExp&&(c.maskTextClass=s),c}({mask:C,unmask:E,block:I,unblock:k,ignore:Q,blockClass:P,blockSelector:T,maskTextClass:R,maskTextSelector:j,ignoreClass:O});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{...Y||{},password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:b,maskAllText:c,privacyOptions:L,key:e,value:t,el:n}),...L,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,36e5),stickySession:o,sessionSampleRate:a,errorSampleRate:l,useCompression:i,workerUrl:A,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:h,mutationLimit:g,slowClickTimeout:f,slowClickIgnoreSelectors:p,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:v,networkRequestHeaders:Xn(w),networkResponseHeaders:Xn(B),beforeAddRecordingEvent:M,beforeErrorSampling:F,_experiments:s},"number"==typeof a&&(S.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${a} })`),this._initialOptions.sessionSampleRate=a),"number"==typeof l&&(S.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${l} })`),this._initialOptions.errorSampleRate=l),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Jn}`:Jn),this._isInitialized&&x())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Vn}set _isInitialized(e){Vn=e}setupOnce(){x()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=function(e){const t=(0,o.s3)(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...(0,h.Jr)(e)};return n?(null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&(0,p.Cf)((()=>{S.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):((0,p.Cf)((()=>{S.warn("SDK client is not available.")})),r)}(this._initialOptions);this._replay=new Gn({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const e=(0,o.s3)().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function Xn(e){return[...Wn,...e.map((e=>e.toLowerCase()))]}Kn.__initStatic()},9181:(e,t,n)=>{"use strict";n.d(t,{EN:()=>c,IQ:()=>u,bU:()=>A});var r=n(3897),o=n(7597),i=n(2343);const A="baggage",s="sentry-",a=/^sentry-/,l=8192;function c(e){if(!(0,o.HD)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>{const n=d(t);for(const t of Object.keys(n))e[t]=n[t];return e}),{});else{if(!e)return;t=d(e)}const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(a)&&(e[t.slice(s.length)]=n),e)),{});return Object.keys(n).length>0?n:void 0}function u(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce(((e,[t,n],o)=>{const A=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===o?A:`${e},${A}`;return s.length>l?(r.X&&i.kg.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${s}${t}`]=n),e)),{}))}function d(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}},8464:(e,t,n)=>{"use strict";n.d(t,{Rt:()=>A,iY:()=>c,l4:()=>a,qT:()=>l});var r=n(7597);const o=(0,n(1235).R)(),i=80;function A(e,t={}){if(!e)return"";try{let n=e;const r=5,o=[];let A=0,a=0;const l=" > ",c=l.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||i;for(;n&&A++1&&a+o.length*c+u.length>=h));)o.push(u),a+=u.length,n=n.parentNode;return o.reverse().join(l)}catch(e){return""}}function s(e,t){const n=e,i=[];let A,s,a,l,c;if(!n||!n.tagName)return"";if(o.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(u&&u.length)u.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),A=n.className,A&&(0,r.HD)(A))for(s=A.split(/\s+/),c=0;c{"use strict";n.d(t,{X:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},292:(e,t,n)=>{"use strict";n.d(t,{RA:()=>s,vK:()=>l});var r=n(3897),o=n(2343),i=n(5108);const A=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function s(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:A,protocol:s,publicKey:a}=e;return`${s}://${a}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${A}`}function a(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function l(e){const t="string"==typeof e?function(e){const t=A.exec(e);if(!t)return void(0,o.Cf)((()=>{i.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,s="",l,c="",u]=t.slice(1);let d="",h=u;const g=h.split("/");if(g.length>1&&(d=g.slice(0,-1).join("/"),h=g.pop()),h){const e=h.match(/^\d+/);e&&(h=e[0])}return a({host:l,pass:s,path:d,projectId:h,port:c,protocol:n,publicKey:r})}(e):a(e);if(t&&function(e){if(!r.X)return!0;const{port:t,projectId:n,protocol:i}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(o.kg.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(i)?t&&isNaN(parseInt(t,10))&&(o.kg.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(o.kg.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(o.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}},8518:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(t,{S:()=>o,n:()=>r})},8725:(e,t,n)=>{"use strict";n.d(t,{BO:()=>s,Cd:()=>f,HY:()=>g,Jd:()=>A,V$:()=>c,gv:()=>a,mL:()=>h,zQ:()=>u});var r=n(292),o=n(8007),i=n(535);function A(e,t=[]){return[e,t]}function s(e,t){const[n,r]=e;return[n,[...r,t]]}function a(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function l(e,t){return(t||new TextEncoder).encode(e)}function c(e,t){const[n,r]=e;let i=JSON.stringify(n);function A(e){"string"==typeof i?i="string"==typeof e?i+e:[l(i,t),e]:i.push("string"==typeof e?l(e,t):e)}for(const e of r){const[t,n]=e;if(A(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)A(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify((0,o.Fv)(n))}A(e)}}return"string"==typeof i?i:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function u(e,t){const n="string"==typeof e.data?l(e.data,t):e.data;return[(0,i.Jr)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const d={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 h(e){return d[e]}function g(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function f(e,t,n,o){const A=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&o&&{dsn:(0,r.RA)(o)},...A&&{trace:(0,i.Jr)({...A})}}}},409:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});class r extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}},9729:(e,t,n)=>{"use strict";n.d(t,{D2:()=>l,Hj:()=>a,rK:()=>c});var r=n(3897),o=n(2343),i=n(1738);const A={},s={};function a(e,t){A[e]=A[e]||[],A[e].push(t)}function l(e,t){s[e]||(t(),s[e]=!0)}function c(e,t){const n=e&&A[e];if(n)for(const A of n)try{A(t)}catch(t){r.X&&o.kg.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${(0,i.$P)(A)}\nError:`,t)}}},5316:(e,t,n)=>{"use strict";n.d(t,{O:()=>d});var r=n(2844),o=n(535),i=n(1235),A=n(9729);const s=i.GLOBAL_OBJ,a=1e3;let l,c,u;function d(e){(0,A.Hj)("dom",e),(0,A.D2)("dom",h)}function h(){if(!s.document)return;const e=A.rK.bind(null,"dom"),t=g(e,!0);s.document.addEventListener("click",t,!1),s.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=s[t]&&s[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,o.hl)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},A=i[n]=i[n]||{refCount:0};if(!A.handler){const r=g(e);A.handler=r,t.call(this,n,r,o)}A.refCount++}catch(e){}return t.call(this,n,r,o)}})),(0,o.hl)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function g(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const i=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,i))return;(0,o.xp)(n,"_sentryCaptured",!0),i&&!i._sentryId&&(0,o.xp)(i,"_sentryId",(0,r.DM)());const A="keypress"===n.type?"input":n.type;(function(e){if(e.type!==c)return!1;try{if(!e.target||e.target._sentryId!==u)return!1}catch(e){}return!0})(n)||(e({event:n,name:A,global:t}),c=n.type,u=i?i._sentryId:void 0),clearTimeout(l),l=s.setTimeout((()=>{u=void 0,c=void 0}),a)}}},1394:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(535),o=n(8823),i=n(1235),A=n(9729);function s(e){const t="fetch";(0,A.Hj)(t,e),(0,A.D2)(t,a)}function a(){(0,o.t$)()&&(0,r.hl)(i.GLOBAL_OBJ,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:c(t),method:l(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:c(t),method:l(t,"method")?String(t.method).toUpperCase():"GET"}}(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return(0,A.rK)("fetch",{...o}),e.apply(i.GLOBAL_OBJ,t).then((e=>{const t={...o,endTimestamp:Date.now(),response:e};return(0,A.rK)("fetch",t),e}),(e=>{const t={...o,endTimestamp:Date.now(),error:e};throw(0,A.rK)("fetch",t),e}))}}))}function l(e,t){return!!e&&"object"==typeof e&&!!e[t]}function c(e){return"string"==typeof e?e:e?l(e,"url")?e.url:e.toString?e.toString():"":""}},1674:(e,t,n)=>{"use strict";n.d(t,{V:()=>A});var r=n(1235),o=n(9729);let i=null;function A(e){const t="error";(0,o.Hj)(t,e),(0,o.D2)(t,s)}function s(){i=r.GLOBAL_OBJ.onerror,r.GLOBAL_OBJ.onerror=function(e,t,n,r,A){const s={column:r,error:A,line:n,msg:e,url:t};return(0,o.rK)("error",s),!(!i||i.__SENTRY_LOADER__)&&i.apply(this,arguments)},r.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}},7373:(e,t,n)=>{"use strict";n.d(t,{h:()=>A});var r=n(1235),o=n(9729);let i=null;function A(e){const t="unhandledrejection";(0,o.Hj)(t,e),(0,o.D2)(t,s)}function s(){i=r.GLOBAL_OBJ.onunhandledrejection,r.GLOBAL_OBJ.onunhandledrejection=function(e){const t=e;return(0,o.rK)("unhandledrejection",t),!(i&&!i.__SENTRY_LOADER__)||i.apply(this,arguments)},r.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}},734:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var r=n(535),o=n(1235);const i=(0,o.R)();var A=n(9729);const s=o.GLOBAL_OBJ;let a;function l(e){const t="history";(0,A.Hj)(t,e),(0,A.D2)(t,c)}function c(){if(!function(){const e=i.chrome,t=e&&e.app&&e.app.runtime,n="history"in i&&!!i.history.pushState&&!!i.history.replaceState;return!t&&n}())return;const e=s.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=a,t=String(n);a=t;const r={from:e,to:t};(0,A.rK)("history",r)}return e.apply(this,t)}}s.onpopstate=function(...t){const n=s.location.href,r=a;a=n;const o={from:r,to:n};if((0,A.rK)("history",o),e)try{return e.apply(this,t)}catch(e){}},(0,r.hl)(s.history,"pushState",t),(0,r.hl)(s.history,"replaceState",t)}},5322:(e,t,n)=>{"use strict";n.d(t,{UK:()=>l,xU:()=>a});var r=n(7597),o=n(535),i=n(1235),A=n(9729);const s=i.GLOBAL_OBJ,a="__sentry_xhr_v3__";function l(e){(0,A.Hj)("xhr",e),(0,A.D2)("xhr",c)}function c(){if(!s.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;(0,o.hl)(e,"open",(function(e){return function(...t){const n=Date.now(),i=(0,r.HD)(t[0])?t[0].toUpperCase():void 0,s=function(e){if((0,r.HD)(e))return e;try{return e.toString()}catch(e){}}(t[1]);if(!i||!s)return e.apply(this,t);this[a]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const l=()=>{const e=this[a];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}const t={args:[i,s],endTimestamp:Date.now(),startTimestamp:n,xhr:this};(0,A.rK)("xhr",t)}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,o.hl)(this,"onreadystatechange",(function(e){return function(...t){return l(),e.apply(this,t)}})):this.addEventListener("readystatechange",l),(0,o.hl)(this,"setRequestHeader",(function(e){return function(...t){const[n,o]=t,i=this[a];return i&&(0,r.HD)(n)&&(0,r.HD)(o)&&(i.request_headers[n.toLowerCase()]=o),e.apply(this,t)}})),e.apply(this,t)}})),(0,o.hl)(e,"send",(function(e){return function(...t){const n=this[a];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);const r={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return(0,A.rK)("xhr",r),e.apply(this,t)}}))}},7597:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>m,HD:()=>l,J8:()=>p,Kj:()=>f,Le:()=>c,PO:()=>d,TX:()=>s,V9:()=>v,VW:()=>A,VZ:()=>o,cO:()=>h,fm:()=>a,i2:()=>y,kK:()=>g,pt:()=>u,y1:()=>w});const r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(e,Error)}}function i(e,t){return r.call(e)===`[object ${t}]`}function A(e){return i(e,"ErrorEvent")}function s(e){return i(e,"DOMError")}function a(e){return i(e,"DOMException")}function l(e){return i(e,"String")}function c(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function u(e){return null===e||c(e)||"object"!=typeof e&&"function"!=typeof e}function d(e){return i(e,"Object")}function h(e){return"undefined"!=typeof Event&&v(e,Event)}function g(e){return"undefined"!=typeof Element&&v(e,Element)}function f(e){return i(e,"RegExp")}function p(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function m(e){return d(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"==typeof e&&e!=e}function v(e,t){try{return e instanceof t}catch(e){return!1}}function w(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}},2343:(e,t,n)=>{"use strict";n.d(t,{Cf:()=>s,LD:()=>A,RU:()=>i,kg:()=>a});var r=n(3897),o=n(1235);const i=["debug","info","warn","error","log","assert","trace"],A={};function s(e){if(!("console"in o.GLOBAL_OBJ))return e();const t=o.GLOBAL_OBJ.console,n={},r=Object.keys(A);r.forEach((e=>{const r=A[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const a=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return r.X?i.forEach((n=>{t[n]=(...t)=>{e&&s((()=>{o.GLOBAL_OBJ.console[n](`Sentry Logger [${n}]:`,...t)}))}})):i.forEach((e=>{t[e]=()=>{}})),t}()},2844:(e,t,n)=>{"use strict";n.d(t,{DM:()=>i,Db:()=>a,EG:()=>l,YO:()=>c,jH:()=>s,lE:()=>u});var r=n(535),o=n(1235);function i(){const e=o.GLOBAL_OBJ,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function A(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function s(e){const{message:t,event_id:n}=e;if(t)return t;const r=A(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function a(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function l(e,t){const n=A(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function c(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(e){}return!1}function u(e){return Array.isArray(e)?e:[e]}},1422:(e,t,n)=>{"use strict";n.d(t,{KV:()=>i});var r=n(8518);e=n.hmd(e);var o=n(4155);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==o?o:0)}},8007:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>A,Qy:()=>s});var r=n(7597),o=n(535),i=n(1738);function A(e,t=100,n=1/0){try{return a("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function s(e,t=3,n=102400){const r=A(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?s(e,t-1,n):r;var o}function a(e,t,A=1/0,s=1/0,l=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e=s){f[e]="[MaxProperties ~]";break}const t=m[e];f[e]=a(e,t,h-1,s,l),p++}return u(t),f}},535:(e,t,n)=>{"use strict";n.d(t,{$Q:()=>c,HK:()=>u,Jr:()=>m,Sh:()=>h,_j:()=>d,hl:()=>a,xp:()=>l,zf:()=>p});var r=n(8464),o=n(3897),i=n(7597),A=n(2343),s=n(7321);function a(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&c(o,r),e[t]=o}function l(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){o.X&&A.kg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function c(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,l(e,"__sentry_original__",t)}catch(e){}}function u(e){return e.__sentry_original__}function d(e){return Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&")}function h(e){if((0,i.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...f(e)};if((0,i.cO)(e)){const t={type:e.type,target:g(e.target),currentTarget:g(e.currentTarget),...f(e)};return"undefined"!=typeof CustomEvent&&(0,i.V9)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function g(e){try{return(0,i.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(e){return""}}function f(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function p(e,t=40){const n=Object.keys(h(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return(0,s.$G)(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:(0,s.$G)(r,t)}return""}function m(e){return y(e,new Map)}function y(e,t){if(function(e){if(!(0,i.PO)(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=y(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(y(e,t))})),r}return e}},228:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,WG:()=>i});const r=6e4;function o(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function i(e,{statusCode:t,headers:n},o=Date.now()){const i={...e},A=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(A)for(const e of A.trim().split(",")){const[t,n]=e.split(":",2),r=parseInt(t,10),A=1e3*(isNaN(r)?60:r);if(n)for(const e of n.split(";"))i[e]=o+A;else i.all=o+A}else s?i.all=o+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const o=Date.parse(`${e}`);return isNaN(o)?r:o-t}(s,o):429===t&&(i.all=o+6e4);return i}},1738:(e,t,n)=>{"use strict";n.d(t,{$P:()=>l,Sq:()=>s,pE:()=>A});const r=50,o=/\(error: (.*)\)/,i=/captureMessage|captureException/;function A(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const A=[],s=e.split("\n");for(let e=n;e1024)continue;const i=o.test(n)?n.replace(o,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){A.push(t);break}}if(A.length>=r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),i.test(t[t.length-1].function||"")&&(t.pop(),i.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,r).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(A)}}function s(e){return Array.isArray(e)?A(...e):e}const a="";function l(e){try{return e&&"function"==typeof e&&e.name||a}catch(e){return a}}},7321:(e,t,n)=>{"use strict";n.d(t,{$G:()=>o,U0:()=>A,nK:()=>i});var r=n(7597);function o(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function i(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;tfunction(e,t,n=!1){return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(n?e===t:e.includes(t)))}(e,t,n)))}},8823:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>A,Du:()=>s,t$:()=>a});var r=n(3897),o=n(2343);const i=(0,n(1235).R)();function A(){if(!("fetch"in i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function s(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function a(){if("string"==typeof EdgeRuntime)return!0;if(!A())return!1;if(s(i.fetch))return!0;let e=!1;const t=i.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=s(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r.X&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}},6893:(e,t,n)=>{"use strict";n.d(t,{$2:()=>A,WD:()=>i,cW:()=>s});var r,o=n(7597);function i(e){return new s((t=>{t(e)}))}function A(e){return new s(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(r||(r={}));class s{constructor(e){s.prototype.__init.call(this),s.prototype.__init2.call(this),s.prototype.__init3.call(this),s.prototype.__init4.call(this),this._state=r.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new s(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new s(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===r.PENDING&&((0,o.J8)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)}))}}}},1170:(e,t,n)=>{"use strict";n.d(t,{Z1:()=>a,ph:()=>A,yW:()=>i});var r=n(1235);const o=1e3;function i(){return Date.now()/o}const A=function(){const{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return i;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/o}();let s;const a=(()=>{const{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return void(s="none");const t=36e5,n=e.now(),o=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-o):t,A=i{"use strict";n.d(t,{$p:()=>s,pT:()=>A});var r=n(9181),o=n(2844);const i=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function A(e,t){const n=function(e){if(!e)return;const t=e.match(i);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),A=(0,r.EN)(t),{traceId:s,parentSpanId:a,parentSampled:l}=n||{};return n?{traceId:s||(0,o.DM)(),parentSpanId:a||(0,o.DM)().substring(16),spanId:(0,o.DM)().substring(16),sampled:l,dsc:A||{}}:{traceId:s||(0,o.DM)(),spanId:(0,o.DM)().substring(16)}}function s(e=(0,o.DM)(),t=(0,o.DM)().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}},6956:(e,t,n)=>{"use strict";function r(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}}function o(e){return e.split(/\\?\//).filter((e=>e.length>0&&","!==e)).length}n.d(t,{$A:()=>o,en:()=>r})},1235:(e,t,n)=>{"use strict";function r(e){return e&&e.Math==Math?e:void 0}n.d(t,{GLOBAL_OBJ:()=>o,R:()=>i,Y:()=>A});const o="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function i(){return o}function A(e,t,n){const r=n||o,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}},9282:(e,t,n)=>{"use strict";var r=n(4155),o=n(5108);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function A(e,t){for(var n=0;n1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o{"use strict";var r=n(4155);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var v="",w="",B="",C="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function E(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function I(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var x=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(x,e);var n,o,s,c,u=(n=x,o=d(),function(){var e,t=g(n);if(o){var r=g(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function x(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),"object"!==f(e)||null===e)throw new m("options","Object",e);var n=e.message,o=e.operator,i=e.stackStartFn,A=e.actual,s=e.expected,c=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)t=u.call(this,String(n));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(v="",w="",C="",B=""):(v="",w="",C="",B="")),"object"===f(A)&&null!==A&&"object"===f(s)&&null!==s&&"stack"in A&&A instanceof Error&&"stack"in s&&s instanceof Error&&(A=E(A),s=E(s)),"deepStrictEqual"===o||"strictEqual"===o)t=u.call(this,function(e,t,n){var o="",i="",A=0,s="",a=!1,l=I(e),c=l.split("\n"),u=I(t).split("\n"),d=0,h="";if("strictEqual"===n&&"object"===f(e)&&"object"===f(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var g=c[0].length+u[0].length;if(g<=10){if(!("object"===f(e)&&null!==e||"object"===f(t)&&null!==t||0===e&&0===t))return"".concat(b[n],"\n\n")+"".concat(c[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==n&&g<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;c[0][d]===u[0][d];)d++;d>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",d),"^"),d=0)}}for(var p=c[c.length-1],m=u[u.length-1];p===m&&(d++<2?s="\n ".concat(p).concat(s):o=p,c.pop(),u.pop(),0!==c.length&&0!==u.length);)p=c[c.length-1],m=u[u.length-1];var E=Math.max(c.length,u.length);if(0===E){var x=l.split("\n");if(x.length>30)for(x[26]="".concat(v,"...").concat(C);x.length>27;)x.pop();return"".concat(b.notIdentical,"\n\n").concat(x.join("\n"),"\n")}d>3&&(s="\n".concat(v,"...").concat(C).concat(s),a=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var k=0,S=b[n]+"\n".concat(w,"+ actual").concat(C," ").concat(B,"- expected").concat(C),Q=" ".concat(v,"...").concat(C," Lines skipped");for(d=0;d1&&d>2&&(D>4?(i+="\n".concat(v,"...").concat(C),a=!0):D>3&&(i+="\n ".concat(u[d-2]),k++),i+="\n ".concat(u[d-1]),k++),A=d,o+="\n".concat(B,"-").concat(C," ").concat(u[d]),k++;else if(u.length1&&d>2&&(D>4?(i+="\n".concat(v,"...").concat(C),a=!0):D>3&&(i+="\n ".concat(c[d-2]),k++),i+="\n ".concat(c[d-1]),k++),A=d,i+="\n".concat(w,"+").concat(C," ").concat(c[d]),k++;else{var M=u[d],F=c[d],P=F!==M&&(!y(F,",")||F.slice(0,-1)!==M);P&&y(M,",")&&M.slice(0,-1)===F&&(P=!1,F+=","),P?(D>1&&d>2&&(D>4?(i+="\n".concat(v,"...").concat(C),a=!0):D>3&&(i+="\n ".concat(c[d-2]),k++),i+="\n ".concat(c[d-1]),k++),A=d,i+="\n".concat(w,"+").concat(C," ").concat(F),o+="\n".concat(B,"-").concat(C," ").concat(M),k+=2):(i+=o,o="",1!==D&&0!==d||(i+="\n ".concat(F),k++))}if(k>20&&d30)for(h[26]="".concat(v,"...").concat(C);h.length>27;)h.pop();t=1===h.length?u.call(this,"".concat(d," ").concat(h[0])):u.call(this,"".concat(d,"\n\n").concat(h.join("\n"),"\n"))}else{var g=I(A),p="",k=b[o];"notDeepEqual"===o||"notEqual"===o?(g="".concat(b[o],"\n\n").concat(g)).length>1024&&(g="".concat(g.slice(0,1021),"...")):(p="".concat(I(s)),g.length>512&&(g="".concat(g.slice(0,509),"...")),p.length>512&&(p="".concat(p.slice(0,509),"...")),"deepEqual"===o||"equal"===o?g="".concat(k,"\n\n").concat(g,"\n\nshould equal\n\n"):p=" ".concat(o," ").concat(p)),t=u.call(this,"".concat(g).concat(p))}return Error.stackTraceLimit=c,t.generatedMessage=!n,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=A,t.expected=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",a(t)}return s=x,(c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return p(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&A(s.prototype,c),Object.defineProperty(s,"prototype",{writable:!1}),x}(c(Error),p.custom);e.exports=x},2136:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var A,s,a={};function l(e,t,n){n||(n=Error);var A=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,n);var A,s,a,l=(s=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(n,r,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i=l.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,o)),i.code=e,i}return A=c,Object.defineProperty(A,"prototype",{writable:!1}),A}(n);a[e]=A}function c(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,s,a,l,u;if(void 0===A&&(A=n(9282)),A("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(0,4)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(c(t,"type"));else{var d=("number"!=typeof u&&(u=0),u+1>(l=e).length||-1===l.indexOf(".",u)?"argument":"property");a='The "'.concat(e,'" ').concat(d," ").concat(i," ").concat(c(t,"type"))}return a+". Received type ".concat(r(o))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=n(9539));var o=s.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(o)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=a},9158:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,A,s=[],a=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=n.return&&(A=n.return(),Object(A)!==A))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(F).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function T(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),A=i[0],a=i[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,A,a)),c=0,u=a>0?A-4:A;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],A=16383,s=0,l=r-o;sl?l:s+A));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0;A<64;++A)n[A]=i[A],r[i.charCodeAt(A)]=A;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function a(e,t,r){for(var o,i,A=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return A.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(e,t,n)=>{"use strict";var r=n(5108);const o=n(9742),i=n(645),A="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=l,t.h2=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let r=a(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const o=function(e){if(l.isBuffer(e)){const t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),a(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=a(t);for(let r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(o)return r?-1:W(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return Q(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,o){let i,A=1,s=e.length,a=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;A=2,s/=2,a/=2,n/=2}function l(e,t){return 1===A?e[t]:e.readUInt16BE(t*A)}if(o){let r=-1;for(i=n;is&&(n=s-a),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let A;for(r>i/2&&(r=i/2),A=0;A>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+A<=n){let n,r,s,a;switch(A){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(a=(31&t)<<6|63&n,a>127&&(i=a));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(a=(15&t)<<12|(63&n)<<6|63&r,a>2047&&(a<55296||a>57343)&&(i=a));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(a=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,a>65535&&a<1114112&&(i=a))}}null===i?(i=65533,A=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=A}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},A&&(l.prototype[A]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,o){if(K(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),A=(n>>>=0)-(t>>>=0);const s=Math.min(i,A),a=this.slice(r,o),c=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return B(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function Q(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function Y(e,t,n,r,o){_(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let A=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=A,A>>=8,e[n++]=A,A>>=8,e[n++]=A,A>>=8,e[n++]=A,n}function R(e,t,n,r,o){_(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let A=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=A,A>>=8,e[n+2]=A,A>>=8,e[n+1]=A,A>>=8,e[n]=A,n+8}function j(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return t=+t,n>>>=0,o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return t=+t,n>>>=0,o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=q((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||T(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||T(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=q((function(e,t=0){return Y(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=q((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,e,t,n,r-1,-r)}let o=0,i=1,A=0;for(this[t]=255&e;++o>>=0,!r){const r=Math.pow(2,8*n-1);T(this,e,t,n,r-1,-r)}let o=n-1,i=1,A=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===A&&0!==this[t+o+1]&&(A=1),this[t+o]=(e/i|0)-A&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=q((function(e,t=0){return Y(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=q((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function _(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new N.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||z(t,e.length-(n+1))}(r,o,i)}function G(e,t){if("number"!=typeof e)throw new N.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new N.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}H("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),H("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),H("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=U(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=U(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function W(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let A=0;A55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(A+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},5116:(e,t,n)=>{"use strict";var r=n(8612),o=n(1768),i=n(8928),A=n(9770);e.exports=A||r.call(i,o)},3192:(e,t,n)=>{"use strict";var r=n(8612),o=n(1768),i=n(5116);e.exports=function(){return i(r,o,arguments)}},1768:e=>{"use strict";e.exports=Function.prototype.apply},8928:e=>{"use strict";e.exports=Function.prototype.call},319:(e,t,n)=>{"use strict";var r=n(8612),o=n(4453),i=n(8928),A=n(5116);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return A(r,i,e)}},9770:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},1924:(e,t,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},5559:(e,t,n)=>{"use strict";var r=n(7771),o=n(4429),i=n(319),A=n(3192);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:A}):e.exports.apply=A},7379:(e,t,n)=>{"use strict";var r=n(210),o=n(319),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},5108:(e,t,n)=>{var r=n(9539),o=n(9282);function i(){return(new Date).getTime()}var A,s=Array.prototype.slice,a={};A=void 0!==n.g&&n.g.console?n.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var l=[[function(){},"log"],[function(){A.log.apply(A,arguments)},"info"],[function(){A.log.apply(A,arguments)},"warn"],[function(){A.warn.apply(A,arguments)},"error"],[function(e){a[e]=i()},"time"],[function(e){var t=a[e];if(!t)throw new Error("No such label: "+e);delete a[e];var n=i()-t;A.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),A.error(e.stack)},"trace"],[function(e){A.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,r.format.apply(null,t))}},"assert"]],c=0;c=t?e:""+Array(t+1-r.length).join(n)+e},m={s:p,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+p(r,2,"0")+":"+p(o,2,"0")},m:function e(t,n){if(t.date()1)return e(A[0])}else{var s=t.name;v[s]=t,o=s}return!r&&o&&(y=o),o||!r&&y},b=function(e,t){if(B(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new I(n)},E=m;E.l=C,E.i=B,E.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var I=function(){function f(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var p=f.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return E},p.isValid=function(){return!(this.$d.toString()===d)},p.isSame=function(e,t){var n=b(e);return this.startOf(t)<=n&&n<=this.endOf(t)},p.isAfter=function(e,t){return b(e){"use strict";var r=n(4429),o=n(3464),i=n(4453),A=n(7296);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],u=!!A&&A(e,t);if(r)r(e,t,{configurable:null===l&&u?u.configurable:!l,enumerable:null===s&&u?u.enumerable:!s,value:n,writable:null===a&&u?u.writable:!a});else{if(!c&&(s||a||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},4289:(e,t,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,A=Array.prototype.concat,s=n(2296),a=n(1044)(),l=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;a?s(e,t,n,!0):s(e,t,n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=A.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s{"use strict";var t={single_source_shortest_paths:function(e,n,r){var o={},i={};i[n]=0;var A,s,a,l,c,u,d,h=t.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(a in s=(A=h.pop()).value,l=A.cost,c=e[s]||{})c.hasOwnProperty(a)&&(u=l+c[a],d=i[a],(void 0===i[a]||d>u)&&(i[a]=u,h.push(a,u),o[a]=s));if(void 0!==r&&void 0===i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},6504:(e,t,n)=>{"use strict";var r,o=n(319),i=n(7296);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var A=!!r&&i&&i(Object.prototype,"__proto__"),s=Object,a=s.getPrototypeOf;e.exports=A&&"function"==typeof A.get?o([A.get]):"function"==typeof a&&function(e){return a(null==e?e:s(e))}},2378:e=>{"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r=55296&&o<=56319&&n>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},4429:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},3981:e=>{"use strict";e.exports=EvalError},1648:e=>{"use strict";e.exports=Error},4726:e=>{"use strict";e.exports=RangeError},6712:e=>{"use strict";e.exports=ReferenceError},3464:e=>{"use strict";e.exports=SyntaxError},4453:e=>{"use strict";e.exports=TypeError},3915:e=>{"use strict";e.exports=URIError},8892:e=>{"use strict";e.exports=Object},4029:(e,t,n)=>{"use strict";var r=n(5320),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var A,s;arguments.length>=3&&(A=n),s=e,"[object Array]"===o.call(s)?function(e,t,n){for(var r=0,o=e.length;r{(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{default:()=>Ce});const o=n(5697);var i=t.n(o);const A=n(7294);var s=t.n(A),a="fslightbox-",l="".concat(a,"styles"),c="".concat(a,"cursor-grabbing"),u="".concat(a,"full-dimension"),d="".concat(a,"flex-centered"),h="".concat(a,"transform-transition"),g="".concat(a,"absoluted"),f="".concat(a,"fade-in"),p="".concat(a,"fade-out"),m=f+"-strong",y=p+"-strong",v="".concat(a,"opacity-1");"".concat(a,"source");const w=function(e){var t=e.size,n=e.viewBox,r=e.d;return s().createElement("svg",{width:t,height:t,viewBox:n,xmlns:"http://www.w3.org/2000/svg"},s().createElement("path",{className:"".concat(a,"svg-path"),d:r}))},B=function(e){var t=e.onClick,n=e.viewBox,r=e.size,o=e.d,i=e.title;return s().createElement("div",{onClick:t,className:"".concat(a,"toolbar-button ").concat(d),title:i},s().createElement(w,{viewBox:n,size:r,d:o}))};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n55&&(d.current.style.justifyContent="flex-start")}),[]),s().createElement("div",{ref:d,className:"".concat(a,"slide-number-container")},s().createElement("div",{ref:h,className:"fslightbox-flex-centered"},s().createElement("span",null,c),s().createElement("span",{className:"".concat(a,"slash")}),s().createElement("span",null,o.length)))},S=function(e){var t=e.fsLightbox;return s().createElement("div",{className:"".concat(a,"nav")},s().createElement(I,{fsLightbox:t}),t.props.sources.length>1&&s().createElement(k,{fsLightbox:t}))};function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?l(s,"ne"):void 0!==a&&o.swipedX<0&&l(a,"p")}(e,t)}}function ae(e){var t=e.core.slideIndexChanger,n=e.smwm,r=e.stageIndexes,o=e.sws;function i(e){var t=n[r.current];t.a(),t[e]()}function A(e,t){void 0!==e&&(n[e].s(),n[e][t]())}this.p=function(){var e=r.previous;if(void 0===e)i("z");else{i("p");var n=r.next;t.changeTo(e);var s=r.previous;o.d(s),o.b(n),i("z"),A(s,"ne")}},this.n=function(){var e=r.next;if(void 0===e)i("z");else{i("ne");var n=r.previous;t.changeTo(e);var s=r.next;o.d(s),o.b(n),i("z"),A(s,"p")}}}function le(e){var t=e.componentsServices,n=e.core.lightboxCloser,r=e.dss,o=e.elements.container,i=e.p,A=e.props.disableBackgroundClose,s=(0,e.r)(ae);this.n=function(){t.hideSlideSwipingHovererIfShown(),i.isSourceDownEventTarget||A||n.closeLightbox(),i.isSwiping=!1},this.s=function(){r||(i.swipedX>0?s.p():s.n()),t.hideSlideSwipingHovererIfShown(),o.current.classList.remove(c),i.isSwiping=!1}}function ce(e,t,n,r){var o=e.data,i=e.elements.sources,A=n/r,s=0;this.adjustSize=function(){if((s=o.maxSourceWidth/A)o.maxSourceHeight?o.maxSourceHeight:r,a()};var a=function(){var e=i[t].current.style;e.width=s*A+"px",e.height=s+"px"}}function ue(e,t){var n=this,r=e.collections.sourceSizers,o=e.elements.sources,i=e.isl,A=e.resolve,s=e.saw,a=e.sawu;function l(e,n){r[t]=A(ce,[t,e,n]),r[t].adjustSize()}this.runActions=function(e,r){i[t]=!0,a[t](),o[t].current.classList.add(v),s[t].current.classList.add(m),l(e,r),n.runActions=l}}function de(e,t){var n,r=this,o=e.elements.sources,i=e.props,A=(0,e.resolve)(ue,[t]);this.handleImageLoad=function(e){var t=e.target,n=t.naturalWidth,r=t.naturalHeight;A.runActions(n,r)},this.handleVideoLoad=function(e){var t=e.target,r=t.videoWidth,o=t.videoHeight;n=!0,A.runActions(r,o)},this.handleNotMetaDatedVideoLoad=function(){n||r.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;i.maxYoutubeVideoDimensions&&(e=i.maxYoutubeVideoDimensions.width,t=i.maxYoutubeVideoDimensions.height),A.runActions(e,t)},this.handleCustomLoad=function(){var e=o[t].current;if(e){var n=e.offsetWidth,i=e.offsetHeight;n&&i?A.runActions(n,i):setTimeout(r.handleCustomLoad)}}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function fe(e,t,n){return fe=ve()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&me(o,n.prototype),o},fe.apply(null,arguments)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nwindow.innerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")};n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),function(e){var t=e.core.slideIndexChanger,n=e.sl,r=e.st;n>1?(e.pr=function(){t.jumpTo(r.p())},e.n=function(){t.jumpTo(r.n())}):(e.pr=function(){},e.n=function(){})}(e),function(e){var t=e.componentsServices,n=e.core.slideIndexChanger,r=e.isl,o=e.saw,i=e.smwm,A=e.st,s=e.stageIndexes,a=e.sws;n.changeTo=function(n){s.current=n,A.u(),t.setSlideNumber(n+1),ie(e)},n.jumpTo=function(e){var t=s.previous,l=s.current,c=s.next,u=r[l],d=r[e];n.changeTo(e);for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(this),fe(e,function(e){if(Array.isArray(e))return pe(e)}(t=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"e",value:function(e){var t=this.props[e];t&&t(this)}},{key:"componentDidUpdate",value:function(e,t,n){this.core.lightboxUpdater.handleUpdate(e)}},{key:"componentDidMount",value:function(){var e,t,n;e=this.data,t=this.i,n=this.props.openOnMount,document.getElementsByClassName(l).length||j(),e.scrollbarWidth=function(){var e=document.createElement("div"),t=e.style,n=document.createElement("div");t.visibility="hidden",t.width="100px",t.msOverflowStyle="scrollbar",t.overflow="scroll",n.style.width="100%",document.body.appendChild(e);var r=e.offsetWidth;e.appendChild(n);var o=n.offsetWidth;return document.body.removeChild(e),r-o}(),n&&t()}},{key:"componentWillUnmount",value:function(){!function(e){for(var t=e.collections.xhrs,n=e.componentsServices.isLightboxOpenManager,r=e.core.globalEventsController,o=0;o1?s().createElement(s().Fragment,null,s().createElement(M,{onClick:this.pr,name:"previous",d:"M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"}),s().createElement(M,{onClick:this.n,name:"next",d:"M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z"})):null,s().createElement(R,{o:this})):null}}],n&&function(e,t){for(var n=0;n{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,o=n(8892),i=n(1648),A=n(3981),s=n(4726),a=n(6712),l=n(3464),c=n(4453),u=n(3915),d=n(9738),h=n(6329),g=n(2264),f=n(5730),p=n(707),m=n(3862),y=n(9550),v=Function,w=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},B=n(7296),C=n(4429),b=function(){throw new c},E=B?function(){try{return b}catch(e){try{return B(arguments,"callee").get}catch(e){return b}}}():b,I=n(1405)(),x=n(1618),k=n(8899),S=n(443),Q=n(1768),D=n(8928),M={},F="undefined"!=typeof Uint8Array&&x?x(Uint8Array):r,P={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":I&&x?x([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":A,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":M,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&x?x(x([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&I&&x?x((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":B,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&I&&x?x((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&x?x(""[Symbol.iterator]()):r,"%Symbol%":I?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":E,"%TypedArray%":F,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":Q,"%Object.defineProperty%":C,"%Object.getPrototypeOf%":k,"%Math.abs%":d,"%Math.floor%":h,"%Math.max%":g,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(x)try{null.error}catch(e){var T=x(x(e));P["%Error.prototype%"]=T}var Y=function e(t){var n;if("%AsyncFunction%"===t)n=w("async function () {}");else if("%GeneratorFunction%"===t)n=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=w("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&x&&(n=x(o.prototype))}return P[t]=n,n},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=n(8612),O=n(8824),L=j.call(D,Array.prototype.concat),N=j.call(Q,Array.prototype.splice),H=j.call(D,String.prototype.replace),U=j.call(D,String.prototype.slice),_=j.call(D,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,J=function(e,t){var n,r=e;if(O(R,r)&&(r="%"+(n=R[r])[0]+"%"),O(P,r)){var o=P[r];if(o===M&&(o=Y(r)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=U(e,0,1),n=U(e,-1);if("%"===t&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return H(e,G,(function(e,t,n,o){r[r.length]=n?H(o,z,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=J("%"+r+"%",t),i=o.name,A=o.value,s=!1,a=o.alias;a&&(r=a[0],N(n,L([0,1],a)));for(var u=1,d=!0;u=n.length){var p=B(A,h);A=(d=!!p)&&"get"in p&&!("originalValue"in p.get)?p.get:A[h]}else d=O(A,h),A=A[h];d&&!s&&(P[i]=A)}}return A}},8899:(e,t,n)=>{"use strict";var r=n(8892);e.exports=r.getPrototypeOf||null},443:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},1618:(e,t,n)=>{"use strict";var r=n(443),o=n(8899),i=n(6504);e.exports=r?function(e){return r(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},690:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},7296:(e,t,n)=>{"use strict";var r=n(690);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},1044:(e,t,n)=>{"use strict";var r=n(4429),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(e,t,n)=>{"use strict";var r=n(5419);e.exports=function(){return r()&&!!Symbol.toStringTag}},8824:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(8612);e.exports=i.call(r,o)},8679:(e,t,n)=>{"use strict";var r=n(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return r.isMemo(e)?A:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=A;var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(g){var o=h(n);o&&o!==g&&e(t,o,r)}var A=c(n);u&&(A=A.concat(u(n)));for(var s=a(t),f=a(n),p=0;p{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,A=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,p=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function B(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case u:case i:case s:case A:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case p:case f:case a:return e;default:return t}}case o:return t}}}function C(e){return B(e)===u}t.AsyncMode=c,t.ConcurrentMode=u,t.ContextConsumer=l,t.ContextProvider=a,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=p,t.Memo=f,t.Portal=o,t.Profiler=s,t.StrictMode=A,t.Suspense=h,t.isAsyncMode=function(e){return C(e)||B(e)===c},t.isConcurrentMode=C,t.isContextConsumer=function(e){return B(e)===l},t.isContextProvider=function(e){return B(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return B(e)===d},t.isFragment=function(e){return B(e)===i},t.isLazy=function(e){return B(e)===p},t.isMemo=function(e){return B(e)===f},t.isPortal=function(e){return B(e)===o},t.isProfiler=function(e){return B(e)===s},t.isStrictMode=function(e){return B(e)===A},t.isSuspense=function(e){return B(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===A||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===y||e.$$typeof===v||e.$$typeof===w||e.$$typeof===m)},t.typeOf=B},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},645:(e,t)=>{t.read=function(e,t,n,r,o){var i,A,s=8*o-r-1,a=(1<>1,c=-7,u=n?o-1:0,d=n?-1:1,h=e[t+u];for(u+=d,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+u],u+=d,c-=8);for(A=i&(1<<-c)-1,i>>=-c,c+=r;c>0;A=256*A+e[t+u],u+=d,c-=8);if(0===i)i=1-l;else{if(i===a)return A?NaN:1/0*(h?-1:1);A+=Math.pow(2,r),i-=l}return(h?-1:1)*A*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var A,s,a,l=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,g=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,A=c):(A=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-A))<1&&(A--,a*=2),(t+=A+u>=1?d/a:d*Math.pow(2,1-u))*a>=2&&(A++,a/=2),A+u>=c?(s=0,A=c):A+u>=1?(s=(t*a-1)*Math.pow(2,o),A+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,o),A=0));o>=8;e[n+h]=255&s,h+=g,s/=256,o-=8);for(A=A<0;e[n+h]=255&A,h+=g,A/=256,l-=8);e[n+h-g]|=128*f}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1143:e=>{"use strict";e.exports=function(e,t,n,r,o,i,A,s){if(!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,A,s],c=0;(a=new Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},2584:(e,t,n)=>{"use strict";var r=n(6410)(),o=n(7379)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},A=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=A,e.exports=s?i:A},5320:e=>{"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,A=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!A(e)&&(r.call(e),!0)}catch(e){return!1}},a=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var d=document.all;a.call(d)===a.call(document.all)&&(u=function(e){if((c||!e)&&(void 0===e||"object"==typeof e))try{var t=a.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!A(e)&&s(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(l)return s(e);if(A(e))return!1;var t=a.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},8662:(e,t,n)=>{"use strict";var r,o=n(7379),i=n(9246)(/^\s*(?:function)?\*/),A=n(6410)(),s=n(1618),a=o("Object.prototype.toString"),l=o("Function.prototype.toString");e.exports=function(e){if("function"!=typeof e)return!1;if(i(l(e)))return!0;if(!A)return"[object GeneratorFunction]"===a(e);if(!s)return!1;if(void 0===r){var t=function(){if(!A)return!1;try{return Function("return function*() {}")()}catch(e){}}();r=!!t&&s(t)}return s(e)===r}},8611:e=>{"use strict";e.exports=function(e){return e!=e}},360:(e,t,n)=>{"use strict";var r=n(5559),o=n(4289),i=n(8611),A=n(9415),s=n(3194),a=r(A(),Number);o(a,{getPolyfill:A,implementation:i,shim:s}),e.exports=a},9415:(e,t,n)=>{"use strict";var r=n(8611);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},3194:(e,t,n)=>{"use strict";var r=n(4289),o=n(9415);e.exports=function(){var e=o();return r(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},8420:(e,t,n)=>{"use strict";var r,o=n(7379),i=n(6410)(),A=n(8824),s=n(7296);if(i){var a=o("RegExp.prototype.exec"),l={},c=function(){throw l},u={toString:c,valueOf:c};"symbol"==typeof Symbol.toPrimitive&&(u[Symbol.toPrimitive]=c),r=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!A(t,"value"))return!1;try{a(e,u)}catch(e){return e===l}}}else{var d=o("Object.prototype.toString");r=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===d(e)}}e.exports=r},5692:(e,t,n)=>{"use strict";var r=n(6430);e.exports=function(e){return!!r(e)}},6245:(e,t,n)=>{"use strict";function r(e){this.message=e}n.d(t,{Z:()=>s}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,i=0,A=0,s="";o=t.charAt(A++);~o&&(n=i%4?64*n+o:o,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return s};function i(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(e){return decodeURIComponent(o(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return o(t)}}function A(e){this.message=e}A.prototype=new Error,A.prototype.name="InvalidTokenError";const s=function(e,t){if("string"!=typeof e)throw new A("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(".")[n]))}catch(e){throw new A("Invalid token specified: "+e.message)}}},6119:(e,t,n)=>{"use strict";n.d(t,{sC:()=>qt,Rt:()=>xt,Vb:()=>en,mC:()=>tn});var r=n(7294),o=n(5108);function i(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return t.prototype=new Error,t.prototype.name=e,t.prototype.constructor=t,t}const A=i("LaunchDarklyUnexpectedResponseError"),s=i("LaunchDarklyInvalidEnvironmentIdError"),a=i("LaunchDarklyInvalidUserError"),l=i("LaunchDarklyInvalidEventKeyError"),c=i("LaunchDarklyInvalidArgumentError"),u=i("LaunchDarklyFlagFetchError");for(var d={LDUnexpectedResponseError:A,LDInvalidEnvironmentIdError:s,LDInvalidUserError:a,LDInvalidEventKeyError:l,LDInvalidArgumentError:c,LDInvalidDataError:i("LaunchDarklyInvalidDataError"),LDFlagFetchError:u,LDTimeoutError:i("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||400===e||408===e||429===e}},h=[],g=[],f=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),p=0;p<64;++p)h[p]=f[p],g[f.charCodeAt(p)]=p;function m(e,t,n){for(var r,o,i=[],A=t;A>18&63]+h[o>>12&63]+h[o>>6&63]+h[63&o]);return i.join("")}g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;var y=Array.isArray,v=Object.keys,w=Object.prototype.hasOwnProperty,B=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,o,i,A=y(t),s=y(n);if(A&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(A!=s)return!1;var a=t instanceof Date,l=n instanceof Date;if(a!=l)return!1;if(a&&l)return t.getTime()==n.getTime();var c=t instanceof RegExp,u=n instanceof RegExp;if(c!=u)return!1;if(c&&u)return t.toString()==n.toString();var d=v(t);if((o=d.length)!==v(n).length)return!1;for(r=o;0!=r--;)if(!w.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!e(t[i=d[r]],n[i]))return!1;return!0}return t!=t&&n!=n};const C=["key","ip","country","email","firstName","lastName","avatar","name"];function b(e){return function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,A=0,s=n-r;As?s:A+i));return 1===r?(t=e[n-1],o.push(h[t>>2]+h[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(h[t>>10]+h[t>>4&63]+h[t<<2&63]+"=")),o.join("")}(function(e){const t=[];for(let n=0;n({...e,...t})),{})},getLDUserAgentString:function(e){const t=e.version||"?";return e.userAgent+"/"+t},objectHasOwnProperty:E,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){if(!e)return e;let t;return null!==e.kind&&void 0!==e.kind||C.forEach((n=>{const r=e[n];void 0!==r&&"string"!=typeof r&&(t=t||{...e},t[n]=String(r))})),t||e},transformValuesToVersionedValues:function(e){const t={};for(const n in e)E(e,n)&&(t[n]={value:e[n],version:0});return t},transformVersionedValuesToValues:function(e){const t={};for(const n in e)E(e,n)&&(t[n]=e[n].value);return t},wrapPromiseCallback:function(e,t){const n=e.then((e=>(t&&setTimeout((()=>{t(null,e)}),0),e)),(e=>{if(!t)return Promise.reject(e);setTimeout((()=>{t(e,null)}),0)}));return t?void 0:n},once:function(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}},k=new Uint8Array(16);function S(){if(!I&&!(I="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(k)}var Q=/^(?:[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 D(e){return"string"==typeof e&&Q.test(e)}for(var M,F,P=[],T=0;T<256;++T)P.push((T+256).toString(16).substr(1));function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(P[e[t+0]]+P[e[t+1]]+P[e[t+2]]+P[e[t+3]]+"-"+P[e[t+4]]+P[e[t+5]]+"-"+P[e[t+6]]+P[e[t+7]]+"-"+P[e[t+8]]+P[e[t+9]]+"-"+P[e[t+10]]+P[e[t+11]]+P[e[t+12]]+P[e[t+13]]+P[e[t+14]]+P[e[t+15]]).toLowerCase();if(!D(n))throw TypeError("Stringified UUID is invalid");return n}var R=0,j=0;function O(e){if(!D(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function L(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function H(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function U(e,t,n,r,o,i){return H((A=H(H(t,e),H(r,i)))<<(s=o)|A>>>32-s,n);var A,s}function _(e,t,n,r,o,i,A){return U(t&n|~t&r,e,t,o,i,A)}function G(e,t,n,r,o,i,A){return U(t&r|n&~r,e,t,o,i,A)}function z(e,t,n,r,o,i,A){return U(t^n^r,e,t,o,i,A)}function J(e,t,n,r,o,i,A){return U(n^(t|~r),e,t,o,i,A)}var W=L("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>o%32&255,A=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(A)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>32-t}var X=L("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o>>0;v=y,y=m,m=K(p,30)>>>0,p=f,f=C}n[0]=n[0]+f>>>0,n[1]=n[1]+p>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),Z=X,q=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||M,A=void 0!==e.clockseq?e.clockseq:F;if(null==i||null==A){var s=e.random||(e.rng||S)();null==i&&(i=M=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==A&&(A=F=16383&(s[6]<<8|s[7]))}var a=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:j+1,c=a-R+(l-j)/1e4;if(c<0&&void 0===e.clockseq&&(A=A+1&16383),(c<0||a>R)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");R=a,j=l,F=A;var u=(1e4*(268435455&(a+=122192928e5))+l)%4294967296;o[r++]=u>>>24&255,o[r++]=u>>>16&255,o[r++]=u>>>8&255,o[r++]=255&u;var d=a/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=A>>>8|128,o[r++]=255&A;for(var h=0;h<6;++h)o[r+h]=i[h];return t||Y(o)},v3:V,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||S)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Y(r)},v5:Z,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!D(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:D,stringify:Y,parse:O});const ee=["debug","info","warn","error","none"];var te={commonBasicLogger:function(e,t){if(e&&e.destination&&"function"!=typeof e.destination)throw new Error("destination for basicLogger was set to a non-function");function n(e){return function(t){o&&o[e]&&o[e].call(o,t)}}const r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n("log"),n("info"),n("warn"),n("error")],i=!(!e||!e.destination),A=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ";let s=1;if(e&&e.level)for(let t=0;t{};else{const n=e;l[t]=function(){a(n,t,arguments)}}}return l},validateLogger:function(e){ee.forEach((t=>{if("none"!==t&&(!e[t]||"function"!=typeof e[t]))throw new Error("Provided logger instance must support logger."+t+"(...) method")}))}};function ne(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}const re=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var oe={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+re},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(e){return'enqueueing "'+e+'" event'},debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"},debugPostingEvents:function(e){return"sending "+e+" events"},debugStreamDelete:function(e){return'received streaming deletion for flag "'+e+'"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag "'+e+'"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(e){return"polling for feature flags at "+e},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+re},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+re},errorFetchingFlags:function(e){return"Error fetching flag settings: "+ne(e)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(e,t,n){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+t+" - "+(d.isHttpErrorRecoverable(e)?n:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+re},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got "'+e+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidMetricValue:e=>`The track function was called with a non-numeric "metricValue" (${e}), only numeric metric values are supported.`,invalidContext:function(){return"Invalid context specified."+re},invalidTagValue:e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return"local storage is unavailable: "+ne(e)},networkError:e=>"network error"+(e?" ("+e+")":""),optionBelowMinimum:(e,t,n)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+n,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(e){return"Opening stream connection to "+e},streamError:function(e,t){return"Error on stream connection: "+ne(e)+", will continue retrying after "+t+" milliseconds."},tagValueTooLong:e=>`Value of "${e}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event "'+e+'" does not exist'},unknownOption:e=>'Ignoring unknown config option "'+e+'"',contextNotSpecified:function(){return"No context specified."+re},unrecoverableStreamError:e=>`Error on stream connection ${ne(e)}, giving up permanently`,wrongOptionType:(e,t,n)=>'Config option "'+e+'" should be of type '+t+", got "+n+", using default value",wrongOptionTypeBoolean:(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean"};const{validateLogger:ie}=te,Ae={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,n){const r={};return t.id&&(r.id=le(`${e}.id`,t.id,n)),t.version&&(r.version=le(`${e}.version`,t.version,n)),r}},inspectors:{default:[]},hooks:{default:[]},plugins:{default:[]}},se=/^(\w|\.|-)+$/;function ae(e){return e&&e.replace(/\/+$/,"")}function le(e,t,n){if("string"==typeof t&&t.match(se)){if(!(t.length>64))return t;n.warn(oe.tagValueTooLong(e))}else n.warn(oe.invalidTagValue(e))}var ce={baseOptionDefs:Ae,validate:function(e,t,n,r){const o=x.extend({logger:{default:r}},Ae,n),i={};function A(e){x.onNextTick((()=>{t&&t.maybeReportError(new d.LDInvalidArgumentError(e))}))}let s=x.extend({},e||{});return function(e){const t=e;Object.keys(i).forEach((e=>{if(void 0!==t[e]){const n=i[e];r&&r.warn(oe.deprecated(e,n)),n&&(void 0===t[n]&&(t[n]=t[e]),delete t[e])}}))}(s),s=function(e){const t=x.extend({},e);return Object.keys(o).forEach((e=>{void 0!==t[e]&&null!==t[e]||(t[e]=o[e]&&o[e].default)})),t}(s),s=function(e){const t=x.extend({},e),n=e=>{if(null===e)return"any";if(void 0===e)return;if(Array.isArray(e))return"array";const t=typeof e;return"boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"};return Object.keys(e).forEach((i=>{const s=e[i];if(null!=s){const a=o[i];if(void 0===a)A(oe.unknownOption(i));else{const o=a.type||n(a.default),l=a.validator;if(l){const n=l(i,e[i],r);void 0!==n?t[i]=n:delete t[i]}else if("any"!==o){const e=o.split("|"),r=n(s);e.indexOf(r)<0?"boolean"===o?(t[i]=!!s,A(oe.wrongOptionTypeBoolean(i,r))):(A(oe.wrongOptionType(i,o,r)),t[i]=a.default):"number"===r&&void 0!==a.minimum&&sArray.isArray(r[e])?r[e].sort().map((t=>`${e}/${t}`)):[`${e}/${r[e]}`])).reduce(((e,t)=>e.concat(t)),[]).join(" ")),n},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};const{v1:he}=q,{getLDHeaders:ge,transformHeaders:fe}=de;var pe=function(e,t,n){const r=x.extend({"Content-Type":"application/json"},ge(e,n)),o={sendEvents:(t,o,i)=>{if(!e.httpRequest)return Promise.resolve();const A=JSON.stringify(t),s=i?null:he();return function t(a){const l=i?r:x.extend({},r,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":s});return e.httpRequest("POST",o,fe(l,n),A).promise.then((e=>{if(e)return e.status>=400&&d.isHttpErrorRecoverable(e.status)&&a?t(!1):function(e){const t={status:e.status},n=e.header("date");if(n){const e=Date.parse(n);e&&(t.serverTime=e)}return t}(e)})).catch((()=>a?t(!1):Promise.reject()))}(!0).catch((()=>{}))}};return o};const{commonBasicLogger:me}=te;function ye(e){return"string"==typeof e&&"kind"!==e&&e.match(/^(\w|\.|-)+$/)}function ve(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}var we={checkContext:function(e,t){if(e){if(t&&(void 0===e.kind||null===e.kind))return void 0!==e.key&&null!==e.key;const n=e.key,r=void 0===e.kind?"user":e.kind,o=ye(r),i="multi"===r||null!=n&&""!==n;if("multi"===r){const t=Object.keys(e).filter((e=>"kind"!==e));return i&&t.every((e=>ye(e)))&&t.every((t=>{const n=e[t].key;return null!=n&&""!==n}))}return i&&o}return!1},getContextKeys:function(e,t=me()){if(!e)return;const n={},{kind:r,key:o}=e;switch(r){case void 0:n.user=`${o}`;break;case"multi":Object.entries(e).filter((([e])=>"kind"!==e)).forEach((([e,t])=>{t&&t.key&&(n[e]=t.key)}));break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(e){return e?null===e.kind||void 0===e.kind?["user"]:"multi"!==e.kind?[e.kind]:Object.keys(e).filter((e=>"kind"!==e)):[]},getCanonicalKey:function(e){if(e){if((void 0===e.kind||null===e.kind||"user"===e.kind)&&e.key)return e.key;if("multi"!==e.kind&&e.key)return`${e.kind}:${ve(e.key)}`;if("multi"===e.kind)return Object.keys(e).sort().filter((e=>"kind"!==e)).map((t=>`${t}:${ve(e[t].key)}`)).join(":")}}};const{getContextKinds:Be}=we;function Ce(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function be(e){return(e.startsWith("/")?e.substring(1):e).split("/").map((e=>e.indexOf("~")>=0?e.replace(/~1/g,"/").replace(/~0/g,"~"):e))}function Ee(e){return!e.startsWith("/")}function Ie(e,t){const n=Ee(e),r=Ee(t);if(n&&r)return e===t;if(n){const n=be(t);return 1===n.length&&e===n[0]}if(r){const n=be(e);return 1===n.length&&t===n[0]}return e===t}function xe(e){return`/${Ce(e)}`}var ke={cloneExcluding:function(e,t){const n=[],r={},o=[];for(n.push(...Object.keys(e).map((t=>({key:t,ptr:xe(t),source:e,parent:r,visited:[e]}))));n.length;){const e=n.pop();if(t.some((t=>Ie(t,e.ptr))))o.push(e.ptr);else{const t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if("object"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},n.push(...Object.keys(t).map((n=>{return{key:n,ptr:(r=e.ptr,o=Ce(n),`${r}/${o}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]};var r,o})))}else e.parent[e.key]=t}}return{cloned:r,excluded:o.sort()}},compare:Ie,literalToReference:xe};const{getContextKeys:Se}=we;const Qe="ready",De="initialized",Me="failed",{appendUrlPath:Fe,base64URLEncode:Pe,objectHasOwnProperty:Te}=x,{getLDHeaders:Ye,transformHeaders:Re}=de,{isHttpErrorRecoverable:je}=d;const{transformHeaders:Oe,getLDHeaders:Le}=de,Ne="application/json";const{v1:He}=q,{getContextKinds:Ue}=we;var _e=function(e){function t(e){return null==e||"user"===e?"ld:$anonUserId":`ld:$contextKey:${e}`}function n(n,r){return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?function(n){return e.get(t(n))}(n).then((o=>{if(o)return r.key=o,r;{const o=He();return r.key=o,function(n,r){return e.set(t(r),n)}(o,n).then((()=>r))}})):Promise.reject(new d.LDInvalidUserError(oe.invalidContext()))}this.processContext=e=>{if(!e)return Promise.reject(new d.LDInvalidUserError(oe.contextNotSpecified()));const t=x.clone(e);if("multi"===e.kind){const e=Ue(t);return Promise.all(e.map((e=>n(e,t[e])))).then((()=>t))}return n(e.kind,t)}};const{v1:Ge}=q,{baseOptionDefs:ze}=ce,{appendUrlPath:Je}=x;const{onNextTick:We}=x,Ve={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(Ve);var $e={InspectorTypes:Ve,InspectorManager:function(e,t){const n={},r={[Ve.flagUsed]:[],[Ve.flagDetailsChanged]:[],[Ve.flagDetailChanged]:[],[Ve.clientIdentityChanged]:[]},o={[Ve.flagUsed]:[],[Ve.flagDetailsChanged]:[],[Ve.flagDetailChanged]:[],[Ve.clientIdentityChanged]:[]},i=e&&e.map((e=>function(e,t){let n=!1;const r={type:e.type,name:e.name,synchronous:e.synchronous,method:(...o)=>{try{e.method(...o)}catch{n||(n=!0,t.warn(oe.inspectorMethodError(r.type,r.name)))}}};return r}(e,t)));return i&&i.forEach((e=>{Object.prototype.hasOwnProperty.call(r,e.type)&&!e.synchronous?r[e.type].push(e):Object.prototype.hasOwnProperty.call(o,e.type)&&e.synchronous?o[e.type].push(e):t.warn(oe.invalidInspector(e.type,e.name))})),n.hasListeners=e=>r[e]&&r[e].length||o[e]&&o[e].length,n.onFlagUsed=(e,t,n)=>{const i=Ve.flagUsed;o[i].length&&o[i].forEach((r=>r.method(e,t,n))),r[i].length&&We((()=>{r[i].forEach((r=>r.method(e,t,n)))}))},n.onFlags=e=>{const t=Ve.flagDetailsChanged;o[t].length&&o[t].forEach((t=>t.method(e))),r[t].length&&We((()=>{r[t].forEach((t=>t.method(e)))}))},n.onFlagChanged=(e,t)=>{const n=Ve.flagDetailChanged;o[n].length&&o[n].forEach((n=>n.method(e,t))),r[n].length&&We((()=>{r[n].forEach((n=>n.method(e,t)))}))},n.onIdentityChanged=e=>{const t=Ve.clientIdentityChanged;o[t].length&&o[t].forEach((t=>t.method(e))),r[t].length&&We((()=>{r[t].forEach((t=>t.method(e)))}))},n}};const{LDTimeoutError:Ke}=d,Xe="unknown hook";function Ze(e,t,n,r,o){try{return r()}catch(r){return e?.error(`An error was encountered in "${t}" of the "${n}" hook: ${r}`),o}}function qe(e,t){try{return t.getMetadata().name||Xe}catch{return e.error("Exception thrown getting metadata for hook. Unable to get hook name."),Xe}}const et="unknown plugin";function tt(e,t){try{return t.getMetadata().name||et}catch(t){return e.error("Exception thrown getting metadata for plugin. Unable to get plugin name."),et}}var nt={getPluginHooks:function(e,t,n){const r=[];return n.forEach((n=>{try{const o=n.getHooks?.(t);void 0===o?e.error(`Plugin ${tt(e,n)} returned undefined from getHooks.`):o&&o.length>0&&r.push(...o)}catch(t){e.error(`Exception thrown getting hooks for plugin ${tt(e,n)}. Unable to get hooks.`)}})),r},registerPlugins:function(e,t,n,r){r.forEach((r=>{try{r.register(n,t)}catch(t){e.error(`Exception thrown registering plugin ${tt(e,r)}.`)}}))},createPluginEnvironment:function(e,t,n){const r={};e.userAgent&&(r.name=e.userAgent),e.version&&(r.version=e.version),n.wrapperName&&(r.wrapperName=n.wrapperName),n.wrapperVersion&&(r.wrapperVersion=n.wrapperVersion);const o={};n.application&&(n.application.name&&(o.name=n.application.name),n.application.version&&(o.version=n.application.version));const i={sdk:r,clientSideId:t};return Object.keys(o).length>0&&(i.application=o),i}};const{commonBasicLogger:rt}=te,{checkContext:ot,getContextKeys:it}=we,{InspectorTypes:At,InspectorManager:st}=$e,{getPluginHooks:at,registerPlugins:lt,createPluginEnvironment:ct}=nt,ut="change",dt="internal-change";var ht={initialize:function(e,t,n,r,i){const A=n&&n.logger?n.logger:i&&i.logger&&i.logger.default||rt("warn"),s=function(e){const t={},n={};return t.on=function(e,t,r){n[e]=n[e]||[],n[e]=n[e].concat({handler:t,context:r})},t.off=function(e,t,r){if(n[e])for(let o=0;o{const n=()=>{e.off(Qe,n),t()};e.on(Qe,n)})).catch((()=>{}));return{getInitializationPromise:()=>o||(t?Promise.resolve():n?Promise.reject(r):(o=new Promise(((t,n)=>{const r=()=>{e.off(De,r),t()},o=t=>{e.off(Me,o),n(t)};e.on(De,r),e.on(Me,o)})),o)),getReadyPromise:()=>i,signalSuccess:()=>{t||n||(t=!0,e.emit(De),e.emit(Qe))},signalFailure:o=>{t||n||(n=!0,r=o,e.emit(Me,o),e.emit(Qe)),e.maybeReportError(o)}}}(s),l=ce.validate(n,s,i,A),c=st(l.inspectors,A),u=l.sendEvents;let h=e,g=l.hash;const f=[...l.plugins],p=ct(r,e,l),m=at(A,p,f),y=function(e,t){const n=t?[...t]:[];return{withEvaluation:function(t,r,o,i){if(0===n.length)return i();const A=[...n],s={flagKey:t,context:r,defaultValue:o},a=function(e,t,n){return t.map((t=>Ze(e,"beforeEvaluation",qe(e,t),(()=>t?.beforeEvaluation?.(n,{})??{}),{})))}(e,A,s),l=i();return function(e,t,n,r,o){for(let i=t.length-1;i>=0;i-=1){const A=t[i],s=r[i];Ze(e,"afterEvaluation",qe(e,A),(()=>A?.afterEvaluation?.(n,s,o)??{}),{})}}(e,A,s,a,l),l},identify:function(t,r){const o=[...n],i={context:t,timeout:r},A=function(e,t,n){return t.map((t=>Ze(e,"beforeIdentify",qe(e,t),(()=>t?.beforeIdentify?.(n,{})??{}),{})))}(e,o,i);return t=>{!function(e,t,n,r,o){for(let i=t.length-1;i>=0;i-=1){const A=t[i],s=r[i];Ze(e,"afterIdentify",qe(e,A),(()=>A?.afterIdentify?.(n,s,o)??{}),{})}}(e,o,i,A,t)}},addHook:function(e){n.push(e)},afterTrack:function(t){if(0===n.length)return;const r=[...n];!function(e,t,n){for(let r=t.length-1;r>=0;r-=1){const o=t[r];Ze(e,"afterTrack",qe(e,o),(()=>o?.afterTrack?.(n)),void 0)}}(e,r,t)}}}(A,[...l.hooks,...m]),v=function(e,t){const n={};let r=!1;const o=e=>{r||(r=!0,t.warn(oe.localStorageUnavailable(e)))};return n.isEnabled=()=>!!e,n.get=t=>new Promise((n=>{e?e.get(t).then(n).catch((e=>{o(e),n(void 0)})):n(void 0)})),n.set=(t,n)=>new Promise((r=>{e?e.set(t,n).then((()=>r(!0))).catch((e=>{o(e),r(!1)})):r(!1)})),n.clear=t=>new Promise((n=>{e?e.clear(t).then((()=>n(!0))).catch((e=>{o(e),n(!1)})):n(!1)})),n}(r.localStorage,A),w=pe(r,0,l),B=l.sendEvents&&!l.diagnosticOptOut,C=B?function(e){const t={diagnosticId:Ge()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t}(h):null,b=B?function(e){let t,n,r,o;function i(e){t=e,n=0,r=0,o=[]}return i(e),{getProps:()=>({dataSinceDate:t,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:e=>{t=e.dataSinceDate,n=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:e=>{r=e},recordStreamInit:(e,t,n)=>{const r={timestamp:e,failed:t,durationMillis:n};o.push(r)},reset:i}}((new Date).getTime()):null,E=B?function(e,t,n,r,o,i,A){const s=!!e.diagnosticUseCombinedEvent,a="ld:"+o+":$diagnostics",l=Je(i.eventsUrl,"/events/diagnostic/"+o),c=i.diagnosticRecordingInterval,u=n;let d,h,g=!!i.streaming;const f={};function p(){return{sdk:v(),configuration:{customBaseURI:i.baseUrl!==ze.baseUrl.default,customStreamURI:i.streamUrl!==ze.streamUrl.default,customEventsURI:i.eventsUrl!==ze.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!g,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation},platform:e.diagnosticPlatformData}}function m(e){i.logger&&i.logger.debug(oe.debugPostingDiagnosticEvent(e)),r.sendEvents(e,l,!0).then((()=>{})).catch((()=>{}))}function y(){m(function(){const e=(new Date).getTime();let t={kind:s?"diagnostic-combined":"diagnostic",id:A,creationDate:e,...u.getProps()};return s&&(t={...t,...p()}),u.reset(e),t}()),h=setTimeout(y,c),d=(new Date).getTime(),s&&function(){if(t.isEnabled()){const e={...u.getProps()};t.set(a,JSON.stringify(e))}}()}function v(){const t={...e.diagnosticSdkData};return i.wrapperName&&(t.wrapperName=i.wrapperName),i.wrapperVersion&&(t.wrapperVersion=i.wrapperVersion),t}return f.start=()=>{s?function(e){if(!t.isEnabled())return e(!1);t.get(a).then((t=>{if(t)try{const e=JSON.parse(t);u.setProps(e),d=e.dataSinceDate}catch(e){}e(!0)})).catch((()=>{e(!1)}))}((e=>{if(e){const e=(d||0)+c,t=(new Date).getTime();t>=e?y():h=setTimeout(y,e-t)}else 0===Math.floor(4*Math.random())?y():h=setTimeout(y,c)})):(m({kind:"diagnostic-init",id:A,creationDate:u.getProps().dataSinceDate,...p()}),h=setTimeout(y,c))},f.stop=()=>{h&&clearTimeout(h)},f.setStreaming=e=>{g=e},f}(r,v,b,w,h,l,C):null,I=function(e,t,n,r){const o=t.streamUrl,i=t.logger,A={},s=Fe(o,"/eval/"+n),a=t.useReport,l=t.evaluationReasons,c=t.streamReconnectDelay,u=Ye(e,t);let d,h=!1,g=null,f=null,p=null,m=null,y=null,v=0;function w(e){if(e.status&&"number"==typeof e.status&&!je(e.status))return b(),i.error(oe.unrecoverableStreamError(e)),void(f&&(clearTimeout(f),f=null));const t=function(){const e=(t=function(){const e=c*Math.pow(2,v);return e>3e4?3e4:e}(),t-Math.trunc(.5*Math.random()*t));var t;return v+=1,e}();h||(i.warn(oe.streamError(e,t)),h=!0),E(!1),b(),B(t)}function B(e){f||(e?f=setTimeout(C,e):C())}function C(){let r;f=null;let A="";const c={headers:u,readTimeoutMillis:3e5};if(e.eventSourceFactory){null!=m&&(A="h="+m),a?e.eventSourceAllowsReport?(r=s,c.method="REPORT",c.headers["Content-Type"]="application/json",c.body=JSON.stringify(p)):(r=Fe(o,"/ping/"+n),A=""):r=s+"/"+Pe(JSON.stringify(p)),c.headers=Re(c.headers,t),l&&(A=A+(A?"&":"")+"withReasons=true"),r=r+(A?"?":"")+A,b(),i.info(oe.streamConnecting(r)),d=(new Date).getTime(),g=e.eventSourceFactory(r,c);for(const e in y)Te(y,e)&&g.addEventListener(e,y[e]);g.onerror=w,g.onopen=()=>{v=0}}}function b(){g&&(i.info(oe.streamClosing()),g.close(),g=null)}function E(e){d&&r&&r.recordStreamInit(d,!e,(new Date).getTime()-d),d=null}return A.connect=function(e,t,n){p=e,m=t,y={};for(const e in n||{})y[e]=function(t){h=!1,E(!0),n[e]&&n[e](t)};B()},A.disconnect=function(){clearTimeout(f),f=null,b()},A.isConnected=function(){return!!(g&&e.eventSourceIsActive&&e.eventSourceIsActive(g))},A}(r,l,h,b),k=l.eventProcessor||function(e,t,n,r=null,o=null,i=null){const A={},s=i||pe(e,0,t),a=x.appendUrlPath(t.eventsUrl,"/events/bulk/"+n),l=function(){const e={};let t=0,n=0,r={},o={};return e.summarizeEvent=e=>{if("feature"===e.kind){const i=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),A=r[i];let s=o[e.key];s||(s=new Set,o[e.key]=s),function(e){return e.context?Be(e.context):e.contextKeys?Object.keys(e.contextKeys):[]}(e).forEach((e=>s.add(e))),A?A.count=A.count+1:r[i]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDaten&&(n=e.creationDate)}},e.getSummary=()=>{const e={};let i=!0;for(const t of Object.values(r)){let n=e[t.key];n||(n={default:t.default,counters:[],contextKinds:[...o[t.key]]},e[t.key]=n);const r={value:t.value,count:t.count};void 0!==t.variation&&null!==t.variation&&(r.variation=t.variation),void 0!==t.version&&null!==t.version?r.version=t.version:r.unknown=!0,n.counters.push(r),i=!1}return i?null:{startDate:t,endDate:n,features:e}},e.clearSummary=()=>{t=0,n=0,r={},o={}},e}(),c=function(e){const t={},n=e.allAttributesPrivate,r=e.privateAttributes||[],o=["key","kind","_meta","anonymous"],i=["name","ip","firstName","lastName","email","avatar","country"],A=(e,t)=>{if("object"!=typeof e||null===e||Array.isArray(e))return;const{cloned:i,excluded:A}=ke.cloneExcluding(e,((e,t)=>(n||t&&e.anonymous?Object.keys(e):[...r,...e._meta&&e._meta.privateAttributes||[]]).filter((e=>!o.some((t=>ke.compare(e,t))))))(e,t));return i.key=String(i.key),A.length&&(i._meta||(i._meta={}),i._meta.redactedAttributes=A),i._meta&&(delete i._meta.privateAttributes,0===Object.keys(i._meta).length&&delete i._meta),void 0!==i.anonymous&&(i.anonymous=!!i.anonymous),i};return t.filter=(e,t=!1)=>void 0===e.kind||null===e.kind?A((e=>{const t={...e.custom||{},kind:"user",key:e.key};void 0!==e.anonymous&&(t.anonymous=!!e.anonymous);for(const n of i)delete t[n],void 0!==e[n]&&null!==e[n]&&(t[n]=String(e[n]));return void 0!==e.privateAttributeNames&&null!==e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map((e=>e.startsWith("/")?ke.literalToReference(e):e))),t})(e),t):"multi"===e.kind?((e,t)=>{const n={kind:e.kind},r=Object.keys(e);for(const o of r)if("kind"!==o){const r=A(e[o],t);r&&(n[o]=r)}return n})(e,t):A(e,t),t}(t),u=t.samplingInterval,h=t.eventCapacity,g=t.flushInterval,f=t.logger;let p,m=[],y=0,v=!1,w=!1;function B(){return 0===u||0===Math.floor(Math.random()*u)}function C(e){m.lengthy&&r.debugEventsUntilDate>(new Date).getTime()):t=B(),t&&C(function(e){const t=x.extend({},e);return"identify"===e.kind||"feature"===e.kind||"custom"===e.kind?t.context=c.filter(e.context):(t.contextKeys=Se(e.context,f),delete t.context),"feature"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t}(e)),n){const t=x.extend({},e,{kind:"debug"});t.context=c.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,C(t)}},A.flush=function(){if(v)return Promise.resolve();const e=m,t=l.getSummary();return l.clearSummary(),t&&(t.kind="summary",e.push(t)),r&&r.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(m=[],f.debug(oe.debugPostingEvents(e.length)),s.sendEvents(e,a).then((e=>{e&&(e.serverTime&&(y=e.serverTime),d.isHttpErrorRecoverable(e.status)||(v=!0),e.status>=400&&x.onNextTick((()=>{o.maybeReportError(new d.LDUnexpectedResponseError(oe.httpErrorMessage(e.status,"event posting","some events were dropped")))})))})))},A.start=function(){const e=()=>{A.flush(),p=setTimeout(e,g)};p=setTimeout(e,g)},A.stop=function(){clearTimeout(p)},A}(r,l,h,b,s,w),S=function(e,t,n){const r=t.baseUrl,o=t.useReport,i=t.evaluationReasons,A=t.logger,s={},a={};function l(n,r){if(!e.httpRequest)return new Promise(((e,t)=>{t(new d.LDFlagFetchError(oe.httpUnavailable()))}));const o=r?"REPORT":"GET",i=Le(e,t);r&&(i["Content-Type"]=Ne);let A=a[n];A||(A=function(e){let t,n,r,o;const i={addPromise:(i,A)=>{t=i,n&&n(),n=A,i.then((n=>{t===i&&(r(n),e&&e())}),(n=>{t===i&&(o(n),e&&e())}))}};return i.resultPromise=new Promise(((e,t)=>{r=e,o=t})),i}((()=>{delete a[n]})),a[n]=A);const s=e.httpRequest(o,n,Oe(i,t),r),l=s.promise.then((e=>{if(200===e.status){if(e.header("content-type")&&e.header("content-type").substring(0,16)===Ne)return JSON.parse(e.body);{const t=oe.invalidContentType(e.header("content-type")||"");return Promise.reject(new d.LDFlagFetchError(t))}}return Promise.reject(function(e){return 404===e.status?new d.LDInvalidEnvironmentIdError(oe.environmentNotFound()):new d.LDFlagFetchError(oe.errorFetchingFlags(e.statusText||String(e.status)))}(e))}),(e=>Promise.reject(new d.LDFlagFetchError(oe.networkError(e)))));return A.addPromise(l,(()=>{s.cancel&&s.cancel()})),A.resultPromise}return s.fetchJSON=function(e){return l(x.appendUrlPath(r,e),null)},s.fetchFlagSettings=function(e,t){let s,a,c,u="";return o?(a=[r,"/sdk/evalx/",n,"/context"].join(""),c=JSON.stringify(e)):(s=x.base64URLEncode(JSON.stringify(e)),a=[r,"/sdk/evalx/",n,"/contexts/",s].join("")),t&&(u="h="+t),i&&(u=u+(u?"&":"")+"withReasons=true"),a=a+(u?"?":"")+u,A.debug(oe.debugPolling(a)),l(a,c)},s}(r,l,h);let Q,D,M,F={},P=l.streaming,T=!1,Y=!1,R=!0;const j=l.stateProvider,O=function(e,t){const n={};let r;return n.setContext=function(e){r=x.sanitizeContext(e),r&&t&&t(x.clone(r))},n.getContext=function(){return r?x.clone(r):null},n}(0,(function(e){(function(e){j||e&&H({kind:"identify",context:e,creationDate:(new Date).getTime()})})(e),c.hasListeners(At.clientIdentityChanged)&&c.onIdentityChanged(O.getContext())})),L=new _e(v),N=v.isEnabled()?function(e,t,n,r){const o={};function i(){let e="";const o=r.getContext();return o&&(e=n||x.btoa(JSON.stringify(o))),"ld:"+t+":"+e}return o.loadFlags=()=>e.get(i()).then((e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){const e=t.$schema;void 0===e||e<1?t=x.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(e){return o.clearFlags().then((()=>null))}})),o.saveFlags=t=>{const n=x.extend({},t,{$schema:1});return e.set(i(),JSON.stringify(n))},o.clearFlags=()=>e.clear(i()),o}(v,h,g,O):null;function H(e){h&&(j&&j.enqueueEvent&&j.enqueueEvent(e)||(e.context?(R=!1,!u||Y||r.isDoNotTrack()||(A.debug(oe.debugEnqueueingEvent(e.kind)),k.enqueue(e))):R&&(A.warn(oe.eventWithoutContext()),R=!1)))}function U(e,t){c.hasListeners(At.flagDetailChanged)&&c.onFlagChanged(e.key,W(t))}function _(){c.hasListeners(At.flagDetailsChanged)&&c.onFlags(Object.entries(F).map((([e,t])=>({key:e,detail:W(t)}))).reduce(((e,t)=>(e[t.key]=t.detail,e)),{}))}function G(e,t,n,r){const o=O.getContext(),i=new Date,A={kind:"feature",key:e,context:o,value:t?t.value:null,variation:t?t.variationIndex:null,default:n,creationDate:i.getTime()},s=F[e];s&&(A.version=s.flagVersion?s.flagVersion:s.version,A.trackEvents=s.trackEvents,A.debugEventsUntilDate=s.debugEventsUntilDate),(r||s&&s.trackReason)&&t&&(A.reason=t.reason),H(A)}function z(e){return ot(e,!1)?Promise.resolve(e):Promise.reject(new d.LDInvalidUserError(oe.invalidContext()))}function J(e,t,n,r,o,i){let A,s;return F&&x.objectHasOwnProperty(F,e)&&F[e]&&!F[e].deleted?(s=F[e],A=W(s),null!==s.value&&void 0!==s.value||(A.value=t)):A={value:t,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},n&&(o||s?.prerequisites?.forEach((e=>{J(e,void 0,n,!1,!1,!1)})),G(e,A,t,r)),!o&&i&&function(e,t){c.hasListeners(At.flagUsed)&&c.onFlagUsed(e,t,O.getContext())}(e,A),A}function W(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function V(){if(D=!0,!O.getContext())return;const e=e=>{try{return JSON.parse(e)}catch(e){return void s.maybeReportError(new d.LDInvalidDataError(oe.invalidData()))}};I.connect(O.getContext(),g,{ping:function(){A.debug(oe.debugStreamPing());const e=O.getContext();S.fetchFlagSettings(e,g).then((t=>{x.deepEquals(e,O.getContext())&&K(t||{})})).catch((e=>{s.maybeReportError(new d.LDFlagFetchError(oe.errorFetchingFlags(e)))}))},put:function(t){const n=e(t.data);n&&(A.debug(oe.debugStreamPut()),K(n))},patch:function(t){const n=e(t.data);if(!n)return;const r=F[n.key];if(!r||!r.version||!n.version||r.version{}))}function X(e){const t=Object.keys(e);if(t.length>0){const n={};t.forEach((t=>{const r=e[t].current,o=r?r.value:void 0,i=e[t].previous;s.emit(ut+":"+t,o,i),n[t]=r?{current:o,previous:i}:{previous:i}})),s.emit(ut,n),s.emit(dt,F),l.sendEventsOnlyForVariation||j||t.forEach((t=>{G(t,e[t].current)}))}return Q&&N?N.saveFlags(F):Promise.resolve()}function Z(){const e=P||M&&void 0===P;e&&!D?V():!e&&D&&$(),E&&E.setStreaming(e)}function q(e){return e===ut||e.substr(0,7)===ut+":"}if("string"==typeof l.bootstrap&&"LOCALSTORAGE"===l.bootstrap.toUpperCase()&&(N?Q=!0:A.warn(oe.localStorageUnavailable())),"object"==typeof l.bootstrap&&(F=function(e){const t=Object.keys(e),n="$flagsState",r="$valid",o=e[n];!o&&t.length&&A.warn(oe.bootstrapOldFormat()),!1===e[r]&&A.warn(oe.bootstrapInvalid());const i={};return t.forEach((t=>{if(t!==n&&t!==r){let n={value:e[t]};o&&o[t]?n=x.extend(n,o[t]):n.version=0,i[t]=n}})),i}(l.bootstrap)),j){const e=j.getInitialState();e?ee(e):j.on("init",ee),j.on("update",(function(e){e.context&&O.setContext(e.context),e.flags&&K(e.flags)}))}else(function(){if(!e)return Promise.reject(new d.LDInvalidEnvironmentIdError(oe.environmentNotSpecified()));let n;return L.processContext(t).then(z).then((e=>(n=x.once(y.identify(e,void 0)),e))).then((e=>(n?.({status:"completed"}),O.setContext(e),"object"==typeof l.bootstrap?te():Q?N.loadFlags().then((e=>null==e?(F={},S.fetchFlagSettings(O.getContext(),g).then((e=>K(e||{}))).then(te).catch((e=>{ne(new d.LDFlagFetchError(oe.errorFetchingFlags(e)))}))):(F=e,x.onNextTick(te),S.fetchFlagSettings(O.getContext(),g).then((e=>K(e))).catch((e=>s.maybeReportError(e)))))):S.fetchFlagSettings(O.getContext(),g).then((e=>{F=e||{},_(),te()})).catch((e=>{F={},ne(e)}))))).catch((e=>{throw n?.({status:"error"}),e}))})().catch(ne);function ee(e){h=e.environment,O.setContext(e.context),F={...e.flags},x.onNextTick(te)}function te(){A.info(oe.clientInitialized()),T=!0,Z(),a.signalSuccess()}function ne(e){a.signalFailure(e)}const re={waitForInitialization:function(e=void 0){if(null!=e){if("number"==typeof e)return function(e){e>5&&A.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less.");const t=a.getInitializationPromise(),n=function(e){return new Promise(((t,n)=>{setTimeout((()=>{n(new Ke(`waitForInitialization timed out after ${e} seconds.`))}),1e3*e)}))}(e);return Promise.race([n,t]).catch((e=>{throw e instanceof d.LDTimeoutError&&A.error(`waitForInitialization error: ${e}`),e}))}(e);A.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return A.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),a.getInitializationPromise()},waitUntilReady:()=>a.getReadyPromise(),identify:function(e,t,n){if(Y)return x.wrapPromiseCallback(Promise.resolve({}),n);if(j)return A.warn(oe.identifyDisabled()),x.wrapPromiseCallback(Promise.resolve(x.transformVersionedValuesToValues(F)),n);let r;const o=Q&&N?N.clearFlags():Promise.resolve();return x.wrapPromiseCallback(o.then((()=>L.processContext(e))).then(z).then((e=>(r=x.once(y.identify(e,void 0)),e))).then((e=>S.fetchFlagSettings(e,t).then((n=>{const r=x.transformVersionedValuesToValues(n);return O.setContext(e),g=t,n?K(n).then((()=>r)):r})))).then((e=>(r?.({status:"completed"}),D&&V(),e))).catch((e=>(r?.({status:"error"}),s.maybeReportError(e),Promise.reject(e)))),n)},getContext:function(){return O.getContext()},variation:function(e,t){const{value:n}=y.withEvaluation(e,O.getContext(),t,(()=>J(e,t,!0,!1,!1,!0)));return n},variationDetail:function(e,t){return y.withEvaluation(e,O.getContext(),t,(()=>J(e,t,!0,!0,!1,!0)))},track:function(e,t,n){if("string"!=typeof e)return void s.maybeReportError(new d.LDInvalidEventKeyError(oe.unknownCustomEventKey(e)));void 0!==n&&"number"!=typeof n&&A.warn(oe.invalidMetricValue(typeof n)),r.customEventFilter&&!r.customEventFilter(e)&&A.warn(oe.unknownCustomEventKey(e));const o=O.getContext(),i={kind:"custom",key:e,context:o,url:r.getCurrentUrl(),creationDate:(new Date).getTime()};o&&o.anonymous&&(i.contextKind=o.anonymous?"anonymousUser":"user"),null!=t&&(i.data=t),null!=n&&(i.metricValue=n),H(i),y.afterTrack({context:o,key:e,data:t,metricValue:n})},on:function(e,t,n){q(e)?(M=!0,T&&Z(),s.on(e,t,n)):s.on(...arguments)},off:function(e){if(s.off(...arguments),q(e)){let e=!1;s.getEvents().forEach((t=>{q(t)&&s.getEventListenerCount(t)>0&&(e=!0)})),e||(M=!1,D&&void 0===P&&$())}},setStreaming:function(e){const t=null===e?void 0:e;t!==P&&(P=t,Z())},flush:function(e){return x.wrapPromiseCallback(u?k.flush():Promise.resolve(),e)},allFlags:function(){const e={};if(!F)return e;for(const t in F)x.objectHasOwnProperty(F,t)&&!F[t].deleted&&(e[t]=J(t,null,!l.sendEventsOnlyForVariation,!1,!0,!1).value);return e},close:function(e){if(Y)return x.wrapPromiseCallback(Promise.resolve(),e);const t=()=>{Y=!0,F={}},n=Promise.resolve().then((()=>{if($(),E&&E.stop(),u)return k.stop(),k.flush()})).then(t).catch(t);return x.wrapPromiseCallback(n,e)},addHook:function(e){y.addHook(e)}};return lt(A,p,re,f),{client:re,options:l,emitter:s,ident:O,logger:A,requestor:S,start:function(){u&&(E&&E.start(),k.start())},enqueueEvent:H,getFlagsInternal:function(){return F},getEnvironmentId:()=>h,internalChangeEventName:dt}},commonBasicLogger:rt,errors:d,messages:oe,utils:x,getContextKeys:it},gt=ht.initialize,ft=ht.errors;function pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Ct(e,t,n,r){var o,i,A=("substring"!==e.kind&&"regex"!==e.kind||!r.includes("/")?t.replace(r,""):t).replace(n,"");switch(e.kind){case"exact":i=t,o=new RegExp("^"+Bt(e.url)+"/?$");break;case"canonical":i=A,o=new RegExp("^"+Bt(e.url)+"/?$");break;case"substring":i=A,o=new RegExp(".*"+Bt(e.substring)+".*$");break;case"regex":i=A,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function bt(e,t){for(var n={},r=null,o=[],i=0;i0&&(r=function(e){for(var n=function(e,t){for(var n=[],r=0;r0;){for(var a=0;a{var t;return null!=(t=e.context)?t:e.user},Tt=e=>{const t={};for(const n in e)0!==n.indexOf("$")&&(t[St()(n)]=e[n]);return t},Yt=(e,t)=>{const n={};for(const r in e)t&&void 0===t[r]||(n[r]=e[r].current);return n};Tt.camelCaseKeys=Tt;var Rt=Object.defineProperty,jt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Nt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t)=>{for(var n in t||(t={}))Ot.call(t,n)&&Nt(e,n,t[n]);if(jt)for(var n of jt(t))Lt.call(t,n)&&Nt(e,n,t[n]);return e};const Ut={wrapperName:"react-client-sdk",wrapperVersion:"3.1.0",sendEventsOnlyForVariation:!0},_t=(e,...t)=>{return n=[e,...t],r=function*(e,t={anonymous:!0,kind:"user"},n,r){const o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(e){var t,n={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var r=e&&e.disableSyncEventPost;n.httpRequest=function(e,t,o,i){var A=n.synchronousFlush&!r;return n.synchronousFlush=!1,function(e,t,n,r,o){if(o&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var t=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(t)return parseInt(t[2],10)<73}return!0}())return wt;var i=new window.XMLHttpRequest;for(var A in i.open(e,t,!o),n||{})Object.prototype.hasOwnProperty.call(n,A)&&i.setRequestHeader(A,n[A]);if(o){try{i.send(r)}catch(e){}return wt}var s,a=new Promise((function(e,t){i.addEventListener("load",(function(){s||e({status:i.status,header:function(e){return i.getResponseHeader(e)},body:i.responseText})})),i.addEventListener("error",(function(){s||t(new Error)})),i.send(r)}));return{promise:a,cancel:function(){s=!0,i.abort()}}}(e,t,o,i,A)}}n.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),t},n.httpFallbackPing=function(e){(new window.Image).src=e};var o,i=e&&e.eventUrlTransformer;n.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},n.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(n.localStorage={get:function(e){return new Promise((function(t){t(window.localStorage.getItem(e))}))},set:function(e,t){return new Promise((function(n){window.localStorage.setItem(e,t),n()}))},clear:function(e){return new Promise((function(t){window.localStorage.removeItem(e),t()}))}})}catch(e){n.localStorage=null}if(e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(n.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(n.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var A=3e5;n.eventSourceFactory=function(e,t){var n=yt(yt({},{heartbeatTimeout:A,silentTimeout:A,skipDefaultHeaders:!0}),t);return new o(e,n)},n.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return n.userAgent="JSClient",n.version="3.7.0",n.diagnosticSdkData={name:"js-client-sdk",version:"3.7.0"},n.diagnosticPlatformData={name:"JS"},n.diagnosticUseCombinedEvent=!0,n}(n),o=gt(e,t,n,r,It),i=o.client,A=o.options,s=o.emitter,a=new Promise((function(e){var t=s.on(Et,(function(){s.off(Et,t),e()}))}));i.waitUntilGoalsReady=function(){return a},A.fetchGoals?function(e,t){var n,r;function o(){r&&r.dispose(),n&&n.length&&(r=bt(n,i))}function i(t,n){var r=e.ident.getContext(),o={kind:t,key:n.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:r};return"click"===t&&(o.selector=n.selector),e.enqueueEvent(o)}e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then((function(e){e&&e.length>0&&(r=bt(n=e,i),function(e,t){var n,r=window.location.href;function o(){(n=window.location.href)!==r&&(r=n,t())}!function e(t,n){t(),setTimeout((function(){e(t,n)}),n)}(o,300),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o)}(0,o)),t()})).catch((function(n){e.emitter.maybeReportError(new ft.LDUnexpectedResponseError((n&&n.message,n.message))),t()}))}(o,(function(){return s.emit(Et)})):s.emit(Et),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();var l=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1};return document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&l()})),window.addEventListener("pagehide",l),i}(e,t,Ht(Ht({},Ut),n));return new Promise((e=>{function t(){o.off("ready",i),o.off("failed",n)}function n(n){t(),e({flags:{},ldClient:o,error:n})}function i(){t();const n=((e,t)=>{const n=e.allFlags();return t?Object.keys(t).reduce(((e,r)=>(e[r]=Object.prototype.hasOwnProperty.call(n,r)?n[r]:t[r],e)),{}):n})(o,r);e({flags:n,ldClient:o})}o.on("failed",n),o.on("ready",i)}))},new Promise(((e,t)=>{var o=e=>{try{A(r.next(e))}catch(e){t(e)}},i=e=>{try{A(r.throw(e))}catch(e){t(e)}},A=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);A((r=r.apply(void 0,n)).next())}));var n,r};function Gt(e,t,n=Qt,r){const o=function(e,t){return void 0===t?e:Object.keys(t).reduce(((t,n)=>(zt(e,n)&&(t[n]=e[n]),t)),{})}(t,r),{useCamelCaseFlagKeys:i=!0}=n,[A,s={}]=i?function(e){const t={},n={};for(const r in e){if(0===r.indexOf("$"))continue;const o=St()(r);t[o]=e[r],n[o]=r}return[t,n]}(o):[o];return{flags:n.sendEventsOnFlagRead?Jt(e,A,s,i):A,flagKeyMap:s}}function zt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Jt(e,t,n,r){return new Proxy(t,{get(t,o,i){const A=Reflect.get(t,o,i),s=r&&zt(n,o)||zt(t,o);if("symbol"==typeof o||!s)return A;if(void 0===A)return;const a=r?n[o]:o;return e.variation(a,A)}})}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Wt=Object.defineProperty,Vt=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,Xt=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t)=>{for(var n in t||(t={}))$t.call(t,n)&&Xt(e,n,t[n]);if(Vt)for(var n of Vt(t))Kt.call(t,n)&&Xt(e,n,t[n]);return e};function qt(e){return t=this,n=function*(){const{clientSideID:t,flags:n,options:o,reactOptions:i}=e,A=Zt(Zt({},Qt),i),{ldClient:s,flags:a,error:l}=yield _t(t,Pt(e),o,n),c=(null==o?void 0:o.bootstrap)&&"localStorage"!==o.bootstrap?o.bootstrap:a;return({children:e})=>{const[t,o]=(0,r.useState)((()=>Zt({unproxiedFlags:c},Gt(s,c,A,n))));(0,r.useEffect)((()=>{function e(e){const t=Yt(e,n);Object.keys(t).length>0&&o((({unproxiedFlags:e})=>{const r=Zt(Zt({},e),t);return Zt({unproxiedFlags:r},Gt(s,r,A,n))}))}return s.on("change",e),function(){s.off("change",e)}}),[]);const{flags:i,flagKeyMap:a}=t;return r.createElement(Mt,{value:{flags:i,flagKeyMap:a,ldClient:s,error:l}},e)}},new Promise(((e,r)=>{var o=e=>{try{A(n.next(e))}catch(e){r(e)}},i=e=>{try{A(n.throw(e))}catch(e){r(e)}},A=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);A((n=n.apply(t,null)).next())}));var t,n}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const en=()=>{const{flags:e}=(0,r.useContext)(Dt);return e},tn=()=>{const{ldClient:e}=(0,r.useContext)(Dt);return e}},6884:(e,t,n)=>{var r,o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,A="\\ud800-\\udfff",s="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",l="\\u2700-\\u27bf",c="a-z\\xdf-\\xf6\\xf8-\\xff",u="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",h="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",g="["+A+"]",f="["+h+"]",p="["+s+a+"]",m="\\d+",y="["+l+"]",v="["+c+"]",w="[^"+A+h+m+l+c+u+"]",B="\\ud83c[\\udffb-\\udfff]",C="[^"+A+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+u+"]",x="\\u200d",k="(?:"+v+"|"+w+")",S="(?:"+I+"|"+w+")",Q="(?:['’](?:d|ll|m|re|s|t|ve))?",D="(?:['’](?:D|LL|M|RE|S|T|VE))?",M="(?:"+p+"|"+B+")?",F="["+d+"]?",P=F+M+"(?:"+x+"(?:"+[C,b,E].join("|")+")"+F+M+")*",T="(?:"+[y,b,E].join("|")+")"+P,Y="(?:"+[C+p+"?",p,b,E,g].join("|")+")",R=RegExp("['’]","g"),j=RegExp(p,"g"),O=RegExp(B+"(?="+B+")|"+Y+P,"g"),L=RegExp([I+"?"+v+"+"+Q+"(?="+[f,I,"$"].join("|")+")",S+"+"+D+"(?="+[f,I+k,"$"].join("|")+")",I+"?"+k+"+"+Q,I+"+"+D,m,T].join("|"),"g"),N=RegExp("["+x+A+s+a+d+"]"),H=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,_="object"==typeof self&&self&&self.Object===Object&&self,G=U||_||Function("return this")(),z=(r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==r?void 0:r[e]});function J(e){return N.test(e)}var W=Object.prototype.toString,V=G.Symbol,$=V?V.prototype:void 0,K=$?$.toString:void 0;function X(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==W.call(e)}(e))return K?K.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}var Z,q=(Z=function(e,t,n){return t=t.toLowerCase(),e+(n?ee(X(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r=o?t:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",A="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[A]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u,d,h,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,p=g||f||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,v=y&&y.exports===m,w=v&&g.process,B=function(){try{return y&&y.require&&y.require("util").types||w&&w.binding&&w.binding("util")}catch(e){}}(),C=B&&B.isTypedArray,b=Array.prototype,E=Function.prototype,I=Object.prototype,x=p["__core-js_shared__"],k=E.toString,S=I.hasOwnProperty,Q=(u=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",D=I.toString,M=k.call(Object),F=RegExp("^"+k.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=v?p.Buffer:void 0,T=p.Symbol,Y=p.Uint8Array,R=(P&&P.allocUnsafe,d=Object.getPrototypeOf,h=Object,function(e){return d(h(e))}),j=Object.create,O=I.propertyIsEnumerable,L=b.splice,N=T?T.toStringTag:void 0,H=function(){try{var e=se(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),U=P?P.isBuffer:void 0,_=Math.max,G=Date.now,z=se(p,"Map"),J=se(Object,"create"),W=function(){function e(){}return function(t){if(!ve(t))return{};if(j)return j(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function V(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},$.prototype.set=function(e,t){var n=this.__data__,r=ee(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},K.prototype.clear=function(){this.size=0,this.__data__={hash:new V,map:new(z||$),string:new V}},K.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},K.prototype.get=function(e){return Ae(this,e).get(e)},K.prototype.has=function(e){return Ae(this,e).has(e)},K.prototype.set=function(e,t){var n=Ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new $,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $){var r=n.__data__;if(!z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new K(r)}return n.set(e,t),this.size=n.size,this};function ne(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?function(e){var t=S.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=D.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return D.call(e)}(e)}function re(e){return we(e)&&ne(e)==i}function oe(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),A=i.length;A--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,(function(i,A){if(o||(o=new X),ve(i))!function(e,t,n,r,o,i,A){var a=ce(e,n),l=ce(t,n),c=A.get(l);if(c)Z(e,n,c);else{var u,d,h,g,f,p=i?i(a,l,n+"",e,t,A):void 0,m=void 0===p;if(m){var y=ge(l),v=!y&&pe(l),w=!y&&!v&&Be(l);p=l,y||v||w?ge(a)?p=a:we(f=a)&&fe(f)?p=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function de(e,t){return e===t||e!=e&&t!=t}var he=re(function(){return arguments}())?re:function(e){return we(e)&&S.call(e,"callee")&&!O.call(e,"callee")},ge=Array.isArray;function fe(e){return null!=e&&ye(e.length)&&!me(e)}var pe=U||function(){return!1};function me(e){if(!ve(e))return!1;var t=ne(e);return t==A||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ye(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function we(e){return null!=e&&"object"==typeof e}var Be=C?function(e){return function(t){return e(t)}}(C):function(e){return we(e)&&ye(e.length)&&!!c[ne(e)]};function Ce(e){return fe(e)?function(e,t){var n=ge(e),r=!n&&he(e),o=!n&&!r&&pe(e),i=!n&&!r&&!o&&Be(e),A=n||r||o||i,s=A?function(e,t){for(var n=-1,r=Array(e);++n1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=be.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?fe(n)&&ae(t,n.length):"string"==r&&t in n)&&de(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n{"use strict";e.exports=Math.abs},6329:e=>{"use strict";e.exports=Math.floor},3678:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2264:e=>{"use strict";e.exports=Math.max},5730:e=>{"use strict";e.exports=Math.min},707:e=>{"use strict";e.exports=Math.pow},3862:e=>{"use strict";e.exports=Math.round},9550:(e,t,n)=>{"use strict";var r=n(3678);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},609:(e,t,n)=>{"use strict";var r=n(4289),o=n(5559),i=n(4244),A=n(5624),s=n(2281),a=o(A(),Object);r(a,{getPolyfill:A,implementation:i,shim:s}),e.exports=a},5624:(e,t,n)=>{"use strict";var r=n(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},2281:(e,t,n)=>{"use strict";var r=n(5624),o=n(4289);e.exports=function(){var e=r();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,A=n(1414),s=Object.prototype.propertyIsEnumerable,a=!s.call({toString:null},"toString"),l=s.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=A(e),s=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var g=l&&n;if(s&&e.length>0&&!o.call(e,0))for(var f=0;f0)for(var p=0;p{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,A=i?function(e){return i(e)}:n(8987),s=Object.keys;A.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)})}else Object.keys=A;return Object.keys||A},e.exports=A},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},2837:(e,t,n)=>{"use strict";var r=n(2215),o=n(5419)(),i=n(7379),A=n(8892),s=i("Array.prototype.push"),a=i("Object.prototype.propertyIsEnumerable"),l=o?A.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var n=A(e);if(1===arguments.length)return n;for(var i=1;i{"use strict";var r=n(2837);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r{"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},4155:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function A(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,a=[],l=!1,c=-1;function u(){l&&s&&(l=!1,s.length?a=s.concat(a):c=-1,a.length&&d())}function d(){if(!l){var e=A(u);l=!0;for(var t=a.length;t;){for(s=a,a=[];++c1)for(var n=1;n{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,A){if(A!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5760:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,o=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,A=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),a=new t(512),l=new t(512);function c(e){return s.get(e)||s.set(e,u(e).map((function(e){return e.replace(A,"$2")})))}function u(e){return e.match(n)||[""]}function d(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function h(e){return!d(e)&&(function(e){return e.match(o)&&!e.match(r)}(e)||function(e){return i.test(e)}(e))}e.exports={Cache:t,split:u,normalizePath:c,setter:function(e){var t=c(e);return a.get(e)||a.set(e,(function(e,n){for(var r=0,o=t.length,i=e;r{var t;window,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=256,A=function(){function e(e){void 0===e&&(e="="),this._paddingCharacter=e}return e.prototype.encodedLength=function(e){return this._paddingCharacter?(e+2)/3*4|0:(8*e+5)/6|0},e.prototype.encode=function(e){for(var t="",n=0;n>>18&63),t+=this._encodeByte(r>>>12&63),t+=this._encodeByte(r>>>6&63),t+=this._encodeByte(r>>>0&63)}var o=e.length-n;return o>0&&(r=e[n]<<16|(2===o?e[n+1]<<8:0),t+=this._encodeByte(r>>>18&63),t+=this._encodeByte(r>>>12&63),t+=2===o?this._encodeByte(r>>>6&63):this._paddingCharacter||"",t+=this._paddingCharacter||""),t},e.prototype.maxDecodedLength=function(e){return this._paddingCharacter?e/4*3|0:(6*e+7)/8|0},e.prototype.decodedLength=function(e){return this.maxDecodedLength(e.length-this._getPaddingLength(e))},e.prototype.decode=function(e){if(0===e.length)return new Uint8Array(0);for(var t=this._getPaddingLength(e),n=e.length-t,r=new Uint8Array(this.maxDecodedLength(n)),o=0,A=0,s=0,a=0,l=0,c=0,u=0;A>>4,r[o++]=l<<4|c>>>2,r[o++]=c<<6|u,s|=a&i,s|=l&i,s|=c&i,s|=u&i;if(A>>4,s|=a&i,s|=l&i),A>>2,s|=c&i),A>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-15,t+=62-e>>>8&3,String.fromCharCode(t)},e.prototype._decodeChar=function(e){var t=i;return t+=(42-e&e-44)>>>8&-256+e-43+62,t+=(46-e&e-48)>>>8&-256+e-47+63,t+=(47-e&e-58)>>>8&-256+e-48+52,(t+=(64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},e.prototype._getPaddingLength=function(e){var t=0;if(this._paddingCharacter){for(var n=e.length-1;n>=0&&e[n]===this._paddingCharacter;n--)t++;if(e.length<4||t>2)throw new Error("Base64Coder: incorrect padding")}return t},e}();t.Coder=A;var s=new A;t.encode=function(e){return s.encode(e)},t.decode=function(e){return s.decode(e)};var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-13,t+=62-e>>>8&49,String.fromCharCode(t)},t.prototype._decodeChar=function(e){var t=i;return t+=(44-e&e-46)>>>8&-256+e-45+62,t+=(94-e&e-96)>>>8&-256+e-95+63,t+=(47-e&e-58)>>>8&-256+e-48+52,(t+=(64-e&e-91)>>>8&-256+e-65+0)+((96-e&e-123)>>>8&-256+e-97+26)},t}(A);t.URLSafeCoder=a;var l=new a;t.encodeURLSafe=function(e){return l.encode(e)},t.decodeURLSafe=function(e){return l.decode(e)},t.encodedLength=function(e){return s.encodedLength(e)},t.maxDecodedLength=function(e){return s.maxDecodedLength(e)},t.decodedLength=function(e){return s.decodedLength(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="utf8: invalid string",o="utf8: invalid source encoding";function i(e){for(var t=0,n=0;n=e.length-1)throw new Error(r);n++,t+=4}}return t}t.encode=function(e){for(var t=new Uint8Array(i(e)),n=0,r=0;r>6,t[n++]=128|63&o):o<55296?(t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|63&o):(r++,o=(1023&o)<<10,o|=1023&e.charCodeAt(r),o+=65536,t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|63&o)}return t},t.encodedLength=i,t.decode=function(e){for(var t=[],n=0;n=e.length)throw new Error(o);if(128!=(192&(A=e[++n])))throw new Error(o);r=(31&r)<<6|63&A,i=128}else if(r<240){if(n>=e.length-1)throw new Error(o);var A=e[++n],s=e[++n];if(128!=(192&A)||128!=(192&s))throw new Error(o);r=(15&r)<<12|(63&A)<<6|63&s,i=2048}else{if(!(r<248))throw new Error(o);if(n>=e.length-2)throw new Error(o);A=e[++n],s=e[++n];var a=e[++n];if(128!=(192&A)||128!=(192&s)||128!=(192&a))throw new Error(o);r=(15&r)<<18|(63&A)<<12|(63&s)<<6|63&a,i=65536}if(r=55296&&r<=57343)throw new Error(o);if(r>=65536){if(r>1114111)throw new Error(o);r-=65536,t.push(String.fromCharCode(55296|r>>10)),r=56320|1023&r}}t.push(String.fromCharCode(r))}return t.join("")}},function(e,t,n){e.exports=n(3).default},function(e,t,n){"use strict";n.r(t);class r{constructor(e,t){this.lastId=0,this.prefix=e,this.name=t}create(e){this.lastId++;var t=this.lastId,n=this.prefix+t,r=this.name+"["+t+"]",o=!1,i=function(){o||(e.apply(null,arguments),o=!0)};return this[t]=i,{number:t,id:n,name:r,callback:i}}remove(e){delete this[e.number]}}var o=new r("_pusher_script_","Pusher.ScriptReceivers"),i="8.4.0",A=7,s=80,a=443,l="",c="sockjs.pusher.com",u=80,d=443,h="/pusher",g="stats.pusher.com",f="/pusher/auth",p="ajax",m=12e4,y=3e4,v=1e4,w={endpoint:"/pusher/user-auth",transport:"ajax"},B={endpoint:"/pusher/auth",transport:"ajax"},C="http://js.pusher.com",b="https://js.pusher.com",E="",I=new r("_pusher_dependencies","Pusher.DependenciesReceivers"),x=new class{constructor(e){this.options=e,this.receivers=e.receivers||o,this.loading={}}load(e,t,n){var r=this;if(r.loading[e]&&r.loading[e].length>0)r.loading[e].push(n);else{r.loading[e]=[n];var o=Et.createScriptRequest(r.getPath(e,t)),i=r.receivers.create((function(t){if(r.receivers.remove(i),r.loading[e]){var n=r.loading[e];delete r.loading[e];for(var A=function(e){e||o.cleanup()},s=0;s>>6)+N(128|63&t):N(224|t>>>12&15)+N(128|t>>>6&63)+N(128|63&t)},z=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[H.charAt(n>>>18),H.charAt(n>>>12&63),t>=2?"=":H.charAt(n>>>6&63),t>=1?"=":H.charAt(63&n)].join("")},J=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,z)},W=class{constructor(e,t,n,r){this.clear=t,this.timer=e((()=>{this.timer&&(this.timer=r(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function V(e){window.clearTimeout(e)}function $(e){window.clearInterval(e)}class K extends W{constructor(e,t){super(setTimeout,V,e,(function(e){return t(),null}))}}class X extends W{constructor(e,t){super(setInterval,$,e,(function(e){return t(),e}))}}var Z={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:e=>new K(0,e),method(e,...t){var n=Array.prototype.slice.call(arguments,1);return function(t){return t[e].apply(t,n.concat(arguments))}}},q=Z;function ee(e,...t){for(var n=0;n{window.console&&window.console.log&&window.console.log(e)}}debug(...e){this.log(this.globalLog,e)}warn(...e){this.log(this.globalLogWarn,e)}error(...e){this.log(this.globalLogError,e)}globalLogWarn(e){window.console&&window.console.warn?window.console.warn(e):this.globalLog(e)}globalLogError(e){window.console&&window.console.error?window.console.error(e):this.globalLogWarn(e)}log(e,...t){var n=te.apply(this,arguments);Ht.log?Ht.log(n):Ht.logToConsole&&e.bind(this)(n)}},he=function(e,t,n,r,o){void 0===n.headers&&null==n.headersProvider||de.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);var i=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var A=e.getDocument(),s=A.createElement("script");e.auth_callbacks[i]=function(e){o(null,e)};var a="Pusher.auth_callbacks['"+i+"']";s.src=n.endpoint+"?callback="+encodeURIComponent(a)+"&"+t;var l=A.getElementsByTagName("head")[0]||A.documentElement;l.insertBefore(s,l.firstChild)};class ge{constructor(e){this.src=e}send(e){var t=this,n="Error loading "+t.src;t.script=document.createElement("script"),t.script.id=e.id,t.script.src=t.src,t.script.type="text/javascript",t.script.charset="UTF-8",t.script.addEventListener?(t.script.onerror=function(){e.callback(n)},t.script.onload=function(){e.callback(null)}):t.script.onreadystatechange=function(){"loaded"!==t.script.readyState&&"complete"!==t.script.readyState||e.callback(null)},void 0===t.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(t.errorScript=document.createElement("script"),t.errorScript.id=e.id+"_error",t.errorScript.text=e.name+"('"+n+"');",t.script.async=t.errorScript.async=!1):t.script.async=!0;var r=document.getElementsByTagName("head")[0];r.insertBefore(t.script,r.firstChild),t.errorScript&&r.insertBefore(t.errorScript,t.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class fe{constructor(e,t){this.url=e,this.data=t}send(e){if(!this.request){var t=(r=this.data,Ae((o=ce(ae(r,(function(e){return void 0!==e}))),i=[],re(o,(function(e,t){i.push([t,e])})),i),q.method("join","=")).join("&")),n=this.url+"/"+e.number+"?"+t;this.request=Et.createScriptRequest(n),this.request.send(e)}var r,o,i}cleanup(){this.request&&this.request.cleanup()}}var pe={name:"jsonp",getAgent:function(e,t){return function(n,r){var i="http"+(t?"s":"")+"://"+(e.host||e.options.host)+e.options.path,A=Et.createJSONPRequest(i,n),s=Et.ScriptReceivers.create((function(t,n){o.remove(s),A.cleanup(),n&&n.host&&(e.host=n.host),r&&r(t,n)}));A.send(s)}}};function me(e,t,n){return e+(t.useTLS?"s":"")+"://"+(t.useTLS?t.hostTLS:t.hostNonTLS)+n}function ye(e,t){return"/app/"+e+"?protocol="+A+"&client=js&version="+i+(t?"&"+t:"")}var ve={getInitial:function(e,t){return me("ws",t,(t.httpPath||"")+ye(e,"flash=false"))}},we={getInitial:function(e,t){return me("http",t,(t.httpPath||"/pusher")+ye(e))}},Be={getInitial:function(e,t){return me("http",t,t.httpPath||"/pusher")},getPath:function(e,t){return ye(e)}};class Ce{constructor(){this._callbacks={}}get(e){return this._callbacks[be(e)]}add(e,t,n){var r=be(e);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:t,context:n})}remove(e,t,n){if(e||t||n){var r=e?[be(e)]:oe(this._callbacks);t||n?this.removeCallback(r,t,n):this.removeAllCallbacks(r)}else this._callbacks={}}removeCallback(e,t,n){ie(e,(function(e){this._callbacks[e]=se(this._callbacks[e]||[],(function(e){return t&&t!==e.fn||n&&n!==e.context})),0===this._callbacks[e].length&&delete this._callbacks[e]}),this)}removeAllCallbacks(e){ie(e,(function(e){delete this._callbacks[e]}),this)}}function be(e){return"_"+e}class Ee{constructor(e){this.callbacks=new Ce,this.global_callbacks=[],this.failThrough=e}bind(e,t,n){return this.callbacks.add(e,t,n),this}bind_global(e){return this.global_callbacks.push(e),this}unbind(e,t,n){return this.callbacks.remove(e,t,n),this}unbind_global(e){return e?(this.global_callbacks=se(this.global_callbacks||[],(t=>t!==e)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(e,t,n){for(var r=0;r0)for(r=0;r{this.onError(e),this.changeState("closed")})),!1}return this.bindListeners(),de.debug("Connecting",{transport:this.name,url:e}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(e){return"open"===this.state&&(q.defer((()=>{this.socket&&this.socket.send(e)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(e){this.emit("error",{type:"WebSocketError",error:e}),this.timeline.error(this.buildTimelineMessage({error:e.toString()}))}onClose(e){e?this.changeState("closed",{code:e.code,reason:e.reason,wasClean:e.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(e){this.emit("message",e)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=e=>{this.onError(e)},this.socket.onclose=e=>{this.onClose(e)},this.socket.onmessage=e=>{this.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(e,t){this.state=e,this.timeline.info(this.buildTimelineMessage({state:e,params:t})),this.emit(e,t)}buildTimelineMessage(e){return ee({cid:this.id},e)}}class xe{constructor(e){this.hooks=e}isSupported(e){return this.hooks.isSupported(e)}createConnection(e,t,n,r){return new Ie(this.hooks,e,t,n,r)}}var ke=new xe({urls:ve,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Et.getWebSocketAPI())},isSupported:function(){return Boolean(Et.getWebSocketAPI())},getSocket:function(e){return Et.createWebSocket(e)}}),Se={urls:we,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Qe=ee({getSocket:function(e){return Et.HTTPFactory.createStreamingSocket(e)}},Se),De=ee({getSocket:function(e){return Et.HTTPFactory.createPollingSocket(e)}},Se),Me={isSupported:function(){return Et.isXHRSupported()}},Fe={ws:ke,xhr_streaming:new xe(ee({},Qe,Me)),xhr_polling:new xe(ee({},De,Me))},Pe=new xe({file:"sockjs",urls:Be,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:x.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),Te={isSupported:function(e){return Et.isXDRSupported(e.useTLS)}},Ye=new xe(ee({},Qe,Te)),Re=new xe(ee({},De,Te));Fe.xdr_streaming=Ye,Fe.xdr_polling=Re,Fe.sockjs=Pe;var je=Fe,Oe=new class extends Ee{constructor(){super();var e=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){e.emit("online")}),!1),window.addEventListener("offline",(function(){e.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Le{constructor(e,t,n){this.manager=e,this.transport=t,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(e,t,n,r){r=ee({},r,{activityTimeout:this.pingDelay});var o=this.transport.createConnection(e,t,n,r),i=null,A=function(){o.unbind("open",A),o.bind("closed",s),i=q.now()},s=e=>{if(o.unbind("closed",s),1002===e.code||1003===e.code)this.manager.reportDeath();else if(!e.wasClean&&i){var t=q.now()-i;t<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(t/2,this.minPingDelay))}};return o.bind("open",A),o}isSupported(e){return this.manager.isAlive()&&this.transport.isSupported(e)}}const Ne={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if("string"==typeof n)try{n=JSON.parse(t.data)}catch(e){}var r={event:t.event,channel:t.channel,data:n};return t.user_id&&(r.user_id=t.user_id),r}catch(t){throw{type:"MessageParseError",error:t,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Ne.decodeMessage(e);if("pusher:connection_established"===t.event){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:1e3*t.data.activity_timeout}}if("pusher:error"===t.event)return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?"backoff":null:4e3===e.code?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return 1e3!==e.code&&1001!==e.code?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}};var He=Ne;class Ue extends Ee{constructor(e,t){super(),this.id=e,this.transport=t,this.activityTimeout=t.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(e){return this.transport.send(e)}send_event(e,t,n){var r={event:e,data:t};return n&&(r.channel=n),de.debug("Event sent",r),this.send(He.encodeMessage(r))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var e={message:e=>{var t;try{t=He.decodeMessage(e)}catch(t){this.emit("error",{type:"MessageParseError",error:t,data:e.data})}if(void 0!==t){switch(de.debug("Event recd",t),t.event){case"pusher:error":this.emit("error",{type:"PusherError",data:t.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",t)}},activity:()=>{this.emit("activity")},error:e=>{this.emit("error",e)},closed:e=>{t(),e&&e.code&&this.handleCloseEvent(e),this.transport=null,this.emit("closed")}},t=()=>{re(e,((e,t)=>{this.transport.unbind(t,e)}))};re(e,((e,t)=>{this.transport.bind(t,e)}))}handleCloseEvent(e){var t=He.getCloseAction(e),n=He.getCloseError(e);n&&this.emit("error",n),t&&this.emit(t,{action:t,error:n})}}class _e{constructor(e,t){this.transport=e,this.callback=t,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=e=>{var t;this.unbindListeners();try{t=He.processHandshake(e)}catch(e){return this.finish("error",{error:e}),void this.transport.close()}"connected"===t.action?this.finish("connected",{connection:new Ue(t.id,this.transport),activityTimeout:t.activityTimeout}):(this.finish(t.action,{error:t.error}),this.transport.close())},this.onClosed=e=>{this.unbindListeners();var t=He.getCloseAction(e)||"backoff",n=He.getCloseError(e);this.finish(t,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(e,t){this.callback(ee({transport:this.transport,action:e},t))}}class Ge{constructor(e,t){this.timeline=e,this.options=t||{}}send(e,t){this.timeline.isEmpty()||this.timeline.send(Et.TimelineTransport.getAgent(this,e),t)}}class ze extends Ee{constructor(e,t){super((function(t,n){de.debug("No callbacks on "+e+" for "+t)})),this.name=e,this.pusher=t,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(e,t){return t(null,{auth:""})}trigger(e,t){if(0!==e.indexOf("client-"))throw new D("Event '"+e+"' does not start with 'client-'");if(!this.subscribed){var n=Q("triggeringClientEvents");de.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(e,t,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(e){var t=e.event,n=e.data;"pusher_internal:subscription_succeeded"===t?this.handleSubscriptionSucceededEvent(e):"pusher_internal:subscription_count"===t?this.handleSubscriptionCountEvent(e):0!==t.indexOf("pusher_internal:")&&this.emit(t,n,{})}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",e.data)}handleSubscriptionCountEvent(e){e.data.subscription_count&&(this.subscriptionCount=e.data.subscription_count),this.emit("pusher:subscription_count",e.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((e,t)=>{e?(this.subscriptionPending=!1,de.error(e.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:e.message},e instanceof O?{status:e.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:t.auth,channel_data:t.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Je extends ze{authorize(e,t){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:e},t)}}class We{constructor(){this.reset()}get(e){return Object.prototype.hasOwnProperty.call(this.members,e)?{id:e,info:this.members[e]}:null}each(e){re(this.members,((t,n)=>{e(this.get(n))}))}setMyID(e){this.myID=e}onSubscription(e){this.members=e.presence.hash,this.count=e.presence.count,this.me=this.get(this.myID)}addMember(e){return null===this.get(e.user_id)&&this.count++,this.members[e.user_id]=e.user_info,this.get(e.user_id)}removeMember(e){var t=this.get(e.user_id);return t&&(delete this.members[e.user_id],this.count--),t}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Ve extends Je{constructor(e,t){super(e,t),this.members=new We}authorize(e,t){super.authorize(e,((e,n)=>{return r=this,o=void 0,A=function*(){if(!e)if(null!=n.channel_data){var r=JSON.parse(n.channel_data);this.members.setMyID(r.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let e=Q("authorizationEndpoint");return de.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`),void t("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}t(e,n)},new((i=void 0)||(i=Promise))((function(e,t){function n(e){try{a(A.next(e))}catch(e){t(e)}}function s(e){try{a(A.throw(e))}catch(e){t(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(n,s)}a((A=A.apply(r,o||[])).next())}));var r,o,i,A}))}handleEvent(e){var t=e.event;if(0===t.indexOf("pusher_internal:"))this.handleInternalEvent(e);else{var n=e.data,r={};e.user_id&&(r.user_id=e.user_id),this.emit(t,n,r)}}handleInternalEvent(e){var t=e.event,n=e.data;switch(t){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(e);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(e);break;case"pusher_internal:member_added":var r=this.members.addMember(n);this.emit("pusher:member_added",r);break;case"pusher_internal:member_removed":var o=this.members.removeMember(n);o&&this.emit("pusher:member_removed",o)}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var $e=n(1),Ke=n(0);class Xe extends Je{constructor(e,t,n){super(e,t),this.key=null,this.nacl=n}authorize(e,t){super.authorize(e,((e,n)=>{if(e)return void t(e,n);let r=n.shared_secret;r?(this.key=Object(Ke.decode)(r),delete n.shared_secret,t(null,n)):t(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(e,t){throw new Y("Client events are not currently supported for encrypted channels")}handleEvent(e){var t=e.event,n=e.data;0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")?this.handleEncryptedEvent(t,n):super.handleEvent(e)}handleEncryptedEvent(e,t){if(!this.key)return void de.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!t.ciphertext||!t.nonce)return void de.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+t);let n=Object(Ke.decode)(t.ciphertext);if(n.length{t?de.error(`Failed to make a request to the authEndpoint: ${i}. Unable to fetch new key, so dropping encrypted event`):(o=this.nacl.secretbox.open(n,r,this.key),null!==o?this.emit(e,this.getDataToEmit(o)):de.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(e,this.getDataToEmit(o))}getDataToEmit(e){let t=Object($e.decode)(e);try{return JSON.parse(t)}catch(e){return t}}}class Ze extends Ee{constructor(e,t){super(),this.state="initialized",this.connection=null,this.key=e,this.options=t,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=Et.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(e){return!!this.connection&&this.connection.send(e)}send_event(e,t,n){return!!this.connection&&this.connection.send_event(e,t,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var e=(t,n)=>{t?this.runner=this.strategy.connect(0,e):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,e)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(e){this.timeline.info({action:"retry",delay:e}),e>0&&this.emit("connecting_in",Math.round(e/1e3)),this.retryTimer=new K(e||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new K(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new K(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new K(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(e){return ee({},e,{message:e=>{this.resetActivityCheck(),this.emit("message",e)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:e=>{this.emit("error",e)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(e){return ee({},e,{connected:e=>{this.activityTimeout=Math.min(this.options.activityTimeout,e.activityTimeout,e.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(e.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let e=e=>t=>{t.error&&this.emit("error",{type:"WebSocketError",error:t.error}),e(t)};return{tls_only:e((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:e((()=>{this.disconnect()})),backoff:e((()=>{this.retryIn(1e3)})),retry:e((()=>{this.retryIn(0)}))}}setConnection(e){for(var t in this.connection=e,this.connectionCallbacks)this.connection.bind(t,this.connectionCallbacks[t]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var e in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(e,this.connectionCallbacks[e]);var t=this.connection;return this.connection=null,t}}updateState(e,t){var n=this.state;if(this.state=e,n!==e){var r=e;"connected"===r&&(r+=" with new socket ID "+t.socket_id),de.debug("State changed",n+" -> "+r),this.timeline.info({state:e,params:t}),this.emit("state_change",{previous:n,current:e}),this.emit(e,t)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class qe{constructor(){this.channels={}}add(e,t){return this.channels[e]||(this.channels[e]=function(e,t){if(0===e.indexOf("private-encrypted-")){if(t.config.nacl)return et.createEncryptedChannel(e,t,t.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",r=Q("encryptedChannelSupport");throw new Y(`${n}. ${r}`)}if(0===e.indexOf("private-"))return et.createPrivateChannel(e,t);if(0===e.indexOf("presence-"))return et.createPresenceChannel(e,t);if(0===e.indexOf("#"))throw new M('Cannot create a channel with name "'+e+'".');return et.createChannel(e,t)}(e,t)),this.channels[e]}all(){return e=this.channels,t=[],re(e,(function(e){t.push(e)})),t;var e,t}find(e){return this.channels[e]}remove(e){var t=this.channels[e];return delete this.channels[e],t}disconnect(){re(this.channels,(function(e){e.disconnect()}))}}var et={createChannels:()=>new qe,createConnectionManager:(e,t)=>new Ze(e,t),createChannel:(e,t)=>new ze(e,t),createPrivateChannel:(e,t)=>new Je(e,t),createPresenceChannel:(e,t)=>new Ve(e,t),createEncryptedChannel:(e,t,n)=>new Xe(e,t,n),createTimelineSender:(e,t)=>new Ge(e,t),createHandshake:(e,t)=>new _e(e,t),createAssistantToTheTransportManager:(e,t,n)=>new Le(e,t,n)};class tt{constructor(e){this.options=e||{},this.livesLeft=this.options.lives||1/0}getAssistant(e){return et.createAssistantToTheTransportManager(this,e,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class nt{constructor(e,t){this.strategies=e,this.loop=Boolean(t.loop),this.failFast=Boolean(t.failFast),this.timeout=t.timeout,this.timeoutLimit=t.timeoutLimit}isSupported(){return le(this.strategies,q.method("isSupported"))}connect(e,t){var n=this.strategies,r=0,o=this.timeout,i=null,A=(s,a)=>{a?t(null,a):(r+=1,this.loop&&(r%=n.length),r0&&(o=new K(n.timeout,(function(){i.abort(),r(!0)}))),i=e.connect(t,(function(e,t){e&&o&&o.isRunning()&&!n.failFast||(o&&o.ensureAborted(),r(e,t))})),{abort:function(){o&&o.ensureAborted(),i.abort()},forceMinPriority:function(e){i.forceMinPriority(e)}}}}class rt{constructor(e){this.strategies=e}isSupported(){return le(this.strategies,q.method("isSupported"))}connect(e,t){return function(e,n){var r=Ae(e,(function(e,r,o,i){return e.connect(n,function(e,n){return function(r,o){n[e].error=r,r?function(e){return function(e,t){for(var n=0;n=q.now()){var A=this.transports[r.transport];A&&(["ws","wss"].includes(r.transport)||o>3?(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),i.push(new nt([A],{timeout:2*r.latency+1e3,failFast:!0}))):o++)}var s=q.now(),a=i.pop().connect(e,(function r(A,l){A?(st(n),i.length>0?(s=q.now(),a=i.pop().connect(e,r)):t(A)):(function(e,t,n,r){var o=Et.getLocalStorage();if(o)try{o[At(e)]=ue({timestamp:q.now(),transport:t,latency:n,cacheSkipCount:r})}catch(e){}}(n,l.transport.name,q.now()-s,o),t(null,l))}));return{abort:function(){a.abort()},forceMinPriority:function(t){e=t,a&&a.forceMinPriority(t)}}}}function At(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function st(e){var t=Et.getLocalStorage();if(t)try{delete t[At(e)]}catch(e){}}class at{constructor(e,{delay:t}){this.strategy=e,this.options={delay:t}}isSupported(){return this.strategy.isSupported()}connect(e,t){var n,r=this.strategy,o=new K(this.options.delay,(function(){n=r.connect(e,t)}));return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(t){e=t,n&&n.forceMinPriority(t)}}}}class lt{constructor(e,t,n){this.test=e,this.trueBranch=t,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(e,t){return(this.test()?this.trueBranch:this.falseBranch).connect(e,t)}}class ct{constructor(e){this.strategy=e}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy.connect(e,(function(e,r){r&&n.abort(),t(e,r)}));return n}}function ut(e){return function(){return e.isSupported()}}var dt,ht={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new F),e.close()},t.onerror=function(t){e.emit("error",t),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}};class gt extends Ee{constructor(e,t,n){super(),this.hooks=e,this.method=t,this.url=n}start(e){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},Et.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(e)}close(){this.unloader&&(Et.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(e,t){for(;;){var n=this.advanceBuffer(t);if(!n)break;this.emit("chunk",{status:e,data:n})}this.isBufferTooLong(t)&&this.emit("buffer_too_long")}advanceBuffer(e){var t=e.slice(this.position),n=t.indexOf("\n");return-1!==n?(this.position+=n+1,t.slice(0,n)):null}isBufferTooLong(e){return this.position===e.length&&e.length>262144}}!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"}(dt||(dt={}));var ft=dt,pt=1;function mt(e){var t=-1===e.indexOf("?")?"?":"&";return e+t+"t="+ +new Date+"&n="+pt++}function yt(e){return Et.randomInt(e)}var vt,wt=class{constructor(e,t){this.hooks=e,this.session=yt(1e3)+"/"+function(){for(var e=[],t=0;t<8;t++)e.push(yt(32).toString(32));return e.join("")}(),this.location=function(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}(t),this.readyState=ft.CONNECTING,this.openStream()}send(e){return this.sendRaw(JSON.stringify([e]))}ping(){this.hooks.sendHeartbeat(this)}close(e,t){this.onClose(e,t,!0)}sendRaw(e){if(this.readyState!==ft.OPEN)return!1;try{return Et.createSocketRequest("POST",mt((t=this.location,n=this.session,t.base+"/"+n+"/xhr_send"))).start(e),!0}catch(e){return!1}var t,n}reconnect(){this.closeStream(),this.openStream()}onClose(e,t,n){this.closeStream(),this.readyState=ft.CLOSED,this.onclose&&this.onclose({code:e,reason:t,wasClean:n})}onChunk(e){var t;if(200===e.status)switch(this.readyState===ft.OPEN&&this.onActivity(),e.data.slice(0,1)){case"o":t=JSON.parse(e.data.slice(1)||"{}"),this.onOpen(t);break;case"a":t=JSON.parse(e.data.slice(1)||"[]");for(var n=0;n{this.onChunk(e)})),this.stream.bind("finished",(e=>{this.hooks.onFinished(this,e)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(e){q.defer((()=>{this.onError(e),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},Bt={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},Ct={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){200===t?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},bt={getRequest:function(e){var t=new(Et.getXHRAPI());return t.onreadystatechange=t.onprogress=function(){switch(t.readyState){case 3:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText);break;case 4:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText),e.emit("finished",t.status),e.close()}},t},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},Et={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:o,DependenciesReceivers:I,getDefaultStrategy:function(e,t,n){var r={};function o(t,o,i,A,s){var a=n(e,t,o,i,A,s);return r[t]=a,a}var i,A=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),s=Object.assign({},A,{useTLS:!0}),a=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),l={loop:!0,timeout:15e3,timeoutLimit:6e4},c=new tt({minPingDelay:1e4,maxPingDelay:e.activityTimeout}),u=new tt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),d=o("ws","ws",3,A,c),h=o("wss","ws",3,s,c),g=o("sockjs","sockjs",1,a),f=o("xhr_streaming","xhr_streaming",1,a,u),p=o("xdr_streaming","xdr_streaming",1,a,u),m=o("xhr_polling","xhr_polling",1,a),y=o("xdr_polling","xdr_polling",1,a),v=new nt([d],l),w=new nt([h],l),B=new nt([g],l),C=new nt([new lt(ut(f),f,p)],l),b=new nt([new lt(ut(m),m,y)],l),E=new nt([new lt(ut(C),new rt([C,new at(b,{delay:4e3})]),b)],l),I=new lt(ut(E),E,B);return i=t.useTLS?new rt([v,new at(I,{delay:2e3})]):new rt([v,new at(w,{delay:2e3}),new at(I,{delay:5e3})]),new it(new ct(new lt(ut(d),i,I)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},Transports:je,transportConnectionInitializer:function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),x.load(e.hooks.file,{useTLS:e.options.useTLS},(function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))}))):e.onClose()},HTTPFactory:{createStreamingSocket(e){return this.createSocket(Bt,e)},createPollingSocket(e){return this.createSocket(Ct,e)},createSocket:(e,t)=>new wt(e,t),createXHR(e,t){return this.createRequest(bt,e,t)},createRequest:(e,t,n)=>new gt(e,t,n),createXDR:function(e,t){return this.createRequest(ht,e,t)}},TimelineTransport:pe,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(e){window.Pusher=e;var t=()=>{this.onDocumentBody(e.ready)};window.JSON?t():x.load("json2",{},t)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:L,jsonp:he}),onDocumentBody(e){document.body?e():setTimeout((()=>{this.onDocumentBody(e)}),0)},createJSONPRequest:(e,t)=>new fe(e,t),createScriptRequest:e=>new ge(e),getLocalStorage(){try{return window.localStorage}catch(e){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Oe,createWebSocket(e){return new(this.getWebSocketAPI())(e)},createSocketRequest(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(0===t.indexOf("https:")))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var e=this.getXHRAPI();return Boolean(e)&&void 0!==(new e).withCredentials},isXDRSupported(e){var t=e?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===t},addUnloadListener(e){void 0!==window.addEventListener?window.addEventListener("unload",e,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",e)},removeUnloadListener(e){void 0!==window.addEventListener?window.removeEventListener("unload",e,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",e)},randomInt:e=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*e)};!function(e){e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG"}(vt||(vt={}));var It=vt;class xt{constructor(e,t,n){this.key=e,this.session=t,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(e,t){e<=this.options.level&&(this.events.push(ee({},t,{timestamp:q.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(e){this.log(It.ERROR,e)}info(e){this.log(It.INFO,e)}debug(e){this.log(It.DEBUG,e)}isEmpty(){return 0===this.events.length}send(e,t){var n=ee({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],e(n,((e,n)=>{e||this.sent++,t&&t(e,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class kt{constructor(e,t,n,r){this.name=e,this.priority=t,this.transport=n,this.options=r||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(e,t){if(!this.isSupported())return St(new j,t);if(this.priority{n||(l(),o?o.close():r.close())},forceMinPriority:e=>{n||this.priority{if(void 0===Et.getAuthorizers()[e.transport])throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{const r=((e,t)=>{var n="socket_id="+encodeURIComponent(e.socketId);for(var r in t.params)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t.params[r]);if(null!=t.paramsProvider){let e=t.paramsProvider();for(var r in e)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e[r])}return n})(t,e);Et.getAuthorizers()[e.transport](Et,r,e,S.UserAuthentication,n)}})(t)}function jt(e,t){const n=function(e,t){let n;return"channelAuthorization"in e?n=Object.assign(Object.assign({},B),e.channelAuthorization):(n={transport:e.authTransport||p,endpoint:e.authEndpoint||f},"auth"in e&&("params"in e.auth&&(n.params=e.auth.params),"headers"in e.auth&&(n.headers=e.auth.headers)),"authorizer"in e&&(n.customHandler=((e,t,n)=>{const r={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return(t,o)=>{const i=e.channel(t.channelName);n(i,r).authorize(t.socketId,o)}})(t,n,e.authorizer))),n}(e,t);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(e=>{if(void 0===Et.getAuthorizers()[e.transport])throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{const r=((e,t)=>{var n="socket_id="+encodeURIComponent(e.socketId);for(var r in n+="&channel_name="+encodeURIComponent(e.channelName),t.params)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t.params[r]);if(null!=t.paramsProvider){let e=t.paramsProvider();for(var r in e)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(e[r])}return n})(t,e);Et.getAuthorizers()[e.transport](Et,r,e,S.ChannelAuthorization,n)}})(n)}class Ot extends Ee{constructor(e){super((function(e,t){de.debug(`No callbacks on watchlist events for ${e}`)})),this.pusher=e,this.bindWatchlistInternalEvent()}handleEvent(e){e.data.events.forEach((e=>{this.emit(e.name,e)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(e=>{"pusher_internal:watchlist_events"===e.event&&this.handleEvent(e)}))}}class Lt extends Ee{constructor(e){super((function(e,t){de.debug("No callbacks on user for "+e)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(e,t)=>{if(e)return de.warn(`Error during signin: ${e}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:t.auth,user_data:t.user_data})},this.pusher=e,this.pusher.connection.bind("state_change",(({previous:e,current:t})=>{"connected"!==e&&"connected"===t&&this._signin(),"connected"===e&&"connected"!==t&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Ot(e),this.pusher.connection.bind("message",(e=>{"pusher:signin_success"===e.event&&this._onSigninSuccess(e.data),this.serverToUserChannel&&this.serverToUserChannel.name===e.channel&&this.serverToUserChannel.handleEvent(e)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(e){try{this.user_data=JSON.parse(e.user_data)}catch(t){return de.error(`Failed parsing user data after signin: ${e.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return de.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new ze(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((e,t)=>{0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")&&this.emit(e,t)})),(e=>{e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.pusher.connection.state||e.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:e,resolve:t,reject:n}=function(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}}();e.done=!1;const r=()=>{e.done=!0};e.then(r).catch(r),this.signinDonePromise=e,this._signinDoneResolve=t}}class Nt{static ready(){Nt.isReady=!0;for(var e=0,t=Nt.instances.length;eEt.getDefaultStrategy(this.config,e,Dt),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(e=>{var t=0===e.event.indexOf("pusher_internal:");if(e.channel){var n=this.channel(e.channel);n&&n.handleEvent(e)}t||this.global_emitter.emit(e.event,e.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(e=>{de.warn(e)})),Nt.instances.push(this),this.timeline.info({instances:Nt.instances.length}),this.user=new Lt(this),Nt.isReady&&this.connect()}channel(e){return this.channels.find(e)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var e=this.connection.isUsingTLS(),t=this.timelineSender;this.timelineSenderTimer=new X(6e4,(function(){t.send(e)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(e,t,n){return this.global_emitter.bind(e,t,n),this}unbind(e,t,n){return this.global_emitter.unbind(e,t,n),this}bind_global(e){return this.global_emitter.bind_global(e),this}unbind_global(e){return this.global_emitter.unbind_global(e),this}unbind_all(e){return this.global_emitter.unbind_all(),this}subscribeAll(){var e;for(e in this.channels.channels)this.channels.channels.hasOwnProperty(e)&&this.subscribe(e)}subscribe(e){var t=this.channels.add(e,this);return t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.connection.state||t.subscribe(),t}unsubscribe(e){var t=this.channels.find(e);t&&t.subscriptionPending?t.cancelSubscription():(t=this.channels.remove(e))&&t.subscribed&&t.unsubscribe()}send_event(e,t,n){return this.connection.send_event(e,t,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Nt.instances=[],Nt.isReady=!1,Nt.logToConsole=!1,Nt.Runtime=Et,Nt.ScriptReceivers=Et.ScriptReceivers,Nt.DependenciesReceivers=Et.DependenciesReceivers,Nt.auth_callbacks=Et.auth_callbacks;var Ht=t.default=Nt;Et.setup(Nt)}])},e.exports=t()},2592:(e,t,n)=>{const r=n(7138),o=n(5115),i=n(6907),A=n(3776);function s(e,t,n,i,A){const s=[].slice.call(arguments,1),a=s.length,l="function"==typeof s[a-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(a<1)throw new Error("Too few arguments provided");return 1===a?(n=t,t=i=void 0):2!==a||t.getContext||(i=n,n=t,t=void 0),new Promise((function(r,A){try{const A=o.create(n,i);r(e(A,t,i))}catch(e){A(e)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(A=n,n=t,t=i=void 0):3===a&&(t.getContext&&void 0===A?(A=i,i=void 0):(A=i,i=n,n=t,t=void 0));try{const r=o.create(n,i);A(null,e(r,t,i))}catch(e){A(e)}}o.create,t.rT=s.bind(null,i.render),s.bind(null,i.renderToDataURL),s.bind(null,(function(e,t,n){return A.render(e,n)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,n)=>{const r=n(242).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let e=1;e{const r=n(6910),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},7245:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3280:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},3424:(e,t,n)=>{const r=n(2378),o=n(6910);function i(e){this.mode=o.BYTE,"string"==typeof e&&(e=r(e)),this.data=new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t{const r=n(4908),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},6526:(e,t,n)=>{const r=n(242).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,n)=>{const r=n(242),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},5442:(e,t,n)=>{const r=n(6910),o=n(242);function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=i},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,o=0,i=null,A=null;for(let s=0;s=5&&(n+=r-5+3),i=t,r=1),t=e.get(a,s),t===A?o++:(o>=5&&(n+=o-5+3),A=t,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(A,i),A>=10&&(1488===o||93===o)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r{const r=n(3114),o=n(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},1085:(e,t,n)=>{const r=n(6910);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},6143:(e,t,n)=>{const r=n(2577);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o=0;){const e=n[0];for(let o=0;o{const r=n(242),o=n(4908),i=n(7245),A=n(3280),s=n(1845),a=n(6526),l=n(7126),c=n(5393),u=n(2882),d=n(3103),h=n(1642),g=n(6910),f=n(6130);function p(e,t,n){const r=e.size,o=h.getEncodedBits(t,n);let i,A;for(i=0;i<15;i++)A=1==(o>>i&1),i<6?e.set(i,8,A,!0):i<8?e.set(i+1,8,A,!0):e.set(r-15+i,8,A,!0),i<8?e.set(8,r-i-1,A,!0):i<9?e.set(8,15-i-1+1,A,!0):e.set(8,15-i-1,A,!0);e.set(r-8,8,1,!0)}function m(e,t,n,o){let h;if(Array.isArray(e))h=f.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=f.rawSplit(e);r=d.getBestVersionForData(t,n)}h=f.fromString(e,r||40)}}const m=d.getBestVersionForData(h,n);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0))}}(w,t),function(e){const t=e.size;for(let n=8;n=7&&function(e,t){const n=e.size,r=d.getEncodedBits(t);let o,i,A;for(let t=0;t<18;t++)o=Math.floor(t/3),i=t%3+n-8-3,A=1==(r>>t&1),e.set(o,i,A,!0),e.set(i,o,A,!0)}(w,t),function(e,t){const n=e.size;let r=-1,o=n-1,i=7,A=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;A>>i&1)),e.set(o,s-n,r),i--,-1===i&&(A++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(w,y),isNaN(o)&&(o=l.getBestMask(w,p.bind(null,w,n))),l.applyMask(o,w),p(w,n,o),{modules:w,version:t,errorCorrectionLevel:n,maskPattern:o,segments:h}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,i,A=o.M;return void 0!==t&&(A=o.from(t.errorCorrectionLevel,o.M),n=d.from(t.version),i=l.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),m(e,n,A,i)}},2882:(e,t,n)=>{const r=n(6143);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},7007:(e,t)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),A=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return A.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},6130:(e,t,n)=>{const r=n(6910),o=n(1085),i=n(8260),A=n(3424),s=n(5442),a=n(7007),l=n(242),c=n(8993);function u(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function h(e){const t=d(a.NUMERIC,r.NUMERIC,e),n=d(a.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,i;return l.isKanjiModeEnabled()?(o=d(a.BYTE,r.BYTE,e),i=d(a.KANJI,r.KANJI,e)):(o=d(a.BYTE_KANJI,r.BYTE,e),i=[]),t.concat(n,o,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function g(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return A.getBitsLength(e)}}function f(e,t){let n;const a=r.getBestModeForData(e);if(n=r.from(t,a),n!==r.BYTE&&n.bit=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},t.rawSplit=function(e){return t.fromArray(h(e,l.isKanjiModeEnabled()))}},242:(e,t)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},3114:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,n)=>{const r=n(242),o=n(5393),i=n(4908),A=n(6910),s=n(3114),a=r.getBCHDigit(7973);function l(e,t){return A.getCharCountIndicator(e,t)+4}function c(e,t){let n=0;return e.forEach((function(e){const r=l(e.mode,t);n+=r+e.getBitsLength()})),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=A.BYTE);const i=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===A.MIXED)return i;const a=i-l(n,e);switch(n){case A.NUMERIC:return Math.floor(a/10*3);case A.ALPHANUMERIC:return Math.floor(a/11*2);case A.KANJI:return Math.floor(a/13);case A.BYTE:default:return Math.floor(a/8)}},t.getBestVersionForData=function(e,n){let r;const o=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(c(e,r)<=t.getCapacity(r,n,A.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-a>=0;)t^=7973<{const r=n(9653);t.render=function(e,t,n){let o=n,i=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const A=r.getImageWidth(e.modules.size,o),s=i.getContext("2d"),a=s.createImageData(A,A);return r.qrToImageData(a.data,e,o),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,i,A),s.putImageData(a,0,0),i},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=t.render(e,n,o),A=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(A,s.quality)}},3776:(e,t,n)=>{const r=n(9653);function o(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const A=r.getOptions(t),s=e.modules.size,a=e.modules.data,l=s+2*A.margin,c=A.color.light.a?"':"",u="0&&l>0&&e[a-1]||(r+=A?i("M",l+n,.5+c+n):i("m",o,0),o=0,A=!1),l+1',d='viewBox="0 0 '+l+" "+l+'"',h=''+c+u+"\n";return"function"==typeof n&&n(null,h),h}},9653:(e,t)=>{function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,i=n.modules.data,A=t.getScale(o,r),s=Math.floor((o+2*r.margin)*A),a=r.margin*A,l=[r.color.light,r.color.dark];for(let t=0;t=a&&n>=a&&t{"use strict";var r=n(5108),o=n(7294),i=n(3840);function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n