{"version":3,"sources":["webpack:///./node_modules/@sentry/utils/esm/string.js","webpack:///./node_modules/@sentry/utils/esm/node.js","webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/core-js/internals/array-reduce.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/mongo.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./node_modules/@sentry/tracing/esm/errors.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./node_modules/@sentry/utils/esm/supports.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/@sentry/utils/esm/object.js","webpack:///./node_modules/@sentry/utils/esm/instrument.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@sentry/utils/esm/logger.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/@sentry/utils/esm/misc.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@sentry/utils/esm/is.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-plugin-catch-links/gatsby-browser.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/postgres.js","webpack:///./node_modules/@sentry/tracing/esm/hubextensions.js","webpack:///./node_modules/core-js/modules/es.array.reduce.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@sentry/tracing/esm/transaction.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./node_modules/@sentry/tracing/esm/utils.js","webpack:///./node_modules/@sentry/gatsby/gatsby-browser.js","webpack:///./gatsby-browser.js","webpack:///./node_modules/@sentry/utils/esm/syncpromise.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@sentry/hub/esm/scope.js","webpack:///./node_modules/core-js/internals/engine-v8-version.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@sentry/tracing/esm/idletransaction.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./node_modules/core-js/internals/engine-user-agent.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@sentry/tracing/esm/span.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/core-js/internals/engine-is-node.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/@sentry/tracing/esm/browser/backgroundtab.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/getFirstHidden.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/whenInput.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/observe.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getLCP.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getTTFB.js","webpack:///./node_modules/@sentry/tracing/esm/browser/metrics.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getCLS.js","webpack:///./node_modules/@sentry/tracing/esm/browser/web-vitals/getFID.js","webpack:///./node_modules/@sentry/tracing/esm/browser/request.js","webpack:///./node_modules/@sentry/tracing/esm/browser/router.js","webpack:///./node_modules/@sentry/tracing/esm/browser/browsertracing.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/express.js","webpack:///./node_modules/@sentry/tracing/esm/index.js","webpack:///./node_modules/@sentry/types/esm/severity.js","webpack:///./node_modules/@sentry/types/esm/status.js","webpack:///./node_modules/@sentry/browser/esm/version.js","webpack:///./node_modules/@sentry/minimal/esm/index.js","webpack:///./node_modules/@sentry/utils/esm/polyfill.js","webpack:///./node_modules/@sentry/utils/esm/error.js","webpack:///./node_modules/@sentry/utils/esm/dsn.js","webpack:///./node_modules/@sentry/core/esm/integration.js","webpack:///./node_modules/@sentry/core/esm/baseclient.js","webpack:///./node_modules/@sentry/core/esm/transports/noop.js","webpack:///./node_modules/@sentry/core/esm/basebackend.js","webpack:///./node_modules/@sentry/browser/esm/tracekit.js","webpack:///./node_modules/@sentry/browser/esm/parsers.js","webpack:///./node_modules/@sentry/browser/esm/eventbuilder.js","webpack:///./node_modules/@sentry/core/esm/request.js","webpack:///./node_modules/@sentry/core/esm/api.js","webpack:///./node_modules/@sentry/utils/esm/promisebuffer.js","webpack:///./node_modules/@sentry/browser/esm/transports/base.js","webpack:///./node_modules/@sentry/browser/esm/transports/fetch.js","webpack:///./node_modules/@sentry/browser/esm/transports/xhr.js","webpack:///./node_modules/@sentry/browser/esm/backend.js","webpack:///./node_modules/@sentry/browser/esm/helpers.js","webpack:///./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack:///./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack:///./node_modules/@sentry/browser/esm/client.js","webpack:///./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack:///./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack:///./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack:///./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack:///./node_modules/@sentry/browser/esm/integrations/useragent.js","webpack:///./node_modules/@sentry/browser/esm/sdk.js","webpack:///./node_modules/@sentry/core/esm/sdk.js","webpack:///./node_modules/@sentry/browser/esm/index.js","webpack:///./node_modules/@sentry/react/esm/profiler.js","webpack:///./node_modules/@sentry/react/esm/errorboundary.js","webpack:///./node_modules/@sentry/react/esm/redux.js","webpack:///./node_modules/@sentry/react/esm/reactrouterv3.js","webpack:///./node_modules/@sentry/react/esm/reactrouter.js","webpack:///./node_modules/@sentry/react/esm/index.js","webpack:///./node_modules/@sentry/tracing/esm/spanstatus.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./node_modules/gatsby-plugin-offline/gatsby-browser.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/gatsby-remark-autolink-headers/gatsby-browser.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./node_modules/gatsby-plugin-catch-links/catch-links.js","webpack:///./node_modules/gatsby-plugin-canonical-urls/gatsby-browser.js","webpack:///./node_modules/@sentry/types/esm/transaction.js","webpack:///./node_modules/@sentry/utils/esm/time.js","webpack:///./node_modules/@sentry/hub/esm/session.js","webpack:///./node_modules/@sentry/hub/esm/hub.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/escape-string-regexp/index.js","webpack:///./node_modules/@sentry/utils/esm/stacktrace.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/core-js/internals/array-method-is-strict.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///./node_modules/core-js/internals/array-method-uses-to-length.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./node_modules/@sentry/utils/esm/browser.js","webpack:///./node_modules/@sentry/utils/esm/memo.js","webpack:///./.cache/api-runner-browser.js","webpack:///./node_modules/@sentry/types/esm/session.js","webpack:///./node_modules/@sentry/tracing/esm/integrations/mysql.js"],"names":["truncate","str","max","length","substr","snipLine","line","colno","newLine","ll","start","Math","end","min","slice","safeJoin","input","delimiter","Array","isArray","output","i","value","push","String","e","join","isMatchingPattern","pattern","test","indexOf","isNodeEnv","Object","prototype","toString","call","process","dynamicRequire","mod","request","require","DEFAULT_REQUEST_KEYS","extractNodeRequestData","req","keys","Error","requestData","headers","header","method","host","hostname","protocol","secure","socket","encrypted","originalUrl","url","absoluteUrl","forEach","key","cookies","module","parse","cookie","query_string","query","undefined","body","data","JSON","stringify","hasOwnProperty","_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","__PATH_PREFIX__","__BASE_PATH__","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","entries","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","stateKey","getStateKey","sessionStorage","getItem","save","storedValue","setItem","stateKeyBase","aFunction","toObject","IndexedObject","toLength","createMethod","IS_RIGHT","that","callbackfn","argumentsLength","memo","O","self","index","TypeError","left","right","OPERATIONS","OPERATION_SIGNATURES","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","dropIndex","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexExists","insertMany","insertOne","mapReduce","rename","replaceOne","updateMany","updateOne","Mongo","name","id","_operations","operations","_describeOperations","describeOperations","setupOnce","_","getCurrentHub","collection","Collection","error","_instrumentOperations","operation","_patchOperation","getSpanContext","_getSpanContextFromOperationArguments","orig","_a","_b","_c","args","_i","arguments","lastArg","scope","getScope","parentSpan","getSpan","span_1","startChild","apply","then","res","finish","span","err","result","collectionName","dbName","namespace","spanContext","op","description","signature","shouldDescribe","includes","map","reduce","_oO","_typeof","_getRequireWildcardCache","WeakMap","cache","obj","has","get","newObj","hasPropertyDescriptor","defineProperty","getOwnPropertyDescriptor","desc","set","registerErrorInstrumentation","callback","errorCallback","type","activeTransaction","log","InternalError","setStatus","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","Memo","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","concat","targetStatics","sourceStatics","descriptor","charAt","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","originalModule","webpackPolyfill","create","children","enumerable","l","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","supportsFetch","Headers","Request","Response","isNativeFetch","supportsNativeFetch","global","fetch","doc","document","sandbox","hidden","head","appendChild","contentWindow","removeChild","supportsReferrerPolicy","referrerPolicy","supportsHistory","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","emitter","all","on","handler","off","splice","emit","evt","mitt","fill","source","replacement","original","wrapped","defineProperties","__sentry_original__","_Oo","urlEncode","encodeURIComponent","getWalkSource","message","stack","event_1","currentTarget","CustomEvent","detail","jsonSize","utf8Length","normalizeToSize","depth","maxSize","serialized","normalize","normalizeValue","_events","walk","Infinity","normalized","serializeValue","toJSON","acc","memoize","innerKey","unmemoize","extractExceptionKeysForMessage","exception","maxLength","sort","includedKeys","dropUndefinedKeys","val","e_1","rv","next","done","e_1_1","return","lastHref","handlers","instrumented","instrument","level","originalConsoleLevel","triggerHandlers","Function","instrumentConsole","addEventListener","domEventHandler","keypressEventHandler","proto","eventName","fn","handleEvent","innerOriginal","event","__sentry_wrapped__","instrumentDOM","requestKeys","requestValues","xhrproto","XMLHttpRequest","originalOpen","xhr","__sentry_xhr__","toUpperCase","match","__sentry_own_request__","onreadystatechangeHandler","readyState","status_code","status","requestPos","args_1","endTimestamp","Date","now","startTimestamp","onreadystatechange","readyStateArgs","originalSend","instrumentXHR","originalFetch","handlerData","fetchData","getFetchMethod","getFetchUrl","response","instrumentFetch","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","from","instrumentHistory","_oldOnErrorHandler","onerror","msg","column","_oldOnUnhandledRejectionHandler","onunhandledrejection","addInstrumentationHandler","fetchArgs","keypressTimeout","lastCapturedEvent","debounceTimer","debounce","clearTimeout","setTimeout","tagName","isContentEditable","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","PREFIX","Logger","_enabled","disable","enable","__SENTRY__","logger","excluded","sourceKeys","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","fallbackGlobalObject","getGlobalObject","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","c","r","random","parseUrl","fragment","relative","getEventDescription","values","event_id","consoleSandbox","originalConsole","wrappedLevels","addExceptionTypeValue","addExceptionMechanism","mechanism","getLocationHref","oO","parseRetryAfterHeader","headerDelay","parseInt","isNaN","headerDate","stripUrlQueryAndFragment","urlPath","polyfill","isError","wat","isInstanceOf","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","isSyntheticEvent","_e","_extends","assign","getLocation","_source$location","search","hash","origin","port","canUseDOM","decodeURI","createHistory","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","removeEventListener","_ref$replace","go","transition","Promise","createMemorySource","initialPath","searchIndex","initialLocation","states","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","globalHistory","localizedManifests","localizedManifest","find","start_url","lang","_gatsby","_catchLinks","onClientEntry","pluginOptions","Postgres","client","Client","config","text","traceHeaders","toTraceparent","sample","hub","transaction","samplingContext","sampleRate","getClient","getOptions","sampled","tags","__sentry_samplingMethod","Explicit","tracesSampler","Sampler","__sentry_sampleRate","Number","parentSampled","Inheritance","tracesSampleRate","Rate","rate","isValidSampleRate","initSpanRecorder","_experiments","maxSpans","getDefaultSamplingContext","transactionContext","defaultSamplingContext","domain","requestType_1","IncomingMessage","members","member","globalObject","_startTransaction","customSamplingContext","startIdleTransaction","idleTimeout","onScope","addExtensionMethods","carrier","extensions","startTransaction","$","$reduce","arrayMethodIsStrict","arrayMethodUsesToLength","CHROME_VERSION","IS_NODE","STRICT_METHOD","USES_TO_LENGTH","1","forced","iter","Symbol","iterator","Transaction","_super","_measurements","_hub","_trimEnd","trimEnd","setName","maxlen","spanRecorder","add","setMeasurements","measurements","finishedSpans","spans","s","prev","contexts","trace","getTraceContext","start_timestamp","timestamp","captureEvent","_interopRequireWildcard","React","_sessionStorage","createContext","_len","_key","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","element","TRACEPARENT_REGEXP","RegExp","hasTracingEnabled","extractTraceparentData","traceparent","matches","traceId","parentSpanId","getActiveTransaction","getTransaction","msToSec","time","secToMs","Sentry","Tracing","pluginParams","integrations","some","ele","Integrations","BrowserTracing","browserTracingOptions","init","environment","release","__SENTRY_RELEASE__","dsn","__SENTRY_DSN__","addGlobalEventProcessor","sdk","packages","SDK_VERSION","States","SyncPromise","executor","_state","PENDING","_handlers","_resolve","_setResult","RESOLVED","_reject","reason","REJECTED","_value","_executeHandlers","_attachHandler","cachedHandlers","onfulfilled","onrejected","reject","counter","resolvedCollection","item","_onfulfilled","_onrejected","catch","finally","onfinally","isRejected","PageRenderer","pageResources","json","pageContext","__params","pathContext","pageElement","apiRunner","loader","publicLoader","page","pop","arrayLikeToArray","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","clone","newScope","_level","_span","_session","_transactionName","_fingerprint","addScopeListener","addEventProcessor","setUser","user","update","_notifyScopeListeners","getUser","setTags","setTag","setExtras","extras","setExtra","extra","setFingerprint","fingerprint","setLevel","setTransactionName","setTransaction","setContext","context","setSpan","_d","setSession","session","getSession","captureContext","updatedScope","clear","addBreadcrumb","breadcrumb","maxBreadcrumbs","mergedBreadcrumb","clearBreadcrumbs","applyToEvent","hint","transactionName","_applyFingerprint","breadcrumbs","_notifyEventProcessors","getGlobalEventProcessors","processors","processor","final","globalEventProcessors","userAgent","v8","routes","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","missed","routeSegments","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","rankRoute","score","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","DEFAULT_IDLE_TIMEOUT","IdleTransactionSpanRecorder","_pushActivity","_popActivity","transactionSpanId","spanId","IdleTransaction","_idleHub","_idleTimeout","_onScope","activities","_heartbeatTimer","_heartbeatCounter","_finished","_beforeFinishCallbacks","clearActiveTransaction","configureScope","toISOString","Cancelled","keepSpan","registerBeforeFinishCallback","_initTimeout","_pingHeartbeat","end_1","_beat","heartbeatString","_prevHeartbeatString","DeadlineExceeded","ie10","navigator","appVersion","fns","hack","documentElement","doScroll","loaded","shift","definition","getBuiltIn","serviceWorker","register","reg","installingWorker","installing","controller","___swUpdated","___failedResources","reload","components","ReferenceError","condition","format","d","f","argIndex","framesToPop","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","SpanRecorder","_maxlen","Span","child","childSpan","setData","setHttpStatus","httpStatus","spanStatus","fromHttpCode","UnknownError","isSuccess","Ok","sampledString","parent_span_id","span_id","trace_id","RouteAnnouncerProps","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirects","redirect","fromPath","maybeRedirect","toPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","PageResourceStatus","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","RouteUpdates","shouldComponentUpdate","Fragment","shallowDiffers","EnsureResources","loadPageSync","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","LocationHandler","Consumer","pagePath","browserLoc","SiteRoot","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","constructor","__proto__","prefetchPathname","StaticQueryContext","StaticQueryDataRenderer","staticQueryData","finalData","StaticQuery","useStaticQuery","graphql","arr2","classof","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","writable","configurable","setPrototypeOf","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","ServerLocation","BaseContext","Router","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","createRoute","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_React$Component2","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","n","k","C","_ref4","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","shouldNavigate","_location$state","restState","RedirectRequest","o","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","elementPath","minLen","firstHiddenTime","inputPromise","bindReporter","metric","po","observeAllUpdates","prevValue","isFinal","visibilityState","delta","floor","PerformanceObserver","supportedEntryTypes","getEntries","buffered","isUnloading","listenersAdded","onPageHide","persisted","onHidden","timeStamp","capture","onReport","reportAllChanges","report","firstHidden","entryHandler","startTime","onFinal","takeRecords","passive","navigationEntry","performance","getEntriesByType","timing","entryType","navigationStart","getNavigationEntryFromPerformanceTiming","responseStart","MetricsInstrumentation","_performanceCursor","mark","_trackCLS","_trackLCP","_trackFID","_trackTTFB","addPerformanceEntries","entryScriptSrc","entryScriptStartTimestamp","tracingInitMarkStartTime","timeOrigin","scripts","dataset","src","duration","addPerformanceNavigationTiming","_startChild","responseEnd","requestStart","addRequest","addNavigationSpans","measureStartTimestamp","measureEndTimestamp","addMeasureSpans","shouldRecord","resourceName","initiatorType","transferSize","encodedBodySize","decodedBodySize","addResourceSpans","_trackNavigator","timeOrigin_1","oldValue","measurementTimestamp","normalizedValue","abs","hadRecentInput","connection","effectiveType","isMeasurementValue","rtt","downlink","deviceMemory","hardwareConcurrency","processingStart","perfMetrics","onFirstInputDelay","cancelable","requestTime","eventEnd","ctx","isFinite","defaultRequestInstrumentationOptions","traceFetch","traceXHR","tracingOrigins","registerRequestInstrumentation","_options","shouldCreateSpanForRequest","urlMap","defaultShouldCreateSpan","origins","shouldCreateSpan","currentClientOptions","__span","is","append","fetchCallback","__sentry_xhr_span_id__","setRequestHeader","xhrCallback","DEFAULT_BROWSER_TRACING_OPTIONS","markBackgroundTransactions","maxTransactionDuration","routingInstrumentation","startTransactionOnPageLoad","startTransactionOnLocationChange","startingUrl","_metrics","_emitOptionsWarning","_getCurrentHub","_createRouteTransaction","beforeNavigate","parentContextFromHeader","metaName","querySelector","getAttribute","getHeaderContext","expandedContext","modifiedContext","finalContext","idleTransaction","maxDuration","diff","adjustTransactionDuration","Express","router","_methods","methods","originalCallback","wrapMiddlewareArgs","patchMiddleware","instrumentMiddlewares","wrap","__sentry_transaction","arg","Severity","Status","SDK_NAME","fromString","Debug","Info","Warning","Fatal","Critical","Log","code","Success","RateLimit","Invalid","Failed","Unknown","callOnHub","captureException","syntheticException","originalException","captureMessage","withScope","prop","SentryError","_newTarget","DSN_REGEX","Dsn","_fromString","_fromComponents","_validate","withPassword","pass","projectId","projectMatch","ERROR_MESSAGE","installedIntegrations","setupIntegrations","defaultIntegrations","userIntegrations","userIntegrationsNames_1","pickedIntegrationsNames_1","defaultIntegration","userIntegration","integrationsNames","getIntegrationsToSetup","integration","setupIntegration","BaseClient","backendClass","_integrations","_processing","_backend","_dsn","eventId","_process","_getBackend","eventFromException","_captureEvent","promisedEvent","eventFromMessage","captureSession","_sendSession","getDsn","flush","_isClientProcessing","ready","getTransport","close","transportFlushed","enabled","_isEnabled","getIntegration","_updateSessionFromEvent","crashed","errored","exceptions","exceptions_1","exceptions_1_1","handled","toLowerCase","Crashed","errors","sendSession","ticked","interval","setInterval","clearInterval","_prepareEvent","normalizeDepth","prepared","_applyClientOptions","_applyIntegrationsMetadata","finalScope","_normalizeEvent","dist","maxValueLength","sdkInfo","integrationsArray","_sendEvent","sendEvent","_processEvent","finalEvent","beforeSend","isTransaction","__sentry__","beforeSendResult","processedEvent","promise","NoopTransport","Skipped","BaseBackend","_transport","_setupTransport","_exception","_hint","_message","gecko","winjs","geckoEval","chromeEval","reactMinifiedRegexp","computeStackTrace","ex","popSize","stacktrace","parts","opera10Regex","opera11Regex","lines","extractMessage","computeStackTraceFromStacktraceProp","popFrames","submatch","isNative","columnNumber","computeStackTraceFromStackProp","failed","exceptionFromStacktrace","frames","prepareFramesForEvent","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","frame","filename","function","in_app","lineno","reverse","eventFromUnknownInput","attachStacktrace","eventFromString","domException","name_1","rejection","__serialized__","frames_1","eventFromPlainObject","synthetic","sessionToSentryRequest","api","sent_at","getEnvelopeEndpointWithUrlEncodedAuth","eventToSentryRequest","samplingMethod","otherTags","useEnvelope","getStoreEndpointWithUrlEncodedAuth","envelope","sample_rates","API","_dsnObject","getBaseApiEndpoint","getStoreEndpoint","_getIngestEndpoint","_encodedAuth","_getEnvelopeEndpoint","getStoreEndpointPath","getRequestHeaders","clientName","clientVersion","getReportDialogEndpoint","dialogOptions","endpoint","encodedOptions","email","auth","sentry_key","sentry_version","PromiseBuffer","_limit","_buffer","isReady","task","remove","drain","capturedSetTimeout","BaseTransport","_rateLimits","_api","_handleResponse","requestType","_handleRateLimit","_disabledUntil","category","_isRateLimited","e_2","rlHeader","raHeader","trim","parameters","delay","_f","e_2_1","FetchTransport","_sendRequest","sentryRequest","originalPayload","supports","fetchParameters","XHRTransport","getResponseHeader","open","send","BrowserBackend","transportOptions","transport","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","before","sentryWrapped","wrappedArguments","property","injectReportDialog","script","async","onLoad","onload","originalFunctionToString","Breadcrumbs","dom","sentry","addSentryBreadcrumb","_consoleBreadcrumb","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","parsedLoc","parsedFrom","parsedTo","BrowserClient","showReportDialog","platform","FunctionToString","DEFAULT_IGNORE_ERRORS","InboundFilters","clientOptions","_mergeOptions","_shouldDropEvent","_isSentryError","_isIgnoredError","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreInternal","ignoreErrors","_getPossibleEventMessages","denyUrls","allowUrls","whitelistUrls","blacklistUrls","frames_2","DEFAULT_EVENT_TARGET","TryCatch","eventTarget","_wrapTimeFunction","_wrapRAF","_wrapXHR","_wrapEventTarget","originalRemoveEventListener","wrappedEventHandler","originalEventHandler","xmlHttpRequestProps","wrapOptions","GlobalHandlers","_onErrorHandlerInstalled","_onUnhandledRejectionHandlerInstalled","stackTraceLimit","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","currentHub","hasIntegration","isFailedOwnDelivery","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","_eventFromRejectionWithPrimitive","groups","LinkedErrors","limit","_handler","linkedErrors","_walkErrorTree","UserAgent","referrer","Referer","window_1","SENTRY_RELEASE","autoSessionTracking","clientClass","debug","bindClient","initAndBind","loadResolved","fcpResolved","possiblyEndSession","endSession","startSession","resolveWindowLoaded","entryList","firstHiddenTime_1","startSessionTracking","lastEventId","forceLoad","windowIntegrations","_window","INTEGRATIONS","TRACING_GETTER","globalTracingIntegration","Profiler","_mountActivity","_mountSpan","disabled","pushActivity","activity","getActivitySpan","popActivity","updateProps","includeUpdates","changedProps","includeRender","withProfiler","WrappedComponent","componentDisplayName","Wrapped","useProfiler","hasRenderSpan","mountSpan","INITIAL_STATE","componentStack","ErrorBoundary","resetErrorBoundary","onReset","beforeCapture","onError","showDialog","react","onMount","onUnmount","fallback","resetError","withErrorBoundary","errorBoundaryOptions","defaultOptions","actionTransformer","stateTransformer","createReduxEnhancer","enhancerOptions","reducer","initialState","newState","transformedAction","transformedState","configureScopeWithState","reactRouterV3Instrumentation","prevName","normalizeTransactionName","localName","tags_1","appRoutes","_redirectLocation","renderProps","routePath","routesWithPaths","x","getRouteStringFromRoutes","reactRouterV4Instrumentation","reactRouterInstrumentation","reactRouterV5Instrumentation","allRoutes","getName","branches","matchRoutes","branch","isExact","computeRootMatch","withSentryRouting","Route","WrappedRoute","computedMatch","SpanStatus","Unauthenticated","PermissionDenied","NotFound","AlreadyExists","FailedPrecondition","ResourceExhausted","InvalidArgument","Unimplemented","Unavailable","hashIndex","_inheritsLoose","registerServiceWorker","whiteListLinkRels","prefetchedPathnames","setPathResources","getResourceURLsForPathname","resources","onServiceWorkerActive","active","nodes","headerResources","prefetchedResources","resource","link","rel","onPostPrefetchPathname","_arrayLikeToArray","_toConsumableArray","supportedPrefetchStrategy","feature","fakeLink","relList","support","setAttribute","getElementsByTagName","getElementsByName","parentNode","preFetched","prefetch","preferDefault","m","createPageDataUrl","doFetch","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","delete","prefetchDisabled","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","saveData","doesConnectionSupportPrefetch","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","requireObjectCoercible","argument","offsetY","getTargetOffset","pageYOffset","clientTop","computedStyles","getComputedStyle","scrollMarginTop","getPropertyValue","getBoundingClientRect","onInitialClientRender","offset","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","root","clickHandler","routeThroughBrowserOrApp","hashShouldBeFollowed","pathIsNotHandledByApp","urlsAreOnSameOrigin","authorIsForcingNavigation","anchorsTargetIsEquivalentToSelf","findClosestAnchor","navigationWasHandledElsewhere","slashedPathname","userIsForcingNavigation","_escapeStringRegexp","nodeName","anchor","hasAttribute","ownerDocument","defaultView","parent","destination","pathStartRegEx","hrefHandler","clickedAnchor","SVGAnimatedString","animVal","excludePattern","destinationPathname","stripQueryString","domElem","existingValue","baseProtocol","baseHost","TransactionSamplingMethod","dateTimestampSource","nowSeconds","platformPerformance","getNodePerformance","getBrowserPerformance","timestampSource","dateTimestampInSeconds","timestampWithMs","browserPerformanceTimeOrigin","Session","sid","started","ip_address","ipAddress","did","username","Exited","attrs","user_agent","Hub","_version","_stack","getStackTop","isOlderThan","pushScope","getStack","popScope","_lastEventId","finalHint","_invokeClient","beforeBreadcrumb","finalBreadcrumb","oldHub","makeMain","startSpan","_callExtensionMethod","getMainCarrier","registry","getHubFromCarrier","setHubOnCarrier","hasHubOnCarrier","activeDomain","getActiveDomain","registryHubTopStack","getHubFromActiveDomain","_extendStatics","p","__extends","__","_assign","t","__rest","propertyIsEnumerable","__values","__read","ar","__spread","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","matchOperatorsRe","getFunctionName","fails","METHOD_NAME","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","for","g","h","w","y","z","u","$$typeof","A","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Lazy","Portal","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","DESCRIPTORS","thrower","it","ACCESSORS","argument0","argument1","ProdPageRenderer","InternalPageRenderer","htmlTreeAsString","elem","currentElem","out","sepLength","nextStr","_htmlElementAsString","classes","attr","allowedAttrs","_hasWeakSet","WeakSet","_inner","plugins","defaultReturn","argTransform","previous","SessionStatus","Mysql","sql","fields"],"mappings":";6FAAA,wJASO,SAASA,EAASC,EAAKC,GAK5B,YAJY,IAAR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oP,GAC5C,OAAO,SAAUrE,EAAS2a,EAAQvT,GAChC,IAAI9C,EAAIC,EAIJgB,EAA6B,QAArBhB,EADsB,QAAhBD,EADNV,IAAgBkB,kBACqB,IAAPR,OAAgB,EAASA,EAAGU,iBACtB,IAAPT,OAAgB,EAASA,EAAGW,WAAW,CAC9Ea,YAAgC,iBAAZ/F,EAAuBA,EAAUA,EAAQk3D,IAC7DpxD,GAAI,OAGN,MAAwB,mBAAbsB,EACF/C,EAAKlP,KAAK4F,KAAMiF,EAAS2a,GAAQ,SAAUnV,EAAKC,EAAQ0xD,GAC7D,IAAI7yD,EAEY,QAAfA,EAAKiB,SAAyB,IAAPjB,GAAyBA,EAAGgB,SACpD8B,EAAS5B,EAAKC,EAAQ0xD,MAIJ,mBAAXx8C,EACFtW,EAAKlP,KAAK4F,KAAMiF,GAAS,SAAUwF,EAAKC,EAAQ0xD,GACrD,IAAI7yD,EAEY,QAAfA,EAAKiB,SAAyB,IAAPjB,GAAyBA,EAAGgB,SACpDqV,EAAOnV,EAAKC,EAAQ0xD,MAIjB9yD,EAAKlP,KAAK4F,KAAMiF,EAAS2a,EAAQvT,QAS9C6vD,EAAM5zD,GAAK,QACJ4zD,EAlET,K","file":"app-b37eca389c02a22c8854.js","sourcesContent":["import { isRegExp, isString } from './is';\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function truncate(str, max) {\n if (max === void 0) {\n max = 0;\n }\n\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line, colno) {\n var newLine = line;\n var ll = newLine.length;\n\n if (ll <= 150) {\n return newLine;\n }\n\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n\n var start = Math.max(colno - 60, 0);\n\n if (start < 5) {\n start = 0;\n }\n\n var end = Math.min(start + 140, ll);\n\n if (end > ll - 5) {\n end = ll;\n }\n\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\n\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n\n return false;\n}","import { isString } from './is';\nimport { normalize } from './object';\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\n\nexport function isNodeEnv() {\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/** Default request keys that'll be used to extract data from the request */\n\nvar DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url'];\n/**\n * Normalizes data from the request object, accounting for framework differences.\n *\n * @param req The request object from which to extract data\n * @param keys An optional array of keys to include in the normalized data. Defaults to DEFAULT_REQUEST_KEYS if not\n * provided.\n * @returns An object containing normalized request data\n */\n\nexport function extractNodeRequestData(req, keys) {\n if (keys === void 0) {\n keys = DEFAULT_REQUEST_KEYS;\n } // make sure we can safely use dynamicRequire below\n\n\n if (!isNodeEnv()) {\n throw new Error(\"Can't get node request data outside of a node environment\");\n }\n\n var requestData = {}; // headers:\n // node, express: req.headers\n // koa: req.header\n\n var headers = req.headers || req.header || {}; // method:\n // node, express, koa: req.method\n\n var method = req.method; // host:\n // express: req.hostname in > 4 and req.host in < 4\n // koa: req.host\n // node: req.headers.host\n\n var host = req.hostname || req.host || headers.host || ''; // protocol:\n // node: \n // express, koa: req.protocol\n\n var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted ? 'https' : 'http'; // url (including path and query string):\n // node, express: req.originalUrl\n // koa: req.url\n\n var originalUrl = req.originalUrl || req.url || ''; // absolute url\n\n var absoluteUrl = protocol + \"://\" + host + originalUrl;\n keys.forEach(function (key) {\n switch (key) {\n case 'headers':\n requestData.headers = headers;\n break;\n\n case 'method':\n requestData.method = method;\n break;\n\n case 'url':\n requestData.url = absoluteUrl;\n break;\n\n case 'cookies':\n // cookies:\n // node, express, koa: req.headers.cookie\n // vercel, sails.js, express (w/ cookie middleware): req.cookies\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.cookies = req.cookies || dynamicRequire(module, 'cookie').parse(headers.cookie || '');\n break;\n\n case 'query_string':\n // query string:\n // node: req.url (raw)\n // express, koa: req.query\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n requestData.query_string = dynamicRequire(module, 'url').parse(originalUrl || '', false).query;\n break;\n\n case 'data':\n if (method === 'GET' || method === 'HEAD') {\n break;\n } // body data:\n // node, express, koa: req.body\n\n\n if (req.body !== undefined) {\n requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body));\n }\n\n break;\n\n default:\n if ({}.hasOwnProperty.call(req, key)) {\n requestData[key] = req[key];\n }\n\n }\n });\n return requestData;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","import { __read, __spread } from \"tslib\";\nimport { dynamicRequire, fill, logger } from '@sentry/utils';\nvar OPERATIONS = ['aggregate', 'bulkWrite', 'countDocuments', 'createIndex', 'createIndexes', 'deleteMany', 'deleteOne', 'distinct', 'drop', 'dropIndex', 'dropIndexes', 'estimatedDocumentCount', 'findOne', 'findOneAndDelete', 'findOneAndReplace', 'findOneAndUpdate', 'indexes', 'indexExists', 'indexInformation', 'initializeOrderedBulkOp', 'insertMany', 'insertOne', 'isCapped', 'mapReduce', 'options', 'parallelCollectionScan', 'rename', 'replaceOne', 'stats', 'updateMany', 'updateOne']; // All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\n\nvar OPERATION_SIGNATURES = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update']\n};\n/** Tracing integration for mongo package */\n\nvar Mongo =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function Mongo(options) {\n if (options === void 0) {\n options = {};\n }\n /**\n * @inheritDoc\n */\n\n\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : OPERATIONS;\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n }\n /**\n * @inheritDoc\n */\n\n\n Mongo.prototype.setupOnce = function (_, getCurrentHub) {\n var collection;\n\n try {\n var mongodbModule = dynamicRequire(module, 'mongodb');\n collection = mongodbModule.Collection;\n } catch (e) {\n logger.error('Mongo Integration was unable to require `mongodb` package.');\n return;\n }\n\n this._instrumentOperations(collection, this._operations, getCurrentHub);\n };\n /**\n * Patches original collection methods\n */\n\n\n Mongo.prototype._instrumentOperations = function (collection, operations, getCurrentHub) {\n var _this = this;\n\n operations.forEach(function (operation) {\n return _this._patchOperation(collection, operation, getCurrentHub);\n });\n };\n /**\n * Patches original collection to utilize our tracing functionality\n */\n\n\n Mongo.prototype._patchOperation = function (collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n var getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a, _b, _c;\n\n var lastArg = args[args.length - 1];\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan(); // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n\n if (typeof lastArg !== 'function' || operation === 'mapReduce' && args.length === 2) {\n var span_1 = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild(getSpanContext(this, operation, args));\n return orig.call.apply(orig, __spread([this], args)).then(function (res) {\n var _a;\n\n (_a = span_1) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n }\n\n var span = (_c = parentSpan) === null || _c === void 0 ? void 0 : _c.startChild(getSpanContext(this, operation, args.slice(0, -1)));\n return orig.call.apply(orig, __spread([this], args.slice(0, -1), [function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n lastArg(err, result);\n }]));\n };\n });\n };\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n\n\n Mongo.prototype._getSpanContextFromOperationArguments = function (collection, operation, args) {\n var data = {\n collectionName: collection.collectionName,\n dbName: collection.dbName,\n namespace: collection.namespace\n };\n var spanContext = {\n op: \"db\",\n description: operation,\n data: data\n }; // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n\n var signature = OPERATION_SIGNATURES[operation];\n var shouldDescribe = Array.isArray(this._describeOperations) ? this._describeOperations.includes(operation) : this._describeOperations;\n\n if (!signature || !shouldDescribe) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n var _a = __read(args, 2),\n map = _a[0],\n reduce = _a[1];\n\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (var i = 0; i < signature.length; i++) {\n data[signature[i]] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {// no-empty\n }\n\n return spanContext;\n };\n /**\n * @inheritDoc\n */\n\n\n Mongo.id = 'Mongo';\n return Mongo;\n}();\n\nexport { Mongo };","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { SpanStatus } from './spanstatus';\nimport { getActiveTransaction } from './utils';\n/**\n * Configures global error listeners\n */\n\nexport function registerErrorInstrumentation() {\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'error'\n });\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection'\n });\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\n\nfunction errorCallback() {\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.InternalError + \" -> Global error occured\");\n activeTransaction.setStatus(SpanStatus.InternalError);\n }\n}","'use strict';\n\nvar reactIs = require('react-is');\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\n\n\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n\n var global = getGlobalObject(); // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n\n if (isNativeFetch(global.fetch)) {\n return true;\n } // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n\n\n var result = false;\n var doc = global.document; // eslint-disable-next-line deprecation/deprecation\n\n if (doc && typeof doc.createElement === \"function\") {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin'\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","import { __values } from \"tslib\";\nimport { htmlTreeAsString } from './browser';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName } from './stacktrace';\nimport { truncate } from './string';\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\n\nexport function fill(source, name, replacement) {\n if (!(name in source)) {\n return;\n }\n\n var original = source[name];\n var wrapped = replacement(original); // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original\n }\n });\n } catch (_Oo) {// This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\n\nexport function urlEncode(object) {\n return Object.keys(object).map(function (key) {\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]);\n }).join('&');\n}\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\n\nfunction getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack\n };\n\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n source.type = event_1.type; // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\n try {\n source.target = isElement(event_1.target) ? htmlTreeAsString(event_1.target) : Object.prototype.toString.call(event_1.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event_1.currentTarget) ? htmlTreeAsString(event_1.currentTarget) : Object.prototype.toString.call(event_1.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n\n for (var i in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, i)) {\n source[i] = event_1;\n }\n }\n\n return source;\n }\n\n return value;\n}\n/** Calculates bytes size of input string */\n\n\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\n\n\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/** JSDoc */\n\n\nexport function normalizeToSize(object, // Default Node.js REPL depth\ndepth, // 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) {\n depth = 3;\n }\n\n if (maxSize === void 0) {\n maxSize = 100 * 1024;\n }\n\n var serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized;\n}\n/**\n * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,\n * booleans, null, and undefined.\n *\n * @param value The value to stringify\n * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or\n * type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,\n * unchanged.\n */\n\nfunction serializeValue(value) {\n var type = Object.prototype.toString.call(value); // Node.js REPL notation\n\n if (typeof value === 'string') {\n return value;\n }\n\n if (type === '[object Object]') {\n return '[Object]';\n }\n\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n var normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n\n\nfunction normalizeValue(value, key) {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n } // React's SyntheticEvent thingy\n\n\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n } // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable\n\n\n if (typeof value === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n\n return value;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\nexport function walk(key, value, depth, memo) {\n if (depth === void 0) {\n depth = +Infinity;\n }\n\n if (memo === void 0) {\n memo = new Memo();\n } // If we reach the maximum depth, serialize whatever has left\n\n\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n\n\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n\n\n var normalized = normalizeValue(value, key);\n\n if (isPrimitive(normalized)) {\n return normalized;\n } // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n\n\n var source = getWalkSource(value); // Create an accumulator that will act as a parent for all future itterations of that branch\n\n var acc = Array.isArray(value) ? [] : {}; // If we already walked that branch, bail out, as it's circular reference\n\n if (memo.memoize(value)) {\n return '[Circular ~]';\n } // Walk all keys of the source\n\n\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n } // Recursively walk through all the child nodes\n\n\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n } // Once walked through all the branches, remove the parent from memo storage\n\n\n memo.unmemoize(value); // Return accumulated values\n\n return acc;\n}\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function normalize(input, depth) {\n try {\n return JSON.parse(JSON.stringify(input, function (key, value) {\n return walk(key, value, depth);\n }));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) {\n maxLength = 40;\n }\n\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n\n if (serialized.length > maxLength) {\n continue;\n }\n\n if (includedKeys === keys.length) {\n return serialized;\n }\n\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\n\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n\n try {\n for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n return rv;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n\n return val;\n}","import { __assign, __values } from \"tslib\";\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\n\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n\n case 'dom':\n instrumentDOM();\n break;\n\n case 'xhr':\n instrumentXHR();\n break;\n\n case 'fetch':\n instrumentFetch();\n break;\n\n case 'history':\n instrumentHistory();\n break;\n\n case 'error':\n instrumentError();\n break;\n\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\n\n\nexport function addInstrumentationHandler(handler) {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}\n/** JSDoc */\n\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n\n if (!type || !handlers[type]) {\n return;\n }\n\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n\n try {\n handler(data);\n } catch (e) {\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError: \" + e);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n}\n/** JSDoc */\n\n\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function (originalConsoleLevel) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n triggerHandlers('console', {\n args: args,\n level: level\n }); // this fails for some browsers. :(\n\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\n\n\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args)\n },\n startTimestamp: Date.now()\n };\n triggerHandlers('fetch', __assign({}, handlerData)); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), {\n endTimestamp: Date.now(),\n response: response\n }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), {\n endTimestamp: Date.now(),\n error: error\n })); // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** Extract `method` from fetch call arguments */\n\n\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) {\n fetchArgs = [];\n }\n\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\n\n\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) {\n fetchArgs = [];\n }\n\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\n\n\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n } // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n\n\n var requestKeys = [];\n var requestValues = [];\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // eslint-disable-next-line @typescript-eslint/no-this-alias\n\n\n var xhr = this;\n var url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1]\n }; // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n var onreadystatechangeHandler = function onreadystatechangeHandler() {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n\n try {\n var requestPos = requestKeys.indexOf(xhr);\n\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n var args_1 = requestValues.splice(requestPos)[0];\n\n if (xhr.__sentry_xhr__ && args_1[0] !== undefined) {\n xhr.__sentry_xhr__.body = args_1[0];\n }\n }\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n requestKeys.push(this);\n requestValues.push(args);\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this\n });\n return originalSend.apply(this, args);\n };\n });\n}\n\nvar lastHref;\n/** JSDoc */\n\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n var oldOnPopState = global.onpopstate;\n\n global.onpopstate = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var to = global.location.href; // keep track of the current URL state, as we always receive only the updated state\n\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to\n });\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n /** @hidden */\n\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var url = args.length > 2 ? args[2] : undefined;\n\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url); // keep track of the current URL state, as we always receive only the updated state\n\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to\n });\n }\n\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n/** JSDoc */\n\n\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n } // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n\n\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n\n ['EventTarget', 'Node'].forEach(function (target) {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n var proto = global[target] && global[target].prototype; // eslint-disable-next-line no-prototype-builtins\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n if (fn && fn.handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n fill(proto, 'removeEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n original.call(this, eventName, fn.__sentry_wrapped__, options);\n } catch (e) {// ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n });\n}\n\nvar debounceDuration = 1000;\nvar debounceTimer = 0;\nvar keypressTimeout;\nvar lastCapturedEvent;\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\n\nfunction domEventHandler(name, handler, debounce) {\n if (debounce === void 0) {\n debounce = false;\n }\n\n return function (event) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined; // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(function () {\n handler({\n event: event,\n name: name\n });\n });\n } else {\n handler({\n event: event,\n name: name\n });\n }\n };\n}\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\n\n\nfunction keypressEventHandler(handler) {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function (event) {\n var target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n var tagName = target && target.tagName; // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n\n if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable) {\n return;\n } // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n\n\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n\n clearTimeout(keypressTimeout);\n keypressTimeout = setTimeout(function () {\n keypressTimeout = undefined;\n }, debounceDuration);\n };\n}\n\nvar _oldOnErrorHandler = null;\n/** JSDoc */\n\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { consoleSandbox, getGlobalObject } from './misc'; // TODO: Implement different loggers for different environments\n\nvar global = getGlobalObject();\n/** Prefix for logging strings */\n\nvar PREFIX = 'Sentry Logger ';\n/** JSDoc */\n\nvar Logger =\n/** @class */\nfunction () {\n /** JSDoc */\n function Logger() {\n this._enabled = false;\n }\n /** JSDoc */\n\n\n Logger.prototype.disable = function () {\n this._enabled = false;\n };\n /** JSDoc */\n\n\n Logger.prototype.enable = function () {\n this._enabled = true;\n };\n /** JSDoc */\n\n\n Logger.prototype.log = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (!this._enabled) {\n return;\n }\n\n consoleSandbox(function () {\n global.console.log(PREFIX + \"[Log]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n\n\n Logger.prototype.warn = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (!this._enabled) {\n return;\n }\n\n consoleSandbox(function () {\n global.console.warn(PREFIX + \"[Warn]: \" + args.join(' '));\n });\n };\n /** JSDoc */\n\n\n Logger.prototype.error = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (!this._enabled) {\n return;\n }\n\n consoleSandbox(function () {\n global.console.error(PREFIX + \"[Error]: \" + args.join(' '));\n });\n };\n\n return Logger;\n}(); // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\n\n\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nvar logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger());\nexport { logger };","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\n\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\n\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n return 0;\n};","import { isNodeEnv } from './node';\nimport { snipLine } from './string';\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\n\nexport function getGlobalObject() {\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject;\n}\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\n\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr); // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n\n arr[3] = arr[3] & 0xfff | 0x4000; // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n\n arr[4] = arr[4] & 0x3fff | 0x8000;\n\n var pad = function pad(num) {\n var v = num.toString(16);\n\n while (v.length < 4) {\n v = \"0\" + v;\n }\n\n return v;\n };\n\n return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]);\n } // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n\n\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = Math.random() * 16 | 0; // eslint-disable-next-line no-bitwise\n\n var v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\n\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n } // coerce to undefined values to empty string so we don't get 'undefined'\n\n\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment\n };\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\n\nexport function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n\n return exception.type || exception.value || event.event_id || '';\n }\n\n return event.event_id || '';\n}\n/** JSDoc */\n\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n\n var originalConsole = global.console;\n var wrappedLevels = {}; // Restore all wrapped console methods\n\n levels.forEach(function (level) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n }); // Perform callback manipulations\n\n var result = callback(); // Revert restoration to wrapped state\n\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\n\nexport function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\n\nexport function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) {\n mechanism = {};\n } // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n\n\n try {\n // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined'\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore Mechanism has no index signature\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {// no-empty\n }\n}\n/**\n * A safe form of location.href\n */\n\nexport function getLocationHref() {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n} // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\n\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4]\n };\n}\nvar defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\n\nexport function parseRetryAfterHeader(now, header) {\n if (!header) {\n return defaultRetryAfter;\n }\n\n var headerDelay = parseInt(\"\" + header, 10);\n\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n var headerDate = Date.parse(\"\" + header);\n\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\n\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) {\n linesOfContext = 5;\n }\n\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map(function (line) {\n return snipLine(line, 0);\n });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map(function (line) {\n return snipLine(line, 0);\n });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\n\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}","exports.polyfill = Component => Component\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n\n case '[object Exception]':\n return true;\n\n case '[object DOMException]':\n return true;\n\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isErrorEvent(wat) {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isDOMError(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isDOMException(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isString(wat) {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isPrimitive(wat) {\n return wat === null || typeof wat !== 'object' && typeof wat !== 'function';\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isPlainObject(wat) {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isRegExp(wat) {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\n\nexport function isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\n\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _catchLinks = _interopRequireDefault(require(\"./catch-links\"));\n\nexports.onClientEntry = function (_, pluginOptions) {\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n (0, _catchLinks.default)(window, pluginOptions, function (href) {\n (0, _gatsby.navigate)(href);\n });\n};","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","import { dynamicRequire, fill, logger } from '@sentry/utils';\n/** Tracing integration for node-postgres package */\n\nvar Postgres =\n/** @class */\nfunction () {\n function Postgres() {\n /**\n * @inheritDoc\n */\n this.name = Postgres.id;\n }\n /**\n * @inheritDoc\n */\n\n\n Postgres.prototype.setupOnce = function (_, getCurrentHub) {\n var client;\n\n try {\n var pgModule = dynamicRequire(module, 'pg');\n client = pgModule.Client;\n } catch (e) {\n logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n */\n\n\n fill(client.prototype, 'query', function (orig) {\n return function (config, values, callback) {\n var _a, _b;\n\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof config === 'string' ? config : config.text,\n op: \"db\"\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result);\n });\n }\n\n return orig.call(this, config, values).then(function (res) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n };\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Postgres.id = 'Postgres';\n return Postgres;\n}();\n\nexport { Postgres };","import { __assign } from \"tslib\";\nimport { getActiveDomain, getMainCarrier } from '@sentry/hub';\nimport { TransactionSamplingMethod } from '@sentry/types';\nimport { dynamicRequire, extractNodeRequestData, getGlobalObject, isInstanceOf, isNodeEnv, logger } from '@sentry/utils';\nimport { registerErrorInstrumentation } from './errors';\nimport { IdleTransaction } from './idletransaction';\nimport { Transaction } from './transaction';\nimport { hasTracingEnabled } from './utils';\n/** Returns all trace headers that are currently on the top scope. */\n\nfunction traceHeaders() {\n var scope = this.getScope();\n\n if (scope) {\n var span = scope.getSpan();\n\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent()\n };\n }\n }\n\n return {};\n}\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * @param hub: The hub off of which to read config options\n * @param transaction: The transaction needing a sampling decision\n * @param samplingContext: Default and user-provided data which may be used to help make the decision\n *\n * @returns The given transaction with its `sampled` value set\n */\n\n\nfunction sample(hub, transaction, samplingContext) {\n var _a;\n\n var client = hub.getClient();\n var options = client && client.getOptions() || {}; // nothing to do if there's no client or if tracing is disabled\n\n if (!client || !hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n } // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n\n\n if (transaction.sampled !== undefined) {\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Explicit\n });\n return transaction;\n } // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n\n\n var sampleRate;\n\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext); // cast the rate to a number first in case it's a boolean\n\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Sampler,\n // TODO kmclb - once tag types are loosened, don't need to cast to string here\n __sentry_sampleRate: String(Number(sampleRate))\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Inheritance\n });\n } else {\n sampleRate = options.tracesSampleRate; // cast the rate to a number first in case it's a boolean\n\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Rate,\n // TODO kmclb - once tag types are loosened, don't need to cast to string here\n __sentry_sampleRate: String(Number(sampleRate))\n });\n } // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n\n\n if (!isValidSampleRate(sampleRate)) {\n logger.warn(\"[Tracing] Discarding transaction because of invalid sample rate.\");\n transaction.sampled = false;\n return transaction;\n } // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n\n\n if (!sampleRate) {\n logger.log(\"[Tracing] Discarding transaction because \" + (typeof options.tracesSampler === 'function' ? 'tracesSampler returned 0 or false' : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));\n transaction.sampled = false;\n return transaction;\n } // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n\n\n transaction.sampled = Math.random() < sampleRate; // if we're not going to keep it, we're done\n\n if (!transaction.sampled) {\n logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \" + Number(sampleRate) + \")\");\n return transaction;\n } // at this point we know we're keeping the transaction, whether because of an inherited decision or because it got\n // lucky with the dice roll\n\n\n transaction.initSpanRecorder((_a = options._experiments) === null || _a === void 0 ? void 0 : _a.maxSpans);\n logger.log(\"[Tracing] starting \" + transaction.op + \" transaction - \" + transaction.name);\n return transaction;\n}\n/**\n * Gets the correct context to pass to the tracesSampler, based on the environment (i.e., which SDK is being used)\n *\n * @returns The default sample context\n */\n\n\nfunction getDefaultSamplingContext(transactionContext) {\n // promote parent sampling decision (if any) for easy access\n var parentSampled = transactionContext.parentSampled;\n var defaultSamplingContext = {\n transactionContext: transactionContext,\n parentSampled: parentSampled\n };\n\n if (isNodeEnv()) {\n var domain = getActiveDomain();\n\n if (domain) {\n // for all node servers that we currently support, we store the incoming request object (which is an instance of\n // http.IncomingMessage) on the domain\n // the domain members are stored as an array, so our only way to find the request is to iterate through the array\n // and compare types\n var nodeHttpModule = dynamicRequire(module, 'http'); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n var requestType_1 = nodeHttpModule.IncomingMessage;\n var request = domain.members.find(function (member) {\n return isInstanceOf(member, requestType_1);\n });\n\n if (request) {\n defaultSamplingContext.request = extractNodeRequestData(request);\n }\n }\n } // we must be in browser-js (or some derivative thereof)\n else {\n // we use `getGlobalObject()` rather than `window` since service workers also have a `location` property on `self`\n var globalObject = getGlobalObject();\n\n if ('location' in globalObject) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n defaultSamplingContext.location = __assign({}, globalObject.location);\n }\n }\n\n return defaultSamplingContext;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\n\n\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \" + JSON.stringify(rate) + \" of type \" + JSON.stringify(typeof rate) + \".\");\n return false;\n } // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n\n\n if (rate < 0 || rate > 1) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \" + rate + \".\");\n return false;\n }\n\n return true;\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\n\n\nfunction _startTransaction(transactionContext, customSamplingContext) {\n var transaction = new Transaction(transactionContext, this);\n return sample(this, transaction, __assign(__assign({}, getDefaultSamplingContext(transactionContext)), customSamplingContext));\n}\n/**\n * Create new idle transaction.\n */\n\n\nexport function startIdleTransaction(hub, transactionContext, idleTimeout, onScope) {\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, onScope);\n return sample(hub, transaction, getDefaultSamplingContext(transactionContext));\n}\n/**\n * @private\n */\n\nexport function _addTracingExtensions() {\n var carrier = getMainCarrier();\n\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n }\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\n\nexport function addExtensionMethods() {\n _addTracingExtensions(); // If an error happens globally, we should make sure transaction status is set to error.\n\n\n registerErrorInstrumentation();\n}","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","import \"core-js/modules/es.array.reduce.js\";\nimport \"core-js/modules/es.string.trim-end.js\";\nimport { __assign, __extends } from \"tslib\";\nimport { getCurrentHub, Hub } from '@sentry/hub';\nimport { isInstanceOf, logger } from '@sentry/utils';\nimport { Span as SpanClass, SpanRecorder } from './span';\n/** JSDoc */\n\nvar Transaction =\n/** @class */\nfunction (_super) {\n __extends(Transaction, _super);\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n\n\n function Transaction(transactionContext, hub) {\n var _this = _super.call(this, transactionContext) || this;\n\n _this._measurements = {};\n /**\n * The reference to the current hub.\n */\n\n _this._hub = getCurrentHub();\n\n if (isInstanceOf(hub, Hub)) {\n _this._hub = hub;\n }\n\n _this.name = transactionContext.name ? transactionContext.name : '';\n _this._trimEnd = transactionContext.trimEnd; // this is because transactions are also spans, and spans have a transaction pointer\n\n _this.transaction = _this;\n return _this;\n }\n /**\n * JSDoc\n */\n\n\n Transaction.prototype.setName = function (name) {\n this.name = name;\n };\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n\n\n Transaction.prototype.initSpanRecorder = function (maxlen) {\n if (maxlen === void 0) {\n maxlen = 1000;\n }\n\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n\n this.spanRecorder.add(this);\n };\n /**\n * Set observed measurements for this transaction.\n * @hidden\n */\n\n\n Transaction.prototype.setMeasurements = function (measurements) {\n this._measurements = __assign({}, measurements);\n };\n /**\n * @inheritDoc\n */\n\n\n Transaction.prototype.finish = function (endTimestamp) {\n var _this = this; // This transaction is already finished, so we should not flush it again.\n\n\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n logger.warn('Transaction has no name, falling back to ``.');\n this.name = '';\n } // just sets the end timestamp\n\n\n _super.prototype.finish.call(this, endTimestamp);\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n return undefined;\n }\n\n var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) {\n return s !== _this && s.endTimestamp;\n }) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce(function (prev, current) {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n\n return prev;\n }).endTimestamp;\n }\n\n var transaction = {\n contexts: {\n trace: this.getTraceContext()\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction'\n };\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n\n return this._hub.captureEvent(transaction);\n };\n\n return Transaction;\n}(SpanClass);\n\nexport { Transaction };","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import { getCurrentHub } from '@sentry/hub';\nexport var TRACEPARENT_REGEXP = new RegExp('^[ \\\\t]*' + // whitespace\n'([0-9a-f]{32})?' + // trace_id\n'-?([0-9a-f]{16})?' + // span_id\n'-?([01])?' + // sampled\n'[ \\\\t]*$');\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\n\nexport function hasTracingEnabled(options) {\n return 'tracesSampleRate' in options || 'tracesSampler' in options;\n}\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\n\nexport function extractTraceparentData(traceparent) {\n var matches = traceparent.match(TRACEPARENT_REGEXP);\n\n if (matches) {\n var parentSampled = void 0;\n\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled: parentSampled,\n parentSpanId: matches[2]\n };\n }\n\n return undefined;\n}\n/** Grabs active transaction off scope, if any */\n\nexport function getActiveTransaction(hub) {\n if (hub === void 0) {\n hub = getCurrentHub();\n }\n\n var _a, _b;\n\n return (_b = (_a = hub) === null || _a === void 0 ? void 0 : _a.getScope()) === null || _b === void 0 ? void 0 : _b.getTransaction();\n}\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\n\nexport function msToSec(time) {\n return time / 1000;\n}\n/**\n * Converts from seconds to milliseconds\n * @param time time in seconds\n */\n\nexport function secToMs(time) {\n return time * 1000;\n} // so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils\n\nexport { stripUrlQueryAndFragment } from '@sentry/utils';","const Sentry = require('@sentry/react');\nconst Tracing = require('@sentry/tracing');\n\nexports.onClientEntry = function(_, pluginParams) {\n if (pluginParams === undefined) {\n return;\n }\n\n const integrations = [...(pluginParams.integrations || [])];\n\n if (Tracing.hasTracingEnabled(pluginParams) && !integrations.some(ele => ele.name === 'BrowserTracing')) {\n integrations.push(new Tracing.Integrations.BrowserTracing(pluginParams.browserTracingOptions));\n }\n\n Tracing.addExtensionMethods();\n\n Sentry.init({\n environment: process.env.NODE_ENV || 'development',\n // eslint-disable-next-line no-undef\n release: __SENTRY_RELEASE__,\n // eslint-disable-next-line no-undef\n dsn: __SENTRY_DSN__,\n ...pluginParams,\n integrations,\n });\n\n Sentry.addGlobalEventProcessor(event => {\n event.sdk = {\n ...event.sdk,\n name: 'sentry.javascript.gatsby',\n packages: [\n ...((event.sdk && event.sdk.packages) || []),\n {\n name: 'npm:@sentry/gatsby',\n version: Sentry.SDK_VERSION,\n },\n ],\n version: Sentry.SDK_VERSION,\n };\n return event;\n });\n window.Sentry = Sentry;\n};\n","'use strict';\n\nrequire('./src/assets/scss/init.scss');\nrequire('./static/css/prismjs/theme.min.css');\n","import \"core-js/modules/es.promise.finally.js\";\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/* eslint-disable @typescript-eslint/typedef */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/** SyncPromise internal states */\n\nvar States;\n\n(function (States) {\n /** Pending */\n States[\"PENDING\"] = \"PENDING\";\n /** Resolved / OK */\n\n States[\"RESOLVED\"] = \"RESOLVED\";\n /** Rejected / Error */\n\n States[\"REJECTED\"] = \"REJECTED\";\n})(States || (States = {}));\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\n\n\nvar SyncPromise =\n/** @class */\nfunction () {\n function SyncPromise(executor) {\n var _this = this;\n\n this._state = States.PENDING;\n this._handlers = [];\n /** JSDoc */\n\n this._resolve = function (value) {\n _this._setResult(States.RESOLVED, value);\n };\n /** JSDoc */\n\n\n this._reject = function (reason) {\n _this._setResult(States.REJECTED, reason);\n };\n /** JSDoc */\n\n\n this._setResult = function (state, value) {\n if (_this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n value.then(_this._resolve, _this._reject);\n return;\n }\n\n _this._state = state;\n _this._value = value;\n\n _this._executeHandlers();\n }; // TODO: FIXME\n\n /** JSDoc */\n\n\n this._attachHandler = function (handler) {\n _this._handlers = _this._handlers.concat(handler);\n\n _this._executeHandlers();\n };\n /** JSDoc */\n\n\n this._executeHandlers = function () {\n if (_this._state === States.PENDING) {\n return;\n }\n\n var cachedHandlers = _this._handlers.slice();\n\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler.done) {\n return;\n }\n\n if (_this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled(_this._value);\n }\n }\n\n if (_this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(_this._value);\n }\n }\n\n handler.done = true;\n });\n };\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n\n\n SyncPromise.resolve = function (value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n };\n /** JSDoc */\n\n\n SyncPromise.reject = function (reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n };\n /** JSDoc */\n\n\n SyncPromise.all = function (collection) {\n return new SyncPromise(function (resolve, reject) {\n if (!Array.isArray(collection)) {\n reject(new TypeError(\"Promise.all requires an array as input.\"));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n var counter = collection.length;\n var resolvedCollection = [];\n collection.forEach(function (item, index) {\n SyncPromise.resolve(item).then(function (value) {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n\n resolve(resolvedCollection);\n }).then(null, reject);\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.then = function (_onfulfilled, _onrejected) {\n var _this = this;\n\n return new SyncPromise(function (resolve, reject) {\n _this._attachHandler({\n done: false,\n onfulfilled: function onfulfilled(result) {\n if (!_onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n return;\n }\n\n try {\n resolve(_onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: function onrejected(reason) {\n if (!_onrejected) {\n reject(reason);\n return;\n }\n\n try {\n resolve(_onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n }\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) {\n return val;\n }, onrejected);\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val);\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.toString = function () {\n return '[object SyncPromise]';\n };\n\n return SyncPromise;\n}();\n\nexport { SyncPromise };","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","import { __assign, __read, __spread } from \"tslib\";\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\n\nvar Scope =\n/** @class */\nfunction () {\n function Scope() {\n /** Flag if notifiying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n\n this._breadcrumbs = [];\n /** User */\n\n this._user = {};\n /** Tags */\n\n this._tags = {};\n /** Extra */\n\n this._extra = {};\n /** Contexts */\n\n this._contexts = {};\n }\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n\n\n Scope.clone = function (scope) {\n var newScope = new Scope();\n\n if (scope) {\n newScope._breadcrumbs = __spread(scope._breadcrumbs);\n newScope._tags = __assign({}, scope._tags);\n newScope._extra = __assign({}, scope._extra);\n newScope._contexts = __assign({}, scope._contexts);\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = __spread(scope._eventProcessors);\n }\n\n return newScope;\n };\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n\n\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n\n if (this._session) {\n this._session.update({\n user: user\n });\n }\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.getUser = function () {\n return this._user;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setTags = function (tags) {\n this._tags = __assign(__assign({}, this._tags), tags);\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setTag = function (key, value) {\n var _a;\n\n this._tags = __assign(__assign({}, this._tags), (_a = {}, _a[key] = value, _a));\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setExtras = function (extras) {\n this._extra = __assign(__assign({}, this._extra), extras);\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n\n this._extra = __assign(__assign({}, this._extra), (_a = {}, _a[key] = extra, _a));\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setTransactionName = function (name) {\n this._transactionName = name;\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n\n\n Scope.prototype.setTransaction = function (name) {\n return this.setTransactionName(name);\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setContext = function (key, context) {\n var _a;\n\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts = __assign(__assign({}, this._contexts), (_a = {}, _a[key] = context, _a));\n }\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.getTransaction = function () {\n var _a, _b, _c, _d; // often, this span will be a transaction, but it's not guaranteed to be\n\n\n var span = this.getSpan(); // try it the new way first\n\n if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) {\n return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction;\n } // fallback to the old way (known bug: this only finds transactions with sampled = true)\n\n\n if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) {\n return span.spanRecorder.spans[0];\n } // neither way found a transaction\n\n\n return undefined;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.setSession = function (session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.getSession = function () {\n return this._session;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = __assign(__assign({}, this._tags), captureContext._tags);\n this._extra = __assign(__assign({}, this._extra), captureContext._extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext._contexts);\n\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext;\n this._tags = __assign(__assign({}, this._tags), captureContext.tags);\n this._extra = __assign(__assign({}, this._extra), captureContext.extra);\n this._contexts = __assign(__assign({}, this._contexts), captureContext.contexts);\n\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n }\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.clear = function () {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._session = undefined;\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var mergedBreadcrumb = __assign({\n timestamp: dateTimestampInSeconds()\n }, breadcrumb);\n\n this._breadcrumbs = maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 ? __spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs) : __spread(this._breadcrumbs, [mergedBreadcrumb]);\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n\n this._notifyScopeListeners();\n\n return this;\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n\n\n Scope.prototype.applyToEvent = function (event, hint) {\n var _a;\n\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = __assign(__assign({}, this._extra), event.extra);\n }\n\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = __assign(__assign({}, this._tags), event.tags);\n }\n\n if (this._user && Object.keys(this._user).length) {\n event.user = __assign(__assign({}, this._user), event.user);\n }\n\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = __assign(__assign({}, this._contexts), event.contexts);\n }\n\n if (this._level) {\n event.level = this._level;\n }\n\n if (this._transactionName) {\n event.transaction = this._transactionName;\n } // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relys on that.\n\n\n if (this._span) {\n event.contexts = __assign({\n trace: this._span.getTraceContext()\n }, event.contexts);\n var transactionName = (_a = this._span.transaction) === null || _a === void 0 ? void 0 : _a.name;\n\n if (transactionName) {\n event.tags = __assign({\n transaction: transactionName\n }, event.tags);\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = __spread(event.breadcrumbs || [], this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n return this._notifyEventProcessors(__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n\n\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n\n if (index === void 0) {\n index = 0;\n }\n\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n var result = processor(__assign({}, event), hint);\n\n if (isThenable(result)) {\n result.then(function (final) {\n return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve);\n }).then(null, reject);\n } else {\n _this._notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);\n }\n }\n });\n };\n /**\n * This will be called on every set call.\n */\n\n\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this; // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n\n\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n\n this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n\n this._notifyingListeners = false;\n }\n };\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n\n\n Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : []; // If we have something on the scope, then merge it with event\n\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n } // If we have no data at all, remove empty array default\n\n\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n };\n\n return Scope;\n}();\n\nexport { Scope };\n/**\n * Retruns the global event processors.\n */\n\nfunction getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\n\n\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":960,\"withWebp\":true,\"linkImagesToOriginal\":true,\"showCaptions\":false,\"markdownCaptions\":false,\"sizeByPixelDensity\":false,\"backgroundColor\":\"white\",\"quality\":50,\"tracedSVG\":false,\"loading\":\"lazy\",\"disableBgImageOnAlpha\":false,\"disableBgImage\":false},\n },{\n plugin: require('../node_modules/gatsby-remark-autolink-headers/gatsby-browser.js'),\n options: {\"plugins\":[],\"offsetY\":0,\"className\":\"anchor\"},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"Johannes Haas - Frontend Developer\",\"short_name\":\"Johannes Haas - Frontend Developer\",\"start_url\":\"/\",\"background_color\":\"#FFF\",\"theme_color\":\"#F7A046\",\"display\":\"standalone\",\"icon\":\"static/photo.jpg\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"05cbd2d0e9c0b47201858cbcba84159d\"},\n },{\n plugin: require('../node_modules/gatsby-plugin-offline/gatsby-browser.js'),\n options: {\"plugins\":[],\"workboxConfig\":{\"runtimeCaching\":[{\"urlPattern\":{},\"handler\":\"CacheFirst\"},{\"urlPattern\":{},\"handler\":\"StaleWhileRevalidate\"},{\"urlPattern\":{},\"handler\":\"StaleWhileRevalidate\"},{\"urlPattern\":{},\"handler\":\"StaleWhileRevalidate\"}]}},\n },{\n plugin: require('../node_modules/gatsby-plugin-catch-links/gatsby-browser.js'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../node_modules/@sentry/gatsby/gatsby-browser.js'),\n options: {\"plugins\":[],\"tracesSampleRate\":1},\n },{\n plugin: require('../node_modules/gatsby-plugin-canonical-urls/gatsby-browser.js'),\n options: {\"plugins\":[],\"siteUrl\":\"https://www.johanneshaas.com\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","import \"core-js/modules/es.array.reduce.js\";\nimport { __extends, __values } from \"tslib\";\nimport { logger, timestampWithMs } from '@sentry/utils';\nimport { SpanRecorder } from './span';\nimport { SpanStatus } from './spanstatus';\nimport { Transaction } from './transaction';\nexport var DEFAULT_IDLE_TIMEOUT = 1000;\n/**\n * @inheritDoc\n */\n\nvar IdleTransactionSpanRecorder =\n/** @class */\nfunction (_super) {\n __extends(IdleTransactionSpanRecorder, _super);\n\n function IdleTransactionSpanRecorder(_pushActivity, _popActivity, transactionSpanId, maxlen) {\n if (transactionSpanId === void 0) {\n transactionSpanId = '';\n }\n\n var _this = _super.call(this, maxlen) || this;\n\n _this._pushActivity = _pushActivity;\n _this._popActivity = _popActivity;\n _this.transactionSpanId = transactionSpanId;\n return _this;\n }\n /**\n * @inheritDoc\n */\n\n\n IdleTransactionSpanRecorder.prototype.add = function (span) {\n var _this = this; // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n\n\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = function (endTimestamp) {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n\n _this._popActivity(span.spanId);\n }; // We should only push new activities if the span does not have an end timestamp.\n\n\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n _super.prototype.add.call(this, span);\n };\n\n return IdleTransactionSpanRecorder;\n}(SpanRecorder);\n\nexport { IdleTransactionSpanRecorder };\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\n\nvar IdleTransaction =\n/** @class */\nfunction (_super) {\n __extends(IdleTransaction, _super);\n\n function IdleTransaction(transactionContext, _idleHub, // The time to wait in ms until the idle transaction will be finished. Default: 1000\n _idleTimeout, // If an idle transaction should be put itself on and off the scope automatically.\n _onScope) {\n if (_idleTimeout === void 0) {\n _idleTimeout = DEFAULT_IDLE_TIMEOUT;\n }\n\n if (_onScope === void 0) {\n _onScope = false;\n }\n\n var _this = _super.call(this, transactionContext, _idleHub) || this;\n\n _this._idleHub = _idleHub;\n _this._idleTimeout = _idleTimeout;\n _this._onScope = _onScope; // Activities store a list of active spans\n\n _this.activities = {}; // Stores reference to the timeout that calls _beat().\n\n _this._heartbeatTimer = 0; // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n _this._heartbeatCounter = 0; // We should not use heartbeat if we finished a transaction\n\n _this._finished = false;\n _this._beforeFinishCallbacks = [];\n\n if (_idleHub && _onScope) {\n // There should only be one active transaction on the scope\n clearActiveTransaction(_idleHub); // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n\n logger.log(\"Setting idle transaction on scope. Span ID: \" + _this.spanId);\n\n _idleHub.configureScope(function (scope) {\n return scope.setSpan(_this);\n });\n }\n\n return _this;\n }\n /** {@inheritDoc} */\n\n\n IdleTransaction.prototype.finish = function (endTimestamp) {\n var e_1, _a;\n\n var _this = this;\n\n if (endTimestamp === void 0) {\n endTimestamp = timestampWithMs();\n }\n\n this._finished = true;\n this.activities = {};\n\n if (this.spanRecorder) {\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n try {\n for (var _b = __values(this._beforeFinishCallbacks), _c = _b.next(); !_c.done; _c = _b.next()) {\n var callback = _c.value;\n callback(this, endTimestamp);\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter(function (span) {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === _this.spanId) {\n return true;\n } // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n\n\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus(SpanStatus.Cancelled);\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n var keepSpan = span.startTimestamp < endTimestamp;\n\n if (!keepSpan) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', JSON.stringify(span, undefined, 2));\n }\n\n return keepSpan;\n }); // this._onScope is true if the transaction was previously on the scope.\n\n if (this._onScope) {\n clearActiveTransaction(this._idleHub);\n }\n\n logger.log('[Tracing] flushing IdleTransaction');\n } else {\n logger.log('[Tracing] No active IdleTransaction');\n }\n\n return _super.prototype.finish.call(this, endTimestamp);\n };\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n\n\n IdleTransaction.prototype.registerBeforeFinishCallback = function (callback) {\n this._beforeFinishCallbacks.push(callback);\n };\n /**\n * @inheritDoc\n */\n\n\n IdleTransaction.prototype.initSpanRecorder = function (maxlen) {\n var _this = this;\n\n if (!this.spanRecorder) {\n this._initTimeout = setTimeout(function () {\n if (!_this._finished) {\n _this.finish();\n }\n }, this._idleTimeout);\n\n var pushActivity = function pushActivity(id) {\n if (_this._finished) {\n return;\n }\n\n _this._pushActivity(id);\n };\n\n var popActivity = function popActivity(id) {\n if (_this._finished) {\n return;\n }\n\n _this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen); // Start heartbeat so that transactions do not run forever.\n\n logger.log('Starting heartbeat');\n\n this._pingHeartbeat();\n }\n\n this.spanRecorder.add(this);\n };\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n\n\n IdleTransaction.prototype._pushActivity = function (spanId) {\n if (this._initTimeout) {\n clearTimeout(this._initTimeout);\n this._initTimeout = undefined;\n }\n\n logger.log(\"[Tracing] pushActivity: \" + spanId);\n this.activities[spanId] = true;\n logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n };\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n\n\n IdleTransaction.prototype._popActivity = function (spanId) {\n var _this = this;\n\n if (this.activities[spanId]) {\n logger.log(\"[Tracing] popActivity \" + spanId); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete this.activities[spanId];\n logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n var timeout = this._idleTimeout; // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampWithMs is in seconds, timeout is in ms\n\n var end_1 = timestampWithMs() + timeout / 1000;\n setTimeout(function () {\n if (!_this._finished) {\n _this.finish(end_1);\n }\n }, timeout);\n }\n };\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n\n\n IdleTransaction.prototype._beat = function () {\n clearTimeout(this._heartbeatTimer); // We should not be running heartbeat if the idle transaction is finished.\n\n if (this._finished) {\n return;\n }\n\n var keys = Object.keys(this.activities);\n var heartbeatString = keys.length ? keys.reduce(function (prev, current) {\n return prev + current;\n }) : '';\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter += 1;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n logger.log(\"[Tracing] Transaction finished because of no change for 3 heart beats\");\n this.setStatus(SpanStatus.DeadlineExceeded);\n this.setTag('heartbeat', 'failed');\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n };\n /**\n * Pings the heartbeat\n */\n\n\n IdleTransaction.prototype._pingHeartbeat = function () {\n var _this = this;\n\n logger.log(\"pinging Heartbeat -> current counter: \" + this._heartbeatCounter);\n this._heartbeatTimer = setTimeout(function () {\n _this._beat();\n }, 5000);\n };\n\n return IdleTransaction;\n}(Transaction);\n\nexport { IdleTransaction };\n/**\n * Reset active transaction on scope\n */\n\nfunction clearActiveTransaction(hub) {\n if (hub) {\n var scope = hub.getScope();\n\n if (scope) {\n var transaction = scope.getTransaction();\n\n if (transaction) {\n scope.setSpan(undefined);\n }\n }\n }\n}","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---cache-caches-gatsby-plugin-offline-app-shell-js\": () => import(\"./../../caches/gatsby-plugin-offline/app-shell.js\" /* webpackChunkName: \"component---cache-caches-gatsby-plugin-offline-app-shell-js\" */),\n \"component---src-templates-index-template-js\": () => import(\"./../../../src/templates/index-template.js\" /* webpackChunkName: \"component---src-templates-index-template-js\" */),\n \"component---src-templates-not-found-template-js\": () => import(\"./../../../src/templates/not-found-template.js\" /* webpackChunkName: \"component---src-templates-not-found-template-js\" */),\n \"component---src-templates-page-template-js\": () => import(\"./../../../src/templates/page-template.js\" /* webpackChunkName: \"component---src-templates-page-template-js\" */),\n \"component---src-templates-post-template-js\": () => import(\"./../../../src/templates/post-template.js\" /* webpackChunkName: \"component---src-templates-post-template-js\" */),\n \"component---src-templates-tag-template-js\": () => import(\"./../../../src/templates/tag-template.js\" /* webpackChunkName: \"component---src-templates-tag-template-js\" */),\n \"component---src-templates-tags-list-template-js\": () => import(\"./../../../src/templates/tags-list-template.js\" /* webpackChunkName: \"component---src-templates-tags-list-template-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","import { __assign } from \"tslib\";\nimport { dropUndefinedKeys, timestampWithMs, uuid4 } from '@sentry/utils';\nimport { SpanStatus } from './spanstatus';\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\n\nvar SpanRecorder =\n/** @class */\nfunction () {\n function SpanRecorder(maxlen) {\n if (maxlen === void 0) {\n maxlen = 1000;\n }\n\n this.spans = [];\n this._maxlen = maxlen;\n }\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n\n\n SpanRecorder.prototype.add = function (span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n };\n\n return SpanRecorder;\n}();\n\nexport { SpanRecorder };\n/**\n * Span contains all data about a span\n */\n\nvar Span =\n/** @class */\nfunction () {\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n function Span(spanContext) {\n /**\n * @inheritDoc\n */\n this.traceId = uuid4();\n /**\n * @inheritDoc\n */\n\n this.spanId = uuid4().substring(16);\n /**\n * Timestamp in seconds when the span was created.\n */\n\n this.startTimestamp = timestampWithMs();\n /**\n * @inheritDoc\n */\n\n this.tags = {};\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n this.data = {};\n\n if (!spanContext) {\n return this;\n }\n\n if (spanContext.traceId) {\n this.traceId = spanContext.traceId;\n }\n\n if (spanContext.spanId) {\n this.spanId = spanContext.spanId;\n }\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n } // We want to include booleans as well here\n\n\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n\n if (spanContext.data) {\n this.data = spanContext.data;\n }\n\n if (spanContext.tags) {\n this.tags = spanContext.tags;\n }\n\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n\n if (spanContext.startTimestamp) {\n this.startTimestamp = spanContext.startTimestamp;\n }\n\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n /**\n * @inheritDoc\n * @deprecated\n */\n\n\n Span.prototype.child = function (spanContext) {\n return this.startChild(spanContext);\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.startChild = function (spanContext) {\n var childSpan = new Span(__assign(__assign({}, spanContext), {\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId\n }));\n childSpan.spanRecorder = this.spanRecorder;\n\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n return childSpan;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.setTag = function (key, value) {\n var _a;\n\n this.tags = __assign(__assign({}, this.tags), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\n Span.prototype.setData = function (key, value) {\n var _a;\n\n this.data = __assign(__assign({}, this.data), (_a = {}, _a[key] = value, _a));\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.setStatus = function (value) {\n this.status = value;\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.setHttpStatus = function (httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n var spanStatus = SpanStatus.fromHttpCode(httpStatus);\n\n if (spanStatus !== SpanStatus.UnknownError) {\n this.setStatus(spanStatus);\n }\n\n return this;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.isSuccess = function () {\n return this.status === SpanStatus.Ok;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.finish = function (endTimestamp) {\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampWithMs();\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.toTraceparent = function () {\n var sampledString = '';\n\n if (this.sampled !== undefined) {\n sampledString = this.sampled ? '-1' : '-0';\n }\n\n return this.traceId + \"-\" + this.spanId + sampledString;\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.getTraceContext = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Span.prototype.toJSON = function () {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId\n });\n };\n\n return Span;\n}();\n\nexport { Span };","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\nconst redirectMap = redirects.reduce((map, redirect) => {\n map[redirect.fromPath] = redirect\n return map\n}, {})\n\nfunction maybeRedirect(pathname) {\n const redirect = redirectMap[pathname]\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n const redirect = redirectMap[pathname]\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
\n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nmodule.exports = _inheritsLoose;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
Loading (StaticQuery)
}\n
\n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
Not Found!
\n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","import { getGlobalObject, logger } from '@sentry/utils';\nimport { SpanStatus } from '../spanstatus';\nimport { getActiveTransaction } from '../utils';\nvar global = getGlobalObject();\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\n\nexport function registerBackgroundTabDetection() {\n if (global && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n var activeTransaction = getActiveTransaction();\n\n if (global.document.hidden && activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.Cancelled + \" -> since tab moved to the background, op: \" + activeTransaction.op); // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n\n if (!activeTransaction.status) {\n activeTransaction.setStatus(SpanStatus.Cancelled);\n }\n\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { onHidden } from './onHidden';\nvar firstHiddenTime;\nexport var getFirstHidden = function getFirstHidden() {\n if (firstHiddenTime === undefined) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = document.visibilityState === 'hidden' ? 0 : Infinity; // Update the time if/when the document becomes hidden.\n\n onHidden(function (_a) {\n var timeStamp = _a.timeStamp;\n return firstHiddenTime = timeStamp;\n }, true);\n }\n\n return {\n get timeStamp() {\n return firstHiddenTime;\n }\n\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar inputPromise;\nexport var whenInput = function whenInput() {\n if (!inputPromise) {\n inputPromise = new Promise(function (r) {\n return ['scroll', 'keydown', 'pointerdown'].map(function (type) {\n addEventListener(type, r, {\n once: true,\n passive: true,\n capture: true\n });\n });\n });\n }\n\n return inputPromise;\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var bindReporter = function bindReporter(callback, metric, po, observeAllUpdates) {\n var prevValue;\n return function () {\n if (po && metric.isFinal) {\n po.disconnect();\n }\n\n if (metric.value >= 0) {\n if (observeAllUpdates || metric.isFinal || document.visibilityState === 'hidden') {\n metric.delta = metric.value - (prevValue || 0); // Report the metric if there's a non-zero delta, if the metric is\n // final, or if no previous value exists (which can happen in the case\n // of the document becoming hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n\n if (metric.delta || metric.isFinal || prevValue === undefined) {\n callback(metric);\n prevValue = metric.value;\n }\n }\n }\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateUniqueID } from './generateUniqueID';\nexport var initMetric = function initMetric(name, value) {\n if (value === void 0) {\n value = -1;\n }\n\n return {\n name: name,\n value: value,\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n isFinal: false\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 27-char string by combining the current\n * timestamp with a 13-digit random number.\n * @return {string}\n */\nexport var generateUniqueID = function generateUniqueID() {\n return Date.now() + \"-\" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport var observe = function observe(type, callback) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n var po = new PerformanceObserver(function (l) {\n return l.getEntries().map(callback);\n });\n po.observe({\n type: type,\n buffered: true\n });\n return po;\n }\n } catch (e) {// Do nothing.\n }\n\n return;\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar isUnloading = false;\nvar listenersAdded = false;\n\nvar onPageHide = function onPageHide(event) {\n isUnloading = !event.persisted;\n};\n\nvar addListeners = function addListeners() {\n addEventListener('pagehide', onPageHide); // `beforeunload` is needed to fix this bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=987409\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n addEventListener('beforeunload', function () {});\n};\n\nexport var onHidden = function onHidden(cb, once) {\n if (once === void 0) {\n once = false;\n }\n\n if (!listenersAdded) {\n addListeners();\n listenersAdded = true;\n }\n\n addEventListener('visibilitychange', function (_a) {\n var timeStamp = _a.timeStamp;\n\n if (document.visibilityState === 'hidden') {\n cb({\n timeStamp: timeStamp,\n isUnloading: isUnloading\n });\n }\n }, {\n capture: true,\n once: once\n });\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getFirstHidden } from './lib/getFirstHidden';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport { whenInput } from './lib/whenInput';\nexport var getLCP = function getLCP(onReport, reportAllChanges) {\n if (reportAllChanges === void 0) {\n reportAllChanges = false;\n }\n\n var metric = initMetric('LCP');\n var firstHidden = getFirstHidden();\n var report;\n\n var entryHandler = function entryHandler(entry) {\n // The startTime attribute returns the value of the renderTime if it is not 0,\n // and the value of the loadTime otherwise.\n var value = entry.startTime; // If the page was hidden prior to paint time of the entry,\n // ignore it and mark the metric as final, otherwise add the entry.\n\n if (value < firstHidden.timeStamp) {\n metric.value = value;\n metric.entries.push(entry);\n } else {\n metric.isFinal = true;\n }\n\n report();\n };\n\n var po = observe('largest-contentful-paint', entryHandler);\n\n if (po) {\n report = bindReporter(onReport, metric, po, reportAllChanges);\n\n var onFinal = function onFinal() {\n if (!metric.isFinal) {\n po.takeRecords().map(entryHandler);\n metric.isFinal = true;\n report();\n }\n };\n\n void whenInput().then(onFinal);\n onHidden(onFinal, true);\n }\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nimport { initMetric } from './lib/initMetric';\nvar global = getGlobalObject();\n\nvar afterLoad = function afterLoad(callback) {\n if (document.readyState === 'complete') {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n } else {\n // Use `pageshow` so the callback runs after `loadEventEnd`.\n addEventListener('pageshow', callback);\n }\n};\n\nvar getNavigationEntryFromPerformanceTiming = function getNavigationEntryFromPerformanceTiming() {\n // Really annoying that TypeScript errors when using `PerformanceTiming`.\n // eslint-disable-next-line deprecation/deprecation\n var timing = global.performance.timing;\n var navigationEntry = {\n entryType: 'navigation',\n startTime: 0\n };\n\n for (var key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n navigationEntry[key] = Math.max(timing[key] - timing.navigationStart, 0);\n }\n }\n\n return navigationEntry;\n};\n\nexport var getTTFB = function getTTFB(onReport) {\n var metric = initMetric('TTFB');\n afterLoad(function () {\n try {\n // Use the NavigationTiming L2 entry if available.\n var navigationEntry = global.performance.getEntriesByType('navigation')[0] || getNavigationEntryFromPerformanceTiming();\n metric.value = metric.delta = navigationEntry.responseStart;\n metric.entries = [navigationEntry];\n onReport(metric);\n } catch (error) {// Do nothing.\n }\n });\n};","import { __assign, __rest } from \"tslib\";\nimport { browserPerformanceTimeOrigin, getGlobalObject, logger } from '@sentry/utils';\nimport { msToSec } from '../utils';\nimport { getCLS } from './web-vitals/getCLS';\nimport { getFID } from './web-vitals/getFID';\nimport { getLCP } from './web-vitals/getLCP';\nimport { getTTFB } from './web-vitals/getTTFB';\nimport { getFirstHidden } from './web-vitals/lib/getFirstHidden';\nvar global = getGlobalObject();\n/** Class tracking metrics */\n\nvar MetricsInstrumentation =\n/** @class */\nfunction () {\n function MetricsInstrumentation() {\n this._measurements = {};\n this._performanceCursor = 0;\n\n if (global && global.performance) {\n if (global.performance.mark) {\n global.performance.mark('sentry-tracing-init');\n }\n\n this._trackCLS();\n\n this._trackLCP();\n\n this._trackFID();\n\n this._trackTTFB();\n }\n }\n /** Add performance related spans to a transaction */\n\n\n MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {\n var _this = this;\n\n if (!global || !global.performance || !global.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n logger.log('[Tracing] Adding & adjusting spans using Performance API');\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var entryScriptSrc;\n\n if (global.document) {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < document.scripts.length; i++) {\n // We go through all scripts on the page and look for 'data-entry'\n // We remember the name and measure the time between this script finished loading and\n // our mark 'sentry-tracing-init'\n if (document.scripts[i].dataset.entry === 'true') {\n entryScriptSrc = document.scripts[i].src;\n break;\n }\n }\n }\n\n var entryScriptStartTimestamp;\n var tracingInitMarkStartTime;\n global.performance.getEntries().slice(this._performanceCursor).forEach(function (entry) {\n var startTime = msToSec(entry.startTime);\n var duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation':\n addNavigationSpans(transaction, entry, timeOrigin);\n break;\n\n case 'mark':\n case 'paint':\n case 'measure':\n {\n var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {\n tracingInitMarkStartTime = startTimestamp;\n } // capture web vitals\n\n\n var firstHidden = getFirstHidden(); // Only report if the page wasn't hidden prior to the web vital.\n\n var shouldRecord = entry.startTime < firstHidden.timeStamp;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FP');\n _this._measurements['fp'] = {\n value: entry.startTime\n };\n _this._measurements['mark.fp'] = {\n value: startTimestamp\n };\n }\n\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FCP');\n _this._measurements['fcp'] = {\n value: entry.startTime\n };\n _this._measurements['mark.fcp'] = {\n value: startTimestamp\n };\n }\n\n break;\n }\n\n case 'resource':\n {\n var resourceName = entry.name.replace(window.location.origin, '');\n var endTimestamp = addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin); // We remember the entry script end time to calculate the difference to the first init mark\n\n if (entryScriptStartTimestamp === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) {\n entryScriptStartTimestamp = endTimestamp;\n }\n\n break;\n }\n\n default: // Ignore other entry types.\n\n }\n });\n\n if (entryScriptStartTimestamp !== undefined && tracingInitMarkStartTime !== undefined) {\n _startChild(transaction, {\n description: 'evaluation',\n endTimestamp: tracingInitMarkStartTime,\n op: 'script',\n startTimestamp: entryScriptStartTimestamp\n });\n }\n\n this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n\n this._trackNavigator(transaction); // Measurements are only available for pageload transactions\n\n\n if (transaction.op === 'pageload') {\n // normalize applicable web vital values to be relative to transaction.startTimestamp\n var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin);\n ['fcp', 'fp', 'lcp', 'ttfb'].forEach(function (name) {\n if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {\n return;\n } // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n\n\n var oldValue = _this._measurements[name].value;\n var measurementTimestamp = timeOrigin_1 + msToSec(oldValue); // normalizedValue should be in milliseconds\n\n var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n var delta = normalizedValue - oldValue;\n logger.log(\"[Measurements] Normalized \" + name + \" from \" + oldValue + \" to \" + normalizedValue + \" (\" + delta + \")\");\n _this._measurements[name].value = normalizedValue;\n });\n\n if (this._measurements['mark.fid'] && this._measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: this._measurements['mark.fid'].value + msToSec(this._measurements['fid'].value),\n op: 'web.vitals',\n startTimestamp: this._measurements['mark.fid'].value\n });\n }\n\n transaction.setMeasurements(this._measurements);\n }\n };\n /** Starts tracking the Cumulative Layout Shift on the current page. */\n\n\n MetricsInstrumentation.prototype._trackCLS = function () {\n var _this = this;\n\n getCLS(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n logger.log('[Measurements] Adding CLS');\n _this._measurements['cls'] = {\n value: metric.value\n };\n });\n };\n /**\n * Capture the information of the user agent.\n */\n\n\n MetricsInstrumentation.prototype._trackNavigator = function (transaction) {\n var navigator = global.navigator;\n\n if (!navigator) {\n return;\n } // track network connectivity\n\n\n var connection = navigator.connection;\n\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n this._measurements['connection.rtt'] = {\n value: connection.rtt\n };\n }\n\n if (isMeasurementValue(connection.downlink)) {\n this._measurements['connection.downlink'] = {\n value: connection.downlink\n };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', String(navigator.deviceMemory));\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n };\n /** Starts tracking the Largest Contentful Paint on the current page. */\n\n\n MetricsInstrumentation.prototype._trackLCP = function () {\n var _this = this;\n\n getLCP(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n var timeOrigin = msToSec(performance.timeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding LCP');\n _this._measurements['lcp'] = {\n value: metric.value\n };\n _this._measurements['mark.lcp'] = {\n value: timeOrigin + startTime\n };\n });\n };\n /** Starts tracking the First Input Delay on the current page. */\n\n\n MetricsInstrumentation.prototype._trackFID = function () {\n var _this = this;\n\n getFID(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n var timeOrigin = msToSec(performance.timeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding FID');\n _this._measurements['fid'] = {\n value: metric.value\n };\n _this._measurements['mark.fid'] = {\n value: timeOrigin + startTime\n };\n });\n };\n /** Starts tracking the Time to First Byte on the current page. */\n\n\n MetricsInstrumentation.prototype._trackTTFB = function () {\n var _this = this;\n\n getTTFB(function (metric) {\n var _a;\n\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n logger.log('[Measurements] Adding TTFB');\n _this._measurements['ttfb'] = {\n value: metric.value\n }; // Capture the time spent making the request and receiving the first byte of the response\n\n var requestTime = metric.value - (_a = metric.entries[0], _a !== null && _a !== void 0 ? _a : entry).requestStart;\n _this._measurements['ttfb.requestTime'] = {\n value: requestTime\n };\n });\n };\n\n return MetricsInstrumentation;\n}();\n\nexport { MetricsInstrumentation };\n/** Instrument navigation entries */\n\nfunction addNavigationSpans(transaction, entry, timeOrigin) {\n addPerformanceNavigationTiming(transaction, entry, 'unloadEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'redirect', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'domContentLoadedEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'loadEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'connect', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'connectEnd');\n addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'domainLookupStart');\n addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin);\n addRequest(transaction, entry, timeOrigin);\n}\n/** Create measure related spans */\n\n\nfunction addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {\n var measureStartTimestamp = timeOrigin + startTime;\n var measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n startTimestamp: measureStartTimestamp\n });\n\n return measureStartTimestamp;\n}\n/** Create resource related spans */\n\n\nexport function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return undefined;\n }\n\n var data = {};\n\n if ('transferSize' in entry) {\n data['Transfer Size'] = entry.transferSize;\n }\n\n if ('encodedBodySize' in entry) {\n data['Encoded Body Size'] = entry.encodedBodySize;\n }\n\n if ('decodedBodySize' in entry) {\n data['Decoded Body Size'] = entry.decodedBodySize;\n }\n\n var startTimestamp = timeOrigin + startTime;\n var endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? \"resource.\" + entry.initiatorType : 'resource',\n startTimestamp: startTimestamp,\n data: data\n });\n\n return endTimestamp;\n}\n/** Create performance navigation related spans */\n\nfunction addPerformanceNavigationTiming(transaction, entry, event, timeOrigin, eventEnd) {\n var end = eventEnd ? entry[eventEnd] : entry[event + \"End\"];\n var start = entry[event + \"Start\"];\n\n if (!start || !end) {\n return;\n }\n\n _startChild(transaction, {\n description: event,\n endTimestamp: timeOrigin + msToSec(end),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(start)\n });\n}\n/** Create request and response related spans */\n\n\nfunction addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n description: 'request',\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(entry.requestStart)\n });\n\n _startChild(transaction, {\n description: 'response',\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(entry.responseStart)\n });\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\n\n\nexport function _startChild(transaction, _a) {\n var startTimestamp = _a.startTimestamp,\n ctx = __rest(_a, [\"startTimestamp\"]);\n\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild(__assign({\n startTimestamp: startTimestamp\n }, ctx));\n}\n/**\n * Checks if a given value is a valid measurement value.\n */\n\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getCLS = function getCLS(onReport, reportAllChanges) {\n if (reportAllChanges === void 0) {\n reportAllChanges = false;\n }\n\n var metric = initMetric('CLS', 0);\n var report;\n\n var entryHandler = function entryHandler(entry) {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n metric.value += entry.value;\n metric.entries.push(entry);\n report();\n }\n };\n\n var po = observe('layout-shift', entryHandler);\n\n if (po) {\n report = bindReporter(onReport, metric, po, reportAllChanges);\n onHidden(function (_a) {\n var isUnloading = _a.isUnloading;\n po.takeRecords().map(entryHandler);\n\n if (isUnloading) {\n metric.isFinal = true;\n }\n\n report();\n });\n }\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getFirstHidden } from './lib/getFirstHidden';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getFID = function getFID(onReport) {\n var metric = initMetric('FID');\n var firstHidden = getFirstHidden();\n\n var entryHandler = function entryHandler(entry) {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < firstHidden.timeStamp) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n metric.isFinal = true;\n report();\n }\n };\n\n var po = observe('first-input', entryHandler);\n var report = bindReporter(onReport, metric, po);\n\n if (po) {\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n }, true);\n } else {\n if (window.perfMetrics && window.perfMetrics.onFirstInputDelay) {\n window.perfMetrics.onFirstInputDelay(function (value, event) {\n // Only report if the page wasn't hidden prior to the first input.\n if (event.timeStamp < firstHidden.timeStamp) {\n metric.value = value;\n metric.isFinal = true;\n metric.entries = [{\n entryType: 'first-input',\n name: event.type,\n target: event.target,\n cancelable: event.cancelable,\n startTime: event.timeStamp,\n processingStart: event.timeStamp + value\n }];\n report();\n }\n });\n }\n }\n};","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\nimport { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils';\nimport { getActiveTransaction, hasTracingEnabled } from '../utils';\nexport var DEFAULT_TRACING_ORIGINS = ['localhost', /^\\//];\nexport var defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n tracingOrigins: DEFAULT_TRACING_ORIGINS\n};\n/** Registers span creators for xhr and fetch requests */\n\nexport function registerRequestInstrumentation(_options) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = __assign(__assign({}, defaultRequestInstrumentationOptions), _options),\n traceFetch = _a.traceFetch,\n traceXHR = _a.traceXHR,\n tracingOrigins = _a.tracingOrigins,\n shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest; // We should cache url -> decision so that we don't have to compute\n // regexp everytime we create a request.\n\n\n var urlMap = {};\n\n var defaultShouldCreateSpan = function defaultShouldCreateSpan(url) {\n if (urlMap[url]) {\n return urlMap[url];\n }\n\n var origins = tracingOrigins;\n urlMap[url] = origins.some(function (origin) {\n return isMatchingPattern(url, origin);\n }) && !isMatchingPattern(url, 'sentry_key');\n return urlMap[url];\n }; // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves\n // That's why we filter out already unwanted Spans from tracingOrigins\n\n\n var shouldCreateSpan = defaultShouldCreateSpan;\n\n if (typeof shouldCreateSpanForRequest === 'function') {\n shouldCreateSpan = function shouldCreateSpan(url) {\n return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);\n };\n }\n\n var spans = {};\n\n if (traceFetch) {\n addInstrumentationHandler({\n callback: function callback(handlerData) {\n fetchCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'fetch'\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler({\n callback: function callback(handlerData) {\n xhrCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'xhr'\n });\n }\n}\n/**\n * Create and track fetch request spans\n */\n\nexport function fetchCallback(handlerData, shouldCreateSpan, spans) {\n var _a;\n\n var currentClientOptions = (_a = getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();\n\n if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.fetchData.__span) {\n var span = spans[handlerData.fetchData.__span];\n\n if (span) {\n var response = handlerData.response;\n\n if (response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(response.status);\n }\n\n span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete spans[handlerData.fetchData.__span];\n }\n\n return;\n }\n\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, handlerData.fetchData), {\n type: 'fetch'\n }),\n description: handlerData.fetchData.method + \" \" + handlerData.fetchData.url,\n op: 'http'\n });\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n var request = handlerData.args[0] = handlerData.args[0]; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var options = handlerData.args[1] = handlerData.args[1] || {};\n var headers = options.headers;\n\n if (isInstanceOf(request, Request)) {\n headers = request.headers;\n }\n\n if (headers) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof headers.append === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n headers.append('sentry-trace', span.toTraceparent());\n } else if (Array.isArray(headers)) {\n headers = __spread(headers, [['sentry-trace', span.toTraceparent()]]);\n } else {\n headers = __assign(__assign({}, headers), {\n 'sentry-trace': span.toTraceparent()\n });\n }\n } else {\n headers = {\n 'sentry-trace': span.toTraceparent()\n };\n }\n\n options.headers = headers;\n }\n}\n/**\n * Create and track xhr request spans\n */\n\nexport function xhrCallback(handlerData, shouldCreateSpan, spans) {\n var _a;\n\n var currentClientOptions = (_a = getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();\n\n if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || !(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url)) || handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n var xhr = handlerData.xhr.__sentry_xhr__; // check first if the request has finished and is tracked by an existing span which should now end\n\n if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_span_id__) {\n var span = spans[handlerData.xhr.__sentry_xhr_span_id__];\n\n if (span) {\n span.setHttpStatus(xhr.status_code);\n span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete spans[handlerData.xhr.__sentry_xhr_span_id__];\n }\n\n return;\n } // if not, create a new span to track it\n\n\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, xhr.data), {\n type: 'xhr',\n method: xhr.method,\n url: xhr.url\n }),\n description: xhr.method + \" \" + xhr.url,\n op: 'http'\n });\n handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[handlerData.xhr.__sentry_xhr_span_id__] = span;\n\n if (handlerData.xhr.setRequestHeader) {\n try {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n } catch (_) {// Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n }\n }\n}","import { addInstrumentationHandler, getGlobalObject, logger } from '@sentry/utils';\nvar global = getGlobalObject();\n/**\n * Default function implementing pageload and navigation transactions\n */\n\nexport function defaultRoutingInstrumentation(startTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) {\n startTransactionOnPageLoad = true;\n }\n\n if (startTransactionOnLocationChange === void 0) {\n startTransactionOnLocationChange = true;\n }\n\n if (!global || !global.location) {\n logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n var startingUrl = global.location.href;\n var activeTransaction;\n\n if (startTransactionOnPageLoad) {\n activeTransaction = startTransaction({\n name: global.location.pathname,\n op: 'pageload'\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler({\n callback: function callback(_a) {\n var to = _a.to,\n from = _a.from;\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n\n if (activeTransaction) {\n logger.log(\"[Tracing] Finishing current transaction with op: \" + activeTransaction.op); // If there's an open transaction on the scope, we need to finish it before creating an new one.\n\n activeTransaction.finish();\n }\n\n activeTransaction = startTransaction({\n name: global.location.pathname,\n op: 'navigation'\n });\n }\n },\n type: 'history'\n });\n }\n}","import { __assign } from \"tslib\";\nimport { logger } from '@sentry/utils';\nimport { startIdleTransaction } from '../hubextensions';\nimport { DEFAULT_IDLE_TIMEOUT } from '../idletransaction';\nimport { SpanStatus } from '../spanstatus';\nimport { extractTraceparentData, secToMs } from '../utils';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { MetricsInstrumentation } from './metrics';\nimport { defaultRequestInstrumentationOptions, registerRequestInstrumentation } from './request';\nimport { defaultRoutingInstrumentation } from './router';\nexport var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;\n\nvar DEFAULT_BROWSER_TRACING_OPTIONS = __assign({\n idleTimeout: DEFAULT_IDLE_TIMEOUT,\n markBackgroundTransactions: true,\n maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,\n routingInstrumentation: defaultRoutingInstrumentation,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true\n}, defaultRequestInstrumentationOptions);\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\n\n\nvar BrowserTracing =\n/** @class */\nfunction () {\n function BrowserTracing(_options) {\n /**\n * @inheritDoc\n */\n this.name = BrowserTracing.id;\n this._metrics = new MetricsInstrumentation();\n this._emitOptionsWarning = false;\n var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins; // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances\n\n if (_options && _options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {\n tracingOrigins = _options.tracingOrigins;\n } else {\n this._emitOptionsWarning = true;\n }\n\n this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), {\n tracingOrigins: tracingOrigins\n });\n }\n /**\n * @inheritDoc\n */\n\n\n BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {\n var _this = this;\n\n this._getCurrentHub = getCurrentHub;\n\n if (this._emitOptionsWarning) {\n logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');\n logger.warn(\"[Tracing] We added a reasonable default for you: \" + defaultRequestInstrumentationOptions.tracingOrigins);\n } // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var _a = this.options,\n routingInstrumentation = _a.routingInstrumentation,\n startTransactionOnLocationChange = _a.startTransactionOnLocationChange,\n startTransactionOnPageLoad = _a.startTransactionOnPageLoad,\n markBackgroundTransactions = _a.markBackgroundTransactions,\n traceFetch = _a.traceFetch,\n traceXHR = _a.traceXHR,\n tracingOrigins = _a.tracingOrigins,\n shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n routingInstrumentation(function (context) {\n return _this._createRouteTransaction(context);\n }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n registerRequestInstrumentation({\n traceFetch: traceFetch,\n traceXHR: traceXHR,\n tracingOrigins: tracingOrigins,\n shouldCreateSpanForRequest: shouldCreateSpanForRequest\n });\n };\n /** Create routing idle transaction. */\n\n\n BrowserTracing.prototype._createRouteTransaction = function (context) {\n var _this = this;\n\n if (!this._getCurrentHub) {\n logger.warn(\"[Tracing] Did not create \" + context.op + \" transaction because _getCurrentHub is invalid.\");\n return undefined;\n } // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var _a = this.options,\n beforeNavigate = _a.beforeNavigate,\n idleTimeout = _a.idleTimeout,\n maxTransactionDuration = _a.maxTransactionDuration;\n var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;\n\n var expandedContext = __assign(__assign(__assign({}, context), parentContextFromHeader), {\n trimEnd: true\n });\n\n var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext; // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n\n var finalContext = modifiedContext === undefined ? __assign(__assign({}, expandedContext), {\n sampled: false\n }) : modifiedContext;\n\n if (finalContext.sampled === false) {\n logger.log(\"[Tracing] Will not send \" + finalContext.op + \" transaction because of beforeNavigate.\");\n }\n\n var hub = this._getCurrentHub();\n\n var idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true);\n logger.log(\"[Tracing] Starting \" + finalContext.op + \" transaction on scope\");\n idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {\n _this._metrics.addPerformanceEntries(transaction);\n\n adjustTransactionDuration(secToMs(maxTransactionDuration), transaction, endTimestamp);\n });\n return idleTransaction;\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserTracing.id = 'BrowserTracing';\n return BrowserTracing;\n}();\n\nexport { BrowserTracing };\n/**\n * Gets transaction context from a sentry-trace meta.\n *\n * @returns Transaction context data from the header or undefined if there's no header or the header is malformed\n */\n\nexport function getHeaderContext() {\n var header = getMetaContent('sentry-trace');\n\n if (header) {\n return extractTraceparentData(header);\n }\n\n return undefined;\n}\n/** Returns the value of a meta tag */\n\nexport function getMetaContent(metaName) {\n var el = document.querySelector(\"meta[name=\" + metaName + \"]\");\n return el ? el.getAttribute('content') : null;\n}\n/** Adjusts transaction value based on max transaction duration */\n\nfunction adjustTransactionDuration(maxDuration, transaction, endTimestamp) {\n var diff = endTimestamp - transaction.startTimestamp;\n var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);\n\n if (isOutdatedTransaction) {\n transaction.setStatus(SpanStatus.DeadlineExceeded);\n transaction.setTag('maxTransactionDurationExceeded', 'true');\n }\n}","import { __read, __spread } from \"tslib\";\nimport { logger } from '@sentry/utils';\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\n\nvar Express =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function Express(options) {\n if (options === void 0) {\n options = {};\n }\n /**\n * @inheritDoc\n */\n\n\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n /**\n * @inheritDoc\n */\n\n\n Express.prototype.setupOnce = function () {\n if (!this._router) {\n logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n };\n /**\n * @inheritDoc\n */\n\n\n Express.id = 'Express';\n return Express;\n}();\n\nexport { Express };\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\n\nfunction wrap(fn, method) {\n var arity = fn.length;\n\n switch (arity) {\n case 2:\n {\n return function (req, res) {\n var transaction = res.__sentry_transaction;\n\n if (transaction) {\n var span_1 = transaction.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n res.once('finish', function () {\n span_1.finish();\n });\n }\n\n return fn.call(this, req, res);\n };\n }\n\n case 3:\n {\n return function (req, res, next) {\n var _a;\n\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n fn.call(this, req, res, function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n\n case 4:\n {\n return function (err, req, res, next) {\n var _a;\n\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n fn.call(this, err, req, res, function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n\n default:\n {\n throw new Error(\"Express middleware takes 2-4 arguments. Got: \" + arity);\n }\n }\n}\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\n\n\nfunction wrapMiddlewareArgs(args, method) {\n return args.map(function (arg) {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map(function (a) {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n\n return a;\n });\n }\n\n return arg;\n });\n}\n/**\n * Patches original router to utilize our tracing functionality\n */\n\n\nfunction patchMiddleware(router, method) {\n var originalCallback = router[method];\n\n router[method] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return originalCallback.call.apply(originalCallback, __spread([this], wrapMiddlewareArgs(args, method)));\n };\n\n return router;\n}\n/**\n * Patches original router methods\n */\n\n\nfunction instrumentMiddlewares(router, methods) {\n if (methods === void 0) {\n methods = [];\n }\n\n methods.forEach(function (method) {\n return patchMiddleware(router, method);\n });\n}","import { __assign } from \"tslib\";\nimport { BrowserTracing } from './browser';\nimport { addExtensionMethods } from './hubextensions';\nimport * as TracingIntegrations from './integrations';\n\nvar Integrations = __assign(__assign({}, TracingIntegrations), {\n BrowserTracing: BrowserTracing\n});\n\nexport { Integrations };\nexport { Span } from './span';\nexport { Transaction } from './transaction';\nexport { SpanStatus } from './spanstatus'; // We are patching the global object with our hub extension methods\n\naddExtensionMethods();\nexport { addExtensionMethods };\nexport { extractTraceparentData, getActiveTransaction, hasTracingEnabled, stripUrlQueryAndFragment, TRACEPARENT_REGEXP } from './utils';","/** JSDoc */\n// eslint-disable-next-line import/export\nexport var Severity;\n\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n\n\n(function (Severity) {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n function fromString(level) {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n\n case 'info':\n return Severity.Info;\n\n case 'warn':\n case 'warning':\n return Severity.Warning;\n\n case 'error':\n return Severity.Error;\n\n case 'fatal':\n return Severity.Fatal;\n\n case 'critical':\n return Severity.Critical;\n\n case 'log':\n default:\n return Severity.Log;\n }\n }\n\n Severity.fromString = fromString;\n})(Severity || (Severity = {}));","/** The status of an event. */\n// eslint-disable-next-line import/export\nexport var Status;\n\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent to Sentry successfully. */\n\n Status[\"Success\"] = \"success\";\n /** The client is currently rate limited and will try again later. */\n\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The event could not be processed. */\n\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error ocurred during submission. */\n\n Status[\"Failed\"] = \"failed\";\n})(Status || (Status = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n\n\n(function (Status) {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n function fromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n\n Status.fromHttpCode = fromHttpCode;\n})(Status || (Status = {}));","export var SDK_NAME = 'sentry.javascript.browser';\nexport var SDK_VERSION = '5.29.2';","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfunction callOnHub(method) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var hub = getCurrentHub();\n\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, __spread(args));\n }\n\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\nexport function captureException(exception, captureContext) {\n var syntheticException;\n\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception;\n }\n\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\n\nexport function captureMessage(message, captureContext) {\n var syntheticException;\n\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception;\n } // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n\n\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? {\n captureContext: captureContext\n } : undefined;\n return callOnHub('captureMessage', message, level, __assign({\n originalException: message,\n syntheticException: syntheticException\n }, context));\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\n\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\n\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\n\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n\nexport function setTags(tags) {\n callOnHub('setTags', tags);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\n\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\n\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\n\nexport function setUser(user) {\n callOnHub('setUser', user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nexport function _callOnClient(method) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n callOnHub.apply(void 0, __spread(['_invokeClient', method], args));\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\n\nexport function startTransaction(context, customSamplingContext) {\n return callOnHub('startTransaction', __assign({}, context), customSamplingContext);\n}","export var setPrototypeOf = Object.setPrototypeOf || ({\n __proto__: []\n} instanceof Array ? setProtoOf : mixinProperties);\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\nfunction setProtoOf(obj, proto) {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n // eslint-disable-next-line no-prototype-builtins\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj;\n}","import { __extends } from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\n\nvar SentryError =\n/** @class */\nfunction (_super) {\n __extends(SentryError, _super);\n\n function SentryError(message) {\n var _newTarget = this.constructor;\n\n var _this = _super.call(this, message) || this;\n\n _this.message = message;\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n\n return SentryError;\n}(Error);\n\nexport { SentryError };","import { __read } from \"tslib\";\nimport { SentryError } from './error';\n/** Regular expression used to parse a Dsn. */\n\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n/** Error message */\n\nvar ERROR_MESSAGE = 'Invalid Dsn';\n/** The Sentry Dsn, identifying a Sentry instance and project. */\n\nvar Dsn =\n/** @class */\nfunction () {\n /** Creates a new Dsn component */\n function Dsn(from) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n\n\n Dsn.prototype.toString = function (withPassword) {\n if (withPassword === void 0) {\n withPassword = false;\n }\n\n var _a = this,\n host = _a.host,\n path = _a.path,\n pass = _a.pass,\n port = _a.port,\n projectId = _a.projectId,\n protocol = _a.protocol,\n user = _a.user;\n\n return protocol + \"://\" + user + (withPassword && pass ? \":\" + pass : '') + (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId);\n };\n /** Parses a string into this Dsn. */\n\n\n Dsn.prototype._fromString = function (str) {\n var match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n var _a = __read(match.slice(1), 6),\n protocol = _a[0],\n user = _a[1],\n _b = _a[2],\n pass = _b === void 0 ? '' : _b,\n host = _a[3],\n _c = _a[4],\n port = _c === void 0 ? '' : _c,\n lastPath = _a[5];\n\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n this._fromComponents({\n host: host,\n pass: pass,\n path: path,\n projectId: projectId,\n port: port,\n protocol: protocol,\n user: user\n });\n };\n /** Maps Dsn components into this instance. */\n\n\n Dsn.prototype._fromComponents = function (components) {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n };\n /** Validates this Dsn and throws on error. */\n\n\n Dsn.prototype._validate = function () {\n var _this = this;\n\n ['protocol', 'user', 'host', 'projectId'].forEach(function (component) {\n if (!_this[component]) {\n throw new SentryError(ERROR_MESSAGE + \": \" + component + \" missing\");\n }\n });\n\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid projectId \" + this.projectId);\n }\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE + \": Invalid protocol \" + this.protocol);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid port \" + this.port);\n }\n };\n\n return Dsn;\n}();\n\nexport { Dsn };","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nexport var installedIntegrations = [];\n/** Gets integration to install */\n\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = options.defaultIntegrations && __spread(options.defaultIntegrations) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) {\n return i.name;\n });\n var pickedIntegrationsNames_1 = []; // Leave only unique default integrations, that were not overridden with provided user integrations\n\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n }); // Don't add same user integration twice\n\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n } else {\n integrations = __spread(defaultIntegrations);\n } // Make sure that if present, `Debug` integration will always run last\n\n\n var integrationsNames = integrations.map(function (i) {\n return i.name;\n });\n var alwaysLastToRun = 'Debug';\n\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n\n return integrations;\n}\n/** Setup given integration */\n\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\n\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}","import { __assign, __values } from \"tslib\";\n/* eslint-disable max-lines */\n\nimport { Scope } from '@sentry/hub';\nimport { SessionStatus } from '@sentry/types';\nimport { dateTimestampInSeconds, Dsn, isPrimitive, isThenable, logger, normalize, SentryError, SyncPromise, truncate, uuid4 } from '@sentry/utils';\nimport { setupIntegrations } from './integration';\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\n\nvar BaseClient =\n/** @class */\nfunction () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Number of call being processed */\n\n this._processing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n\n var eventId = hint && hint.event_id;\n\n this._process(this._getBackend().eventFromException(exception, hint).then(function (event) {\n return _this._captureEvent(event, hint, scope);\n }).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n\n var eventId = hint && hint.event_id;\n var promisedEvent = isPrimitive(message) ? this._getBackend().eventFromMessage(String(message), level, hint) : this._getBackend().eventFromException(message, hint);\n\n this._process(promisedEvent.then(function (event) {\n return _this._captureEvent(event, hint, scope);\n }).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n var eventId = hint && hint.event_id;\n\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.captureSession = function (session) {\n if (!session.release) {\n logger.warn('Discarded session because of missing release');\n } else {\n this._sendSession(session);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n\n return this._isClientProcessing(timeout).then(function (ready) {\n return _this._getBackend().getTransport().close(timeout).then(function (transportFlushed) {\n return ready && transportFlushed;\n });\n });\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n\n\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n } catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n\n\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n\n var crashed = false;\n var errored = false;\n var userAgent;\n var exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n\n var user = event.user;\n\n if (!session.userAgent) {\n var headers = event.request ? event.request.headers : {};\n\n for (var key in headers) {\n if (key.toLowerCase() === 'user-agent') {\n userAgent = headers[key];\n break;\n }\n }\n }\n\n session.update(__assign(__assign({}, crashed && {\n status: SessionStatus.Crashed\n }), {\n user: user,\n userAgent: userAgent,\n errors: session.errors + Number(errored || crashed)\n }));\n };\n /** Deliver captured session to Sentry */\n\n\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /** Waits for the client to be done with processing. */\n\n\n BaseClient.prototype._isClientProcessing = function (timeout) {\n var _this = this;\n\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._processing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n\n\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n\n\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n\n\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n\n var _a = this.getOptions().normalizeDepth,\n normalizeDepth = _a === void 0 ? 3 : _a;\n\n var prepared = __assign(__assign({}, event), {\n event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n timestamp: event.timestamp || dateTimestampInSeconds()\n });\n\n this._applyClientOptions(prepared);\n\n this._applyIntegrationsMetadata(prepared); // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n\n\n var finalScope = scope;\n\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n } // We prepare the result here with a resolved Event.\n\n\n var result = SyncPromise.resolve(prepared); // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(function (evt) {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth);\n }\n\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n\n\n BaseClient.prototype._normalizeEvent = function (event, depth) {\n if (!event) {\n return null;\n }\n\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) {\n return __assign(__assign({}, b), b.data && {\n data: normalize(b.data, depth)\n });\n })\n }), event.user && {\n user: normalize(event.user, depth)\n }), event.contexts && {\n contexts: normalize(event.contexts, depth)\n }), event.extra && {\n extra: normalize(event.extra, depth)\n }); // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n\n\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n\n\n BaseClient.prototype._applyClientOptions = function (event) {\n var options = this.getOptions();\n var environment = options.environment,\n release = options.release,\n dist = options.dist,\n _a = options.maxValueLength,\n maxValueLength = _a === void 0 ? 250 : _a;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n var exception = event.exception && event.exception.values && event.exception.values[0];\n\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n var request = event.request;\n\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n\n\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var sdkInfo = event.sdk;\n var integrationsArray = Object.keys(this._integrations);\n\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n\n\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n\n\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n logger.error(reason);\n return undefined;\n });\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n\n\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this; // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var _a = this.getOptions(),\n beforeSend = _a.beforeSend,\n sampleRate = _a.sampleRate;\n\n if (!this._isEnabled()) {\n return SyncPromise.reject(new SentryError('SDK not enabled, will not send event.'));\n }\n\n var isTransaction = event.type === 'transaction'; // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject(new SentryError('This event has been sampled, will not send event.'));\n }\n\n return this._prepareEvent(event, scope, hint).then(function (prepared) {\n if (prepared === null) {\n throw new SentryError('An event processor returned null, will not send event.');\n }\n\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n\n var beforeSendResult = beforeSend(prepared, hint);\n\n if (typeof beforeSendResult === 'undefined') {\n throw new SentryError('`beforeSend` method has to return `null` or a valid event.');\n } else if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(function (event) {\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n\n return beforeSendResult;\n }).then(function (processedEvent) {\n if (processedEvent === null) {\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n\n var session = scope && scope.getSession && scope.getSession();\n\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n\n _this._sendEvent(processedEvent);\n\n return processedEvent;\n }).then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n _this.captureException(reason, {\n data: {\n __sentry__: true\n },\n originalException: reason\n });\n\n throw new SentryError(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n };\n /**\n * Occupies the client with processing and event\n */\n\n\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n\n this._processing += 1;\n promise.then(function (value) {\n _this._processing -= 1;\n return value;\n }, function (reason) {\n _this._processing -= 1;\n return reason;\n });\n };\n\n return BaseClient;\n}();\n\nexport { BaseClient };","import { Status } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n/** Noop transport */\n\nvar NoopTransport =\n/** @class */\nfunction () {\n function NoopTransport() {}\n /**\n * @inheritDoc\n */\n\n\n NoopTransport.prototype.sendEvent = function (_) {\n return SyncPromise.resolve({\n reason: \"NoopTransport: Event has been skipped because no Dsn is configured.\",\n status: Status.Skipped\n });\n };\n /**\n * @inheritDoc\n */\n\n\n NoopTransport.prototype.close = function (_) {\n return SyncPromise.resolve(true);\n };\n\n return NoopTransport;\n}();\n\nexport { NoopTransport };","import { logger, SentryError } from '@sentry/utils';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\n\nvar BaseBackend =\n/** @class */\nfunction () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n\n\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n\n\n BaseBackend.prototype.sendEvent = function (event) {\n this._transport.sendEvent(event).then(null, function (reason) {\n logger.error(\"Error while sending event: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n\n\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n\n this._transport.sendSession(session).then(null, function (reason) {\n logger.error(\"Error while sending session: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n\n\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n\n\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n\n return BaseBackend;\n}();\n\nexport { BaseBackend };","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\nimport { __assign } from \"tslib\"; // global reference to slice\n\nvar UNKNOWN_FUNCTION = '?'; // Chromium based browsers: Chrome, Brave, new Opera, new Edge\n\nvar chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i; // gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\n\nvar gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/; // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\n\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\nexport function computeStackTrace(ex) {\n var stack = null;\n var popSize = 0;\n\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n } else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {// no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {// no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\n\nfunction computeStackTraceFromStackProp(ex) {\n if (!ex || !ex.stack) {\n return null;\n }\n\n var stack = [];\n var lines = ex.stack.split('\\n');\n var isEval;\n var submatch;\n var parts;\n var element;\n\n for (var i = 0; i < lines.length; ++i) {\n if (parts = chrome.exec(lines[i])) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n\n parts[3] = submatch[2]; // line\n\n parts[4] = submatch[3]; // column\n }\n\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n } else if (parts = winjs.exec(lines[i])) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n } else if (parts = gecko.exec(lines[i])) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || \"eval\";\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack\n };\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction computeStackTraceFromStacktraceProp(ex) {\n if (!ex || !ex.stacktrace) {\n return null;\n } // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n\n\n var stacktrace = ex.stacktrace;\n var opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n var opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\((.*)\\))? in (.*):\\s*$/i;\n var lines = stacktrace.split('\\n');\n var stack = [];\n var parts;\n\n for (var line = 0; line < lines.length; line += 2) {\n var element = null;\n\n if (parts = opera10Regex.exec(lines[line])) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null\n };\n } else if (parts = opera11Regex.exec(lines[line])) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2]\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack\n };\n}\n/** Remove N number of frames from the stack */\n\n\nfunction popFrames(stacktrace, popSize) {\n try {\n return __assign(__assign({}, stacktrace), {\n stack: stacktrace.stack.slice(popSize)\n });\n } catch (e) {\n return stacktrace;\n }\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n\n return message;\n}","import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\nimport { computeStackTrace } from './tracekit';\nvar STACKTRACE_LIMIT = 50;\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\n\nexport function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message\n };\n\n if (frames && frames.length) {\n exception.stacktrace = {\n frames: frames\n };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n/**\n * @hidden\n */\n\nexport function eventFromPlainObject(exception, syntheticException, rejection) {\n var event = {\n exception: {\n values: [{\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (rejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception)\n }]\n },\n extra: {\n __serialized__: normalizeToSize(exception)\n }\n };\n\n if (syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1\n };\n }\n\n return event;\n}\n/**\n * @hidden\n */\n\nexport function eventFromStacktrace(stacktrace) {\n var exception = exceptionFromStacktrace(stacktrace);\n return {\n exception: {\n values: [exception]\n }\n };\n}\n/**\n * @hidden\n */\n\nexport function prepareFramesForEvent(stack) {\n if (!stack || !stack.length) {\n return [];\n }\n\n var localStack = stack;\n var firstFrameFunction = localStack[0].func || '';\n var lastFrameFunction = localStack[localStack.length - 1].func || ''; // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n } // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n\n\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n } // The frame where the crash happened, should be the last entry in the array\n\n\n return localStack.slice(0, STACKTRACE_LIMIT).map(function (frame) {\n return {\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line\n };\n }).reverse();\n}","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, SyncPromise } from '@sentry/utils';\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n/**\n * Builds and Event from a Exception\n * @hidden\n */\n\nexport function eventFromException(options, exception, hint) {\n var syntheticException = hint && hint.syntheticException || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic'\n });\n event.level = Severity.Error;\n\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n\n return SyncPromise.resolve(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\n\nexport function eventFromMessage(options, message, level, hint) {\n if (level === void 0) {\n level = Severity.Info;\n }\n\n var syntheticException = hint && hint.syntheticException || undefined;\n var event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace\n });\n event.level = level;\n\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n\n return SyncPromise.resolve(event);\n}\n/**\n * @hidden\n */\n\nexport function eventFromUnknownInput(exception, syntheticException, options) {\n if (options === void 0) {\n options = {};\n }\n\n var event;\n\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception; // eslint-disable-next-line no-param-reassign\n\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n\n if (isDOMError(exception) || isDOMException(exception)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name, code, and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n var domException = exception;\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), {\n 'DOMException.code': \"\" + domException.code\n });\n }\n\n return event;\n }\n\n if (isError(exception)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n } // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n\n\n event = eventFromString(exception, syntheticException, options);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true\n });\n return event;\n}\n/**\n * @hidden\n */\n\nexport function eventFromString(input, syntheticException, options) {\n if (options === void 0) {\n options = {};\n }\n\n var event = {\n message: input\n };\n\n if (options.attachStacktrace && syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1\n };\n }\n\n return event;\n}","import { __rest } from \"tslib\";\n/** Creates a SentryRequest from an event. */\n\nexport function sessionToSentryRequest(session, api) {\n var envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString()\n });\n var itemHeaders = JSON.stringify({\n type: 'session'\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: 'session',\n url: api.getEnvelopeEndpointWithUrlEncodedAuth()\n };\n}\n/** Creates a SentryRequest from an event. */\n\nexport function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {},\n samplingMethod = _a.__sentry_samplingMethod,\n sampleRate = _a.__sentry_sampleRate,\n otherTags = __rest(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth()\n }; // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString()\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{\n id: samplingMethod,\n rate: sampleRate\n }]\n }); // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n\n return req;\n}","import { Dsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/** Helper class to provide urls to different Sentry endpoints. */\n\nvar API =\n/** @class */\nfunction () {\n /** Create a new instance of API */\n function API(dsn) {\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n }\n /** Returns the Dsn object. */\n\n\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n\n\n API.prototype.getBaseApiEndpoint = function () {\n var dsn = this._dsnObject;\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n };\n /** Returns the store endpoint URL. */\n\n\n API.prototype.getStoreEndpoint = function () {\n return this._getIngestEndpoint('store');\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n\n\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return this.getStoreEndpoint() + \"?\" + this._encodedAuth();\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n\n\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return this._getEnvelopeEndpoint() + \"?\" + this._encodedAuth();\n };\n /** Returns only the path component for the store endpoint. */\n\n\n API.prototype.getStoreEndpointPath = function () {\n var dsn = this._dsnObject;\n return (dsn.path ? \"/\" + dsn.path : '') + \"/api/\" + dsn.projectId + \"/store/\";\n };\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n\n\n API.prototype.getRequestHeaders = function (clientName, clientVersion) {\n var dsn = this._dsnObject;\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.user);\n\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', ')\n };\n };\n /** Returns the url to the report dialog endpoint. */\n\n\n API.prototype.getReportDialogEndpoint = function (dialogOptions) {\n if (dialogOptions === void 0) {\n dialogOptions = {};\n }\n\n var dsn = this._dsnObject;\n var endpoint = this.getBaseApiEndpoint() + \"embed/error-page/\";\n var encodedOptions = [];\n encodedOptions.push(\"dsn=\" + dsn.toString());\n\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n\n if (dialogOptions.user.name) {\n encodedOptions.push(\"name=\" + encodeURIComponent(dialogOptions.user.name));\n }\n\n if (dialogOptions.user.email) {\n encodedOptions.push(\"email=\" + encodeURIComponent(dialogOptions.user.email));\n }\n } else {\n encodedOptions.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]));\n }\n }\n\n if (encodedOptions.length) {\n return endpoint + \"?\" + encodedOptions.join('&');\n }\n\n return endpoint;\n };\n /** Returns the envelope endpoint URL. */\n\n\n API.prototype._getEnvelopeEndpoint = function () {\n return this._getIngestEndpoint('envelope');\n };\n /** Returns the ingest API endpoint for target. */\n\n\n API.prototype._getIngestEndpoint = function (target) {\n var base = this.getBaseApiEndpoint();\n var dsn = this._dsnObject;\n return \"\" + base + dsn.projectId + \"/\" + target + \"/\";\n };\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n\n\n API.prototype._encodedAuth = function () {\n var dsn = this._dsnObject;\n var auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.user,\n sentry_version: SENTRY_API_VERSION\n };\n return urlEncode(auth);\n };\n\n return API;\n}();\n\nexport { API };","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n/** A simple queue that holds promises. */\n\nvar PromiseBuffer =\n/** @class */\nfunction () {\n function PromiseBuffer(_limit) {\n this._limit = _limit;\n /** Internal set of queued Promises */\n\n this._buffer = [];\n }\n /**\n * Says if the buffer is ready to take more requests\n */\n\n\n PromiseBuffer.prototype.isReady = function () {\n return this._limit === undefined || this.length() < this._limit;\n };\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns The original promise.\n */\n\n\n PromiseBuffer.prototype.add = function (task) {\n var _this = this;\n\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n\n task.then(function () {\n return _this.remove(task);\n }).then(null, function () {\n return _this.remove(task).then(null, function () {// We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n });\n });\n return task;\n };\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n\n\n PromiseBuffer.prototype.remove = function (task) {\n var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n\n return removedTask;\n };\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n\n\n PromiseBuffer.prototype.length = function () {\n return this._buffer.length;\n };\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n\n\n PromiseBuffer.prototype.drain = function (timeout) {\n var _this = this;\n\n return new SyncPromise(function (resolve) {\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(_this._buffer).then(function () {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }).then(null, function () {\n resolve(true);\n });\n });\n };\n\n return PromiseBuffer;\n}();\n\nexport { PromiseBuffer };","import { __values } from \"tslib\";\nimport { API } from '@sentry/core';\nimport { Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, PromiseBuffer, SentryError } from '@sentry/utils';\n/** Base Transport class implementation */\n\nvar BaseTransport =\n/** @class */\nfunction () {\n function BaseTransport(options) {\n this.options = options;\n /** A simple buffer holding all requests. */\n\n this._buffer = new PromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n\n this._rateLimits = {};\n this._api = new API(this.options.dsn); // eslint-disable-next-line deprecation/deprecation\n\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n }\n /**\n * @inheritDoc\n */\n\n\n BaseTransport.prototype.sendEvent = function (_) {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n };\n /**\n * @inheritDoc\n */\n\n\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n\n\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType,\n response = _a.response,\n headers = _a.headers,\n resolve = _a.resolve,\n reject = _a.reject;\n var status = Status.fromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n\n var limited = this._handleRateLimit(headers);\n\n if (limited) logger.warn(\"Too many requests, backing off until: \" + this._disabledUntil(requestType));\n\n if (status === Status.Success) {\n resolve({\n status: status\n });\n return;\n }\n\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n\n\n BaseTransport.prototype._disabledUntil = function (category) {\n return this._rateLimits[category] || this._rateLimits.all;\n };\n /**\n * Checks if a category is rate limited\n */\n\n\n BaseTransport.prototype._isRateLimited = function (category) {\n return this._disabledUntil(category) > new Date(Date.now());\n };\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n\n\n BaseTransport.prototype._handleRateLimit = function (headers) {\n var e_1, _a, e_2, _b;\n\n var now = Date.now();\n var rlHeader = headers['x-sentry-rate-limits'];\n var raHeader = headers['retry-after'];\n\n if (rlHeader) {\n try {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (var _c = __values(rlHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {\n var limit = _d.value;\n var parameters = limit.split(':', 2);\n var headerDelay = parseInt(parameters[0], 10);\n var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n\n try {\n for (var _e = (e_2 = void 0, __values(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {\n var category = _f.value;\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n return true;\n } else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n\n return false;\n };\n\n return BaseTransport;\n}();\n\nexport { BaseTransport };","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { getGlobalObject, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nvar global = getGlobalObject();\n/** `fetch` based transport */\n\nvar FetchTransport =\n/** @class */\nfunction (_super) {\n __extends(FetchTransport, _super);\n\n function FetchTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n\n\n FetchTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n\n\n FetchTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n\n\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n\n if (this._isRateLimited(sentryRequest.type)) {\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429\n });\n }\n\n var options = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: supportsReferrerPolicy() ? 'origin' : ''\n };\n\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n global.fetch(sentryRequest.url, options).then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After')\n };\n\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject\n });\n }).catch(reject);\n }));\n };\n\n return FetchTransport;\n}(BaseTransport);\n\nexport { FetchTransport };","import { __extends } from \"tslib\";\nimport { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\n\nvar XHRTransport =\n/** @class */\nfunction (_super) {\n __extends(XHRTransport, _super);\n\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n\n\n XHRTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n\n\n XHRTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n\n\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n\n if (this._isRateLimited(sentryRequest.type)) {\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: \"Transport locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429\n });\n }\n\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After')\n };\n\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: request,\n headers: headers,\n resolve: resolve,\n reject: reject\n });\n }\n };\n\n request.open('POST', sentryRequest.url);\n\n for (var header in _this.options.headers) {\n if (_this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n\n request.send(sentryRequest.body);\n }));\n };\n\n return XHRTransport;\n}(BaseTransport);\n\nexport { XHRTransport };","import { __assign, __extends } from \"tslib\";\nimport { BaseBackend } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\n\nvar BrowserBackend =\n/** @class */\nfunction (_super) {\n __extends(BrowserBackend, _super);\n\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n\n\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(this._options, exception, hint);\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) {\n level = Severity.Info;\n }\n\n return eventFromMessage(this._options, message, level, hint);\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n\n var transportOptions = __assign(__assign({}, this._options.transportOptions), {\n dsn: this._options.dsn\n });\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n\n return new XHRTransport(transportOptions);\n };\n\n return BrowserBackend;\n}(BaseBackend);\n\nexport { BrowserBackend };","import { __assign } from \"tslib\";\nimport { API, captureException, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, logger } from '@sentry/utils';\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\n\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\n\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\n\nexport function wrap(fn, options, before) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n } // If this has already been wrapped in the past, return that wrapped function\n\n\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n var sentryWrapped = function sentryWrapped() {\n var args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\n\n var wrappedArguments = args.map(function (arg) {\n return wrap(arg, options);\n });\n\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return fn.handleEvent.apply(this, wrappedArguments);\n } // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n\n\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n var processedEvent = __assign({}, event);\n\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n\n processedEvent.extra = __assign(__assign({}, processedEvent.extra), {\n arguments: args\n });\n return processedEvent;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n\n\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped\n }); // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true\n },\n __sentry_original__: {\n enumerable: false,\n value: fn\n }\n }); // Restore original function name (not all browsers allow that)\n\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function get() {\n return fn.name;\n }\n });\n } // eslint-disable-next-line no-empty\n\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\n\nexport function injectReportDialog(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (!options.eventId) {\n logger.error(\"Missing eventId option in showReportDialog call\");\n return;\n }\n\n if (!options.dsn) {\n logger.error(\"Missing dsn option in showReportDialog call\");\n return;\n }\n\n var script = document.createElement('script');\n script.async = true;\n script.src = new API(options.dsn).getReportDialogEndpoint(options);\n\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n\n (document.head || document.body).appendChild(script);\n}","var originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\n\nvar FunctionToString =\n/** @class */\nfunction () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n\n\n FunctionToString.prototype.setupOnce = function () {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n Function.prototype.toString = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var context = this.__sentry_original__ || this;\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n\n\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}();\n\nexport { FunctionToString };","import { __assign, __read, __spread } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/* eslint-disable max-lines */\n\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\n\nvar Breadcrumbs =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = __assign({\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true\n }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n\n\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event)\n }, {\n event: event\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n\n\n Breadcrumbs.prototype.setupOnce = function () {\n var _this = this;\n\n if (this._options.console) {\n addInstrumentationHandler({\n callback: function callback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n _this._consoleBreadcrumb.apply(_this, __spread(args));\n },\n type: 'console'\n });\n }\n\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: function callback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n _this._domBreadcrumb.apply(_this, __spread(args));\n },\n type: 'dom'\n });\n }\n\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: function callback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n _this._xhrBreadcrumb.apply(_this, __spread(args));\n },\n type: 'xhr'\n });\n }\n\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: function callback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n _this._fetchBreadcrumb.apply(_this, __spread(args));\n },\n type: 'fetch'\n });\n }\n\n if (this._options.history) {\n addInstrumentationHandler({\n callback: function callback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n _this._historyBreadcrumb.apply(_this, __spread(args));\n },\n type: 'history'\n });\n }\n };\n /**\n * Creates breadcrumbs from console API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console'\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' ')\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level\n });\n };\n /**\n * Creates breadcrumbs from DOM API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Breadcrumbs.prototype._domBreadcrumb = function (handlerData) {\n var target; // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\n try {\n target = handlerData.event.target ? htmlTreeAsString(handlerData.event.target) : htmlTreeAsString(handlerData.event);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target\n }, {\n event: handlerData.event,\n name: handlerData.name\n });\n };\n /**\n * Creates breadcrumbs from XHR API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n var _a = handlerData.xhr.__sentry_xhr__ || {},\n method = _a.method,\n url = _a.url,\n status_code = _a.status_code,\n body = _a.body;\n\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code\n },\n type: 'http'\n }, {\n xhr: handlerData.xhr,\n input: body\n });\n return;\n }\n };\n /**\n * Creates breadcrumbs from fetch API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http'\n }, {\n data: handlerData.error,\n input: handlerData.args\n });\n } else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: __assign(__assign({}, handlerData.fetchData), {\n status_code: handlerData.response.status\n }),\n type: 'http'\n }, {\n input: handlerData.args,\n response: handlerData.response\n });\n }\n };\n /**\n * Creates breadcrumbs from history API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to); // Initial pushState doesn't provide `from` information\n\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n } // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n\n\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to\n }\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}();\n\nexport { Breadcrumbs };","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport { BaseClient } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\n\nvar BrowserClient =\n/** @class */\nfunction (_super) {\n __extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n\n\n function BrowserClient(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _super.call(this, BrowserBackend, options) || this;\n }\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n\n\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) {\n options = {};\n } // doesn't work without a document (React Native)\n\n\n var document = getGlobalObject().document;\n\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n\n injectReportDialog(__assign(__assign({}, options), {\n dsn: options.dsn || this.getDsn()\n }));\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n event.sdk = __assign(__assign({}, event.sdk), {\n name: SDK_NAME,\n packages: __spread(event.sdk && event.sdk.packages || [], [{\n name: 'npm:@sentry/browser',\n version: SDK_VERSION\n }]),\n version: SDK_VERSION\n });\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n\n _super.prototype._sendEvent.call(this, event);\n };\n\n return BrowserClient;\n}(BaseClient);\n\nexport { BrowserClient };","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils'; // \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\n\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\n\nvar InboundFilters =\n/** @class */\nfunction () {\n function InboundFilters(_options) {\n if (_options === void 0) {\n _options = {};\n }\n\n this._options = _options;\n /**\n * @inheritDoc\n */\n\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n\n\n InboundFilters.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n\n if (!hub) {\n return event;\n }\n\n var self = hub.getIntegration(InboundFilters);\n\n if (self) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n\n var options = self._mergeOptions(clientOptions);\n\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n\n return event;\n });\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._shouldDropEvent = function (event, options) {\n if (this._isSentryError(event, options)) {\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n\n if (this._isIgnoredError(event, options)) {\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n\n if (this._isDeniedUrl(event, options)) {\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n\n if (!this._isAllowedUrl(event, options)) {\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n\n return false;\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._isSentryError = function (event, options) {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return event && event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].type === 'SentryError' || false;\n } catch (_oO) {\n return false;\n }\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._isIgnoredError = function (event, options) {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(function (message) {\n // Not sure why TypeScript complains here...\n return options.ignoreErrors.some(function (pattern) {\n return isMatchingPattern(message, pattern);\n });\n });\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._isDeniedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n\n var url = this._getEventFilterUrl(event);\n\n return !url ? false : options.denyUrls.some(function (pattern) {\n return isMatchingPattern(url, pattern);\n });\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._isAllowedUrl = function (event, options) {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n\n var url = this._getEventFilterUrl(event);\n\n return !url ? true : options.allowUrls.some(function (pattern) {\n return isMatchingPattern(url, pattern);\n });\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._mergeOptions = function (clientOptions) {\n if (clientOptions === void 0) {\n clientOptions = {};\n }\n\n return {\n allowUrls: __spread(this._options.whitelistUrls || [], this._options.allowUrls || [], clientOptions.whitelistUrls || [], clientOptions.allowUrls || []),\n denyUrls: __spread(this._options.blacklistUrls || [], this._options.denyUrls || [], clientOptions.blacklistUrls || [], clientOptions.denyUrls || []),\n ignoreErrors: __spread(this._options.ignoreErrors || [], clientOptions.ignoreErrors || [], DEFAULT_IGNORE_ERRORS),\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true\n };\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._getPossibleEventMessages = function (event) {\n if (event.message) {\n return [event.message];\n }\n\n if (event.exception) {\n try {\n var _a = event.exception.values && event.exception.values[0] || {},\n _b = _a.type,\n type = _b === void 0 ? '' : _b,\n _c = _a.value,\n value = _c === void 0 ? '' : _c;\n\n return [\"\" + value, type + \": \" + value];\n } catch (oO) {\n logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n\n return [];\n };\n /** JSDoc */\n\n\n InboundFilters.prototype._getEventFilterUrl = function (event) {\n try {\n if (event.stacktrace) {\n var frames_1 = event.stacktrace.frames;\n return frames_1 && frames_1[frames_1.length - 1].filename || null;\n }\n\n if (event.exception) {\n var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return frames_2 && frames_2[frames_2.length - 1].filename || null;\n }\n\n return null;\n } catch (oO) {\n logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n\n\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}();\n\nexport { InboundFilters };","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\n\nvar TryCatch =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = __assign({\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true\n }, options);\n }\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n\n\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n if (this._options.eventTarget) {\n var eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n };\n /** JSDoc */\n\n\n TryCatch.prototype._wrapTimeFunction = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: {\n function: getFunctionName(original)\n },\n handled: true,\n type: 'instrument'\n }\n });\n return original.apply(this, args);\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n TryCatch.prototype._wrapRAF = function (original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(this, wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original)\n },\n handled: true,\n type: 'instrument'\n }\n }));\n };\n };\n /** JSDoc */\n\n\n TryCatch.prototype._wrapEventTarget = function (target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n var proto = global[target] && global[target].prototype; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target\n },\n handled: true,\n type: 'instrument'\n }\n });\n }\n } catch (err) {// can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(this, eventName, // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target\n },\n handled: true,\n type: 'instrument'\n }\n }), options);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n var _a;\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n\n\n var wrappedEventHandler = fn;\n\n try {\n var originalEventHandler = (_a = wrappedEventHandler) === null || _a === void 0 ? void 0 : _a.__sentry_wrapped__;\n\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {// ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n };\n /** JSDoc */\n\n\n TryCatch.prototype._wrapXHR = function (originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // eslint-disable-next-line @typescript-eslint/no-this-alias\n\n\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original)\n },\n handled: true,\n type: 'instrument'\n }\n }; // If Instrument integration has been called before TryCatch, get the name of original function\n\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n } // Otherwise wrap directly\n\n\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n };\n /**\n * @inheritDoc\n */\n\n\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}();\n\nexport { TryCatch };","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\n\nvar GlobalHandlers =\n/** @class */\nfunction () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /** JSDoc */\n\n this._onErrorHandlerInstalled = false;\n /** JSDoc */\n\n this._onUnhandledRejectionHandlerInstalled = false;\n this._options = __assign({\n onerror: true,\n onunhandledrejection: true\n }, options);\n }\n /**\n * @inheritDoc\n */\n\n\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n\n this._installGlobalOnUnhandledRejectionHandler();\n }\n };\n /** JSDoc */\n\n\n GlobalHandlers.prototype._installGlobalOnErrorHandler = function () {\n var _this = this;\n\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function callback(data) {\n var error = data.error;\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n var client = currentHub.getClient();\n var event = isPrimitive(error) ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column) : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false\n }), data.url, data.line, data.column);\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror'\n });\n currentHub.captureEvent(event, {\n originalException: error\n });\n },\n type: 'error'\n });\n this._onErrorHandlerInstalled = true;\n };\n /** JSDoc */\n\n\n GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () {\n var _this = this;\n\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: function callback(e) {\n var error = e; // dig the object of the rejection out of known event types\n\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n } // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {// no-empty\n }\n\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n var client = currentHub.getClient();\n var event = isPrimitive(error) ? _this._eventFromRejectionWithPrimitive(error) : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true\n });\n event.level = Severity.Error;\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection'\n });\n currentHub.captureEvent(event, {\n originalException: error\n });\n return;\n },\n type: 'unhandledrejection'\n });\n this._onUnhandledRejectionHandlerInstalled = true;\n };\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; // If 'message' is ErrorEvent, get real message from inside\n\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name;\n\n if (isString(message)) {\n var groups = message.match(ERROR_TYPES_RE);\n\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n\n var event = {\n exception: {\n values: [{\n type: name || 'Error',\n value: message\n }]\n }\n };\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n };\n /**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\n\n\n GlobalHandlers.prototype._eventFromRejectionWithPrimitive = function (reason) {\n return {\n exception: {\n values: [{\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason)\n }]\n }\n };\n };\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno\n });\n }\n\n return event;\n };\n /**\n * @inheritDoc\n */\n\n\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}();\n\nexport { GlobalHandlers };","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\n\nvar LinkedErrors =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) {\n options = {};\n }\n /**\n * @inheritDoc\n */\n\n\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n\n\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n\n if (self) {\n return self._handler(event, hint);\n }\n\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n\n\n LinkedErrors.prototype._handler = function (event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n\n var linkedErrors = this._walkErrorTree(hint.originalException, this._key);\n\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n };\n /**\n * @inheritDoc\n */\n\n\n LinkedErrors.prototype._walkErrorTree = function (error, key, stack) {\n if (stack === void 0) {\n stack = [];\n }\n\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n\n var stacktrace = computeStackTrace(error[key]);\n var exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, __spread([exception], stack));\n };\n /**\n * @inheritDoc\n */\n\n\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}();\n\nexport { LinkedErrors };","import { __assign } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\n\nvar UserAgent =\n/** @class */\nfunction () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n\n\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var _a, _b, _c;\n\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n } // grab as much info as exists and add it to the event\n\n\n var url = ((_a = event.request) === null || _a === void 0 ? void 0 : _a.url) || ((_b = global.location) === null || _b === void 0 ? void 0 : _b.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n\n var headers = __assign(__assign(__assign({}, (_c = event.request) === null || _c === void 0 ? void 0 : _c.headers), referrer && {\n Referer: referrer\n }), userAgent && {\n 'User-Agent': userAgent\n });\n\n var request = __assign(__assign({}, url && {\n url: url\n }), {\n headers: headers\n });\n\n return __assign(__assign({}, event), {\n request: request\n });\n }\n\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n\n\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}();\n\nexport { UserAgent };","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [new CoreIntegrations.InboundFilters(), new CoreIntegrations.FunctionToString(), new TryCatch(), new Breadcrumbs(), new GlobalHandlers(), new LinkedErrors(), new UserAgent()];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\n\nexport function init(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n\n if (options.release === undefined) {\n var window_1 = getGlobalObject(); // This supports the variable that sentry-webpack-plugin injects\n\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = false;\n }\n\n initAndBind(BrowserClient, options);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\n\nexport function showReportDialog(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n\n var client = getCurrentHub().getClient();\n\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\n\nexport function forceLoad() {// Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\n\nexport function onLoad(callback) {\n callback();\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n\n if (client) {\n return client.flush(timeout);\n }\n\n return SyncPromise.reject(false);\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n\n if (client) {\n return client.close(timeout);\n }\n\n return SyncPromise.reject(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\n\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var hub = getCurrentHub();\n /**\n * We should be using `Promise.all([windowLoaded, firstContentfulPaint])` here,\n * but, as always, it's not available in the IE10-11. Thanks IE.\n */\n\n var loadResolved = document.readyState === 'complete';\n var fcpResolved = false;\n\n var possiblyEndSession = function possiblyEndSession() {\n if (fcpResolved && loadResolved) {\n hub.endSession();\n }\n };\n\n var resolveWindowLoaded = function resolveWindowLoaded() {\n loadResolved = true;\n possiblyEndSession();\n window.removeEventListener('load', resolveWindowLoaded);\n };\n\n hub.startSession();\n\n if (!loadResolved) {\n // IE doesn't support `{ once: true }` for event listeners, so we have to manually\n // attach and then detach it once completed.\n window.addEventListener('load', resolveWindowLoaded);\n }\n\n try {\n var po = new PerformanceObserver(function (entryList, po) {\n entryList.getEntries().forEach(function (entry) {\n if (entry.name === 'first-contentful-paint' && entry.startTime < firstHiddenTime_1) {\n po.disconnect();\n fcpResolved = true;\n possiblyEndSession();\n }\n });\n }); // There's no need to even attach this listener if `PerformanceObserver` constructor will fail,\n // so we do it below here.\n\n var firstHiddenTime_1 = document.visibilityState === 'hidden' ? 0 : Infinity;\n document.addEventListener('visibilitychange', function (event) {\n firstHiddenTime_1 = Math.min(firstHiddenTime_1, event.timeStamp);\n }, {\n once: true\n });\n po.observe({\n type: 'paint',\n buffered: true\n });\n } catch (e) {\n fcpResolved = true;\n possiblyEndSession();\n }\n}","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\n\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n logger.enable();\n }\n\n var hub = getCurrentHub();\n var client = new clientClass(options);\n hub.bindClient(client);\n}","import { __assign } from \"tslib\";\nexport * from './exports';\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\nvar windowIntegrations = {}; // This block is needed to add compatibility with the integrations packages when used with a CDN\n\nvar _window = getGlobalObject();\n\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n\nvar INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);\n\nexport { INTEGRATIONS as Integrations, Transports };","import { __assign, __extends, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { getCurrentHub } from '@sentry/browser';\nimport { timestampWithMs } from '@sentry/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nexport var UNKNOWN_COMPONENT = 'unknown';\nvar TRACING_GETTER = {\n id: 'Tracing'\n};\nvar globalTracingIntegration = null;\n/** @deprecated remove when @sentry/apm no longer used */\n\nvar getTracingIntegration = function getTracingIntegration() {\n if (globalTracingIntegration) {\n return globalTracingIntegration;\n }\n\n globalTracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n return globalTracingIntegration;\n};\n/**\n * pushActivity creates an new react activity.\n * Is a no-op if Tracing integration is not valid\n * @param name displayName of component that started activity\n * @deprecated remove when @sentry/apm no longer used\n */\n\n\nfunction pushActivity(name, op) {\n if (globalTracingIntegration === null) {\n return null;\n }\n\n return globalTracingIntegration.constructor.pushActivity(name, {\n description: \"<\" + name + \">\",\n op: \"react.\" + op\n });\n}\n/**\n * popActivity removes a React activity.\n * Is a no-op if Tracing integration is not valid.\n * @param activity id of activity that is being popped\n * @deprecated remove when @sentry/apm no longer used\n */\n\n\nfunction popActivity(activity) {\n if (activity === null || globalTracingIntegration === null) {\n return;\n }\n\n globalTracingIntegration.constructor.popActivity(activity);\n}\n/**\n * Obtain a span given an activity id.\n * Is a no-op if Tracing integration is not valid.\n * @param activity activity id associated with obtained span\n * @deprecated remove when @sentry/apm no longer used\n */\n\n\nfunction getActivitySpan(activity) {\n if (activity === null || globalTracingIntegration === null) {\n return undefined;\n }\n\n return globalTracingIntegration.constructor.getActivitySpan(activity);\n}\n/**\n * The Profiler component leverages Sentry's Tracing integration to generate\n * spans based on component lifecycles.\n */\n\n\nvar Profiler =\n/** @class */\nfunction (_super) {\n __extends(Profiler, _super);\n\n function Profiler(props) {\n var _this = _super.call(this, props) || this; // The activity representing how long it takes to mount a component.\n\n\n _this._mountActivity = null; // The span of the mount activity\n\n _this._mountSpan = undefined;\n var _a = _this.props,\n name = _a.name,\n _b = _a.disabled,\n disabled = _b === void 0 ? false : _b;\n\n if (disabled) {\n return _this;\n } // If they are using @sentry/apm, we need to push/pop activities\n // eslint-disable-next-line deprecation/deprecation\n\n\n if (getTracingIntegration()) {\n // eslint-disable-next-line deprecation/deprecation\n _this._mountActivity = pushActivity(name, 'mount');\n } else {\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n _this._mountSpan = activeTransaction.startChild({\n description: \"<\" + name + \">\",\n op: 'react.mount'\n });\n }\n }\n\n return _this;\n } // If a component mounted, we can finish the mount activity.\n\n\n Profiler.prototype.componentDidMount = function () {\n if (this._mountSpan) {\n this._mountSpan.finish();\n } else {\n // eslint-disable-next-line deprecation/deprecation\n this._mountSpan = getActivitySpan(this._mountActivity); // eslint-disable-next-line deprecation/deprecation\n\n popActivity(this._mountActivity);\n this._mountActivity = null;\n }\n };\n\n Profiler.prototype.componentDidUpdate = function (_a) {\n var _this = this;\n\n var updateProps = _a.updateProps,\n _b = _a.includeUpdates,\n includeUpdates = _b === void 0 ? true : _b; // Only generate an update span if hasUpdateSpan is true, if there is a valid mountSpan,\n // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.\n // We are just trying to give baseline clues for further investigation.\n\n if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {\n // See what props haved changed between the previous props, and the current props. This is\n // set as data on the span. We just store the prop keys as the values could be potenially very large.\n var changedProps = Object.keys(updateProps).filter(function (k) {\n return updateProps[k] !== _this.props.updateProps[k];\n });\n\n if (changedProps.length > 0) {\n // The update span is a point in time span with 0 duration, just signifying that the component\n // has been updated.\n var now = timestampWithMs();\n\n this._mountSpan.startChild({\n data: {\n changedProps: changedProps\n },\n description: \"<\" + this.props.name + \">\",\n endTimestamp: now,\n op: \"react.update\",\n startTimestamp: now\n });\n }\n }\n }; // If a component is unmounted, we can say it is no longer on the screen.\n // This means we can finish the span representing the component render.\n\n\n Profiler.prototype.componentWillUnmount = function () {\n var _a = this.props,\n name = _a.name,\n _b = _a.includeRender,\n includeRender = _b === void 0 ? true : _b;\n\n if (this._mountSpan && includeRender) {\n // If we were able to obtain the spanId of the mount activity, we should set the\n // next activity as a child to the component mount activity.\n this._mountSpan.startChild({\n description: \"<\" + name + \">\",\n endTimestamp: timestampWithMs(),\n op: \"react.render\",\n startTimestamp: this._mountSpan.endTimestamp\n });\n }\n };\n\n Profiler.prototype.render = function () {\n return this.props.children;\n }; // eslint-disable-next-line @typescript-eslint/member-ordering\n\n\n Profiler.defaultProps = {\n disabled: false,\n includeRender: true,\n includeUpdates: true\n };\n return Profiler;\n}(React.Component);\n/**\n * withProfiler is a higher order component that wraps a\n * component in a {@link Profiler} component. It is recommended that\n * the higher order component be used over the regular {@link Profiler} component.\n *\n * @param WrappedComponent component that is wrapped by Profiler\n * @param options the {@link ProfilerProps} you can pass into the Profiler\n */\n\n\nfunction withProfiler(WrappedComponent, // We do not want to have `updateProps` given in options, it is instead filled through the HOC.\noptions) {\n var componentDisplayName = options && options.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n\n var Wrapped = function Wrapped(props) {\n return React.createElement(Profiler, __assign({}, options, {\n name: componentDisplayName,\n updateProps: props\n }), React.createElement(WrappedComponent, __assign({}, props)));\n };\n\n Wrapped.displayName = \"profiler(\" + componentDisplayName + \")\"; // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n/**\n *\n * `useProfiler` is a React hook that profiles a React component.\n *\n * Requires React 16.8 or above.\n * @param name displayName of component being profiled\n */\n\n\nfunction useProfiler(name, options) {\n if (options === void 0) {\n options = {\n disabled: false,\n hasRenderSpan: true\n };\n }\n\n var _a = __read(React.useState(function () {\n if (options && options.disabled) {\n return undefined;\n }\n\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n return activeTransaction.startChild({\n description: \"<\" + name + \">\",\n op: 'react.mount'\n });\n }\n\n return undefined;\n }), 1),\n mountSpan = _a[0];\n\n React.useEffect(function () {\n if (mountSpan) {\n mountSpan.finish();\n }\n\n return function () {\n if (mountSpan && options.hasRenderSpan) {\n mountSpan.startChild({\n description: \"<\" + name + \">\",\n endTimestamp: timestampWithMs(),\n op: \"react.render\",\n startTimestamp: mountSpan.endTimestamp\n });\n }\n }; // We only want this to run once.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n\nexport { withProfiler, Profiler, useProfiler };\n/** Grabs active transaction off scope */\n\nexport function getActiveTransaction(hub) {\n if (hub === void 0) {\n hub = getCurrentHub();\n }\n\n if (hub) {\n var scope = hub.getScope();\n\n if (scope) {\n return scope.getTransaction();\n }\n }\n\n return undefined;\n}","import { __assign, __extends } from \"tslib\";\nimport { captureException, showReportDialog, withScope } from '@sentry/browser';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nexport var UNKNOWN_COMPONENT = 'unknown';\nvar INITIAL_STATE = {\n componentStack: null,\n error: null,\n eventId: null\n};\n/**\n * A ErrorBoundary component that logs errors to Sentry.\n * Requires React >= 16\n */\n\nvar ErrorBoundary =\n/** @class */\nfunction (_super) {\n __extends(ErrorBoundary, _super);\n\n function ErrorBoundary() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.state = INITIAL_STATE;\n\n _this.resetErrorBoundary = function () {\n var onReset = _this.props.onReset;\n var _a = _this.state,\n error = _a.error,\n componentStack = _a.componentStack,\n eventId = _a.eventId;\n\n if (onReset) {\n onReset(error, componentStack, eventId);\n }\n\n _this.setState(INITIAL_STATE);\n };\n\n return _this;\n }\n\n ErrorBoundary.prototype.componentDidCatch = function (error, _a) {\n var _this = this;\n\n var componentStack = _a.componentStack;\n var _b = this.props,\n beforeCapture = _b.beforeCapture,\n onError = _b.onError,\n showDialog = _b.showDialog,\n dialogOptions = _b.dialogOptions;\n withScope(function (scope) {\n if (beforeCapture) {\n beforeCapture(scope, error, componentStack);\n }\n\n var eventId = captureException(error, {\n contexts: {\n react: {\n componentStack: componentStack\n }\n }\n });\n\n if (onError) {\n onError(error, componentStack, eventId);\n }\n\n if (showDialog) {\n showReportDialog(__assign(__assign({}, dialogOptions), {\n eventId: eventId\n }));\n } // componentDidCatch is used over getDerivedStateFromError\n // so that componentStack is accessible through state.\n\n\n _this.setState({\n error: error,\n componentStack: componentStack,\n eventId: eventId\n });\n });\n };\n\n ErrorBoundary.prototype.componentDidMount = function () {\n var onMount = this.props.onMount;\n\n if (onMount) {\n onMount();\n }\n };\n\n ErrorBoundary.prototype.componentWillUnmount = function () {\n var _a = this.state,\n error = _a.error,\n componentStack = _a.componentStack,\n eventId = _a.eventId;\n var onUnmount = this.props.onUnmount;\n\n if (onUnmount) {\n onUnmount(error, componentStack, eventId);\n }\n };\n\n ErrorBoundary.prototype.render = function () {\n var fallback = this.props.fallback;\n var _a = this.state,\n error = _a.error,\n componentStack = _a.componentStack,\n eventId = _a.eventId;\n\n if (error) {\n if (React.isValidElement(fallback)) {\n return fallback;\n }\n\n if (typeof fallback === 'function') {\n return fallback({\n error: error,\n componentStack: componentStack,\n resetError: this.resetErrorBoundary,\n eventId: eventId\n });\n } // Fail gracefully if no fallback provided\n\n\n return null;\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction withErrorBoundary(WrappedComponent, errorBoundaryOptions) {\n var componentDisplayName = WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n\n var Wrapped = function Wrapped(props) {\n return React.createElement(ErrorBoundary, __assign({}, errorBoundaryOptions), React.createElement(WrappedComponent, __assign({}, props)));\n };\n\n Wrapped.displayName = \"errorBoundary(\" + componentDisplayName + \")\"; // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n\nexport { ErrorBoundary, withErrorBoundary };","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { configureScope } from '@sentry/minimal';\nvar ACTION_BREADCRUMB_CATEGORY = 'redux.action';\nvar ACTION_BREADCRUMB_TYPE = 'info';\nvar STATE_CONTEXT_KEY = 'redux.state';\nvar defaultOptions = {\n actionTransformer: function actionTransformer(action) {\n return action;\n },\n stateTransformer: function stateTransformer(state) {\n return state || null;\n }\n};\n/**\n * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.\n *\n * @param enhancerOptions Options to pass to the enhancer\n */\n\nfunction createReduxEnhancer(enhancerOptions) {\n // Note: We return an any type as to not have type conflicts.\n var options = __assign(__assign({}, defaultOptions), enhancerOptions);\n\n return function (next) {\n return function (reducer, initialState) {\n var sentryReducer = function sentryReducer(state, action) {\n var newState = reducer(state, action);\n configureScope(function (scope) {\n /* Action breadcrumbs */\n var transformedAction = options.actionTransformer(action);\n\n if (typeof transformedAction !== 'undefined' && transformedAction !== null) {\n scope.addBreadcrumb({\n category: ACTION_BREADCRUMB_CATEGORY,\n data: transformedAction,\n type: ACTION_BREADCRUMB_TYPE\n });\n }\n /* Set latest state to scope */\n\n\n var transformedState = options.stateTransformer(newState);\n\n if (typeof transformedState !== 'undefined' && transformedState !== null) {\n scope.setContext(STATE_CONTEXT_KEY, transformedState);\n } else {\n scope.setContext(STATE_CONTEXT_KEY, null);\n }\n /* Allow user to configure scope with latest state */\n // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var configureScopeWithState = options.configureScopeWithState;\n\n if (typeof configureScopeWithState === 'function') {\n configureScopeWithState(scope, newState);\n }\n });\n return newState;\n };\n\n return next(sentryReducer, initialState);\n };\n };\n}\n\nexport { createReduxEnhancer };","import { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/**\n * Creates routing instrumentation for React Router v3\n * Works for React Router >= 3.2.0 and < 4.0.0\n *\n * @param history object from the `history` library\n * @param routes a list of all routes, should be\n * @param match `Router.match` utility\n */\n\nexport function reactRouterV3Instrumentation(history, routes, match) {\n return function (startTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) {\n startTransactionOnPageLoad = true;\n }\n\n if (startTransactionOnLocationChange === void 0) {\n startTransactionOnLocationChange = true;\n }\n\n var activeTransaction;\n var prevName; // Have to use global.location because history.location might not be defined.\n\n if (startTransactionOnPageLoad && global && global.location) {\n normalizeTransactionName(routes, global.location, match, function (localName) {\n prevName = localName;\n activeTransaction = startTransaction({\n name: prevName,\n op: 'pageload',\n tags: {\n 'routing.instrumentation': 'react-router-v3'\n }\n });\n });\n }\n\n if (startTransactionOnLocationChange && history.listen) {\n history.listen(function (location) {\n if (location.action === 'PUSH' || location.action === 'POP') {\n if (activeTransaction) {\n activeTransaction.finish();\n }\n\n var tags_1 = {\n 'routing.instrumentation': 'react-router-v3'\n };\n\n if (prevName) {\n tags_1.from = prevName;\n }\n\n normalizeTransactionName(routes, location, match, function (localName) {\n prevName = localName;\n activeTransaction = startTransaction({\n name: prevName,\n op: 'navigation',\n tags: tags_1\n });\n });\n }\n });\n }\n };\n}\n/**\n * Normalize transaction names using `Router.match`\n */\n\nfunction normalizeTransactionName(appRoutes, location, match, callback) {\n var name = location.pathname;\n match({\n location: location,\n routes: appRoutes\n }, function (error, _redirectLocation, renderProps) {\n if (error || !renderProps) {\n return callback(name);\n }\n\n var routePath = getRouteStringFromRoutes(renderProps.routes || []);\n\n if (routePath.length === 0 || routePath === '/*') {\n return callback(name);\n }\n\n name = routePath;\n return callback(name);\n });\n}\n/**\n * Generate route name from array of routes\n */\n\n\nfunction getRouteStringFromRoutes(routes) {\n if (!Array.isArray(routes) || routes.length === 0) {\n return '';\n }\n\n var routesWithPaths = routes.filter(function (route) {\n return !!route.path;\n });\n var index = -1;\n\n for (var x = routesWithPaths.length - 1; x >= 0; x--) {\n var route = routesWithPaths[x];\n\n if (route.path && route.path.startsWith('/')) {\n index = x;\n break;\n }\n }\n\n return routesWithPaths.slice(index).filter(function (_a) {\n var path = _a.path;\n return !!path;\n }).map(function (_a) {\n var path = _a.path;\n return path;\n }).join('');\n}","import { __assign } from \"tslib\";\nimport { getGlobalObject } from '@sentry/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nvar global = getGlobalObject();\nvar activeTransaction;\nexport function reactRouterV4Instrumentation(history, routes, matchPath) {\n return reactRouterInstrumentation(history, 'react-router-v4', routes, matchPath);\n}\nexport function reactRouterV5Instrumentation(history, routes, matchPath) {\n return reactRouterInstrumentation(history, 'react-router-v5', routes, matchPath);\n}\n\nfunction reactRouterInstrumentation(history, name, allRoutes, matchPath) {\n if (allRoutes === void 0) {\n allRoutes = [];\n }\n\n function getName(pathname) {\n if (allRoutes === [] || !matchPath) {\n return pathname;\n }\n\n var branches = matchRoutes(allRoutes, pathname, matchPath); // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n for (var x = 0; x < branches.length; x++) {\n if (branches[x].match.isExact) {\n return branches[x].match.path;\n }\n }\n\n return pathname;\n }\n\n return function (startTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) {\n startTransactionOnPageLoad = true;\n }\n\n if (startTransactionOnLocationChange === void 0) {\n startTransactionOnLocationChange = true;\n }\n\n if (startTransactionOnPageLoad && global && global.location) {\n activeTransaction = startTransaction({\n name: getName(global.location.pathname),\n op: 'pageload',\n tags: {\n 'routing.instrumentation': name\n }\n });\n }\n\n if (startTransactionOnLocationChange && history.listen) {\n history.listen(function (location, action) {\n if (action && (action === 'PUSH' || action === 'POP')) {\n if (activeTransaction) {\n activeTransaction.finish();\n }\n\n var tags = {\n 'routing.instrumentation': name\n };\n activeTransaction = startTransaction({\n name: getName(location.pathname),\n op: 'navigation',\n tags: tags\n });\n }\n });\n }\n };\n}\n/**\n * Matches a set of routes to a pathname\n * Based on implementation from\n */\n\n\nfunction matchRoutes(routes, pathname, matchPath, branch) {\n if (branch === void 0) {\n branch = [];\n }\n\n routes.some(function (route) {\n var match = route.path ? matchPath(pathname, route) : branch.length ? branch[branch.length - 1].match // use parent match\n : computeRootMatch(pathname); // use default \"root\" match\n\n if (match) {\n branch.push({\n route: route,\n match: match\n });\n\n if (route.routes) {\n matchRoutes(route.routes, pathname, matchPath, branch);\n }\n }\n\n return !!match;\n });\n return branch;\n}\n\nfunction computeRootMatch(pathname) {\n return {\n path: '/',\n url: '/',\n params: {},\n isExact: pathname === '/'\n };\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nexport function withSentryRouting(Route) {\n var componentDisplayName = Route.displayName || Route.name;\n\n var WrappedRoute = function WrappedRoute(props) {\n if (activeTransaction && props && props.computedMatch && props.computedMatch.isExact) {\n activeTransaction.setName(props.computedMatch.path);\n }\n\n return React.createElement(Route, __assign({}, props));\n };\n\n WrappedRoute.displayName = \"sentryRoute(\" + componentDisplayName + \")\";\n hoistNonReactStatics(WrappedRoute, Route);\n return WrappedRoute;\n}","import { __assign, __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, SDK_VERSION } from '@sentry/browser';\n/**\n * A global side effect that makes sure Sentry events that user\n * `@sentry/react` will correctly have Sentry events associated\n * with it.\n */\n\nfunction createReactEventProcessor() {\n if (addGlobalEventProcessor) {\n addGlobalEventProcessor(function (event) {\n event.sdk = __assign(__assign({}, event.sdk), {\n name: 'sentry.javascript.react',\n packages: __spread(event.sdk && event.sdk.packages || [], [{\n name: 'npm:@sentry/react',\n version: SDK_VERSION\n }]),\n version: SDK_VERSION\n });\n return event;\n });\n }\n}\n\nexport * from '@sentry/browser';\nexport { Profiler, withProfiler, useProfiler } from './profiler';\nexport { ErrorBoundary, withErrorBoundary } from './errorboundary';\nexport { createReduxEnhancer } from './redux';\nexport { reactRouterV3Instrumentation } from './reactrouterv3';\nexport { reactRouterV4Instrumentation, reactRouterV5Instrumentation, withSentryRouting } from './reactrouter';\ncreateReactEventProcessor();","/** The status of an Span. */\n// eslint-disable-next-line import/export\nexport var SpanStatus;\n\n(function (SpanStatus) {\n /** The operation completed successfully. */\n SpanStatus[\"Ok\"] = \"ok\";\n /** Deadline expired before operation could complete. */\n\n SpanStatus[\"DeadlineExceeded\"] = \"deadline_exceeded\";\n /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */\n\n SpanStatus[\"Unauthenticated\"] = \"unauthenticated\";\n /** 403 Forbidden */\n\n SpanStatus[\"PermissionDenied\"] = \"permission_denied\";\n /** 404 Not Found. Some requested entity (file or directory) was not found. */\n\n SpanStatus[\"NotFound\"] = \"not_found\";\n /** 429 Too Many Requests */\n\n SpanStatus[\"ResourceExhausted\"] = \"resource_exhausted\";\n /** Client specified an invalid argument. 4xx. */\n\n SpanStatus[\"InvalidArgument\"] = \"invalid_argument\";\n /** 501 Not Implemented */\n\n SpanStatus[\"Unimplemented\"] = \"unimplemented\";\n /** 503 Service Unavailable */\n\n SpanStatus[\"Unavailable\"] = \"unavailable\";\n /** Other/generic 5xx. */\n\n SpanStatus[\"InternalError\"] = \"internal_error\";\n /** Unknown. Any non-standard HTTP status code. */\n\n SpanStatus[\"UnknownError\"] = \"unknown_error\";\n /** The operation was cancelled (typically by the user). */\n\n SpanStatus[\"Cancelled\"] = \"cancelled\";\n /** Already exists (409) */\n\n SpanStatus[\"AlreadyExists\"] = \"already_exists\";\n /** Operation was rejected because the system is not in a state required for the operation's */\n\n SpanStatus[\"FailedPrecondition\"] = \"failed_precondition\";\n /** The operation was aborted, typically due to a concurrency issue. */\n\n SpanStatus[\"Aborted\"] = \"aborted\";\n /** Operation was attempted past the valid range. */\n\n SpanStatus[\"OutOfRange\"] = \"out_of_range\";\n /** Unrecoverable data loss or corruption */\n\n SpanStatus[\"DataLoss\"] = \"data_loss\";\n})(SpanStatus || (SpanStatus = {})); // eslint-disable-next-line @typescript-eslint/no-namespace, import/export\n\n\n(function (SpanStatus) {\n /**\n * Converts a HTTP status code into a {@link SpanStatus}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or {@link SpanStatus.UnknownError}.\n */\n function fromHttpCode(httpStatus) {\n if (httpStatus < 400) {\n return SpanStatus.Ok;\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return SpanStatus.Unauthenticated;\n\n case 403:\n return SpanStatus.PermissionDenied;\n\n case 404:\n return SpanStatus.NotFound;\n\n case 409:\n return SpanStatus.AlreadyExists;\n\n case 413:\n return SpanStatus.FailedPrecondition;\n\n case 429:\n return SpanStatus.ResourceExhausted;\n\n default:\n return SpanStatus.InvalidArgument;\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return SpanStatus.Unimplemented;\n\n case 503:\n return SpanStatus.Unavailable;\n\n case 504:\n return SpanStatus.DeadlineExceeded;\n\n default:\n return SpanStatus.InternalError;\n }\n }\n\n return SpanStatus.UnknownError;\n }\n\n SpanStatus.fromHttpCode = fromHttpCode;\n})(SpanStatus || (SpanStatus = {}));","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","\"use strict\";\n\nexports.registerServiceWorker = function () {\n return true;\n}; // only cache relevant resources for this page\n\n\nvar whiteListLinkRels = /^(stylesheet|preload)$/;\nvar prefetchedPathnames = [];\n\nexports.onServiceWorkerActive = function (_ref) {\n var getResourceURLsForPathname = _ref.getResourceURLsForPathname,\n serviceWorker = _ref.serviceWorker;\n\n // if the SW has just updated then clear the path dependencies and don't cache\n // stuff, since we're on the old revision until we navigate to another page\n if (window.___swUpdated) {\n serviceWorker.active.postMessage({\n gatsbyApi: \"clearPathResources\"\n });\n return;\n } // grab nodes from head of document\n\n\n var nodes = document.querySelectorAll(\"\\n head > script[src],\\n head > link[href],\\n head > style[data-href]\\n \"); // get all resource URLs\n\n var headerResources = [].slice.call(nodes) // don't include preconnect/prefetch/prerender resources\n .filter(function (node) {\n return node.tagName !== \"LINK\" || whiteListLinkRels.test(node.getAttribute(\"rel\"));\n }).map(function (node) {\n return node.src || node.href || node.getAttribute(\"data-href\");\n }); // Loop over prefetched pages and add their resources to an array,\n // plus specify which resources are required for those paths.\n\n var prefetchedResources = [];\n prefetchedPathnames.forEach(function (path) {\n var resources = getResourceURLsForPathname(path);\n prefetchedResources.push.apply(prefetchedResources, resources);\n serviceWorker.active.postMessage({\n gatsbyApi: \"setPathResources\",\n path: path,\n resources: resources\n });\n }); // Loop over all resources and fetch the page component + JSON data\n // to add it to the SW cache.\n\n var resources = [].concat(headerResources, prefetchedResources);\n resources.forEach(function (resource) {\n // Create a prefetch link for each resource, so Workbox runtime-caches them\n var link = document.createElement(\"link\");\n link.rel = \"prefetch\";\n link.href = resource;\n link.onload = link.remove;\n link.onerror = link.remove;\n document.head.appendChild(link);\n });\n};\n\nfunction setPathResources(path, getResourceURLsForPathname) {\n // do nothing if the SW has just updated, since we still have old pages in\n // memory which we don't want to be whitelisted\n if (window.___swUpdated) return;\n\n if (\"serviceWorker\" in navigator) {\n var _navigator = navigator,\n serviceWorker = _navigator.serviceWorker;\n\n if (serviceWorker.controller === null) {\n // if SW is not installed, we need to record any prefetches\n // that happen so we can then add them to SW cache once installed\n prefetchedPathnames.push(path);\n } else {\n var resources = getResourceURLsForPathname(path);\n serviceWorker.controller.postMessage({\n gatsbyApi: \"setPathResources\",\n path: path,\n resources: resources\n });\n }\n }\n}\n\nexports.onRouteUpdate = function (_ref2) {\n var location = _ref2.location,\n getResourceURLsForPathname = _ref2.getResourceURLsForPathname;\n var pathname = location.pathname.replace(__BASE_PATH__, \"\");\n setPathResources(pathname, getResourceURLsForPathname);\n\n if (\"serviceWorker\" in navigator && navigator.serviceWorker.controller !== null) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: \"enableOfflineShell\"\n });\n }\n};\n\nexports.onPostPrefetchPathname = function (_ref3) {\n var pathname = _ref3.pathname,\n getResourceURLsForPathname = _ref3.getResourceURLsForPathname;\n setPathResources(pathname, getResourceURLsForPathname);\n};","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithoutHoles from \"@babel/runtime/helpers/esm/arrayWithoutHoles\";\nimport iterableToArray from \"@babel/runtime/helpers/esm/iterableToArray\";\nimport unsupportedIterableToArray from \"@babel/runtime/helpers/esm/unsupportedIterableToArray\";\nimport nonIterableSpread from \"@babel/runtime/helpers/esm/nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","import arrayLikeToArray from \"@babel/runtime/helpers/esm/arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","\"use strict\";\n\nvar offsetY = 0;\n\nvar getTargetOffset = function getTargetOffset(hash) {\n var id = window.decodeURI(hash.replace(\"#\", \"\"));\n\n if (id !== \"\") {\n var element = document.getElementById(id);\n\n if (element) {\n var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;\n var clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\n var computedStyles = window.getComputedStyle(element);\n var scrollMarginTop = computedStyles.getPropertyValue(\"scroll-margin-top\") || computedStyles.getPropertyValue(\"scroll-snap-margin-top\") || \"0px\";\n return element.getBoundingClientRect().top + scrollTop - parseInt(scrollMarginTop, 10) - clientTop - offsetY;\n }\n }\n\n return null;\n};\n\nexports.onInitialClientRender = function (_, pluginOptions) {\n if (pluginOptions.offsetY) {\n offsetY = pluginOptions.offsetY;\n }\n\n requestAnimationFrame(function () {\n var offset = getTargetOffset(window.location.hash);\n\n if (offset !== null) {\n window.scrollTo(0, offset);\n }\n });\n};\n\nexports.shouldUpdateScroll = function (_ref) {\n var location = _ref.routerProps.location;\n var offset = getTargetOffset(location.hash);\n return offset !== null ? [0, offset] : true;\n};","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
    ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = _default;\nexports.routeThroughBrowserOrApp = exports.hashShouldBeFollowed = exports.pathIsNotHandledByApp = exports.urlsAreOnSameOrigin = exports.authorIsForcingNavigation = exports.anchorsTargetIsEquivalentToSelf = exports.findClosestAnchor = exports.navigationWasHandledElsewhere = exports.slashedPathname = exports.userIsForcingNavigation = void 0;\n\nvar _escapeStringRegexp = _interopRequireDefault(require(\"escape-string-regexp\"));\n\nvar _gatsby = require(\"gatsby\");\n\nvar userIsForcingNavigation = function userIsForcingNavigation(event) {\n return event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n}; // IE does not include leading slash in anchor.pathname\n\n\nexports.userIsForcingNavigation = userIsForcingNavigation;\n\nvar slashedPathname = function slashedPathname(pathname) {\n return pathname[0] === \"/\" ? pathname : \"/\" + pathname;\n};\n\nexports.slashedPathname = slashedPathname;\n\nvar navigationWasHandledElsewhere = function navigationWasHandledElsewhere(event) {\n return event.defaultPrevented;\n};\n\nexports.navigationWasHandledElsewhere = navigationWasHandledElsewhere;\n\nvar findClosestAnchor = function findClosestAnchor(node) {\n for (; node.parentNode; node = node.parentNode) {\n if (node.nodeName.toLowerCase() === \"a\") {\n return node;\n }\n }\n\n return null;\n};\n\nexports.findClosestAnchor = findClosestAnchor;\n\nvar anchorsTargetIsEquivalentToSelf = function anchorsTargetIsEquivalentToSelf(anchor) {\n return (\n /* If target attribute is not present it's treated as _self */\n anchor.hasAttribute(\"target\") === false ||\n /**\n * The browser defaults to _self, but, not all browsers set\n * a.target to the string value `_self` by default\n */\n\n /**\n * Assumption: some browsers use null/undefined for default\n * attribute values\n */\n anchor.target == null ||\n /**\n * Some browsers use the empty string to mean _self, check\n * for actual `_self`\n */\n [\"_self\", \"\"].includes(anchor.target) ||\n /**\n * As per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n anchor.target === \"_parent\" && (!anchor.ownerDocument.defaultView.parent || // Assumption: This can be falsey\n anchor.ownerDocument.defaultView.parent === anchor.ownerDocument.defaultView) || anchor.target === \"_top\" && (!anchor.ownerDocument.defaultView.top || // Assumption: This can be falsey\n anchor.ownerDocument.defaultView.top === anchor.ownerDocument.defaultView)\n );\n};\n\nexports.anchorsTargetIsEquivalentToSelf = anchorsTargetIsEquivalentToSelf;\n\nvar authorIsForcingNavigation = function authorIsForcingNavigation(anchor) {\n return (\n /**\n * HTML5 attribute that informs the browser to handle the\n * href as a downloadable file; let the browser handle it\n */\n anchor.hasAttribute(\"download\") === true ||\n /**\n * Let the browser handle anything that doesn't look like a\n * target=\"_self\" anchor\n */\n anchorsTargetIsEquivalentToSelf(anchor) === false\n );\n}; // https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\n\n\nexports.authorIsForcingNavigation = authorIsForcingNavigation;\n\nvar urlsAreOnSameOrigin = function urlsAreOnSameOrigin(origin, destination) {\n return origin.protocol === destination.protocol &&\n /* a.host includes both hostname and port in the expected format host:port */\n origin.host === destination.host;\n};\n\nexports.urlsAreOnSameOrigin = urlsAreOnSameOrigin;\n\nvar pathIsNotHandledByApp = function pathIsNotHandledByApp(destination, pathStartRegEx) {\n var pathFileExtensionRegEx = /^.*\\.((?!htm)[a-z0-9]{1,5})$/i;\n return (\n /**\n * For when pathPrefix is used in an app and there happens to be a link\n * pointing to the same domain but outside of the app's pathPrefix. For\n * example, a Gatsby app lives at https://example.com/myapp/, with the\n * pathPrefix set to `/myapp`. When adding an absolute link to the same\n * domain but outside of the /myapp path, for example, `` the plugin won't catch it and\n * will navigate to an external link instead of doing a pushState resulting\n * in `https://example.com/myapp/https://example.com/not-my-app`\n */\n pathStartRegEx.test(slashedPathname(destination.pathname)) === false ||\n /**\n * Don't catch links pointed at what look like file extensions (other than\n * .htm/html extensions).\n */\n destination.pathname.search(pathFileExtensionRegEx) !== -1\n );\n};\n\nexports.pathIsNotHandledByApp = pathIsNotHandledByApp;\n\nvar hashShouldBeFollowed = function hashShouldBeFollowed(origin, destination) {\n return destination.hash !== \"\" && (\n /**\n * Dynamically created anchor links (href=\"#my-anchor\") do not always\n * have pathname on IE\n */\n destination.pathname === \"\" ||\n /* Don't catch links pointed to the same page but with a hash. */\n destination.pathname === origin.pathname);\n};\n\nexports.hashShouldBeFollowed = hashShouldBeFollowed;\n\nvar routeThroughBrowserOrApp = function routeThroughBrowserOrApp(hrefHandler, pluginOptions) {\n return function (event) {\n if (window.___failedResources) return true;\n if (userIsForcingNavigation(event)) return true;\n if (navigationWasHandledElsewhere(event)) return true;\n var clickedAnchor = findClosestAnchor(event.target);\n if (clickedAnchor == null) return true;\n if (authorIsForcingNavigation(clickedAnchor)) return true; // IE clears the host value if the anchor href changed after creation, e.g.\n // in React. Creating a new anchor element to ensure host value is present\n\n var destination = document.createElement(\"a\"); // https://html.spec.whatwg.org/multipage/links.html#concept-hyperlink-url-set\n // If clickedAnchor has no href attribute like `example`, the href getter returns empty string.\n\n if (clickedAnchor.href !== \"\") {\n destination.href = clickedAnchor.href;\n }\n\n if (\"SVGAnimatedString\" in window && clickedAnchor.href instanceof SVGAnimatedString) {\n destination.href = clickedAnchor.href.animVal;\n } // In IE, the default port is included in the anchor host but excluded from\n // the location host. This affects the ability to directly compare\n // location host to anchor host. For example: http://example.com would\n // have a location.host of 'example.com' and an destination.host of\n // 'example.com:80' Creating anchor from the location.href to normalize the\n // host value.\n\n\n var origin = document.createElement(\"a\");\n origin.href = window.location.href;\n if (urlsAreOnSameOrigin(origin, destination) === false) return true; // Regex to test pathname against pathPrefix\n\n var pathStartRegEx = new RegExp(\"^\" + (0, _escapeStringRegexp.default)((0, _gatsby.withPrefix)(\"/\")));\n if (pathIsNotHandledByApp(destination, pathStartRegEx)) return true;\n if (hashShouldBeFollowed(origin, destination)) return true;\n\n if (pluginOptions.excludePattern) {\n var excludeRegex = new RegExp(pluginOptions.excludePattern);\n\n if (excludeRegex.test(destination.pathname)) {\n return true;\n }\n }\n\n event.preventDefault(); // See issue #8907: destination.pathname already includes pathPrefix added\n // by gatsby-transformer-remark but gatsby-link.navigate needs href without\n\n var destinationPathname = slashedPathname(destination.pathname).replace(pathStartRegEx, \"/\");\n hrefHandler(\"\" + destinationPathname + destination.search + destination.hash);\n return false;\n };\n};\n\nexports.routeThroughBrowserOrApp = routeThroughBrowserOrApp;\n\nfunction _default(root, pluginOptions, cb) {\n var clickHandler = routeThroughBrowserOrApp(cb, pluginOptions);\n root.addEventListener(\"click\", clickHandler);\n return function () {\n return root.removeEventListener(\"click\", clickHandler);\n };\n}","\"use strict\";\n\nexports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {\n stripQueryString: false\n };\n }\n\n var domElem = document.querySelector(\"link[rel='canonical']\");\n var existingValue = domElem.getAttribute(\"href\");\n var baseProtocol = domElem.getAttribute(\"data-baseProtocol\");\n var baseHost = domElem.getAttribute(\"data-baseHost\");\n\n if (existingValue && baseProtocol && baseHost) {\n var value = baseProtocol + \"//\" + baseHost + location.pathname;\n var _pluginOptions = pluginOptions,\n stripQueryString = _pluginOptions.stripQueryString;\n\n if (!stripQueryString) {\n value += location.search;\n }\n\n value += location.hash;\n domElem.setAttribute(\"href\", \"\" + value);\n }\n};","export var TransactionSamplingMethod;\n\n(function (TransactionSamplingMethod) {\n TransactionSamplingMethod[\"Explicit\"] = \"explicitly_set\";\n TransactionSamplingMethod[\"Sampler\"] = \"client_sampler\";\n TransactionSamplingMethod[\"Rate\"] = \"client_rate\";\n TransactionSamplingMethod[\"Inheritance\"] = \"inheritance\";\n})(TransactionSamplingMethod || (TransactionSamplingMethod = {}));","import { getGlobalObject } from './misc';\nimport { dynamicRequire, isNodeEnv } from './node';\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\n\nvar dateTimestampSource = {\n nowSeconds: function nowSeconds() {\n return Date.now() / 1000;\n }\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\n\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n\n if (!performance || !performance.now) {\n return undefined;\n } // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n\n\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function now() {\n return performance.now();\n },\n timeOrigin: timeOrigin\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\n\n\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\n\n\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined ? dateTimestampSource : {\n nowSeconds: function nowSeconds() {\n return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000;\n }\n};\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\n\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\n\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); // Re-exported with an old name for backwards-compatibility.\n\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\n\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\n\nexport var browserPerformanceTimeOrigin = function () {\n var performance = getGlobalObject().performance;\n\n if (!performance) {\n return undefined;\n }\n\n if (performance.timeOrigin) {\n return performance.timeOrigin;\n } // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n\n\n return performance.timing && performance.timing.navigationStart || Date.now();\n}();","import { SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\n\nvar Session =\n/** @class */\nfunction () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.timestamp = Date.now();\n this.started = Date.now();\n this.duration = 0;\n this.status = SessionStatus.Ok;\n\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n\n\n Session.prototype.update = function (context) {\n if (context === void 0) {\n context = {};\n }\n\n if (context.user) {\n if (context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || Date.now();\n\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n\n if (context.did) {\n this.did = \"\" + context.did;\n }\n\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n\n if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n this.duration = this.timestamp - this.started;\n }\n\n if (context.release) {\n this.release = context.release;\n }\n\n if (context.environment) {\n this.environment = context.environment;\n }\n\n if (context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n\n if (context.userAgent) {\n this.userAgent = context.userAgent;\n }\n\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n\n\n Session.prototype.close = function (status) {\n if (status) {\n this.update({\n status: status\n });\n } else if (this.status === SessionStatus.Ok) {\n this.update({\n status: SessionStatus.Exited\n });\n } else {\n this.update();\n }\n };\n /** JSDoc */\n\n\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: true,\n started: new Date(this.started).toISOString(),\n timestamp: new Date(this.timestamp).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent\n })\n });\n };\n\n return Session;\n}();\n\nexport { Session };","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\nimport { Scope } from './scope';\nimport { Session } from './session';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\n\nexport var API_VERSION = 3;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\n\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\n\nvar MAX_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\n\nvar Hub =\n/** @class */\nfunction () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) {\n scope = new Scope();\n }\n\n if (_version === void 0) {\n _version = API_VERSION;\n }\n\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n\n this._stack = [{}];\n this.getStackTop().scope = scope;\n this.bindClient(client);\n }\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n\n\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n\n\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n\n\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = this._lastEventId = uuid4();\n var finalHint = hint; // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n\n if (!hint) {\n var syntheticException = void 0;\n\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception;\n }\n\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException\n };\n }\n\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = this._lastEventId = uuid4();\n var finalHint = hint; // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n\n if (!hint) {\n var syntheticException = void 0;\n\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception;\n }\n\n finalHint = {\n originalException: message,\n syntheticException: syntheticException\n };\n }\n\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = this._lastEventId = uuid4();\n\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (!scope || !client) return; // eslint-disable-next-line @typescript-eslint/unbound-method\n\n var _b = client.getOptions && client.getOptions() || {},\n _c = _b.beforeBreadcrumb,\n beforeBreadcrumb = _c === void 0 ? null : _c,\n _d = _b.maxBreadcrumbs,\n maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n\n if (maxBreadcrumbs <= 0) return;\n var timestamp = dateTimestampInSeconds();\n\n var mergedBreadcrumb = __assign({\n timestamp: timestamp\n }, breadcrumb);\n\n var finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(function () {\n return beforeBreadcrumb(mergedBreadcrumb, hint);\n }) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope) scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope) scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope) scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope) scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope) scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client) return null;\n\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startSession = function (context) {\n // End existing session if there's one\n this.endSession();\n\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n var _b = client && client.getOptions() || {},\n release = _b.release,\n environment = _b.environment;\n\n var session = new Session(__assign(__assign({\n release: release,\n environment: environment\n }, scope && {\n user: scope.getUser()\n }), context));\n\n if (scope) {\n scope.setSession(session);\n }\n\n return session;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.endSession = function () {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (!scope) return;\n var session = scope.getSession && scope.getSession();\n\n if (session) {\n session.close();\n\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n\n scope.setSession();\n }\n };\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype._invokeClient = function (method) {\n var _a;\n\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var _b = this.getStackTop(),\n scope = _b.scope,\n client = _b.client;\n\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\n }\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n\n logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n\n return Hub;\n}();\n\nexport { Hub };\n/** Returns the global shim registry. */\n\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\n\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\n\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier(); // If there's no hub, or its an old API, assign a new one\n\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n } // Prefer domains over global if they are there (applicable only to Node environment)\n\n\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n } // Return hub that lives on a global object\n\n\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n *\n * @returns The domain, or undefined if there is no active domain\n */\n\nexport function getActiveDomain() {\n var sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\n\nfunction getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain(); // If there's no active domain, just return global hub\n\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n } // If there's no hub on current domain, or it's an old API, assign a new one\n\n\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n } // Return hub that lives on a domain\n\n\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\n\n\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\n\n\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\n\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport function __createBinding(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}\nexport function __exportStar(m, exports) {\n for (var p in m) {\n if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n }\n result.default = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n return privateMap.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n privateMap.set(receiver, value);\n return value;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n return str.replace(matchOperatorsRe, '\\\\$&');\n};","var defaultFunctionName = '';\n/**\n * Safely extract function name from itself\n */\n\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar b = \"function\" === typeof Symbol && Symbol.for,\n c = b ? Symbol.for(\"react.element\") : 60103,\n d = b ? Symbol.for(\"react.portal\") : 60106,\n e = b ? Symbol.for(\"react.fragment\") : 60107,\n f = b ? Symbol.for(\"react.strict_mode\") : 60108,\n g = b ? Symbol.for(\"react.profiler\") : 60114,\n h = b ? Symbol.for(\"react.provider\") : 60109,\n k = b ? Symbol.for(\"react.context\") : 60110,\n l = b ? Symbol.for(\"react.async_mode\") : 60111,\n m = b ? Symbol.for(\"react.concurrent_mode\") : 60111,\n n = b ? Symbol.for(\"react.forward_ref\") : 60112,\n p = b ? Symbol.for(\"react.suspense\") : 60113,\n q = b ? Symbol.for(\"react.suspense_list\") : 60120,\n r = b ? Symbol.for(\"react.memo\") : 60115,\n t = b ? Symbol.for(\"react.lazy\") : 60116,\n v = b ? Symbol.for(\"react.block\") : 60121,\n w = b ? Symbol.for(\"react.fundamental\") : 60117,\n x = b ? Symbol.for(\"react.responder\") : 60118,\n y = b ? Symbol.for(\"react.scope\") : 60119;\n\nfunction z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n\n default:\n return u;\n }\n\n }\n\n case d:\n return u;\n }\n }\n}\n\nfunction A(a) {\n return z(a) === m;\n}\n\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\n\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\n\nexports.isConcurrentMode = A;\n\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\n\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\n\nexports.isElement = function (a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n};\n\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\n\nexports.isFragment = function (a) {\n return z(a) === e;\n};\n\nexports.isLazy = function (a) {\n return z(a) === t;\n};\n\nexports.isMemo = function (a) {\n return z(a) === r;\n};\n\nexports.isPortal = function (a) {\n return z(a) === d;\n};\n\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\n\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\n\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\n\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\n\nexports.typeOf = z;","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !DESCRIPTORS) return true;\n var O = { length: -1 };\n\n if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n else O[1] = 1;\n\n method.call(O, argument0, argument1);\n });\n};\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","import { isString } from './is';\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nexport function htmlTreeAsString(elem) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0; // eslint-disable-next-line no-plusplus\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem); // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n\n if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN) {\n break;\n }\n\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nfunction _htmlElementAsString(el) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n if (elem.id) {\n out.push(\"#\" + elem.id);\n } // eslint-disable-next-line prefer-const\n\n\n className = elem.className;\n\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n\n return out.join('');\n}","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo =\n/** @class */\nfunction () {\n function Memo() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n\n\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n\n this._inner.add(obj);\n\n return false;\n } // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n\n if (value === obj) {\n return true;\n }\n }\n\n this._inner.push(obj);\n\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n\n\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n\n break;\n }\n }\n }\n };\n\n return Memo;\n}();\n\nexport { Memo };","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n","/**\n * Session Status\n */\nexport var SessionStatus;\n\n(function (SessionStatus) {\n /** JSDoc */\n SessionStatus[\"Ok\"] = \"ok\";\n /** JSDoc */\n\n SessionStatus[\"Exited\"] = \"exited\";\n /** JSDoc */\n\n SessionStatus[\"Crashed\"] = \"crashed\";\n /** JSDoc */\n\n SessionStatus[\"Abnormal\"] = \"abnormal\";\n})(SessionStatus || (SessionStatus = {}));","import { dynamicRequire, fill, logger } from '@sentry/utils';\n/** Tracing integration for node-mysql package */\n\nvar Mysql =\n/** @class */\nfunction () {\n function Mysql() {\n /**\n * @inheritDoc\n */\n this.name = Mysql.id;\n }\n /**\n * @inheritDoc\n */\n\n\n Mysql.prototype.setupOnce = function (_, getCurrentHub) {\n var connection;\n\n try {\n // Unfortunatelly mysql is using some custom loading system and `Connection` is not exported directly.\n connection = dynamicRequire(module, 'mysql/lib/Connection.js');\n } catch (e) {\n logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n } // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n\n\n fill(connection.prototype, 'query', function (orig) {\n return function (options, values, callback) {\n var _a, _b;\n\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof options === 'string' ? options : options.sql,\n op: \"db\"\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result, fields);\n });\n }\n\n return orig.call(this, options, values, callback);\n };\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Mysql.id = 'Mysql';\n return Mysql;\n}();\n\nexport { Mysql };"],"sourceRoot":""}