tokentracker-cli 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{AchievementBadge-uuDGO9Mq.js → AchievementBadge-BYxdWhS1.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-BCTVT7Jo.js → AchievementsPage-Bv9o7Aj8.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-B6fJSJSr.js → AchievementsSection-DE5bZGxg.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-FjUN__9G.js → BadgeDetailModal-CgZaSVTp.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-B-KqY_Wr.js → BotAnimated-CwhPfUBI.js} +1 -1
- package/dashboard/dist/assets/{Card-DS8T8piP.js → Card-Y7qaxMuE.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-_0UjsFPu.js → CloudCheckoutPage-DVl7jk6b.js} +1 -1
- package/dashboard/dist/assets/{CloudPage-BstgVBaV.js → CloudPage-BnIvpHGH.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-DtVsYZgc.js → CommandPalette-CzMv2Zxn.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-DTpEJqV3.js → CommunityStatsModal-D8sOZqUc.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-Lfdh2vr7.js → ConfirmModal-Bun5xKMm.js} +1 -1
- package/dashboard/dist/assets/{Controls-DpwQ7pkq.js → Controls-ltfnvkFW.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-C3Xu6_3t.js +1 -0
- package/dashboard/dist/assets/{DateRangePopover-CrWgrzT2.js → DateRangePopover-e3gJYqFJ.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-DbK5KWJS.js → DevicePage-JgT16dEp.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-Dd2B_o03.js → DialogClose-DeWert7h.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-Ca6W3nCT.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-3JQBVha3.js → DialogTitle-BfK_yOeR.js} +1 -1
- package/dashboard/dist/assets/{ElectricLogo-LYAqG8pG.js → ElectricLogo-Bbev0Y8Q.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DhDvUor7.js → FadeIn-fypYWLDK.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-9f1XmgYC.js → HeaderGithubStar-Cnil2Lbo.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-BXhHAkP7.js → HoverTooltip-Bw_8tru-.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-ChPdDeMl.js → IpCheckPage-CHnhUgA2.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DnJ7Y9zw.js → LandingPage-Bq4iQS6S.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardPage-BF9isLzu.js → LeaderboardPage-D42lUdw-.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-BM4JKgkC.js → LeaderboardProBadge-eTKceT90.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-DfZABOpN.js → LeaderboardProfileModal-D-3tRrOR.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-BaZ38iT5.js → LeaderboardProfilePage-DkRCJoiA.js} +1 -1
- package/dashboard/dist/assets/LimitsPage-dUXjP3_1.js +6 -0
- package/dashboard/dist/assets/{LocalOnlyNotice-DvhlYoqQ.js → LocalOnlyNotice-CtpjB6Z2.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-g_Gbnzhs.js → LoginCard-zrRd8o54.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-DkJrI6b7.js → LoginModal-DNl5Rt1e.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CqCKSo0n.js → LoginPage-BuB707vV.js} +1 -1
- package/dashboard/dist/assets/{PetPage-DbF7ROsj.js → PetPage-BpDriXkp.js} +2 -2
- package/dashboard/dist/assets/{PopoverPopup-4WuH41ZT.js → PopoverPopup-rQNSs8R6.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-6j0A2KD9.js → ProviderIcon-CumyO371.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-DBd-iwuM.js → ResetPasswordPage-ecUHfJAk.js} +1 -1
- package/dashboard/dist/assets/{Select-BBEpLeiG.js → Select-YVEqEhk4.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-Cn_U_rrO.js → SelectItemText-D1NBc4uc.js} +1 -1
- package/dashboard/dist/assets/{SelfHostPage-2WZc6Rml.js → SelfHostPage-8nAin68c.js} +1 -1
- package/dashboard/dist/assets/ServiceStatusPage-D1zxuzOg.js +1 -0
- package/dashboard/dist/assets/SessionsPage-B6ksEER_.js +3 -0
- package/dashboard/dist/assets/{SettingsPage-rXNr96i-.js → SettingsPage-COqP8ZbJ.js} +3 -3
- package/dashboard/dist/assets/{SkillsPage-CudTvbZL.js → SkillsPage-DCX7xTj0.js} +1 -1
- package/dashboard/dist/assets/TokenGalaxy-D4n7AR-R.js +4431 -0
- package/dashboard/dist/assets/{TooltipPopup-CsLKXhWC.js → TooltipPopup-DvSoB_eS.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-8onUTbkk.js → TrendMonitor-5GVzh0Ye.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CcwE0lz8.js → WidgetsPage-BIc4MBiu.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-Cj9LLYqP.js → WrappedPage-BpQk4g0o.js} +1 -1
- package/dashboard/dist/assets/__vite-browser-external-B_rKFTTN.js +45 -0
- package/dashboard/dist/assets/__vite-browser-external-CMBWGkOq.css +1 -0
- package/dashboard/dist/assets/{agent-logos-ChBA1nAH.js → agent-logos-DVg-sTm4.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-Bb5mfoPc.js → arrow-left-Ch6Q7eU5.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-D1Ti2XUI.js → arrow-right-B2B9GvSI.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-B_CjA_y8.js → arrow-up-right-DwNO_uSb.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-DdfrAqie.js → calendar-days---NjJlBi.js} +1 -1
- package/dashboard/dist/assets/{check-29zGw1MK.js → check-D3mhgRrW.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-DAzlFX7g.js → chevron-down-x-b39Zto.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-C2SeCjFM.js → cloud-checkout-CycWyTsg.js} +1 -1
- package/dashboard/dist/assets/{composite-DIf735Hq.js → composite-CnA1qtYn.js} +1 -1
- package/dashboard/dist/assets/{copy-BOuOM0HQ.js → copy-JRnRMgdX.js} +1 -1
- package/dashboard/dist/assets/{download-50tQRpGe.js → download-CRLqGD62.js} +1 -1
- package/dashboard/dist/assets/{external-link-BhlQClVe.js → external-link-BrmaWV_t.js} +1 -1
- package/dashboard/dist/assets/{flame-CeGfA-0L.js → flame-meQ5-vRD.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-Cq7YiAkJ.js → format-tokens-D8mIJGz1.js} +1 -1
- package/dashboard/dist/assets/{gift-Do-UFhiT.js → gift-Cd0FPXgO.js} +1 -1
- package/dashboard/dist/assets/{icons-C6EZ_HmP.js → icons-D-PTKw7b.js} +1 -1
- package/dashboard/dist/assets/{index-BWhbBAd9.js → index-CMV9UKNf.js} +1 -1
- package/dashboard/dist/assets/{index-c0crpe9Z.js → index-C_6gEM83.js} +1 -1
- package/dashboard/dist/assets/{index-BFrbVqsm.js → index-DCIZaLNC.js} +1 -1
- package/dashboard/dist/assets/index-HLYcwmPD.js +502 -0
- package/dashboard/dist/assets/{info-B4MXmsNE.js → info-e0tP9P3D.js} +1 -1
- package/dashboard/dist/assets/{link-2-DuWCslzl.js → link-2-DZ2TQhER.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-C2I3NZAO.js → loader-circle-DjflRntu.js} +1 -1
- package/dashboard/dist/assets/{local-usage-transfer-BQasvsUF.js → local-usage-transfer-XTZLA3XH.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-DbeNS6FT.js → modifiers.esm-BpEQ8-Gt.js} +1 -1
- package/dashboard/dist/assets/module-BbVsRaE2.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-C6Y4ktsc.js → monitor-smartphone-VVBcI30G.js} +1 -1
- package/dashboard/dist/assets/{play-CwgcDJC2.js → play-DN4Sb3W_.js} +1 -1
- package/dashboard/dist/assets/{plus-B796wsUO.js → plus-Cz_k7arH.js} +1 -1
- package/dashboard/dist/assets/{provider-display-Cw26RFDm.js → provider-display-S1mSaydF.js} +1 -1
- package/dashboard/dist/assets/{react-d7Bk1-_K.js → react-MQBcjrn_.js} +1 -1
- package/dashboard/dist/assets/{safePolygon-CDE0dNv_.js → safePolygon-InKxYcXd.js} +1 -1
- package/dashboard/dist/assets/{search-DtKvsdRs.js → search-C-N0RDi0.js} +1 -1
- package/dashboard/dist/assets/{server-gAURHUyz.js → server-CZkn8vIZ.js} +1 -1
- package/dashboard/dist/assets/{shield-check-DFVdDTwh.js → shield-check-DPrGFouZ.js} +1 -1
- package/dashboard/dist/assets/{skills-api-2rdPUrJI.js → skills-api-wMwM-GpF.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-DFlfwnJr.js → sortable.esm-CUPP1ihT.js} +1 -1
- package/dashboard/dist/assets/{store-BKPCk_de.js → store-BpVdRYnQ.js} +1 -1
- package/dashboard/dist/assets/{terminal-BtWFakvS.js → terminal-C-7TFeKg.js} +1 -1
- package/dashboard/dist/assets/{trash-bpr9zTAM.js → trash-Be8cd4HD.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-DMnGgLne.js → use-community-stats-cG0WrB4Y.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-BSBlJJHe.js → use-latest-request-guard-C91enyPD.js} +1 -1
- package/dashboard/dist/assets/use-limits-display-prefs-DdwoLqPD.js +1 -0
- package/dashboard/dist/assets/{use-native-settings-OthqiF6g.js → use-native-settings-BR-NiMKh.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-DpAtr0R-.js → use-ordered-list-oqV724BP.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DW5YHBBI.js +1 -0
- package/dashboard/dist/assets/{use-transform-BRz9dz_2.js → use-transform-BsNSgVD6.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CwmhudAX.js → use-usage-limits-Dk8LcMU-.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CAA-tQ27.js → useCurrency-FxerRfd2.js} +1 -1
- package/dashboard/dist/assets/{usePositioner-Cj2DPmwM.js → usePositioner-D2J-rSfX.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-Bf5-f7Hx.js → useTokenFormat-CaI2nl2C.js} +1 -1
- package/dashboard/dist/assets/{zap-B8Fg6PaC.js → zap-D3C37XAj.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/ip-check.html +2 -2
- package/dashboard/dist/leaderboard.html +2 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +4 -4
- package/src/commands/serve.js +3 -2
- package/src/lib/accept-encoding.js +59 -0
- package/src/lib/cursor-config.js +18 -2
- package/src/lib/deepseek-limits.js +280 -0
- package/src/lib/grok-limits.js +40 -1
- package/src/lib/local-api.js +229 -31
- package/src/lib/opencode-status.js +88 -0
- package/src/lib/pricing/curated-overrides.json +14 -0
- package/src/lib/pricing/index.js +182 -79
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/provider-api-key-store.js +2 -0
- package/src/lib/provider-status.js +17 -5
- package/src/lib/rollout.js +13 -4
- package/src/lib/session-analytics.js +194 -29
- package/src/lib/static-server.js +74 -2
- package/src/lib/usage-limits.js +801 -26
- package/src/lib/workbuddy-limits.js +106 -14
- package/dashboard/dist/assets/DashboardPage-DUFWejkE.js +0 -1
- package/dashboard/dist/assets/DialogDescription-CLy0arbt.js +0 -1
- package/dashboard/dist/assets/LimitsPage-C7LbG3LX.js +0 -6
- package/dashboard/dist/assets/ServiceStatusPage-B-g4MDl0.js +0 -1
- package/dashboard/dist/assets/SessionsPage-CWS0iQ1L.js +0 -3
- package/dashboard/dist/assets/TokenGalaxy-BRKrbTsJ.js +0 -4426
- package/dashboard/dist/assets/__vite-browser-external-07djSGmy.js +0 -45
- package/dashboard/dist/assets/__vite-browser-external-BDldtsD2.css +0 -1
- package/dashboard/dist/assets/index-D9kwYWLX.js +0 -502
- package/dashboard/dist/assets/module-ZyVsxBG_.js +0 -3
- package/dashboard/dist/assets/use-limits-display-prefs-eYlvnUKn.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-DF0grwHs.js +0 -1
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
import{r as _e}from"./__vite-browser-external-07djSGmy.js";const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Zt="11.9.0";function it(){return cn($),$}function cn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Zt,t[Zt]=t[Zt]||{}}function kr(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Zt]=r[Zt]||{};return o[e]||(o[e]=t())}const di=["debug","info","warn","error","log","assert","trace"],Cy="Sentry Logger ",Is={};function ft(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(Is);r.forEach(o=>{const s=Is[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Ay(){$c().enabled=!0}function Ny(){$c().enabled=!1}function ip(){return $c().enabled}function xy(...e){Dc("log",...e)}function My(...e){Dc("warn",...e)}function Oy(...e){Dc("error",...e)}function Dc(e,...t){A&&ip()&&ft(()=>{$.console[e](`${Cy}[${e}]:`,...t)})}function $c(){return A?kr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:Ay,disable:Ny,isEnabled:ip,log:xy,warn:My,error:Oy},ap=50,St="?",ol=/\(error: (.*)\)/,sl=/captureMessage|captureException/;function cp(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(`
|
|
2
|
-
`);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=ol.test(c)?c.replace(ol,"$1"):c;if(!u.includes("Error: ")){for(const l of t){const f=l(u);if(f){s.push(f);break}}if(s.length>=ap+o)break}}return Ly(s.slice(o))}}function Py(e){return Array.isArray(e)?cp(...e):e}function Ly(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(qo(t).function||"")&&t.pop(),t.reverse(),sl.test(qo(t).function||"")&&(t.pop(),sl.test(qo(t).function||"")&&t.pop()),t.slice(0,ap).map(n=>({...n,filename:n.filename||qo(t).filename,function:n.function||St}))}function qo(e){return e[e.length-1]||{}}const Qi="<anonymous>";function Ot(e){try{return!e||typeof e!="function"?Qi:e.name||Qi}catch{return Qi}}function Wa(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Dy(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Vr={},il={};function un(e,t){return Vr[e]=Vr[e]||[],Vr[e].push(t),()=>{const n=Vr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function ln(e,t){if(!il[e]){il[e]=!0;try{t()}catch(n){A&&_.error(`Error while instrumenting ${e}`,n)}}}function et(e,t){const n=e&&Vr[e];if(n)for(const r of n)try{r(t)}catch(o){A&&_.error(`Error while triggering instrumentation handler.
|
|
3
|
-
Type: ${e}
|
|
4
|
-
Name: ${Ot(r)}
|
|
5
|
-
Error:`,o)}}let Zi=null;function up(e){const t="error";un(t,e),ln(t,$y)}function $y(){Zi=$.onerror,$.onerror=function(e,t,n,r,o){return et("error",{column:r,error:o,line:n,msg:e,url:t}),Zi?Zi.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let ea=null;function lp(e){const t="unhandledrejection";un(t,e),ln(t,Fy)}function Fy(){ea=$.onunhandledrejection,$.onunhandledrejection=function(e){return et("unhandledrejection",e),ea?ea.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const dp=Object.prototype.toString;function ke(e){switch(dp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return hi(e,Error)}}function Rr(e,t){return dp.call(e)===`[object ${t}]`}function fp(e){return Rr(e,"ErrorEvent")}function al(e){return Rr(e,"DOMError")}function By(e){return Rr(e,"DOMException")}function tt(e){return Rr(e,"String")}function fi(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function lt(e){return e===null||fi(e)||typeof e!="object"&&typeof e!="function"}function Ue(e){return Rr(e,"Object")}function nt(e){return typeof e=="object"&&e!==null}function pi(e){return typeof Event<"u"&&hi(e,Event)}function pp(e){return Rr(e,"RegExp")}function Pt(e){return!!(e?.then&&typeof e.then=="function")}function hi(e,t){try{return e instanceof t}catch{return!1}}function Fc(e){return typeof Request<"u"&&hi(e,Request)}function Oe(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&hp(o,r);try{e[t]=o}catch{A&&_.log(`Failed to replace method "${t}" in object`,e)}}function pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{A&&_.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function hp(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pe(e,"__sentry_original__",t)}catch{}}function Bc(e){return e.__sentry_original__}function mp(e){if(ke(e))return{message:e.message,name:e.name,stack:e.stack,...cl(e)};if(pi(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...cl(e)}}return e}function cl(e){return nt(e)?Object.fromEntries(Object.entries(e)):{}}function Uy(e){const t=Object.keys(mp(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let qn;function lr(e){if(qn!==void 0)return qn?qn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=$;return t in n&&typeof n[t]=="function"?(qn=n[t],qn(e)):(qn=null,e())}function en(){return lr(()=>Math.random())}function Ut(){return lr(()=>Date.now())}const gp=Symbol.for("sentry.skipNormalization"),_p=Symbol.for("sentry.overrideNormalizationDepth");function Hy(e){pe(e,gp,!0)}function Wy(e,t){pe(e,_p,t)}function zy(e){return!!e[gp]}function jy(e){const t=e[_p];return typeof t=="number"?t:void 0}let za;function yp(e){za=e}function Te(e,t=100,n=1/0){try{return ja("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Sp(e,t=3,n=100*1024){const r=Te(e,t);return Vy(r)>n?Sp(e,t-1,n):r}function ja(e,t,n=1/0,r=1/0,o=Ky()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=bp(e,t);if(!a.startsWith("[object "))return a;if(zy(t))return t;const c=jy(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const h=l.toJSON();return ja("",h,u-1,r,o)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const p=mp(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){f[h]="[MaxProperties ~]";break}const m=p[h];f[h]=ja(h,m,u-1,r,o),d++}return i(t),f}function bp(e,t){try{if(za){const r=za(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${Ot(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${qy(t)}]`}catch(n){return`**non-serializable** (${n})`}}function qy(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Gy(e){return~-encodeURI(e).split(/%..|./).length}function Vy(e){return Gy(JSON.stringify(e))}function Ky(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function so(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ta(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function qa(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];lt(o)?n.push(String(o)):o instanceof Error?n.push(o.message?`${o.name}: ${o.message}`:o.name):n.push(bp(void 0,o))}return n.join(t)}function Xr(e,t,n=!1){return tt(e)?pp(t)?t.test(e):tt(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ht(e,t=[],n=!1){for(const r of t)if(Xr(e,r,n))return!0;return!1}function Yy(){const e=$;return e.crypto||e.msCrypto}let na;function Xy(){return en()*16}function Pe(e=Yy()){try{if(e?.randomUUID)return lr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return na||(na="10000000100040008000"+1e11),na.replace(/[018]/g,t=>(t^(Xy()&15)>>t/4).toString(16))}function vp(e){return e.exception?.values?.[0]}function wn(e){const{message:t,event_id:n}=e;if(t)return t;const r=vp(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ga(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function At(e,t){const n=vp(e);n&&Ep(n,t)}function Jy(e,t){const n=e.exception?.values,r=n?.find(o=>o.mechanism?.exception_id===0)??n?.[0];r&&Ep(r,t)}function Ep(e,t){const n={type:"generic",handled:!0},r=e.mechanism;e.mechanism={...n,...r,...t},t&&"data"in t&&(e.mechanism.data={...r?.data,...t.data})}function Qy(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>ta(i,0));const s=Math.min(r-1,o);t.context_line=ta(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ta(i,0))}function ul(e){if(Zy(e))return!0;try{pe(e,"__sentry_captured__",!0)}catch{}return!1}function Zy(e){try{return e.__sentry_captured__}catch{}}const Uc=1e3,eS=1e3,tS=100;function Hn(){return Ut()/Uc}let vn=[];function nS(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return e?.now&&(vn=[{from:0,origin:Ut()-lr(()=>e.now())}]),Hn;let t=e.timeOrigin;vn=[{from:0,origin:t}];let n=!0,r=0;return()=>lr(()=>{const o=e.now(),s=Date.now();return Math.abs(t+o-s)>eS&&(t=s-o,n?vn=[{from:0,origin:t}]:(vn.push({from:r,origin:t}),vn.length>tS&&vn.splice(1,1))),n=!1,r=o,(t+o)/Uc})}function ll(){const{performance:e}=$;return e?.now?lr(()=>e.now()):void 0}let dl,ra=!1;function Le(e,t=e){const n=Cr(t);return n==null?void 0:(n+e)/Uc}function fe(){return(dl??(dl=nS()))()}function Cr(e=0){ra||(ra=!0,Promise.resolve().then(()=>{ra=!1}),fe());let t;for(const n of vn){if(t&&n.from>e)break;t=n}return t?.origin}function rS(e){const t=fe(),n={sid:Pe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sS(n)};return e&&dr(n,e),n}function dr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fe(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Pe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oS(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),dr(e,n)}function sS(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function _o(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=_o(r[o],t[o],n-1));return r}function dn(){return Pe()}function rn(){return Pe().substring(16)}const iS=100;class bt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},pe(this,"refs",{}),this._propagationContext={traceId:dn(),sampleRand:en()}}clone(){const t=new bt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,t.refs={...this.refs},t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&dr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof bt?n.getScopeData():Ue(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:l=[],propagationContext:f,conversationId:d}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),f&&(this._propagationContext=f),d&&(this._conversationId=d),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:iS;if(r<=0)return this;const o={timestamp:Hn(),...t,message:t.message?so(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=_o(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Pe();if(!this._client)return A&&_.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||Pe();if(!this._client)return A&&_.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=t.event_id||n?.event_id||Pe();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(A&&_.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function aS(){return kr("defaultCurrentScope",()=>new bt)}function cS(){return kr("defaultIsolationScope",()=>new bt)}const ks="__SENTRY_SUPPRESS_TRACING__",fl=e=>e instanceof Promise&&!e[wp],wp=Symbol("chained PromiseLike"),Tp=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return fl(r)&&fl(e)?r:uS(e,r)},uS=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[wp]:!0}),t};class lS{constructor(t,n){let r;t?r=t:r=new bt;let o;n?o=n:o=new bt,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Pt(r)?Tp(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function fr(){const e=it(),t=cn(e);return t.stack=t.stack||new lS(aS(),cS())}function Ip(e){return fr().withScope(e)}function dS(e,t){const n=fr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function pl(e){return fr().withScope(()=>e(fr().getIsolationScope()))}function fS(){return{suppressTracing:pS,withIsolationScope:pl,withScope:Ip,withSetScope:dS,withSetIsolationScope:(e,t)=>pl(t),getCurrentScope:()=>fr().getScope(),getIsolationScope:()=>fr().getIsolationScope()}}function pS(e){return Ip(t=>{t.setSDKProcessingMetadata({[ks]:!0});const n=e();return t.setSDKProcessingMetadata({[ks]:void 0}),n})}function fn(e){const t=cn(e);return t.acs?t.acs:fS()}function hS(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function mS(e,t){const{value:n,unit:r}=hS(e)?e:{value:e,unit:void 0},o=gS(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function pr(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=mS(o,t);s&&(n[r]=s)}return n}function hl(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const o=r.value;Array.isArray(o)?t+=ml(o[0])*o.length:lt(o)?t+=ml(o):t+=100}return t}function ml(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function gS(e){if(Array.isArray(e))return{value:e,type:"array"};const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function kp(){return cn(it()).externalPropagationContextProvider?.()}function _S(){return cn(it()).externalPropagationContextProvider!==void 0}function q(){const e=it();return fn(e).getCurrentScope()}function me(){const e=it();return fn(e).getIsolationScope()}function rr(){return kr("globalScope",()=>new bt)}function Je(...e){const t=it(),n=fn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function vP(...e){const t=it(),n=fn(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function v(){return q().getClient()}function Hc(e){const t=kp();if(t)return{trace_id:t.traceId,span_id:t.spanId};const n=e.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:s}=n,i={trace_id:r,span_id:s||rn()};return o&&(i.parent_span_id=o),i}const yS="browser.bfcache.frame",SS="browser.bfcache.not_restored_reason_count",bS="browser.bfcache.outcome",vS="browser.bfcache.reason",Rp="browser.navigation.id",mi="browser.navigation.type",ES="browser.paint.type",wS="browser.web_vital.inp.interaction_type",Wc="browser.web_vital.inp.target",TS="code.file.path",IS="code.function.name",Cp="db.operation.name",Ap="db.system.name",kS="gen_ai.conversation.id",Np="graphql.document",RS="graphql.operation.name",CS="graphql.operation.type",AS="http.method",NS="http.request.header",gi="http.request.method",xS="http.request.same_origin",xp="http.response.body.size",MS="http.response.size",OS="http.response.status_code",Mp="http.route",PS="network.connection.effective_type",LS="network.connection.rtt",DS="network.connection.type",$S="params",Op="router.navigation.route.id",Jr="sentry.description",FS="sentry.environment",yo="sentry.exclusive_time",or="sentry.idle_span_finish_reason",BS="sentry.is_localhost",US="sentry.link.type",H="sentry.op",re="sentry.origin",zc="sentry.profile_id",HS="sentry.release",WS="sentry.replay_id",zS="sentry.sdk.integrations",jS="sentry.sdk.name",qS="sentry.sdk.version",GS="sentry.segment.id",Ar="sentry.segment.name",ce="sentry.segment.name.source",VS="sentry.source",KS="sentry.status.message",YS="sentry.trace_lifecycle",XS="sentry.transaction",_i="server.address",JS="server.port",Nt="ui.component_name",yi="url.domain",Pp="url.fragment",De="url.full",Si="url.path",QS="url.path.parameter",Lp="url.query",ZS="url.scheme",We="url.template",Dp="user_agent.original",eb="user.email",tb="user.id",nb="user.ip_address",rb="user.name",jc="sentry.sample_rate",$p="sentry.previous_trace_sample_rate",EP="sentry.op",wP="sentry.origin",Fp="sentry.measurement_unit",Bp="sentry.measurement_value",Rs="sentry.custom_span_name",ob=["ok","deadline_exceeded","unauthenticated","permission_denied","not_found","resource_exhausted","invalid_argument","unimplemented","unavailable","internal_error","unknown_error","cancelled","already_exists","failed_precondition","aborted","out_of_range","data_loss"],Up=0,So=1,we=2;function sb(e){return e!=="ok"&&ob.includes(e)}function ib(e){if(e<400&&e>=100)return{code:So};if(e>=400&&e<500)switch(e){case 401:return{code:we,message:"unauthenticated"};case 403:return{code:we,message:"permission_denied"};case 404:return{code:we,message:"not_found"};case 409:return{code:we,message:"already_exists"};case 413:return{code:we,message:"failed_precondition"};case 429:return{code:we,message:"resource_exhausted"};case 499:return{code:we,message:"cancelled"};default:return{code:we,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:we,message:"unimplemented"};case 503:return{code:we,message:"unavailable"};case 504:return{code:we,message:"deadline_exceeded"};default:return{code:we,message:"internal_error"}}return{code:we,message:"internal_error"}}function Cs(e,t){e.setAttribute("http.response.status_code",t);const n=ib(t);n.message!=="unknown_error"&&e.setStatus(n)}function Hp(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Wp(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const zp="_sentryScope",jp="_sentryIsolationScope",ab=Symbol.for("sentry.tracerProviderSpan");function Nn(e,t,n){e&&(pe(e,jp,Hp(n)),pe(e,zp,t))}function xt(e){const t=e;return{scope:t[zp],isolationScope:Wp(t[jp])}}function cb(e){return e[ab]===!0}const As="sentry-",ub=8192;function qc(e){const t=lb(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(As)){const i=o.slice(As.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function qp(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${As}${r}`]=o),n),{});return db(t)}function lb(e){if(!(!e||!tt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=gl(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):gl(e)}function gl(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function db(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>ub?(A&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const fb=/^o(\d+)\./,pb=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function hb(e){return e==="http"||e==="https"}function Wt(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function Gp(e){const t=pb.exec(e);if(!t){ft(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Vp({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Vp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function mb(e){if(!A)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(_.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?hb(r)?t&&isNaN(parseInt(t,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function gb(e){return e.match(fb)?.[1]}function Kp(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=gb(n)),r}function Yp(e){const t=typeof e=="string"?Gp(e):Vp(e);if(!(!t||!mb(t)))return t}function xn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const Xp=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function _b(e){if(!e)return;const t=e.match(Xp);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Jp(e,t){const n=_b(e),r=qc(t);if(!n?.traceId)return{traceId:dn(),sampleRand:en()};const o=yb(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function Qp(e=dn(),t=rn(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Zp(e=dn(),t=rn(),n){return`00-${e}-${t}-${n?"01":"00"}`}function yb(e,t){const n=xn(t?.sample_rand);if(n!==void 0)return n;const r=xn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?en()*r:r+en()*(1-r):en()}function Sb(e,t){const n=Kp(e);return t&&n&&t!==n?(_.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(_.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const Va="span";function io(e,t){t?e.refs[Va]=Hp(t):delete e.refs[Va]}function bb(e){return Wp(e.refs[Va])}const eh=0,bi=1;function vb(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Ne(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Gc(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Ne(e).parent_span_id,s=xt(e).scope,i=r?s?.getPropagationContext().propagationSpanId||rn():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Eb(e){const{traceId:t,spanId:n}=e.spanContext(),r=pt(e);return Qp(t,n,r)}function wb(e){const{traceId:t,spanId:n}=e.spanContext(),r=pt(e);return Zp(t,n,r)}function th(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===bi,attributes:s,...o}))}function nh(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===bi,attributes:o}))}function Mt(e){return typeof e=="number"?_l(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_l(e.getTime()):fe()}function _l(e){return e>9999999999?e/1e3:e}function Ne(e){if(ih(e))return e.getStaticSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(sh(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:rh(e),start_timestamp:Mt(o),timestamp:Mt(i)||void 0,status:ah(a),op:r[H],origin:r[re],links:th(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:"ok",data:{}}}function ne(e){if(ih(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(sh(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:rh(e),start_timestamp:Mt(o),end_timestamp:Mt(i)||void 0,is_segment:ao(e),status:Vc(a),attributes:ch(r,a),links:nh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",status:"ok",is_segment:ao(e),attributes:{}}}function rh(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function oh(e){return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:pr(e.attributes),links:e.links?.map(t=>({...t,attributes:pr(t.attributes)}))}}function sh(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ih(e){return typeof e.getSpanJSON=="function"}function pt(e){const{traceFlags:t}=e.spanContext();return t===bi}function ah(e){return!e||e.code===Up||e.code===So?"ok":e.message&&sb(e.message)?e.message:"internal_error"}function Vc(e){return!e||e.code===So||e.code===Up||e.message==="cancelled"?"ok":"error"}function ch(e,t){const n=Vc(t)==="error"?t?.message:void 0;return{...n&&{[KS]:n},...e}}const Rn="_sentryChildSpans",Ka="_sentryRootSpan";function ls(e,t){const n=e[Ka]||e;pe(t,Ka,n),t.setAttribute(ce,void 0),pt(e)&&(!e.isRecording()&&!n.isRecording()||(e[Rn]?e[Rn].add(t):pe(e,Rn,new Set([t]))))}function Tb(e,t){e[Rn]&&e[Rn].delete(t)}function ds(e){const t=new Set;function n(r){if(!t.has(r)&&pt(r)){t.add(r);const o=r[Rn]?Array.from(r[Rn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const Re=vi;function vi(e){return e[Ka]||e}function ao(e){return e===vi(e)}function he(e){const t=it(),n=fn(t);return n.getActiveSpan?n.getActiveSpan(e):bb(e||q())}function TP(e,t){e.updateName(t),e.setAttributes({[Rs]:t}),uh(e,"custom")}function uh(e,t){ao(e)&&e.setAttribute(ce,t)}let yl=!1;function Ib(){if(yl)return;function e(){const t=he(),n=t&&Re(t);if(n){const r="internal_error";A&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:we,message:r})}}yl=!0,up(e),lp(e)}function Ye(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||v()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Sl(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Ns(e,t){if(!t?.length)return!1;for(const n of t){if(Cb(n)){if(e.description&&Xr(e.description,n))return A&&Sl(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const o=n.name?e.description&&Xr(e.description,n.name):!0,s=n.op?e.op&&Xr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>kb(e.attributes?.[a],c)):!0;if(o&&s&&i)return A&&Sl(e),!0}return!1}function kb(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Xr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Rb(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function Cb(e){return typeof e=="string"||e instanceof RegExp}const bl=[];function Ab(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Nb(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return Ab(r)}function xb(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&lh(e,r,n)}),n}function vl(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function lh(e,t,n){if(n[t.name]){A&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!bl.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),bl.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),A&&_.log(`Integration installed: ${t.name}`)}function El(e){const t=v();if(!t){A&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Mb(e,t){const n={...e,...t};for(const r in t){const o=e[r],s=t[r];if(typeof o=="function"&&typeof s=="function"){const i=new Proxy(o,{apply:(a,c,u)=>(Reflect.apply(a,c,u),Reflect.apply(s,c,u))});n[r]=i}}return n}const Ei="production",dh=Symbol.for("sentry.nonRecordingSpan");class Mn{constructor(t={}){this._traceId=t.traceId||dn(),this._spanId=t.spanId||rn(),this.dropReason=t.dropReason,pe(this,dh,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:eh}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function hr(e){return!!e&&e[dh]===!0}const fh="_frozenDsc";function wl(e,t){pe(e,fh,t)}function ph(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ei,release:n.release,public_key:r,trace_id:e,org_id:Kp(t)};return t.emit("createDsc",o),o}function wi(e,t){if(kp())return;const n=t.getPropagationContext();return n.dsc||ph(n.traceId,e)}function st(e){const t=v();if(!t)return{};const n=Re(e),r=Ne(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[jc]??o[$p];function a(g){return(typeof i=="number"||typeof i=="string")&&(g.sample_rate=`${i}`),g}const c=n[fh];if(c)return a(c);const u=hr(n),l=u&&n.dropReason==="ignored";if(u&&(!Ye(t.getOptions())||l)){const g=xt(n).scope,y=g&&wi(t,g);if(y){const S={...y};return l&&(S.sampled="false"),a(S)}}const f=s?.get("sentry.dsc"),d=f&&qc(f);if(d)return a(d);const p=ph(e.spanContext().traceId,t),h=o[ce],m=r.description;return h!=="url"&&m&&(p.transaction=m),Ye()&&(p.sampled=String(pt(n)),p.sample_rand=s?.get("sentry.sample_rand")??xt(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function IP(e){const t=st(e);return qp(t)}function Ob(e,t){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=t;Pb(e,t),Fb(e,n),Lb(e,r),Db(e,o)}function Tl(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:f,attachments:d,propagationContext:p,transactionName:h}=t;zr(e,"extra",n),zr(e,"tags",r),zr(e,"attributes",o),zr(e,"user",s),zr(e,"contexts",i),e.sdkProcessingMetadata=_o(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function zr(e,t,n){e[t]=_o(e[t],n,1)}function Nr(e,t){const n=rr().getScopeData();return e&&Tl(n,e.getScopeData()),t&&Tl(n,t.getScopeData()),n}function Pb(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function Lb(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Db(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function $b(e,t){e.contexts={trace:Gc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:st(t),...e.sdkProcessingMetadata};const n=Re(t),r=Ne(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Fb(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const xs=Symbol.for("SentryCallbackError");function vt(e,t,n){let r;try{r=t()}catch(o){return Il(e,o,n)}return Pt(r)?r.then(void 0,o=>Il(e,o,n)):r}function Il(e,t,n){return A&&_.error(e,t),n(t)}function kP(e){return pe(e,"_static",!0),e}function RP(e){return e}function Ti(e){return!!e&&typeof e=="function"&&"_static"in e&&!!e._static}function Ms(e,t){return vt(A?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":"",()=>t(e),()=>e)||e}function hh(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return oh(t)}function Bb(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=e;if(n&&(n.status_code!=null&&(t["http.response.status_code"]=n.status_code),n.body_size!=null&&(t["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(t["sentry.profile_id"]=r.profile_id),r.profiler_id&&(t["sentry.profiler_id"]=r.profiler_id)),o)for(const[u,l]of Object.entries(o))l!=null&&(t[u]=l);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i?.state&&typeof i.state.type=="string"&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const u=a.version;(typeof u=="string"||typeof u=="number")&&(t["angular.version"]=u)}const c=e.react;if(c){const u=c.version;(typeof u=="string"||typeof u=="number")&&(t["react.version"]=u)}return t}function mh(e,t){const n=ne(e);n.attributes&&delete n.attributes[Rs];const r=vi(e),o=ne(r),{isolationScope:s,scope:i}=xt(e),a=Nr(s,i);Wb(n,o,t,a),t.emit("preprocessSpan",n),n.is_segment&&(Ub(n,a),Hb(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:c,traceLifecycle:u}=t.getOptions(),l=u!=="static"&&c&&!Ti(c)?Ms(n,c):n;return{...oh(l),_segmentSpan:r}}function Ub(e,t){const n=Bb(t.contexts);On(e,n)}function On(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function Hb(e,t){const n=t.getIntegrationNames();n.length&&On(e,{[zS]:n})}function gh(e,t,n,r=!0){const o=t.getSdkMetadata(),{release:s,environment:i}=t.getOptions();return{[YS]:"stream",[Ar]:e.name,[GS]:e.span_id,[jS]:o?.sdk?.name,[qS]:o?.sdk?.version,[HS]:s,[FS]:i||Ei,[tb]:n.user?.id,[eb]:n.user?.email,[nb]:n.user?.ip_address,[rb]:n.user?.username,...r?n.attributes:void 0}}function Wb(e,t,n,r){On(e,gh(t,n,r))}function zb(e,t,n){const r=Ne(e),o=vi(e),s=ne(o),{isolationScope:i,scope:a}=xt(e),c=Nr(i,a),u=gh(s,t,c,!1);Object.entries(u).forEach(([f,d])=>{d!=null&&!(f in r.data)&&(r.data[f]=d)});const l=Ms(r,n);return hh(l)}function V(e){return e.getOptions().traceLifecycle==="stream"}function bo(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}function ht(e,t=[]){return[e,t]}function kl(e,t){const[n,r]=e;return[n,[...r,t]]}function mr(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function Ya(e,t){return mr(e,(n,r)=>t.includes(r))}function Os(e){const t=cn($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function jb(e){const t=cn($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Ps(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[Os(r),s]:r.push(typeof s=="string"?Os(s):s)}for(const s of n){const[i,a]=s;if(o(`
|
|
6
|
-
${JSON.stringify(i)}
|
|
7
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Te(a))}o(c)}}return typeof r=="string"?r:qb(r)}function qb(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Gb(e){let t=typeof e=="string"?Os(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(jb(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function Vb(e){const t=typeof e.data=="string"?Os(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const _h={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",metric:"trace_metric"};function Kb(e){return e in _h}function Rl(e){return Kb(e)?_h[e]:e}function vo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function yh(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ut()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Wt(r)},...o&&{trace:o}}}function Xa(e){return e==="replay_event"?"replay":e||"error"}function Yb(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Xb(){return"npm"}function Jb(){return!Yb()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function on(){return typeof window<"u"&&(!Jb()||Qb())}function Qb(){return $.process?.type==="renderer"}function Ja(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=vo(r._metadata),a={sent_at:new Date(Ut()).toISOString(),...Zb(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Wt(o)}};return ht(a,[Sh(e,n)])}function Sh(e,t){const n=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,ingest_settings:on()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function Zb(e){return!!e.trace_id&&!!e.public_key}function ev(e){let t=156;if(t+=e.name.length*2,t+=hl(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?hl(r):0);t+=o*e.links.length}return t}const Cl=1e3,tv=5e6;class nv{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Cl?r:Cl,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:tv,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:bo(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=ev(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(A&&_.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){A&&_.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=st(o),i=r.map(c=>{const{_segmentSpan:u,...l}=c;return l}),a=Ja(i,s,this._client);A&&_.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{A&&_.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}const Al="SpanStreaming",rv=(e={})=>{const t=e.flushOnSegmentEnd??!0;return{name:Al,setup(n){if(!V(n)){A&&_.log(`[${Al}] \`traceLifecycle\` is "static", skipping setup.`);return}const r=new nv(n);n.on("afterSpanEnd",o=>{pt(o)&&r.add(mh(o,n))}),n.on("flushTraceSpans",o=>{r.flush(o)}),t&&n.on("afterSegmentSpanEnd",o=>{const s=o.spanContext().traceId;bo(setTimeout(()=>{r.flush(s)},500))})}}};function ov(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return sv(o,t,n,r)}function sv(e,t,n,r){return Pt(e)?Tp(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}const Qa=new WeakMap;function bh(e){return lt(e)?void 0:e}function iv(e,t){const n=bh(e);!n||!pt(t)||Qa.has(n)||Qa.set(n,Gc(t))}function av(e,t,n){const r=bh(t.originalException),o=r&&Qa.get(r);if(!o)return;const s=e.contexts?.trace;(s?.trace_id??(n&&Hc(n).trace_id))===o.trace_id&&(e.contexts={...e.contexts,trace:{...s,...o}})}function cv(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Ne(e),{spanId:o}=e.spanContext(),s=pt(e),i=Re(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:l,description:f}=Ne(i);u.push(`root ID: ${i.spanContext().spanId}`),l&&u.push(`root op: ${l}`),f&&u.push(`root description: ${f}`)}_.log(`${c}
|
|
8
|
-
${u.join(`
|
|
9
|
-
`)}`)}function uv(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Ne(e),{spanId:r}=e.spanContext(),s=Re(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;_.log(i)}function lv(e,t,n){if(!Ye(e))return[!1];const r=dv(e,t);if(!r)return[!1,void 0,void 0,"callback_error"];const[o,s]=r,i=xn(o);if(i===void 0)return A&&_.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return A&&_.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,s];const a=n<i;return a||A&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[a,i,s]}function dv(e,t){const{tracesSampler:n,tracesSampleRate:r}=e;if(typeof n=="function"){const o=vt(A?"The `tracesSampler` callback threw an error, falling back to the parent sampling decision or `tracesSampleRate`:":"",()=>[n({...t,inheritOrSampleWith:s=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):s}),!0],()=>{});if(o)return o}if(t.parentSampled!==void 0)return[t.parentSampled];if(typeof r<"u")return[r,!0]}function vh(e,t,n,r=he()){const o=r&&Re(r);o&&(A&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Bp]:t,[Fp]:n}))}function Nl(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Fp],s=r[Bp];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function xl(){return cn(it()).segmentSpanCaptureStrategy}const Go=1e3;class Ii{constructor(t={}){this._traceId=t.traceId||dn(),this._spanId=t.spanId||rn(),t.startTimestamp?this._startTime=t.startTimestamp:(this._startTime=fe(),this._startPerformanceNow=ll()),this._links=t.links,this._attributes={},this.setAttributes({[re]:"manual",[H]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),this._events=[],this._isStandaloneSpan=t.isStandalone}addLink(t){return this._frozen?this:(this._links?this._links.push(t):this._links=[t],this)}addLinks(t){return this._frozen?this:(this._links?this._links.push(...t):this._links=t,this)}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?bi:eh}}setAttribute(t,n){return this._frozen?this:t===ce&&n!==void 0&&!ao(this)?(A&&_.warn("[Tracing] Ignoring name source on a child span: this attribute is only valid on the root span."),this):(n===void 0?delete this._attributes[t]:this._attributes[t]=n,this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=Mt(t),this._startPerformanceNow=void 0)}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,uh(this,"custom"),this)}end(t){this._endTime||(this._endTime=t==null?this._getEndTimeFromDuration():Mt(t),uv(this),this._onSpanEnded(),this._frozen=cb(this))}getStaticSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[H],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ah(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[re],profile_id:this._attributes[zc],exclusive_time:this._attributes[yo],measurements:Nl(this._events),links:th(this._links)}}getSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime,is_segment:ao(this),status:Vc(this._status),attributes:ch(this._attributes,this._status),links:nh(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;A&&_.log("[Tracing] Adding an event to span:",t);const o=Ml(n)?n:r||fe(),s=Ml(n)?{}:n||{},i={name:t,time:Mt(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){const t=ll();return this._startPerformanceNow==null||t==null?fe():this._startTime+(t-this._startPerformanceNow)/1e3}_onSpanEnded(){const t=v();if(t?.emit("spanEnd",this),this._isStandaloneSpan){if(!t)return;if(this._sampled){pv(this,t);return}A&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled.");return}t?.emit("afterSpanEnd",this);const n=Re(this);if(n!==this){const s=xl();if(s){const i=xt(this).scope||q();s.onChildSpanEnded(this,n,a=>this._convertSpanToTransaction(a),i)}return}if(t&&V(t)){t.emit("afterSegmentSpanEnd",this);return}const r=xt(this).scope||q(),o=xl();if(o)o.onSegmentSpanEnded(s=>this._convertSpanToTransaction(s),r);else{const s=this._convertSpanToTransaction();s&&r.captureEvent(s)}}_convertSpanToTransaction(t={}){if(!Ol(Ne(this)))return;this._name||(A&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=xt(this),o=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;t.onSpanCaptured?.(this);const s=[];let i=0;for(const p of ds(this)){if(p===this||fv(p)||t.isSpanAlreadyCaptured?.(p))continue;const h=Ne(p);if(!Ol(h)){t.onSpanCaptured||i++;continue}t.onSpanCaptured?.(p),s.push(h)}const a=n?.getClient()||v();i&&a?.recordDroppedEvent("invalid","span",i),s.length>Go&&a?.recordDroppedEvent("buffer_overflow","span",s.length-Go);const c=this._attributes[ce];delete this._attributes[Rs];let u=!1;s.forEach(p=>{delete p.data[Rs],p.op?.startsWith("gen_ai.")&&(u=!0)});const l={contexts:{trace:vb(this)},spans:s.length>Go?s.sort((p,h)=>p.start_timestamp-h.start_timestamp).slice(0,Go):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:st(this),hasGenAiSpans:u},request:o,...c&&{transaction_info:{source:c}}},f=Nl(this._events);return f&&Object.keys(f).length&&(A&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(f,void 0,2)),l.measurements=f),l}}function Ml(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ol(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function fv(e){return e instanceof Ii&&e.isStandaloneSpan()}function pv(e,t){const{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if(r==="static"&&Ti(n)){const a=zb(e,t,n),c=st(e);t.sendEnvelope(Ja([a],c,t));return}const{_segmentSpan:o,...s}=mh(e,t),i=st(o);t.sendEnvelope(Ja([s],i,t))}function hv(e,t){const n=Zc(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Je(i,()=>Eh(o)(()=>{const c=q(),u=eu(s??c,o),l=v(),d=e.onlyIfParent&&!u?Jc(c,l):Qc({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),p=!Ri(d)||!u;return wh(d,p,()=>t(d),()=>d.end())}))}function Kc(e,t){const n=Zc(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Je(i,()=>Eh(o)(()=>{const c=q(),u=eu(s??c,o),f=e.onlyIfParent&&!u?Jc(c,v()):Qc({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),d=!Ri(f)||!u;return wh(f,d,()=>t(f,()=>f.end()))}))}function Yc(e){const t=Zc(e),{forceTransaction:n,parentSpan:r,scope:o}=e;return(o?i=>Je(o,i):r!==void 0?i=>sn(r,i):i=>i())(()=>{const i=q(),a=eu(o??i,r),c=v();return e.onlyIfParent&&!a?Jc(i,c):Qc({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}const CP=(e,t)=>{const n=it(),r=fn(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=v(),a=qc(s);return i&&!Sb(i,a?.org_id)?gv(t):Je(c=>{const u=Jp(o,s);return c.setPropagationContext(u),sn(null,t)})};function sn(e,t){const n=ki();return n.withActiveSpan?n.withActiveSpan(e,t):Je(r=>(io(r,e||void 0),t(r)))}function mv(e){const t=ki();return t.suppressTracing?t.suppressTracing(e):Je(n=>(n.setSDKProcessingMetadata({[ks]:!0}),e()))}function Xc(e=q()){const t=ki();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ks]===!0}function gv(e){const t=ki();return t.startNewTrace?t.startNewTrace(e):sn(null,()=>Je(n=>(n.setPropagationContext({traceId:dn(),sampleRand:en()}),A&&_.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),e())))}function Jc(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new Mn({dropReason:"no_parent_span",traceId:e.getPropagationContext().traceId});return Nn(n,e,me()),n}function Qc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const o=me(),s={scope:r,parentSpan:e};v()?.emit("prepareSpanScope",s);const{scope:i,parentSpan:a}=s;if(!Ye()){const l=i.getPropagationContext(),f=a?a.spanContext().traceId:l.traceId,d=new Mn({traceId:f});return a&&!n&&ls(a,d),Nn(d,i,o),d}const c=v();if(yv(c,t)){Xc(i)||c?.recordDroppedEvent("ignored","span");const l=new Mn({dropReason:"ignored",traceId:a?.spanContext().traceId??i.getPropagationContext().traceId});return a&&!n&&ls(a,l),Nn(l,i,o),l}let u;if(a&&!n)u=_v(a,i,t,o),ls(a,u);else if(a){const l=st(a),{traceId:f,spanId:d}=a.spanContext(),p=pt(a);u=Pl({traceId:f,parentSpanId:d,...t},i,o,p),wl(u,l)}else{const{traceId:l,dsc:f,parentSpanId:d,sampled:p,sampleRand:h}=i.getPropagationContext();if(u=Pl({traceId:l,parentSpanId:d,...t},i,o,p),f){const m=Object.keys(f).length===0&&h!==void 0?{sample_rand:h.toString()}:f;wl(u,m)}}return cv(u),u}function Zc(e){const t={isStandalone:e.experimental?.standalone,...e};if(e.op&&(t.attributes={[H]:e.op,...e.attributes}),e.startTime){const n={...t};return n.startTimestamp=Mt(e.startTime),delete n.startTime,n}return t}function ki(){const e=it();return fn(e)}function Pl(e,t,n,r){const o=v(),s=o?.getOptions()||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,l=t.getPropagationContext(),f=Xc(t),[d,p,h,m]=f?[!1]:lv(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:xn(l.dsc?.sample_rate)},l.sampleRand),g=new Ii({...e,attributes:{[ce]:"custom",[jc]:p!==void 0&&h?p:void 0,...u},sampled:d});if(!d&&o&&!f){A&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled.");const y=m||"sample_rate";!V(o)&&!e.isStandalone&&o.recordDroppedEvent(y,"transaction"),o.recordDroppedEvent(y,"span")}return Nn(g,t,n),o&&o.emit("spanStart",g),g}function _v(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=Xc(t),a=i?!1:pt(e),c=a?new Ii({...n,parentSpanId:o,traceId:s,sampled:a}):new Mn({traceId:s});ls(e,c),Nn(c,t,r);const u=v();return u&&(hr(c)&&(hr(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c)),c}function eu(e,t){if(t)return t;if(t===null)return;const n=he(e);if(!n)return;const r=v();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Re(n):n}function Eh(e){return e!==void 0?t=>sn(e,t):t=>t()}function yv(e,t){const n=e?.getOptions().ignoreSpans;return!e||!V(e)||!n?.length?!1:Ns({description:t.name||"",op:t.attributes?.[H]||t.op,attributes:t.attributes},n)}function Ri(e){return hr(e)&&e.dropReason==="ignored"}function wh(e,t,n,r){return(t?s=>sn(e,()=>{const i=q(),a=xt(e).scope;return a&&i.setPropagationContext(a.getPropagationContext()),Nn(e,i,me()),s()}):s=>s())(()=>ov(()=>n(),s=>{iv(s,e);const{status:i}=Ne(e);e.isRecording()&&i==="ok"&&e.setStatus({code:we,message:"internal_error"})},r))}const Ll=new WeakSet;function Eo(e=v()){!e||Ll.has(e)||!V(e)||(Ll.add(e),e.addIntegration(rv()))}function AP(e,t){return Eo(),hv(e,t)}function NP(e,t){return Eo(),Kc(e,t)}function yt(e){return Eo(),Yc(e)}const fs={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Sv="heartbeatFailed",bv="idleTimeout",vv="finalTimeout",Ev="externalFinish";function Th(e,t={}){const n=v();Eo(n);const r=new Map;let o=!1,s,i,a=Ev,c=!t.disableAutoFinish;const u=[],{idleTimeout:l=fs.idleTimeout,finalTimeout:f=fs.finalTimeout,childSpanTimeout:d=fs.childSpanTimeout,trimIdleSpanEndTimestamp:p=!0}=t,h=q();if(!n||!Ye()){const R=new Mn({traceId:h.getPropagationContext().traceId});return Nn(R,h,me()),R}const m=he(),g=Yc(e);io(q(),g),A&&_.log("[Tracing] Started span is an idle span"),g.end=new Proxy(g.end,{apply(R,U,E){if(n.emit("beforeIdleSpanEnd",g),hr(U))return;const[O,...x]=E,w=O||fe(),D=Mt(w),N=ds(g).filter(ee=>ee!==g),J=Ne(g);if(!N.length||!p)return k(D),Reflect.apply(R,U,[D,...x]);const Q=n.getOptions().ignoreSpans,P=N?.reduce((ee,Se)=>{const se=Ne(Se);return!se.timestamp||Q&&Ns({description:se.description,op:se.op,attributes:se.data},Q)?ee:ee?Math.max(ee,se.timestamp):se.timestamp},void 0),Y=J.start_timestamp,B=Math.min(Y?Y+f/1e3:1/0,Math.max(Y||-1/0,Math.min(D,P||1/0)));return k(B),Reflect.apply(R,U,[B,...x])}});function y(){s&&(clearTimeout(s),s=void 0)}function S(){i&&(clearTimeout(i),i=void 0)}function T(R){y(),s=setTimeout(()=>{!o&&r.size===0&&c&&(a=bv,g.end(R))},l)}function b(R){S(),i=setTimeout(()=>{!o&&c&&(a=Sv,g.end(R))},d)}function M(R){y(),r.set(R,!0);const U=fe();b(U+d/1e3)}function I(R){if(r.has(R)&&r.delete(R),r.size===0){const U=fe();T(U+l/1e3),S()}}function k(R){o=!0,r.clear(),u.forEach(N=>N()),io(h,m);const U=Ne(g),{start_timestamp:E}=U;if(!E)return;U.data[or]||g.setAttribute(or,a);const x=U.status;(!x||x==="unknown")&&g.setStatus({code:So}),_.log(`[Tracing] Idle span "${U.op}" finished`);const w=ds(g).filter(N=>N!==g);let D=0;w.forEach(N=>{N.isRecording()&&(N.setStatus({code:we,message:"cancelled"}),N.end(R),A&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(N,void 0,2)));const J=Ne(N),{timestamp:Q=0,start_timestamp:P=0}=J,Y=P<=R,B=(f+l)/1e3,ee=Q-P<=B;if(A){const Se=JSON.stringify(N,void 0,2);Y?ee||_.log("[Tracing] Discarding span since it finished after idle span final timeout",Se):_.log("[Tracing] Discarding span since it happened after idle span was finished",Se)}(!ee||!Y)&&(Tb(g,N),D++)}),D>0&&g.setAttribute("sentry.idle_span_discarded_spans",D)}return u.push(n.on("spanStart",R=>{if(o||R===g||ne(R).end_timestamp||R instanceof Ii&&R.isStandaloneSpan())return;ds(g).includes(R)&&M(R.spanContext().spanId)})),u.push(n.on("spanEnd",R=>{o||I(R.spanContext().spanId)})),u.push(n.on("idleSpanEnableAutoFinish",R=>{R===g&&(c=!0,T(),r.size&&b())})),t.disableAutoFinish||T(),setTimeout(()=>{o||(g.setStatus({code:we,message:"deadline_exceeded"}),a=vv,g.end())},f),g}function wv(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function l(){return o!==void 0||s!==void 0?c():r}function f(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return f.cancel=u,f.flush=l,f}const Tv=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],Iv=["removeListener","off","removeEventListener"],Ih=Symbol("SentryScopeBoundListeners");let sr;function kv(e){return sr!==void 0&&(e===sr||e.listener===sr)}function xP(e,t=q()){const n=e;if(Ci(n))return e;tu(n);for(const r of Tv)typeof n[r]=="function"&&(n[r]=Cv(n,n[r],t));for(const r of Iv)typeof n[r]=="function"&&(n[r]=Av(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=Nv(n,n.removeAllListeners)),e}function Rv(e,t){return function(...n){return Je(t,()=>e.apply(this,n))}}function kh(e){return typeof e=="function"}function Cv(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!kh(s)||kv(s))return t.apply(this,r);const a=Ci(e)||tu(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=Rv(s,n),c.set(s,u));const l=sr;sr=u;try{return t.call(this,o,u,...i)}finally{sr=l}}}function Av(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=kh(o)?Ci(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function Nv(e,t){return function(...n){const r=Ci(e);if(r)if(n.length===0)tu(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function tu(e){const t=new Map;return e[Ih]=t,t}function Ci(e){return e[Ih]}const wo="pageload",xr="navigation",xv="navigation.redirect",Mv="resource.other",Ov="browser.paint",Rh="browser.unload_event",Ch="browser.redirect",Ah="browser.dom_content_loaded_event",Nh="browser.load_event",xh="browser.connect",Mh="browser.tls_ssl",Oh="browser.cache",Ph="browser.dns",Za="browser.request",ec="browser.response",Lh="ui.render",Dh="ui.mount",Pv="ui.update",Lv="ui.long_task",Dv="ui.long_animation_frame",Ls="ui.interaction.click",$v="ui.interaction.hover",Fv="ui.interaction.drag",Bv="ui.interaction.press",Uv="ui.webvital.lcp",Hv="ui.webvital.cls",oa="ui.action.click",$h="db",Fh="http.client",Wv="http.client.stream",Lt="Pageload",dt="Navigation",zv="Resource",Bh="Component mount",jv="Component update",Uh="Component render",Hh="Main UI thread blocked",qv="Click",Wh="Click",Gv="Hover",Vv="Drag",Kv="Key press",Dl="Largest contentful paint",$l="Layout shift",tc={[Oh]:"Cache lookup",[Ph]:"DNS lookup",[xh]:"Connect",[Mh]:"TLS handshake",[Ch]:"Redirect",[Za]:"Request",[ec]:"Response",[Rh]:"Unload event",[Ah]:"DOMContentLoaded event",[Nh]:"Load event"};function Yv(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Xv(e,t,n,r){const o=vo(n),s={sent_at:new Date(Ut()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Wt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ht(s,[i])}function Jv(e,t,n,r){const o=vo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Yv(e,n?.sdk);const i=yh(e,o,r,t);return delete e.sdkProcessingMetadata,ht(i,[[{type:s},e]])}const sa=0,Fl=1,Bl=2;function To(e){return new co(t=>{t(e)})}function zh(e){return new co((t,n)=>{n(e)})}class co{constructor(t){this._state=sa,this._handlers=[],this._runExecutor(t)}then(t,n){return new co((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new co((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===sa)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Fl&&n[1](this._value),this._state===Bl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===sa){if(Pt(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Fl,s)},o=s=>{n(Bl,s)};try{t(r,o)}catch(s){o(s)}}}function Qv(e,t,n,r=0,o){try{const s=nc(t,n,e,r,o);return Pt(s)?s:To(s)}catch(s){return zh(s)}}function nc(e,t,n,r,o){const s=n[r];if(!e||!s)return e;const i=`Event processor "${s.id||"?"}"`;let a=!1;const c=vt(A?`${i} threw an error, dropping event:`:"",()=>s({...e},t),()=>(a=!0,null));return A&&c===null&&_.log(`${i} dropped event`),Pt(c)?c.then(u=>u?nc(u,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)):c?nc(c,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)}let yn,Ul,Hl,jt;function jh(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(jt&&r.length===Ul&&o.length===Hl)return jt;Ul=r.length,Hl=o.length,jt={},yn||(yn={});const s=(i,a)=>{for(const c of i){const u=a[c],l=yn?.[c];if(l&&jt&&u)jt[l[0]]=u,yn&&(yn[c]=[l[0],u]);else if(u){const f=e(c);for(let d=f.length-1;d>=0;d--){const h=f[d]?.filename;if(h&&jt&&yn){jt[h]=u,yn[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),jt}function Zv(e,t){const n=jh(e);if(!n)return[];const r=[];for(const o of t){const s=Dy(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function rc(e){return e.data?.__sentry__===!0}function qh(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Gh(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Pe(),timestamp:t.timestamp||Hn()},u=n.integrations||e.integrations.map(T=>T.name);eE(c,e),rE(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&tE(c,e.stackParser);const l=sE(r,n.captureContext);n.mechanism&&Jy(c,n.mechanism);const f=o?o.getEventProcessors():[],d=Nr(s,l),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),Ob(c,d);const h=he(l);h&&$b(c,h),av(c,n,l);const m=[...f,...d.eventProcessors],g=t.type==="transaction",y=t.spans?.length||0;return(rc(n)?To(c):Qv(m,c,n,0,T=>{o&&(o.recordDroppedEvent(T,Xa(t.type)),g&&o.recordDroppedEvent(T,"span",1+y))})).then(T=>{if(!T)return null;if(g&&o){const b=y-(T.spans?.length||0);b>0&&o.recordDroppedEvent("event_processor","span",b)}return nE(T),typeof i=="number"&&i>0?oE(T,i,a):T})}function eE(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ei,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=so(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=so(a.value,s))})}function tE(e,t){const n=jh(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function nE(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function rE(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function oE(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Te(o.data,t,n)}}))},...e.user&&{user:Te(e.user,t,n)},...e.contexts&&{contexts:Te(e.contexts,t,n)},...e.extra&&{extra:Te(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Te(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Te(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Te(e.contexts.flags,3,n)),r}function sE(e,t){if(!t)return e;const n=e?e.clone():new bt;return n.update(t),n}function iE(e){if(e)return aE(e)?{captureContext:e}:uE(e)?{captureContext:e}:e}function aE(e){return e instanceof bt||typeof e=="function"}const cE=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function uE(e){return Object.keys(e).some(t=>cE.includes(t))}function Pn(e,t){return q().captureException(e,iE(t))}function lE(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}function Io(e,t){return q().captureEvent(e,t)}function Vh(e,t){me().setContext(e,t)}function MP(e){me().setExtras(e)}function OP(e,t){me().setExtra(e,t)}function PP(e){me().setTags(e)}function LP(e,t){me().setTag(e,t)}function DP(e){me().setAttributes(e)}function $P(e,t){me().setAttribute(e,t)}function FP(e){me().setUser(e)}function BP(e){me().setConversationId(e)}function dE(){return me().lastEventId()}async function UP(e){const t=v();return t?t.flush(e):(A&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function HP(e){const t=q(),n=t.getClient();if(n){const r=await n.close(e);return t.getClient()===n&&t.setClient(void 0),r}return A&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1)}function WP(){return!!v()}function fE(){const e=v();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function pE(e){me().addEventProcessor(e)}function Wl(e){const t=me(),{user:n}=Nr(t,q()),{userAgent:r}=$.navigator||{},o=rS({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&dr(s,{status:"exited"}),Kh(),t.setSession(o),o}function Kh(){const e=me(),n=q().getSession()||e.getSession();n&&oS(n),Yh(),e.setSession()}function Yh(){const e=me(),t=v(),n=e.getSession();n&&t&&t.captureSession(n)}function ia(e=!1){if(e){Kh();return}Yh()}const hE="7";function Xh(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function mE(e){return`${Xh(e)}${e.projectId}/envelope/`}function gE(e,t){const n={sentry_version:hE};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Jh(e,t,n){return t||`${mE(e)}?${gE(e,n)}`}function _E(e,t){const n=Yp(e);if(!n)return"";const r=`${Xh(n)}embed/error-page/`;let o=`dsn=${Wt(n)}`;for(const s in t)if(s!=="dsn"&&!(s==="onClose"||s==="onError"))if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const yE="sentry.timestamp.sequence";let aa=0,ca;function Qh(e){const t=Math.floor(e*1e3);ca!==void 0&&t!==ca&&(aa=0);const n=aa;return aa++,ca=t,{key:yE,value:{value:n,type:"integer"}}}function Zh(e,t){return t?Je(t,()=>{const n=he(),r=n?Gc(n):Hc(t);return[n?st(n):wi(e,t),r]}):[void 0,void 0]}const SE={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function bE(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...on()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function vE(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Wt(r)),ht(s,[bE(e,o)])}const EE=100;function gt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function wE(e,t){const n=nu(),r=tm(e);r===void 0?n.set(e,[t]):r.length>=EE?(em(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ds(e,t=q(),n=wE){const r=t?.getClient()??v();if(!r){A&&_.warn("No client available to capture log.");return}const{release:o,environment:s,beforeSendLog:i}=r.getOptions(),[,a]=Zh(r,t),c={...e.attributes},{user:{id:u,email:l,username:f},attributes:d}=Nr(me(),t);gt(c,"user.id",u,!1),gt(c,"user.email",l,!1),gt(c,"user.name",f,!1),gt(c,"sentry.release",o),gt(c,"sentry.environment",s);const{name:p,version:h}=r.getSdkMetadata()?.sdk??{};gt(c,"sentry.sdk.name",p),gt(c,"sentry.sdk.version",h);const m=r.getIntegrationByName("Replay"),g=m?.getReplayId(!0);gt(c,"sentry.replay_id",g),g&&m?.getRecordingMode()==="buffer"&>(c,"sentry._internal.replay_is_buffering",!0);const y=e.message;if(fi(y)){const{__sentry_template_string__:x,__sentry_template_values__:w=[]}=y;w?.length&&(c["sentry.message.template"]=x),w.forEach((D,N)=>{c[`sentry.message.parameter.${N}`]=D})}const S=he(t);gt(c,"sentry.trace.parent_span_id",S?.spanContext().spanId);const T={...e,attributes:c};r.emit("beforeCaptureLog",T);const b=i?vt(A?"The `beforeSendLog` callback threw an error, dropping the log:":"",()=>ft(()=>i(T)),()=>xs):T;if(b===xs){r.recordDroppedEvent("callback_error","log_item",1);return}if(!b){r.recordDroppedEvent("before_send","log_item",1),A&&_.warn("beforeSendLog returned null, log will not be captured.");return}const{level:M,message:I,attributes:k={},severityNumber:R}=b,U=fe(),E=Qh(U),O={timestamp:U,level:M,body:oc(String(I)),trace_id:a?.trace_id,severity_number:R??SE[M],attributes:TE({...pr(d),...pr(k,!0),[E.key]:E.value})};n(r,O),r.emit("afterCaptureLog",b)}function em(e,t){const n=t??tm(e)??[];if(n.length===0)return;const r=e.getOptions(),o=vE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);nu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function tm(e){return nu().get(e)}function nu(){return kr("clientToLogBufferMap",()=>new WeakMap)}function TE(e){const t={};for(const[n,r]of Object.entries(e)){const o=oc(n);r.type==="string"?t[o]={...r,value:oc(r.value)}:t[o]=r}return t}function oc(e){const t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n=="function"&&typeof r=="function"?n.call(e)?e:r.call(e):e}function IE(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...on()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function kE(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Wt(r)),ht(s,[IE(e,o)])}const RE=1e3;function It(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function CE(e,t){const n=ru(),r=rm(e);r===void 0?n.set(e,[t]):r.length>=RE?(nm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function AE(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};It(s,"user.id",n.id,!1),It(s,"user.email",n.email,!1),It(s,"user.name",n.username,!1),It(s,"sentry.release",r),It(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};It(s,"sentry.sdk.name",i),It(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return It(s,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&It(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function NE(e,t,n,r){const[,o]=Zh(t,n),s=he(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=fe(),u=Qh(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...pr(r),...pr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function xE(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??CE,o=n?.getClient()??v();if(!o){A&&_.warn("No client available to capture metric.");return}const{beforeSendMetric:s}=o.getOptions(),{user:i,attributes:a}=Nr(me(),n),c=AE(e,o,i);o.emit("processMetric",c);const u=s?vt(A?"The `beforeSendMetric` callback threw an error, dropping the metric:":"",()=>s(c),()=>xs):c;if(u===xs){o.recordDroppedEvent("callback_error","trace_metric",1);return}if(!u){o.recordDroppedEvent("before_send","trace_metric",1),A&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const l=NE(u,o,n,a);A&&_.log("[Metric]",l),r(o,l),o.emit("afterCaptureMetric",u)}function nm(e,t){const n=t??rm(e)??[];if(n.length===0)return;const r=e.getOptions(),o=kE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ru().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function rm(e){return ru().get(e)}function ru(){return kr("clientToMetricBufferMap",()=>new WeakMap)}function ME(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||V(t))return;const n=[],r=[];for(const o of e.spans)o.op?.startsWith("gen_ai.")?n.push(hh(o)):r.push(o);if(n.length!==0)return e.spans=r,Sh(n,t)}const ou=Symbol.for("SentryBufferFullError");function su(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return zh(ou);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return To(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>bo(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const OE=60*1e3;function om(e,t=Ut()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?OE:r-t}function PE(e,t){return e[t]||e.all||0}function sm(e,t,n=Ut()){return PE(e,t)>n}function im(e,{statusCode:t,headers:n},r=Ut()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,l]=a.split(":",5),f=parseInt(c,10),d=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+d;else for(const p of u.split(";"))p==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[p]=r+d):o[p]=r+d}else i?o.all=r+om(i,r):t===429&&(o.all=r+60*1e3);return o}const am=64;function LE(e,t,n=su(e.bufferSize||am)){let r={};const o=a=>n.drain(a);function s(a,[c,u],l){const f=Rl(l);l==="transaction"&&e.recordDroppedEvent(a,"span",(u.spans?.length??0)+1),e.recordDroppedEvent(a,f,typeof c.item_count=="number"?c.item_count:1)}function i(a){const c=[];if(mr(a,(d,p)=>{sm(r,Rl(p))?s("ratelimit_backoff",d,p):c.push(d)}),c.length===0)return Promise.resolve({});const u=ht(a[0],c),l=d=>{if(Ya(u,["client_report"])){A&&_.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}mr(u,(p,h)=>{s(d,p,h)})},f=()=>t({body:Ps(u)}).then(d=>d.statusCode===413?(A&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),l("send_error"),d):(A&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&_.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=im(r,d),d),d=>{throw l("network_error"),A&&_.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===ou)return A&&_.error("Skipped sending event because buffer is full."),l("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function DE(e,t,n){const r=[{type:"client_report"},{timestamp:Hn(),discarded_events:e}];return ht(t?{dsn:t}:{},[r])}function $E(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o??"ok",timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[zc],exclusive_time:i?.[yo],measurements:e.measurements,is_segment:!0}}function FE(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[zc]:e.profile_id},...e.exclusive_time&&{[yo]:e.exclusive_time}}}},measurements:e.measurements}}function BE(e){e.traceLifecycle!=="stream"||!(e.beforeSendTransaction||e.ignoreTransactions?.length)||ft(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}const Me={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function UE(e){return typeof e=="boolean"||"allow"in e||"deny"in e}function HE(e){return e===void 0?{...Me.httpHeaders}:UE(e)?{request:e,response:e}:{request:e.request??Me.httpHeaders.request,response:e.response??Me.httpHeaders.response}}function WE(e){const t=e.dataCollection??{};return{userInfo:t.userInfo??Me.userInfo,cookies:t.cookies??Me.cookies,httpHeaders:HE(t.httpHeaders),httpBodies:t.httpBodies??Me.httpBodies,urlQueryParams:t.urlQueryParams??Me.urlQueryParams,graphQL:{document:t.graphQL?.document??Me.graphQL.document,variables:t.graphQL?.variables??Me.graphQL.variables},genAI:{inputs:t.genAI?.inputs??Me.genAI.inputs,outputs:t.genAI?.outputs??Me.genAI.outputs},mcp:{inputs:t.mcp?.inputs??Me.mcp.inputs,outputs:t.mcp?.outputs??Me.mcp.outputs},databaseQueryData:t.databaseQueryData??Me.databaseQueryData,queues:t.queues??Me.queues,stackFrameVariables:t.stackFrameVariables??Me.stackFrameVariables,frameContextLines:t.frameContextLines??Me.frameContextLines}}const zl="Not capturing exception because it's already been captured.",jl="Discarded session because of missing or non-string release",cm=Symbol.for("SentryInternalError"),um=Symbol.for("SentryDoNotSendEventError"),zE=5e3,lm=Symbol.for("SentryClosedClient");function jE(e){return lm in e}function ql(e){return{message:e,[cm]:!0}}function ua(e){return{message:e,[um]:!0}}function Gl(e){return nt(e)&&cm in e}function Vl(e){return nt(e)&&um in e}function Kl(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{if(s+=r(c),s>=8e5)o(e);else if(!a){const u=e.getOptions()._flushInterval??zE;u>0&&(a=!0,i=bo(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class qE{constructor(t){this._options={attachStacktrace:!0,...t,traceLifecycle:t.traceLifecycle==="static"?"static":"stream"},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=su(t.transportOptions?.bufferSize??am),this._dataCollection=WE(t),this._unhandledSessionStatus="crashed",t.dsn?this._dsn=Yp(t.dsn):A&&_.warn("No DSN provided, client will not send events.");const{beforeSendSpan:n,traceLifecycle:r}=this._options;if(A&&n&&Ti(n)!==(r==="static")&&ft(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${r==="static"?"wrap it with":"remove"} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${r}"\`.`)}),this._dsn){const o=Jh(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}Kl(this,"afterCaptureLog","flushLogs",KE,em),Kl(this,"afterCaptureMetric","flushMetrics",VE,nm)}captureException(t,n,r){const o=Pe();if(ul(t))return A&&_.log(zl),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:Pe(),...r},i=fi(t)?t:String(t),a=lt(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=Pe();if(n?.originalException&&ul(n.originalException))return A&&_.log(zl),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Xa(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),dr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Object.defineProperty(this,lm,{value:!0});const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&(this._setupIntegrations(),BE(this._options))}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),lh(this,t,this._integrations),n||vl(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=ME(t,this);let o=Jv(t,this._dsn,this._options._metadata,this._options.tunnel);if(!rc(n))for(const s of n.attachments||[])o=kl(o,Vb(s));r&&(o=kl(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Ei}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){A&&_.warn(jl);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){A&&_.warn(jl);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=Xv(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;A&&_.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{const n=await this._transport.send(t);return this.emit("afterEnvelope",t),n}catch(n){return A&&_.error("Error while sending envelope:",n),{}}return A&&_.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=xb(this,t),vl(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0,r=!1;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(dr(t,{...r&&{status:this._unhandledSessionStatus},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Gh(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Hc(r)},...a.contexts};const c=wi(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),o=me()){return A&&sc(t)&&_.log(`Captured error event \`${qh(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{A&&(Vl(s)?_.log(s.message):Gl(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=dm(t),c=sc(t),l=`before send for type \`${t.type||"error"}\``;let f="before_send",d=0;const p=typeof i>"u"?void 0:xn(i),h=Xa(t.type);let m=0;return this._prepareEvent(t,n,r,o).then(g=>{if(g===null)throw ua("An event processor returned `null`, will not send event.");return m=g.spans?.length||0,rc(n)?g:GE(s,g,n,y=>{f=y},y=>{d=y})}).then(g=>{if(d&&this.recordDroppedEvent("ignored","span",d),!Ue(g)||g===null){if(this.recordDroppedEvent(f,h),a&&this.recordDroppedEvent(f,"span",1+m-d),g!==null)throw ql(`${l} must return \`null\` or a valid event.`);const b=f==="ignored"?"Transaction matched `ignoreSpans`":`${l} ${f==="callback_error"?"threw an error":"returned `null`"}`;throw ua(`${b}, will not send event.`)}const S=r.getSession()||o.getSession();if(c&&S&&this._updateSessionFromEvent(S,g),c&&typeof p=="number"&&en()>p)throw this.recordDroppedEvent("sample_rate","error"),ua(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const b=m-d-(g.spans?.length||0);b>0&&this.recordDroppedEvent("before_send","span",b)}const T=g.transaction_info;if(a&&T&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...T,source:b}}return this.sendEvent(g,n),g}).then(null,g=>{throw Vl(g)||Gl(g)?g:(this.captureException(g,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:g}),ql(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
-
Reason: ${g}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ou&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){A&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){A&&_.log("No outcomes to send");return}if(!this._dsn){A&&_.log("No dsn provided, will not send outcomes");return}A&&_.log("Sending outcomes:",t);const n=DE(t,this._options.tunnel&&Wt(this._dsn));this.sendEnvelope(n)}}function GE(e,t,n,r,o){const{beforeSend:s,ignoreSpans:i,beforeSendTransaction:a}=e,c=Ti(e.beforeSendSpan)&&e.beforeSendSpan;let u=t;if(sc(u)&&s){const l=u;return vt(A?"The `beforeSend` callback threw an error, dropping the event:":"",()=>s(l,n),()=>(r("callback_error"),null))}if(dm(u)){if(c||i){const l=$E(u);if(i?.length&&Ns({description:l.description,op:l.op,attributes:l.data},i))return r("ignored"),null;if(c){const f=Ms(l,c);u=_o(t,FE(f))}if(u.spans){const f=[],d=u.spans;for(const p of d){if(i?.length&&Ns({description:p.description,op:p.op,attributes:p.data},i)){Rb(d,p);continue}c?f.push(Ms(p,c)):f.push(p)}o(d.length-f.length),u.spans=f}}if(a)return vt(A?"The `beforeSendTransaction` callback threw an error, dropping the event:":"",()=>a(u,n),()=>(r("callback_error"),null))}return u}function sc(e){return e.type===void 0}function dm(e){return e.type==="transaction"}function VE(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+fm(e.attributes)}function KE(e){let t=0;return e.message&&(t+=e.message.length*2),t+fm(e.attributes)}function fm(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Yl(n[0]):lt(n)?t+=Yl(n):t+=100}),t}function Yl(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function YE(e,t){t.debug===!0&&(A?_.enable():ft(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),JE(),q().update(t.initialScope);const r=new e(t);return QE(r),r.init(),r}function XE(){const e=v();return e&&!jE(e)?e:void 0}function JE(){XE()&&ft(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")})}function QE(e){q().setClient(e)}const la=100,da=5e3,ZE=36e5;function ew(e){function t(...n){A&&_.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=da,i;function a(f,d,p){return Ya(f,["client_report"])?!1:n.shouldStore?n.shouldStore(f,d,p):!0}function c(f){i&&clearTimeout(i),i=bo(setTimeout(async()=>{i=void 0;const d=await o.shift();d&&(t("Attempting to send previously queued event"),d[0].sent_at=new Date(Ut()).toISOString(),l(d,!0).catch(p=>{t("Failed to retry sending",p)}))},f))}function u(){i||(c(s),s=Math.min(s*2,ZE))}async function l(f,d=!1){if(!d&&Ya(f,["replay_event","replay_recording"]))return await o.push(f),c(la),{};try{if(n.shouldSend){const m=n.shouldSend(f);if((Pt(m)?await m:m)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false")}const p=await r.send(f);let h=la;if(p){if(p.headers?.["retry-after"])h=om(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),s=da,p}catch(p){const h=a(f,p,s);if(Pt(h)?await h:h)return d?await o.unshift(f):await o.push(f),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:l,flush:f=>(f===void 0&&(s=da,c(la)),r.flush(f))}}}const fa="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function pm(e,t){let n;return mr(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function tw(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=pm(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function nw(e,t){return ht(t?{...e[0],dsn:t}:e[0],e[1])}function zP(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const l=u.getEvent();return l?.extra?.[fa]&&Array.isArray(l.extra[fa])?l.extra[fa]:[]});function i(u,l){const f=l?`${u}:${l}`:u;let d=o.get(f);if(!d){const p=Gp(u);if(!p)return;const h=Jh(p,n.tunnel);d=l?tw(e,l)({...n,url:h}):e({...n,url:h}),o.set(f,d)}return[u,d]}async function a(u){function l(h){const m=h?.length?h:["event"];return pm(u,m)}const f=s({envelope:u,getEvent:l}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),d=f.length?f:[["",r]];return(await Promise.all(d.map(([h,m])=>m.send(nw(u,h)))))[0]}async function c(u){const l=[...o.values(),r];return(await Promise.all(l.map(d=>d.flush(u)))).every(d=>d)}return{send:a,flush:c}}}const iu="[Filtered]",Xl=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],rw=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function ow(e,t){return t.some(n=>e.includes(n))}function hm(e,t,n){if(t===!1)return!0;const r=e.toLowerCase(),o=n!=null?[...Xl,...n]:Xl;if(ow(r,o))return!0;if(t===!0)return!1;const i=("deny"in t?t.deny:t.allow).some(a=>r.includes(a.toLowerCase()));return"deny"in t?i:!i}function Ln(e,t,n){if(t===!1)return{};const r={};for(const o of Object.keys(e))r[o]=hm(o,t,n)?iu:e[o];return r}function sw(e,t){return(Array.isArray(e)?e:[e]).flatMap(r=>typeof r!="string"?[]:t==="set-cookie"?iw(r).map(o=>o.split(";")[0]):r.split(";")).map(r=>r.trim()).filter(r=>r!==""&&r!=="=").map(r=>{const o=r.indexOf("=");return o===-1?["",r]:[r.slice(0,o).trim(),r.slice(o+1).trim()]})}function iw(e){return e.split(/,(?=[^;=,]*=)/)}function aw(e){const t={};for(const[n,r]of e)t[n]===void 0&&(t[n]=n===""?iu:cw(r));return t}function cw(e){const t=e.length>1&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e;try{return t.indexOf("%")!==-1?decodeURIComponent(t):t}catch{return t}}function ic(e,t,n){if(t===!1)return{};const r=aw(sw(e,n));return Ln(r,t,rw)}function mm(e,t){if(!(!e||t===!1))return e.split("&").map(n=>{const r=n.indexOf("="),o=r===-1?n:n.slice(0,r),s=new URLSearchParams(`${o}=`).keys().next().value;return s!==void 0&&hm(s,t)?`${o}=${iu}`:n}).join("&")}function uw(e,t){const n=e.indexOf("#"),r=n===-1?e.length:n,o=e.indexOf("?");if(o===-1||o>r)return e;const s=e.slice(0,o),i=e.slice(o+1,r),a=e.slice(r),c=mm(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}function gm(e){return(e??v())?.getDataCollectionOptions().urlQueryParams??!0}function be(e,t){return e===void 0?void 0:uw(e,gm(t))}function _m(e,t){return e?mm(e,gm(t)):void 0}const lw="thismessage:/";function Ai(e){return"isRelative"in e}function Dn(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?lw:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function ym(e){if(Ai(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Sm(e){return e?.replace(/^\?/,"")||void 0}function bm(e){return e?.replace(/^#/,"")||void 0}function au(e,t){try{return new URL(e,t).hostname||void 0}catch{return}}function Cn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function vm(e){return e.split(/[?#]/,1)[0]}function Dt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function Em(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return fw(e,n)||dw(e,r)}function dw(e,t){return t?Jl(e)===Jl(t):!1}function fw(e,t){const n=Dn(e);return!n||Ai(n)||!t?!1:pw(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function pw(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Jl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function hw(e,...t){const n=e.map((o,s)=>o??e.raw[s]),r=new String(String.raw({raw:n},...t));return r.__sentry_template_string__=n.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),r.__sentry_template_values__=t,r}const mw=hw;function gw(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function wm(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:Zt})),o.version=Zt)}function Tm(e={}){const t=e.client||v();if(!fE()||!t)return{};const n=it(),r=fn(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||q(),s=e.span||he(),i=hr(s)&&!Ye(t.getOptions());if(!s&&_S())return{};const a=s&&!i?Eb(s):_w(o),c=s?st(s):wi(t,o),u=qp(c);if(!Xp.test(a))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const f={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(f.traceparent=s&&!i?wb(s):yw(o)),f}function _w(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Qp(t,r,n)}function yw(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Zp(t,r,n)}const Ql=new WeakMap;function Sw(e){const t=`${e.flags.replace(/[gy]/g,"")}${e.ignoreCase?"":"i"}`;if(t===e.flags)return e;const n=Ql.get(e);if(n)return n;const r=new RegExp(e.source,t);return Ql.set(e,r),r}function pa(e,t,n=!1){const r=e.toLowerCase();for(const o of t)if(tt(o)){const s=o.toLowerCase();if(n?r===s:r.includes(s))return!0}else if(pp(o)&&Sw(o).test(e))return!0;return!1}const bw=100;function Et(e,t){const n=v(),r=me();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=bw}=n.getOptions();if(s<=0)return;const a={timestamp:Hn(),...e},c=o?vt(A?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":"",()=>ft(()=>o(a,t)),()=>null):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const vw="FunctionToString",Zl=new WeakMap,Ew=(()=>({name:vw,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Bc(this);let r;try{Zl.has(v())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Zl.set(e,!0)}})),ww=Ew,Tw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],Iw="EventFilters",kw=(e={})=>{let t;return{name:Iw,setup(n){const r=n.getOptions();t=ed(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=ed(e,s)}return Rw(n,t)?null:n}}};function ed(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Tw],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Rw(e,t){if(e.type){if(e.type==="transaction"&&Aw(e,t.ignoreTransactions))return A&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
-
Event: ${wn(e)}`),!0}else{if(Cw(e,t.ignoreErrors))return A&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
-
Event: ${wn(e)}`),!0;if(Ow(e))return A&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
-
Event: ${wn(e)}`),!0;if(Nw(e,t.denyUrls))return A&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
-
Event: ${wn(e)}.
|
|
15
|
-
Url: ${$s(e)}`),!0;if(!xw(e,t.allowUrls))return A&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
-
Event: ${wn(e)}.
|
|
17
|
-
Url: ${$s(e)}`),!0}return!1}function Cw(e,t){return t?.length?qh(e).some(n=>Ht(n,t)):!1}function Aw(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Ht(n,t):!1}function Nw(e,t){if(!t?.length)return!1;const n=$s(e);return n?Ht(n,t):!1}function xw(e,t){if(!t?.length)return!0;const n=$s(e);return n?Ht(n,t):!0}function Mw(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function $s(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Mw(n):null}catch{return A&&_.error(`Cannot extract url for event ${wn(e)}`),null}}function Ow(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Pw(e,t,n,r,o,s){if(!o.exception?.values||!s||!ke(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=ps(e,t,r,s.originalException,n,o.exception.values,i,0))}function ps(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(ke(r[o])){ha(i,a,r);const u=e(t,r[o]),l=c.length;ma(u,o,l,a),c=ps(e,t,n,r[o],o,[u,...c],u,l)}return Im(r)&&r.errors.forEach((u,l)=>{if(ke(u)){ha(i,a,r);const f=e(t,u),d=c.length;ma(f,`errors[${l}]`,d,a),c=ps(e,t,n,u,o,[f,...c],f,d)}}),Lw(r)&&["error","suppressed"].forEach(u=>{const l=r[u];if(ke(l)){ha(i,a,r);const f=e(t,l),d=c.length;ma(f,u,d,a),c=ps(e,t,n,l,o,[f,...c],f,d)}}),c}function Im(e){return Array.isArray(e.errors)}function Lw(e){return"error"in e&&"suppressed"in e}function ha(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Im(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ma(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Dw(e){return ke(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function td(e){return Dw(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const km=new Map,nd=new Set;function $w(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(nd.has(t))continue;nd.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){km.set(o.filename,n);break}}}function Fw(e,t){return $w(e),km.get(t)}function Rm(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Fw(e,r.filename);o&&(r.module_metadata=o)})})}function Cm(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const jP=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{mr(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(Cm(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Rm(n,t)})}}),Fs=new Set([]);function cu(e){const t="console",n=un(t,e);return ln(t,Uw),n}function Bw(e){for(const t of e)Fs.add(t);return()=>{for(const t of e)Fs.delete(t)}}const rd=new Set;function Uw(){"console"in $&&di.forEach(function(e){rd.has(e)||!(e in $.console)||(rd.add(e),Oe($.console,e,function(t){return Is[e]=t,function(...n){const r=n[0],o=Is[e],s=Fs.size&&typeof r=="string"&&Ht(r,Fs);s||et("console",{args:n,level:e}),(!s||A&&_.isEnabled())&&o?.apply($.console,n)}}))})}function Bs(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Hw="CaptureConsole",Ww=((e={})=>{const t=e.levels||di,n=e.handled??!0;return{name:Hw,setup(r){"console"in $&&cu(({args:o,level:s})=>{v()!==r||!t.includes(s)||zw(o,s,n)})}}}),qP=Ww;function zw(e,t,n){const r=Bs(t),o=new Error,s={level:Bs(t),extra:{arguments:e}};Je(i=>{if(i.addEventProcessor(u=>(u.logger="console",At(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${qa(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){Pn(a,s);return}const c=qa(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const jw="Dedupe",qw=(()=>{let e;return{name:jw,processEvent(t){if(t.type)return t;try{if(Vw(t,e))return A&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Gw=qw;function Vw(e,t){return t?!!(Kw(e,t)||Yw(e,t)):!1}function Kw(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Nm(e,t)||!Am(e,t))}function Yw(e,t){const n=od(t),r=od(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Nm(e,t)||!Am(e,t))}function Am(e,t){const n=Wa(e),r=Wa(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function Nm(e,t){const n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join("")===r.join("")}catch{return!1}}function od(e){return e.exception?.values?.[0]}const Xw="ExtraErrorData",Jw=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Xw,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return Qw(r,o,t,n,i)}}}),GP=Jw;function Qw(e,t={},n,r,o){if(!t.originalException||!ke(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=xm(t.originalException,r,o);if(i){const a={...e.contexts},c=Te(i,n);return Ue(c)&&(Hy(c),a[s]=c),{...e,contexts:a}}return e}function xm(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=ke(i)||typeof i=="string"?n?so(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(ke(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:xm(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=ke(a)?a.toString():a}}return o}catch(r){A&&_.error("Unable to extract extra data from the Error object:",r)}return null}function Zw(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const e0=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function t0(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=e0.exec(t);return n?n.slice(1):[]}function sd(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Zw(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function id(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function n0(e,t){e=sd(e).slice(1),t=sd(t).slice(1);const n=id(e.split("/")),r=id(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function r0(e,t){return t0(e)[2]||""}const o0="RewriteFrames",VP=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,o=e.iteratee||s0({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:o0,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function s0({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?n0(t,i):r0(i);r.filename=`${n}${a}`}return r}}const i0=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],a0=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],c0={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},Mm=["select","insert","upsert","update","delete"];function Ni(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function xi(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Om(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function u0(e,t){return Om(e,t)!==void 0}function Pm(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;const n=e,r=t.toLowerCase(),o=Object.keys(n).find(s=>s.toLowerCase()===r);return o!==void 0?n[o]:void 0}function l0(e,t={}){switch(e){case"GET":case"QUERY":return"select";case"POST":return Pm(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function d0(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&c0[n]||"filter",`${o}(${e}, ${r.join(".")})`}function ad(e,t=!1){return new Proxy(e,{apply(n,r,o){const s=`auth${t?".admin":""}.${e.name}`,i=v(),a=i&&V(i)?s:`auth ${t?"(admin) ":""}${e.name}`;return Kc({name:a,attributes:{[re]:"auto.db.supabase",[H]:$h,[Ap]:"postgresql",[Cp]:s}},c=>Reflect.apply(n,r,o).then(u=>(nt(u)&&"error"in u&&u.error?(c.setStatus({code:we}),Pn(u.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):c.setStatus({code:So}),c.end(),u)).catch(u=>{throw c.setStatus({code:we}),c.end(),Pn(u,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),u}).then(...o))}})}function f0(e){const t=e.auth;if(!(!t||xi(e.auth))){for(const n of i0){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=ad(r))}for(const n of a0){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=ad(r,!0))}Ni(e.auth)}}function p0(e,t){xi(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return m0(i,t),s}}),Ni(e.prototype.from))}function h0(e,t){xi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){const s=Mm,i=r,a=l0(i.method,i.headers);if(!s.includes(a)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(n,r,o);const c=i.url.pathname.split("/"),u=c.length>0?c[c.length-1]:"",l=[];for(const[M,I]of i.url.searchParams.entries())l.push(d0(M,I));const f=Object.create(null);if(Ue(i.body))for(const[M,I]of Object.entries(i.body))f[M]=I;const d=v(),p=t.sendOperationData??d?.getDataCollectionOptions().databaseQueryData===!0,h=Om(i.body,f),m=a==="select"?"":`${a}${u0(i.body,f)?"(...) ":""}`,g=p?l.join(" "):l.length>0?"[redacted]":"",y=[m.trimEnd(),g].filter(Boolean).join(" "),S=y?`${y} from(${u})`:`from(${u})`,T=d&&V(d)?`${a}${u?` ${u}`:""}`:S,b={"db.table":u,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":Pm(i.headers,"X-Client-Info"),[Ap]:"postgresql",[Cp]:a,[re]:"auto.db.supabase",[H]:$h};return l.length&&p&&(b["db.query"]=l),h!==void 0&&p&&(b["db.body"]=h),Kc({name:T,attributes:b},M=>Reflect.apply(n,r,[]).then(I=>{if(M&&(I&&typeof I=="object"&&"status"in I&&Cs(M,I.status||500),M.end()),I?.error){const U=new Error(I.error.message);I.error.code&&(U.code=I.error.code),I.error.details&&(U.details=I.error.details);const E={};l.length&&p&&(E.query=l),h!==void 0&&p&&(E.body=h),Pn(U,O=>(O.addEventProcessor(x=>(At(x,{handled:!1,type:"auto.db.supabase.postgres"}),x)),O.setContext("supabase",E),O))}const k={type:"supabase",category:`db.${a}`,message:S},R={};return l.length&&p&&(R.query=l),h!==void 0&&p&&(R.body=h),Object.keys(R).length&&(k.data=R),Et(k),I},I=>{throw M&&(Cs(M,500),M.end()),I}).then(...o))}}),Ni(e.prototype.then))}function m0(e,t){for(const n of Mm)xi(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,o,s){const i=Reflect.apply(r,o,s),a=i.constructor;return A&&_.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),h0(a,t),i}}),Ni(e.prototype[n]))}const g0=(e,t={})=>{if(!e){A&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;p0(n,t),f0(e)},_0="Supabase",y0=((e,t)=>({setupOnce(){g0(e,t)},name:_0})),KP=e=>y0(e.supabaseClient,{sendOperationData:e.sendOperationData}),S0=10,b0="ZodErrors";function v0(e){return ke(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function E0(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function w0(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function T0(e){const t=new Set;for(const r of e.issues){const o=w0(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${so(n.join(", "),100)}`}function I0(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!v0(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(E0);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:T0(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
18
|
-
${o.stack}`:"unknown"}}}}}const k0=((e={})=>{const t=e.limit??S0;return{name:b0,processEvent(n,r){return I0(t,e.saveZodIssuesAsAttachment,n,r)}}}),YP=k0,XP=e=>{const t=e.ignoreSentryInternalFrames??!1;return{name:"ThirdPartyErrorsFilter",setup(n){n.on("beforeEnvelope",r=>{mr(r,(o,s)=>{if(s==="event"){const i=Array.isArray(o)?o[1]:void 0;i&&(Cm(i),o[1]=i)}})}),n.on("applyFrameMetadata",r=>{if(r.type)return;const o=n.getOptions().stackParser;Rm(o,r)})},preprocessEvent(n){t&&($._sentryWrappedDepth??0)>0&&(n.sdkProcessingMetadata={...n.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(n){const r=t?n.sdkProcessingMetadata?.insideSentryWrapped===!0&&n.exception?.values?.length===1:!1,o=C0(n,t,r);if(o){const s=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(o[s](a=>!a.some(c=>e.filterKeys.includes(c)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;n.tags={...n.tags,third_party_code:!0}}}return n}}};function R0(e,t,n){if(t!==0)return!1;if(n&&A0(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(x0))return!1;if(e.pre_context){const r=e.pre_context.length;for(let o=0;o<r;o++)if(e.pre_context[o]?.includes(N0))return!0}return!1}function C0(e,t,n){const r=Wa(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!R0(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(cd)).map(s=>s.slice(cd.length)):[])}function A0(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const cd="_sentryBundlerPluginAppKey:",N0="Attempt to invoke user-land function",x0="fn.apply(this, wrappedArguments)",M0="Console",O0=(e={})=>{const t=new Set(e.levels||di);return{name:M0,setup(n){const r=cu(({args:o,level:s})=>{v()!==n||!t.has(s)||P0(s,o)});if(n.registerCleanup(r),e.filter){const o=Bw(e.filter);n.registerCleanup(o)}}}};function P0(e,t){const n={category:"console",data:{arguments:t,logger:"console"},level:Bs(e),message:ud(t)};if(e==="assert")if(t[0]===!1){const r=t.slice(1);n.message=r.length>0?`Assertion failed: ${ud(r)}`:"Assertion failed",n.data.arguments=r}else return;Et(n,{input:t,level:e})}function ud(e){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):qa(e," ")}const L0=100,D0=10,Vo="flag.evaluation.";function Mr(e){if(e.type)return e;const n=q().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function $n(e,t,n=L0){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;$0(o,e,t,n)}function $0(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){A&&_.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Fn(e,t,n=D0){if(typeof t!="boolean")return;const r=he();if(!r)return;const o=Ne(r).data;if(`${Vo}${e}`in o){r.setAttribute(`${Vo}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(Vo)).length<n&&r.setAttribute(`${Vo}${e}`,t)}const JP=()=>({name:"FeatureFlags",processEvent(e,t,n){return Mr(e)},addFeatureFlag(e,t){$n(e,t),Fn(e,t)}}),F0=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Oe(t,"isOn",ld),typeof t.getFeatureValue=="function"&&Oe(t,"getFeatureValue",ld)},processEvent(t,n,r){return Mr(t)}});function ld(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&($n(n,r),Fn(n,r)),r}}const B0="ConversationId",U0=(()=>({name:B0,setup(e){e.on("spanStart",t=>{const n=q().getScopeData(),r=me().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=Ne(t);if(!s?.startsWith("gen_ai.")&&!i["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(kS,o)}})}})),H0=U0;function W0(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Ye()&&t(i);if(e.endTimestamp){const g=e.fetchData.__span;if(!g)return;const y=r[g];y&&(a&&(q0(y,e),z0(y,e,o)),delete r[g]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1,urlBase:l}=o??{},f=v(),d=!!he(),p=d||!!f&&V(f),h=a&&p?Yc(K0(i,s,c,f,l)):new Mn,m=Ri(h)&&d?void 0:h;if(a&&!p&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const g=e.args[0],y={...e.args[1]||{}},S=j0(g,y,Ye()&&p?m:void 0,u);S&&(e.args[1]=y,y.headers=S)}if(f){const g={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",h,g)}return h}function z0(e,t,n){n?.onRequestSpanEnd?.(e,{headers:t.response?.headers,error:t.error})}function j0(e,t,n,r){const o=Tm({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(Fc(e)?e.headers:void 0);if(c)if(G0(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const l=u.get("baggage");l?Ko(l)||u.set("baggage",`${l},${i}`):u.set("baggage",i)}return u}else if(V0(c)){const u=[...c];u.find(f=>f[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!u.find(f=>f[0]==="traceparent")&&u.push(["traceparent",a]);const l=c.find(f=>f[0]==="baggage"&&typeof f[1]=="string"&&Ko(f[1]));return i&&!l&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,l="traceparent"in c?c.traceparent:void 0,f="baggage"in c?c.baggage:void 0,d=f?Array.isArray(f)?[...f]:[f]:[],p=f&&(Array.isArray(f)?f.find(m=>Ko(m)):Ko(f));i&&!p&&d.push(i);const h=Object.assign({},c,{"sentry-trace":u??s,...d.length>0&&{baggage:d.join(",")}});return r&&a&&!l&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function q0(e,t){if(t.response){Cs(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute(xp,r)}}else t.error&&e.setStatus({code:we,message:"internal_error"});e.end()}function Ko(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(As))}function G0(e){return typeof Headers<"u"&&hi(e,Headers)}function V0(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function K0(e,t,n,r,o){const s=!!r&&V(r),i=au(e,o);if(e.startsWith("data:")){const u=Dt(e);return{name:s?t:`${t} ${u}`,attributes:dd(e,void 0,t,n,r,i)}}const a=Dn(e),c=a?ym(a):e;return{name:s?i?`${t} ${i}`:t:`${t} ${c}`,attributes:dd(e,a,t,n,r,i)}}function dd(e,t,n,r,o,s){const i={[De]:be(Dt(e),o),type:"fetch",[gi]:n,[re]:r,[H]:Fh,[yi]:s};return t&&(Ai(t)||(i[De]=be(Dt(t.href),o),i[_i]=t.hostname,i[JS]=t.port?Number(t.port):void 0),i[Lp]=_m(Sm(t.search),o),i[Pp]=bm(t.hash)),i}const ac=$;function Y0(){if(!("fetch"in ac))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function cc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function X0(){if(typeof EdgeRuntime=="string")return!0;if(!Y0())return!1;if(cc(ac.fetch))return!0;let e=!1;const t=ac.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=cc(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){A&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Mi(e){const t="fetch",n=un(t,e);return ln(t,()=>Lm()),n}function J0(e){const t="fetch-body-resolved",n=un(t,e);return ln(t,()=>Lm(Z0)),n}function Lm(e){on()&&!X0()||Oe($,"fetch",function(t){return new Proxy(t,{apply(n,r,o){const s=new Error,{method:i,url:a}=eT(o),c={args:o,fetchData:{method:i,url:a},startTimestamp:fe()*1e3,virtualError:s,headers:tT(o)};return e||et("fetch",{...c}),Reflect.apply(n,$,o).then(async u=>(e?e(u):et("fetch",{...c,endTimestamp:fe()*1e3,response:u}),u),u=>{et("fetch",{...c,endTimestamp:fe()*1e3,error:u}),ke(u)&&u.stack===void 0&&(u.stack=s.stack,pe(u,"framesToPop",1));const f=v()?.getOptions().enhanceFetchErrorMessages??"always";if(f!==!1&&ke(u)&&u.name==="TypeError"&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(c.fetchData.url).host;f==="always"?u.message=`${u.message} (${h})`:pe(u,"__sentry_fetch_url_host__",h)}catch{}throw u})}})})}async function Q0(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function Z0(e){let t;try{t=e.clone()}catch{return}Q0(t,()=>{et("fetch-body-resolved",{endTimestamp:fe()*1e3,response:e})})}function hs(e,t){return nt(e)&&!!e[t]}function fd(e){return typeof e=="string"?e:e?hs(e,"url")?e.url:e.toString?e.toString():"":""}function eT(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:fd(n),method:hs(r,"method")?String(r.method).toUpperCase():Fc(n)&&hs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:fd(t),method:hs(t,"method")?String(t.method).toUpperCase():"GET"}}function tT(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Fc(t))return new Headers(t.headers)}catch{}}function Dm(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}class uu{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){const n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.delete(t),this._cache.size>=this._maxSize){const r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){const n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const t=[];return this._cache.forEach(n=>t.push(n)),t}}function nT(e,t={},n=q()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,l={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},f=n?.getClient()||v();return f&&f.emit("beforeSendFeedback",l,t),n.captureEvent(l,t)}function Or(e,t,n,r,o){Ds({level:e,message:t,attributes:n,severityNumber:o},r)}function rT(e,t,{scope:n}={}){Or("trace",e,t,n)}function oT(e,t,{scope:n}={}){Or("debug",e,t,n)}function sT(e,t,{scope:n}={}){Or("info",e,t,n)}function iT(e,t,{scope:n}={}){Or("warn",e,t,n)}function aT(e,t,{scope:n}={}){Or("error",e,t,n)}function cT(e,t,{scope:n}={}){Or("fatal",e,t,n)}const QP=Object.freeze(Object.defineProperty({__proto__:null,debug:oT,error:aT,fatal:cT,fmt:mw,info:sT,trace:rT,warn:iT},Symbol.toStringTag,{value:"Module"}));function Us(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):uT(e,t,n)}function uT(e,t,n){return e.map(r=>lt(r)?String(r):JSON.stringify(Te(r,t,n))).join(" ")}function $m(e){return/%[sdifocO]/.test(e)}function Fm(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const lT="ConsoleLogs",pd={[re]:"auto.log.console"},dT=((e={})=>{const t=e.levels||di;return{name:lT,setup(n){const{normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=n.getOptions(),s=cu(({args:i,level:a})=>{if(v()!==n||!t.includes(a))return;const c=i[0],u=i.slice(1);if(a==="assert"){if(!c){const d=u.length>0?`Assertion failed: ${Us(u,r,o)}`:"Assertion failed";Ds({level:"error",message:d,attributes:pd})}return}const l=a==="log",f={...pd};if(Ue(c)){Object.assign(f,Te(c,r,o));const d=typeof i[1]=="string"?2:1;i.slice(d).forEach((h,m)=>{f[`sentry.message.parameter.${m}`]=Te(h,r,o)})}else if(u.length>0&&typeof c=="string"&&!$m(c)){const p=Fm(c,u);for(const[h,m]of Object.entries(p))f[h]=h.startsWith("sentry.message.parameter.")?Te(m,r,o):m}Ds({level:l?"info":a,message:Us(i,r,o),severityNumber:l?10:void 0,attributes:f})});n.registerCleanup(s)}}}),ZP=dT;function lu(e,t,n,r){xE({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function du(e,t=1,n){lu("counter",e,t,n)}function fT(e,t,n){lu("gauge",e,t,n)}function Hs(e,t,n){lu("distribution",e,t,n)}const eL=Object.freeze(Object.defineProperty({__proto__:null,count:du,distribution:Hs,gauge:fT},Symbol.toStringTag,{value:"Module"})),pT=["trace","debug","info","warn","error","fatal"];function tL(e={}){const t=new Set(e.levels??pT),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...l}=r,f=n||v();if(!f)return;const d=gT(o,s);if(!t.has(d))return;const{normalizeDepth:p=3,normalizeMaxBreadth:h=1e3}=f.getOptions(),m={};for(const[y,S]of Object.entries(l))m[y]=Te(S,p,h);m["sentry.origin"]="auto.log.consola",c&&(m["consola.tag"]=c),o&&(m["consola.type"]=o),s!=null&&typeof s=="number"&&(m["consola.level"]=s);const g=yT(_T(a,p,h),p,h);g?.attributes&&Object.assign(m,g.attributes),Ds({level:d,message:g?.message||i||a&&Us(a,p,h)||"",attributes:m})}}}const hT={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},mT={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function gT(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=hT[e];if(n)return n}if(typeof t=="number"){const n=mT[t];if(n)return n}return"info"}function _T(e,t,n){if(!e?.length)return{message:""};const r=Us(e,t,n),o=e[0];if(Ue(o)){const s=typeof e[1]=="string"?2:1,i=e.slice(s);return{message:r,attributes:o,messageParameters:i}}else{const s=e.slice(1),i=s.length>0&&typeof o=="string"&&!$m(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function yT(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=Fm(s,i);for(const[u,l]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Te(l,t,n):l}else i&&i.length>0&&i.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=Te(c,t,n)});return{message:r,attributes:{...Te(o,t,n),...a}}}const Ze=$,ue=Ze.document,Kr=Ze.navigator,Bm="Report a Bug",ST="Cancel",bT="Send Bug Report",vT="Confirm",ET="Report a Bug",wT="your.email@example.org",TT="Email",IT="What's the bug? What did you expect?",kT="Description",RT="Your Name",CT="Name",AT="Thank you for your report!",NT="(required)",xT="Add a screenshot",MT="Remove screenshot",OT="Highlight",PT="Hide",LT="Remove",Um="Unable to submit feedback with empty message",Hm="No client setup, cannot send feedback.",Wm="Unable to determine if Feedback was correctly sent.",zm="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",jm="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",DT="widget",$T="api",FT=5e3,BT={ERROR_EMPTY_MESSAGE:Um,ERROR_NO_CLIENT:Hm,ERROR_TIMEOUT:Wm,ERROR_FORBIDDEN:zm,ERROR_GENERIC:jm};function UT(e,t){return t?.[e]??BT[e]}function jr(e,t){return new Error(UT(e,t))}const HT=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw jr("ERROR_EMPTY_MESSAGE",n);const r=v();if(!r)throw jr("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const o=nT({source:$T,url:WT(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(jr("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,l)=>{if(u.event_id===o)return clearTimeout(a),c(),l?.statusCode&&l.statusCode>=200&&l.statusCode<300?s(o):l?.statusCode===403?i(jr("ERROR_FORBIDDEN",n)):i(jr("ERROR_GENERIC",n))})})};function WT(){try{return Ze.document.location.href}catch{return""}}const ms=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function zT(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Kr.userAgent)||/Macintosh/i.test(Kr.userAgent)&&Kr.maxTouchPoints&&Kr.maxTouchPoints>1||!isSecureContext)}function Yo(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function jT(e){const t=ue.createElement("style");return t.textContent=`
|
|
19
|
-
.widget__actor {
|
|
20
|
-
position: fixed;
|
|
21
|
-
z-index: var(--z-index);
|
|
22
|
-
margin: var(--page-margin);
|
|
23
|
-
inset: var(--actor-inset);
|
|
24
|
-
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: 8px;
|
|
28
|
-
padding: 16px;
|
|
29
|
-
|
|
30
|
-
font-family: inherit;
|
|
31
|
-
font-size: var(--font-size);
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
line-height: 1.14em;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
|
|
36
|
-
background: var(--actor-background, var(--background));
|
|
37
|
-
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
-
border: var(--actor-border, var(--border));
|
|
39
|
-
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
-
color: var(--actor-color, var(--foreground));
|
|
41
|
-
fill: var(--actor-color, var(--foreground));
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
opacity: 1;
|
|
44
|
-
transition: transform 0.2s ease-in-out;
|
|
45
|
-
transform: translate(0, 0) scale(1);
|
|
46
|
-
}
|
|
47
|
-
.widget__actor[aria-hidden="true"] {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
visibility: hidden;
|
|
51
|
-
transform: translate(0, 16px) scale(0.98);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.widget__actor:hover {
|
|
55
|
-
background: var(--actor-hover-background, var(--background));
|
|
56
|
-
filter: var(--interactive-filter);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.widget__actor svg {
|
|
60
|
-
width: 1.14em;
|
|
61
|
-
height: 1.14em;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@media (max-width: 600px) {
|
|
65
|
-
.widget__actor span {
|
|
66
|
-
display: none;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`,e&&t.setAttribute("nonce",e),t}function Ve(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Gn=20,qT="http://www.w3.org/2000/svg";function GT(){const e=a=>Ze.document.createElementNS(qT,a),t=Ve(e("svg"),{width:`${Gn}`,height:`${Gn}`,viewBox:`0 0 ${Gn} ${Gn}`,fill:"var(--actor-color, var(--foreground))"}),n=Ve(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ve(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Ve(e("clipPath"),{id:"clip0_57_80"}),i=Ve(e("rect"),{width:`${Gn}`,height:`${Gn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function VT({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=ue.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Bm,o.appendChild(GT()),e){const i=ue.createElement("span");i.appendChild(ue.createTextNode(e)),o.appendChild(i)}const s=jT(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const qm="rgba(88, 74, 192, 1)",KT={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:qm,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},hd={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:qm,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function md(e){return`
|
|
70
|
-
--foreground: ${e.foreground};
|
|
71
|
-
--background: ${e.background};
|
|
72
|
-
--accent-foreground: ${e.accentForeground};
|
|
73
|
-
--accent-background: ${e.accentBackground};
|
|
74
|
-
--success-color: ${e.successColor};
|
|
75
|
-
--error-color: ${e.errorColor};
|
|
76
|
-
--border: ${e.border};
|
|
77
|
-
--box-shadow: ${e.boxShadow};
|
|
78
|
-
--outline: ${e.outline};
|
|
79
|
-
--interactive-filter: ${e.interactiveFilter};
|
|
80
|
-
`}function gd({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=ue.createElement("style");return o.textContent=`
|
|
81
|
-
:host {
|
|
82
|
-
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
-
--font-size: 14px;
|
|
84
|
-
--z-index: 100000;
|
|
85
|
-
|
|
86
|
-
--page-margin: 16px;
|
|
87
|
-
--inset: auto 0 0 auto;
|
|
88
|
-
--actor-inset: var(--inset);
|
|
89
|
-
|
|
90
|
-
font-family: var(--font-family);
|
|
91
|
-
font-size: var(--font-size);
|
|
92
|
-
|
|
93
|
-
${e!=="system"?`color-scheme: only ${e};`:""}
|
|
94
|
-
|
|
95
|
-
${md(e==="dark"?{...hd,...t}:{...KT,...n})}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${e==="system"?`
|
|
99
|
-
@media (prefers-color-scheme: dark) {
|
|
100
|
-
:host {
|
|
101
|
-
color-scheme: only dark;
|
|
102
|
-
|
|
103
|
-
${md({...hd,...t})}
|
|
104
|
-
}
|
|
105
|
-
}`:""}
|
|
106
|
-
`,r&&o.setAttribute("nonce",r),o}const Gm=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:l=!0,enableScreenshot:f=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:T=xT,cancelButtonLabel:b=ST,confirmButtonLabel:M=vT,emailLabel:I=TT,emailPlaceholder:k=wT,formTitle:R=ET,isRequiredLabel:U=NT,messageLabel:E=kT,messagePlaceholder:O=IT,nameLabel:x=CT,namePlaceholder:w=RT,removeScreenshotButtonLabel:D=MT,submitButtonLabel:N=bT,successMessageText:J=AT,triggerLabel:Q=Bm,triggerAriaLabel:P="",highlightToolText:Y=OT,hideToolText:B=PT,removeHighlightText:ee=LT,errorEmptyMessageText:Se=Um,errorNoClientText:se=Hm,errorTimeoutText:$e=Wm,errorForbiddenText:zt=zm,errorGenericText:Ur=jm,onFormOpen:Hr,onFormClose:Wr,onSubmitSuccess:zo,onSubmitError:pn,onFormSubmitted:jo}={})=>{const Tt={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:l,enableScreenshot:f,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:S,themeLight:y,triggerLabel:Q,triggerAriaLabel:P,cancelButtonLabel:b,submitButtonLabel:N,confirmButtonLabel:M,formTitle:R,emailLabel:I,emailPlaceholder:k,messageLabel:E,messagePlaceholder:O,nameLabel:x,namePlaceholder:w,successMessageText:J,isRequiredLabel:U,addScreenshotButtonLabel:T,removeScreenshotButtonLabel:D,highlightToolText:Y,hideToolText:B,removeHighlightText:ee,errorEmptyMessageText:Se,errorNoClientText:se,errorTimeoutText:$e,errorForbiddenText:zt,errorGenericText:Ur,onFormClose:Wr,onFormOpen:Hr,onSubmitError:pn,onSubmitSuccess:zo,onFormSubmitted:jo};let Qe=null,ze=null,qe=[];const zn=F=>{if(!Qe){const ie=ue.createElement("div");ie.id=String(F.id),ue.body.appendChild(ie),Qe=ie.attachShadow({mode:"open"}),ze=gd(F),Qe.appendChild(ze)}return Qe},jn=async F=>{const ie=F.enableScreenshot&&zT();let X,ae;try{X=(t?t():await e("feedbackModalIntegration",m))(),El(X)}catch{throw ms&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const _n=ie?n?n():await e("feedbackScreenshotIntegration",m):void 0;_n&&(ae=_n(),El(ae))}catch{ms&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const K={ERROR_EMPTY_MESSAGE:F.errorEmptyMessageText,ERROR_NO_CLIENT:F.errorNoClientText,ERROR_TIMEOUT:F.errorTimeoutText,ERROR_FORBIDDEN:F.errorForbiddenText,ERROR_GENERIC:F.errorGenericText},mt=(_n,Ry)=>HT(_n,{includeReplay:!0,...Ry,errorMessages:K}),gn=X.createDialog({options:{...F,onFormClose:()=>{gn?.close(),F.onFormClose?.()},onFormSubmitted:()=>{gn?.close(),F.onFormSubmitted?.()}},screenshotIntegration:ae,sendFeedback:mt,shadow:zn(F)});return gn},hn=(F,ie={})=>{const X=Yo(Tt,ie),ae=typeof F=="string"?ue.querySelector(F):typeof F.addEventListener=="function"?F:null;if(!ae)throw ms&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let K=null;const mt=async()=>{K||(K=await jn({...X,onFormSubmitted:()=>{K?.removeFromDom(),X.onFormSubmitted?.()}})),K.appendToDom(),K.open()};ae.addEventListener("click",mt);const gn=()=>{qe=qe.filter(_n=>_n!==gn),K?.removeFromDom(),K=null,ae.removeEventListener("click",mt)};return qe.push(gn),gn},mn=(F={})=>{const ie=Yo(Tt,F),X=zn(ie),ae=VT({triggerLabel:ie.triggerLabel,triggerAriaLabel:ie.triggerAriaLabel,shadow:X,styleNonce:h});return hn(ae.el,{...ie,onFormOpen(){ae.hide()},onFormClose(){ae.show()},onFormSubmitted(){ae.show()}}),ae};return{name:"Feedback",setupOnce(){!on()||!Tt.autoInject||(ue.readyState==="loading"?ue.addEventListener("DOMContentLoaded",()=>mn().appendToDom()):mn().appendToDom())},attachTo:hn,createWidget(F={}){const ie=mn(Yo(Tt,F));return ie.appendToDom(),ie},async createForm(F={}){return jn(Yo(Tt,F))},setTheme(F){if(Tt.colorScheme=F,Qe){const ie=gd(Tt);ze?Qe.replaceChild(ie,ze):Qe.prepend(ie),ze=ie}},remove(){Qe&&(Qe.parentElement?.remove(),Qe=null,ze=null),qe.forEach(F=>F()),qe=[]}}});function nL(){return v()?.getIntegrationByName("Feedback")}var Oi,ye,Vm,Vt,_d,Km,Ym,ga,gs,Qr,Xm,fu,uc,lc,Ws={},zs=[],YT=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pi=Array.isArray;function Rt(e,t){for(var n in t)e[n]=t[n];return e}function pu(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function te(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Oi.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return _s(e,i,r,o,null)}function _s(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Vm,__i:-1,__u:0};return o==null&&ye.vnode!=null&&ye.vnode(s),s}function ko(e){return e.children}function ys(e,t){this.props=e,this.context=t}function Bn(e,t){if(t==null)return e.__?Bn(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Bn(e):null}function XT(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],s=Rt({},t);s.__v=t.__v+1,ye.vnode&&ye.vnode(s),hu(e.__P,s,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Bn(t),!!(32&t.__u),o),s.__v=t.__v,s.__.__k[s.__i]=s,tg(r,s,o),t.__e=t.__=null,s.__e!=n&&Jm(s)}}function Jm(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Jm(e)}function yd(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!js.__r++||_d!=ye.debounceRendering)&&((_d=ye.debounceRendering)||Km)(js)}function js(){try{for(var e,t=1;Vt.length;)Vt.length>t&&Vt.sort(Ym),e=Vt.shift(),t=Vt.length,XT(e)}finally{Vt.length=js.__r=0}}function Qm(e,t,n,r,o,s,i,a,c,u,l){var f,d,p,h,m,g,y=r&&r.__k||zs,S=t.length;for(c=JT(n,t,y,c,S),f=0;f<S;f++)(p=n.__k[f])!=null&&(d=p.__i!=-1&&y[p.__i]||Ws,p.__i=f,g=hu(e,p,d,o,s,i,a,c,u,l),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&mu(d.ref,null,p),l.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),4&p.__u?(c=Zm(p,c,e),d.__e&&(d.__e=null)):typeof p.type=="function"&&g!==void 0?c=g:h&&(c=h.nextSibling),p.__u&=-7);return n.__e=m,c}function JT(e,t,n,r,o){var s,i,a,c,u,l=n.length,f=l,d=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?i=e.__k[s]=_s(null,i,null,null,null):Pi(i)?i=e.__k[s]=_s(ko,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=e.__k[s]=_s(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[s]=i,c=s+d,i.__=e,i.__b=e.__b+1,a=null,(u=i.__i=QT(i,n,c,f))!=-1&&(f--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>l?d--:o<l&&d++),typeof i.type!="function"&&(i.__u|=4)):u!=c&&(u==c-1?d--:u==c+1?d++:(u>c?d--:d++,i.__u|=4))):e.__k[s]=null;if(f)for(s=0;s<l;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Bn(a)),rg(a,a));return r}function Zm(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Zm(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=Bn(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function QT(e,t,n,r){var o,s,i,a=e.key,c=e.type,u=t[n],l=u!=null&&(2&u.__u)==0;if(u===null&&a==null||l&&a==u.key&&c==u.type)return n;if(r>(l?1:0)){for(o=n-1,s=n+1;o>=0||s<t.length;)if((u=t[i=o>=0?o--:s++])!=null&&(2&u.__u)==0&&a==u.key&&c==u.type)return i}return-1}function Sd(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||YT.test(t)?n:n+"px"}function Xo(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Sd(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Sd(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(Xm,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n[Qr]=r[Qr]:(n[Qr]=fu,e.addEventListener(t,s?lc:uc,s)):e.removeEventListener(t,s?lc:uc,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function bd(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[gs]==null)t[gs]=fu++;else if(t[gs]<n[Qr])return;return n(ye.event?ye.event(t):t)}}}function hu(e,t,n,r,o,s,i,a,c,u){var l,f,d,p,h,m,g,y,S,T,b,M,I,k,R,U,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(l=ye.__b)&&l(t);e:if(typeof E=="function"){f=i.length;try{if(S=t.props,T=E.prototype&&E.prototype.render,b=(l=E.contextType)&&r[l.__c],M=l?b?b.props.value:l.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:(T?t.__c=d=new E(S,M):(t.__c=d=new ys(S,M),d.constructor=E,d.render=eI),b&&b.sub(d),d.state||(d.state={}),d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),T&&d.__s==null&&(d.__s=d.state),T&&E.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Rt({},d.__s)),Rt(d.__s,E.getDerivedStateFromProps(S,d.__s))),h=d.props,m=d.state,d.__v=t,p)T&&E.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),T&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T&&E.getDerivedStateFromProps==null&&S!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(S,M),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(S,d.__s,M)===!1){t.__v!=n.__v&&(d.props=S,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(O){O&&(O.__=t)}),zs.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&i.push(d),a=Bn(n);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(S,d.__s,M),T&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,g)})}if(d.context=M,d.props=S,d.__P=e,d.__e=!1,I=ye.__r,k=0,T)d.state=d.__s,d.__d=!1,I&&I(t),l=d.render(d.props,d.state,d.context),zs.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,I&&I(t),l=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,d.getChildContext!=null&&(r=Rt(Rt({},r),d.getChildContext())),T&&!p&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,m)),R=l!=null&&l.type===ko&&l.key==null?ng(l.props.children):l,a=Qm(e,Pi(R)?R:[R],t,n,r,o,s,i,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&i.push(d),y&&(d.__E=d.__=null)}catch(O){if(i.length=f,t.__v=null,c||s!=null){if(O.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s!=null&&(s[s.indexOf(a)]=null),t.__e=a}else if(s!=null)for(U=s.length;U--;)pu(s[U])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),O.then||eg(t),ye.__e(O,t,n)}}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=ZT(n.__e,t,n,r,o,s,i,c,u);return(l=ye.diffed)&&l(t),128&t.__u?void 0:a}function eg(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(eg))}function tg(e,t,n){for(var r=0;r<n.length;r++)mu(n[r],n[++r],n[++r]);ye.__c&&ye.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){ye.__e(s,o.__v)}})}function ng(e){return typeof e!="object"||e==null||e.__b>0?e:Pi(e)?e.map(ng):e.constructor!==void 0?null:Rt({},e)}function ZT(e,t,n,r,o,s,i,a,c){var u,l,f,d,p,h,m,g=n.props||Ws,y=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!S&&(S?p.localName==S:p.nodeType==3)){e=p,s[u]=null;break}}if(e==null){if(S==null)return document.createTextNode(y);e=document.createElementNS(o,S,y.is&&y),a&&(ye.__m&&ye.__m(t,s),a=!1),s=null}if(S==null)g===y||a&&e.data==y||(e.data=y);else{if(s=S=="textarea"&&y.defaultValue!=null?null:s&&Oi.call(e.childNodes),!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(p=e.attributes[u]).name]=p.value;for(u in g)p=g[u],u=="dangerouslySetInnerHTML"?f=p:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||Xo(e,u,null,p,o);for(u in y)p=y[u],u=="children"?d=p:u=="dangerouslySetInnerHTML"?l=p:u=="value"?h=p:u=="checked"?m=p:a&&typeof p!="function"||g[u]===p||Xo(e,u,p,g[u],o);if(l)a||f&&(l.__html==f.__html||l.__html==e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(f&&(e.innerHTML=""),Qm(t.type=="template"?e.content:e,Pi(d)?d:[d],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Bn(n,0),a,c),s!=null)for(u=s.length;u--;)pu(s[u]);a&&S!="textarea"||(u="value",S=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||S=="progress"&&!h||S=="option"&&h!=g[u])&&Xo(e,u,h,g[u],o),u="checked",m!=null&&m!=e[u]&&Xo(e,u,m,g[u],o))}return e}function mu(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){ye.__e(o,n)}}function rg(e,t,n){var r,o;if(ye.unmount&&ye.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||mu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){ye.__e(s,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&rg(r[o],t,n||typeof e.type!="function");n||pu(e.__e),e.__c=e.__=e.__e=void 0}function eI(e,t,n){return this.constructor(e,n)}function tI(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),ye.__&&ye.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],hu(t,e=t.__k=te(ko,null,[e]),o||Ws,Ws,t.namespaceURI,o?null:t.firstChild?Oi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),tg(s,e,i),e.props.children=null}Oi=zs.slice,ye={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Vm=0,ys.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Rt({},this.state),typeof e=="function"&&(e=e(Rt({},n),this.props)),e&&Rt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),yd(this))},ys.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),yd(this))},ys.prototype.render=ko,Vt=[],Km=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ym=function(e,t){return e.__v.__b-t.__v.__b},js.__r=0,ga=Math.random().toString(8),gs="__d"+ga,Qr="__a"+ga,Xm=/(PointerCapture)$|Capture$/i,fu=0,uc=bd(!1),lc=bd(!0);var $t,le,_a,vd,gr=0,og=[],ve=ye,Ed=ve.__b,wd=ve.__r,Td=ve.diffed,Id=ve.__c,kd=ve.unmount,Rd=ve.__;function Wn(e,t){ve.__h&&ve.__h(le,e,gr||t),gr=0;var n=le.__H||(le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function kn(e){return gr=1,sg(ag,e)}function sg(e,t,n){var r=Wn($t++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ag(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=le,!le.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var l=!1,f=r.__c.props!==a;if(r.__c.__H.__.some(function(p){if(p.__N){l=!0;var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(f=!0)}}),s){var d=s.call(this,a,c,u);return l?d||f:d}return!l||f};le.__f=!0;var s=le.shouldComponentUpdate,i=le.componentWillUpdate;le.componentWillUpdate=function(a,c,u){if(this.__e){var l=s;s=void 0,o(a,c,u),s=l}i&&i.call(this,a,c,u)},le.shouldComponentUpdate=o}return r.__N||r.__}function nI(e,t){var n=Wn($t++,3);!ve.__s&&gu(n.__H,t)&&(n.__=e,n.u=t,le.__H.__h.push(n))}function ig(e,t){var n=Wn($t++,4);!ve.__s&&gu(n.__H,t)&&(n.__=e,n.u=t,le.__h.push(n))}function rI(e){return gr=5,Ro(function(){return{current:e}},[])}function oI(e,t,n){gr=6,ig(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ro(e,t){var n=Wn($t++,7);return gu(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ir(e,t){return gr=8,Ro(function(){return e},t)}function sI(e){var t=le.context[e.__c],n=Wn($t++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(le)),t.props.value):e.__}function iI(e,t){ve.useDebugValue&&ve.useDebugValue(t?t(e):e)}function aI(e){var t=Wn($t++,10),n=kn();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function cI(){var e=Wn($t++,11);if(!e.__){for(var t=le.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function uI(){for(var e;e=og.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ss),t.__h.some(dc),t.__h=[]}catch(n){t.__h=[],ve.__e(n,e.__v)}}}ve.__b=function(e){le=null,Ed&&Ed(e)},ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rd&&Rd(e,t)},ve.__r=function(e){wd&&wd(e),$t=0;var t=(le=e.__c).__H;t&&(_a===le?(t.__h=[],le.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Ss),t.__h.some(dc),t.__h=[],$t=0)),_a=le},ve.diffed=function(e){Td&&Td(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(og.push(t)!==1&&vd===ve.requestAnimationFrame||((vd=ve.requestAnimationFrame)||lI)(uI)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),_a=le=null},ve.__c=function(e,t){t.some(function(n){try{n.__h.some(Ss),n.__h=n.__h.filter(function(r){return!r.__||dc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ve.__e(r,n.__v)}}),Id&&Id(e,t)},ve.unmount=function(e){kd&&kd(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Ss(r)}catch(o){t=o}}),n.__H=void 0,t&&ve.__e(t,n.__v))};var Cd=typeof requestAnimationFrame=="function";function lI(e){var t,n=function(){clearTimeout(r),Cd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Cd&&(t=requestAnimationFrame(n))}function Ss(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function dc(e){var t=le;e.__c=e.__(),le=t}function gu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ag(e,t){return typeof t=="function"?t(e):t}const dI=Object.defineProperty({__proto__:null,useCallback:ir,useContext:sI,useDebugValue:iI,useEffect:nI,useErrorBoundary:aI,useId:cI,useImperativeHandle:oI,useLayoutEffect:ig,useMemo:Ro,useReducer:sg,useRef:rI,useState:kn},Symbol.toStringTag,{value:"Module"}),fI="http://www.w3.org/2000/svg";function pI(){const e=r=>ue.createElementNS(fI,r),t=Ve(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ve(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function hI({options:e}){const t=Ro(()=>({__html:pI().outerHTML}),[]);return te("h2",{class:"dialog__header"},te("span",{class:"dialog__title"},e.formTitle),e.showBranding?te("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function mI(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function ya(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function gI({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:l,addScreenshotButtonLabel:f,removeScreenshotButtonLabel:d,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:S,messagePlaceholder:T,nameLabel:b,namePlaceholder:M,submitButtonLabel:I,isRequiredLabel:k}=e,[R,U]=kn(!1),[E,O]=kn(null),[x,w]=kn(!1),D=u?.input,[N,J]=kn(null),Q=ir(B=>{J(B),w(!1)},[]),P=ir(B=>{const ee=mI(B,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:S,nameLabel:b});return ee.length>0?O(`Please enter in the following required fields: ${ee.join(", ")}`):O(null),ee.length===0},[h,g,y,S,b]),Y=ir(async B=>{U(!0);try{if(B.preventDefault(),!(B.target instanceof HTMLFormElement))return;const ee=new FormData(B.target),Se=await(u&&x?u.value():void 0),se={name:ya(ee,"name"),email:ya(ee,"email"),message:ya(ee,"message"),attachments:Se?[Se]:void 0};if(!P(se))return;try{const $e=await o({name:se.name,email:se.email,message:se.message,source:DT,tags:l},{attachments:se.attachments});s(se,$e)}catch($e){ms&&_.error($e);const zt=$e;O(zt.message),i(zt)}}finally{U(!1)}},[u&&x,s,i]);return te("form",{class:"form",onSubmit:Y},D&&x?te(D,{onError:Q}):null,te("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:R},te("div",{class:"form__top"},E?te("div",{class:"form__error-container"},E):null,c?te("label",{for:"name",class:"form__label"},te(Sa,{label:b,isRequiredLabel:k,isRequired:y}),te("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:M,required:y,type:"text"})):te("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?te("label",{for:"email",class:"form__label"},te(Sa,{label:h,isRequiredLabel:k,isRequired:g}),te("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):te("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),te("label",{for:"message",class:"form__label"},te(Sa,{label:S,isRequiredLabel:k,isRequired:!0}),te("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:T,required:!0,rows:5})),D?te("label",{for:"screenshot",class:"form__label"},te("button",{class:"btn btn--default",disabled:R,type:"button",onClick:()=>{J(null),w(B=>!B)}},x?d:f),N?te("div",{class:"form__error-container"},N.message):null):null),te("div",{class:"btn-group"},te("button",{class:"btn btn--primary",disabled:R,type:"submit"},I),te("button",{class:"btn btn--default",disabled:R,type:"button",onClick:r},p))))}function Sa({label:e,isRequired:t,isRequiredLabel:n}){return te("span",{class:"form__label__text"},e,t&&te("span",{class:"form__label__text--required"},n))}const Jo=16,Ad=17,_I="http://www.w3.org/2000/svg";function yI(){const e=c=>Ze.document.createElementNS(_I,c),t=Ve(e("svg"),{width:`${Jo}`,height:`${Ad}`,viewBox:`0 0 ${Jo} ${Ad}`,fill:"inherit"}),n=Ve(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ve(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ve(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Ve(e("clipPath"),{id:"clip0_57_156"}),a=Ve(e("rect"),{width:`${Jo}`,height:`${Jo}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function SI({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Ro(()=>({__html:yI().outerHTML}),[]),[s,i]=kn(null),a=ir(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=ir((u,l)=>{n.onSubmitSuccess(u,l),i(setTimeout(()=>{t(),i(null)},FT))},[t]);return te(ko,null,s?te("div",{class:"success__position",onClick:a},te("div",{class:"success__content"},r.successMessageText,te("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):te("dialog",{class:"dialog",onClick:r.onFormClose,open:e},te("div",{class:"dialog__position"},te("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},te(hI,{options:r}),te(gI,{...n,onSubmitSuccess:c})))))}const bI=`
|
|
107
|
-
.dialog {
|
|
108
|
-
position: fixed;
|
|
109
|
-
z-index: var(--z-index);
|
|
110
|
-
margin: 0;
|
|
111
|
-
inset: 0;
|
|
112
|
-
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
padding: 0;
|
|
117
|
-
height: 100vh;
|
|
118
|
-
width: 100vw;
|
|
119
|
-
|
|
120
|
-
color: var(--dialog-color, var(--foreground));
|
|
121
|
-
fill: var(--dialog-color, var(--foreground));
|
|
122
|
-
line-height: 1.75em;
|
|
123
|
-
|
|
124
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
125
|
-
border: none;
|
|
126
|
-
inset: 0;
|
|
127
|
-
opacity: 1;
|
|
128
|
-
transition: opacity 0.2s ease-in-out;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.dialog__position {
|
|
132
|
-
position: fixed;
|
|
133
|
-
z-index: var(--z-index);
|
|
134
|
-
inset: var(--dialog-inset);
|
|
135
|
-
padding: var(--page-margin);
|
|
136
|
-
display: flex;
|
|
137
|
-
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
138
|
-
}
|
|
139
|
-
@media (max-width: 600px) {
|
|
140
|
-
.dialog__position {
|
|
141
|
-
inset: var(--page-margin);
|
|
142
|
-
padding: 0;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.dialog__position:has(.editor) {
|
|
147
|
-
inset: var(--page-margin);
|
|
148
|
-
padding: 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.dialog:not([open]) {
|
|
152
|
-
opacity: 0;
|
|
153
|
-
pointer-events: none;
|
|
154
|
-
visibility: hidden;
|
|
155
|
-
}
|
|
156
|
-
.dialog:not([open]) .dialog__content {
|
|
157
|
-
transform: translate(0, -16px) scale(0.98);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.dialog__content {
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
gap: 16px;
|
|
164
|
-
padding: var(--dialog-padding, 24px);
|
|
165
|
-
max-width: 100%;
|
|
166
|
-
width: 100%;
|
|
167
|
-
max-height: 100%;
|
|
168
|
-
overflow: auto;
|
|
169
|
-
|
|
170
|
-
background: var(--dialog-background, var(--background));
|
|
171
|
-
border-radius: var(--dialog-border-radius, 20px);
|
|
172
|
-
border: var(--dialog-border, var(--border));
|
|
173
|
-
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
174
|
-
transform: translate(0, 0) scale(1);
|
|
175
|
-
transition: transform 0.2s ease-in-out;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
`,vI=`
|
|
179
|
-
.dialog__header {
|
|
180
|
-
display: flex;
|
|
181
|
-
gap: 4px;
|
|
182
|
-
justify-content: space-between;
|
|
183
|
-
font-weight: var(--dialog-header-weight, 600);
|
|
184
|
-
margin: 0;
|
|
185
|
-
}
|
|
186
|
-
.dialog__title {
|
|
187
|
-
align-self: center;
|
|
188
|
-
width: var(--form-width, 272px);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@media (max-width: 600px) {
|
|
192
|
-
.dialog__title {
|
|
193
|
-
width: auto;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.dialog__position:has(.editor) .dialog__title {
|
|
198
|
-
width: auto;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
.brand-link {
|
|
203
|
-
display: inline-flex;
|
|
204
|
-
}
|
|
205
|
-
.brand-link:focus-visible {
|
|
206
|
-
outline: var(--outline);
|
|
207
|
-
}
|
|
208
|
-
`,EI=`
|
|
209
|
-
.form {
|
|
210
|
-
display: flex;
|
|
211
|
-
overflow: auto;
|
|
212
|
-
flex-direction: row;
|
|
213
|
-
gap: 16px;
|
|
214
|
-
flex: 1 0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.form fieldset {
|
|
218
|
-
border: none;
|
|
219
|
-
margin: 0;
|
|
220
|
-
padding: 0;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.form__right {
|
|
224
|
-
flex: 0 0 auto;
|
|
225
|
-
display: flex;
|
|
226
|
-
overflow: auto;
|
|
227
|
-
flex-direction: column;
|
|
228
|
-
justify-content: space-between;
|
|
229
|
-
gap: 20px;
|
|
230
|
-
width: var(--form-width, 100%);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.dialog__position:has(.editor) .form__right {
|
|
234
|
-
width: var(--form-width, 272px);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.form__top {
|
|
238
|
-
display: flex;
|
|
239
|
-
flex-direction: column;
|
|
240
|
-
gap: 8px;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.form__error-container {
|
|
244
|
-
color: var(--error-color);
|
|
245
|
-
fill: var(--error-color);
|
|
246
|
-
width: 0;
|
|
247
|
-
min-width: 100%;
|
|
248
|
-
overflow-wrap: break-word;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.form__label {
|
|
252
|
-
display: flex;
|
|
253
|
-
flex-direction: column;
|
|
254
|
-
gap: 4px;
|
|
255
|
-
margin: 0px;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.form__label__text {
|
|
259
|
-
display: flex;
|
|
260
|
-
gap: 4px;
|
|
261
|
-
align-items: center;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.form__label__text--required {
|
|
265
|
-
font-size: 0.85em;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.form__input {
|
|
269
|
-
font-family: inherit;
|
|
270
|
-
line-height: inherit;
|
|
271
|
-
background: transparent;
|
|
272
|
-
box-sizing: border-box;
|
|
273
|
-
border: var(--input-border, var(--border));
|
|
274
|
-
border-radius: var(--input-border-radius, 6px);
|
|
275
|
-
color: var(--input-color, inherit);
|
|
276
|
-
fill: var(--input-color, inherit);
|
|
277
|
-
font-size: var(--input-font-size, inherit);
|
|
278
|
-
font-weight: var(--input-font-weight, 500);
|
|
279
|
-
padding: 6px 12px;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.form__input::placeholder {
|
|
283
|
-
opacity: 0.65;
|
|
284
|
-
color: var(--input-placeholder-color, inherit);
|
|
285
|
-
filter: var(--interactive-filter);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.form__input:focus-visible {
|
|
289
|
-
outline: var(--input-focus-outline, var(--outline));
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.form__input--textarea {
|
|
293
|
-
font-family: inherit;
|
|
294
|
-
resize: vertical;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.error {
|
|
298
|
-
color: var(--error-color);
|
|
299
|
-
fill: var(--error-color);
|
|
300
|
-
}
|
|
301
|
-
`,wI=`
|
|
302
|
-
.btn-group {
|
|
303
|
-
display: grid;
|
|
304
|
-
gap: 8px;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.btn {
|
|
308
|
-
line-height: inherit;
|
|
309
|
-
border: var(--button-border, var(--border));
|
|
310
|
-
border-radius: var(--button-border-radius, 6px);
|
|
311
|
-
cursor: pointer;
|
|
312
|
-
font-family: inherit;
|
|
313
|
-
font-size: var(--button-font-size, inherit);
|
|
314
|
-
font-weight: var(--button-font-weight, 600);
|
|
315
|
-
padding: var(--button-padding, 6px 16px);
|
|
316
|
-
}
|
|
317
|
-
.btn[disabled] {
|
|
318
|
-
opacity: 0.6;
|
|
319
|
-
pointer-events: none;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.btn--primary {
|
|
323
|
-
color: var(--button-primary-color, var(--accent-foreground));
|
|
324
|
-
fill: var(--button-primary-color, var(--accent-foreground));
|
|
325
|
-
background: var(--button-primary-background, var(--accent-background));
|
|
326
|
-
border: var(--button-primary-border, var(--border));
|
|
327
|
-
border-radius: var(--button-primary-border-radius, 6px);
|
|
328
|
-
font-weight: var(--button-primary-font-weight, 500);
|
|
329
|
-
}
|
|
330
|
-
.btn--primary:hover {
|
|
331
|
-
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
332
|
-
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
333
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
334
|
-
filter: var(--interactive-filter);
|
|
335
|
-
}
|
|
336
|
-
.btn--primary:focus-visible {
|
|
337
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
338
|
-
filter: var(--interactive-filter);
|
|
339
|
-
outline: var(--button-primary-focus-outline, var(--outline));
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.btn--default {
|
|
343
|
-
color: var(--button-color, var(--foreground));
|
|
344
|
-
fill: var(--button-color, var(--foreground));
|
|
345
|
-
background: var(--button-background, var(--background));
|
|
346
|
-
border: var(--button-border, var(--border));
|
|
347
|
-
border-radius: var(--button-border-radius, 6px);
|
|
348
|
-
font-weight: var(--button-font-weight, 500);
|
|
349
|
-
}
|
|
350
|
-
.btn--default:hover {
|
|
351
|
-
color: var(--button-color, var(--foreground));
|
|
352
|
-
fill: var(--button-color, var(--foreground));
|
|
353
|
-
background: var(--button-hover-background, var(--background));
|
|
354
|
-
filter: var(--interactive-filter);
|
|
355
|
-
}
|
|
356
|
-
.btn--default:focus-visible {
|
|
357
|
-
background: var(--button-hover-background, var(--background));
|
|
358
|
-
filter: var(--interactive-filter);
|
|
359
|
-
outline: var(--button-focus-outline, var(--outline));
|
|
360
|
-
}
|
|
361
|
-
`,TI=`
|
|
362
|
-
.success__position {
|
|
363
|
-
position: fixed;
|
|
364
|
-
inset: var(--dialog-inset);
|
|
365
|
-
padding: var(--page-margin);
|
|
366
|
-
z-index: var(--z-index);
|
|
367
|
-
}
|
|
368
|
-
.success__content {
|
|
369
|
-
background: var(--success-background, var(--background));
|
|
370
|
-
border: var(--success-border, var(--border));
|
|
371
|
-
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
372
|
-
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
373
|
-
font-weight: var(--success-font-weight, 600);
|
|
374
|
-
color: var(--success-color);
|
|
375
|
-
fill: var(--success-color);
|
|
376
|
-
padding: 12px 24px;
|
|
377
|
-
line-height: 1.75em;
|
|
378
|
-
|
|
379
|
-
display: grid;
|
|
380
|
-
align-items: center;
|
|
381
|
-
grid-auto-flow: column;
|
|
382
|
-
gap: 6px;
|
|
383
|
-
cursor: default;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.success__icon {
|
|
387
|
-
display: flex;
|
|
388
|
-
}
|
|
389
|
-
`;function II(e){const t=ue.createElement("style");return t.textContent=`
|
|
390
|
-
:host {
|
|
391
|
-
--dialog-inset: var(--inset);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
${bI}
|
|
395
|
-
${vI}
|
|
396
|
-
${EI}
|
|
397
|
-
${wI}
|
|
398
|
-
${TI}
|
|
399
|
-
`,e&&t.setAttribute("nonce",e),t}function kI(){const e=q().getUser(),t=me().getUser(),n=rr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const RI=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=kI(),a=ue.createElement("div"),c=II(e.styleNonce);let u="";const l={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ue.body.style.overflow=u},open(){d(!0),e.onFormOpen?.(),v()?.emit("openFeedbackWidget"),u=ue.body.style.overflow,ue.body.style.overflow="hidden"},close(){d(!1),ue.body.style.overflow=u}},f=t?.createInput({h:te,hooks:dI,dialog:l,options:e}),d=p=>{tI(te(SI,{options:e,screenshotInput:f,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{d(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{d(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return l}}));function CI({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function AI(e){const t=ue.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
400
|
-
.editor {
|
|
401
|
-
display: flex;
|
|
402
|
-
flex-grow: 1;
|
|
403
|
-
flex-direction: column;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.editor__image-container {
|
|
407
|
-
justify-items: center;
|
|
408
|
-
padding: 15px;
|
|
409
|
-
position: relative;
|
|
410
|
-
height: 100%;
|
|
411
|
-
border-radius: var(--menu-border-radius, 6px);
|
|
412
|
-
|
|
413
|
-
background-color: ${n};
|
|
414
|
-
background-image: repeating-linear-gradient(
|
|
415
|
-
-145deg,
|
|
416
|
-
transparent,
|
|
417
|
-
transparent 8px,
|
|
418
|
-
${n} 8px,
|
|
419
|
-
${n} 11px
|
|
420
|
-
),
|
|
421
|
-
repeating-linear-gradient(
|
|
422
|
-
-45deg,
|
|
423
|
-
transparent,
|
|
424
|
-
transparent 15px,
|
|
425
|
-
${r} 15px,
|
|
426
|
-
${r} 16px
|
|
427
|
-
);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.editor__canvas-container {
|
|
431
|
-
width: 100%;
|
|
432
|
-
height: 100%;
|
|
433
|
-
position: relative;
|
|
434
|
-
display: flex;
|
|
435
|
-
align-items: center;
|
|
436
|
-
justify-content: center;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.editor__canvas-container > * {
|
|
440
|
-
object-fit: contain;
|
|
441
|
-
position: absolute;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.editor__tool-container {
|
|
445
|
-
padding-top: 8px;
|
|
446
|
-
display: flex;
|
|
447
|
-
justify-content: center;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.editor__tool-bar {
|
|
451
|
-
display: flex;
|
|
452
|
-
gap: 8px;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.editor__tool {
|
|
456
|
-
display: flex;
|
|
457
|
-
padding: 8px 12px;
|
|
458
|
-
justify-content: center;
|
|
459
|
-
align-items: center;
|
|
460
|
-
border: var(--button-border, var(--border));
|
|
461
|
-
border-radius: var(--button-border-radius, 6px);
|
|
462
|
-
background: var(--button-background, var(--background));
|
|
463
|
-
color: var(--button-color, var(--foreground));
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.editor__tool--active {
|
|
467
|
-
background: var(--button-primary-background, var(--accent-background));
|
|
468
|
-
color: var(--button-primary-color, var(--accent-foreground));
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.editor__rect {
|
|
472
|
-
position: absolute;
|
|
473
|
-
z-index: 2;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.editor__rect button {
|
|
477
|
-
opacity: 0;
|
|
478
|
-
position: absolute;
|
|
479
|
-
top: -12px;
|
|
480
|
-
right: -12px;
|
|
481
|
-
cursor: pointer;
|
|
482
|
-
padding: 0;
|
|
483
|
-
z-index: 3;
|
|
484
|
-
border: none;
|
|
485
|
-
background: none;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.editor__rect:hover button {
|
|
489
|
-
opacity: 1;
|
|
490
|
-
}
|
|
491
|
-
`,e&&t.setAttribute("nonce",e),t}function NI({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function xI({hooks:e}){function t(){const[n,r]=e.useState(Ze.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(Ze.devicePixelRatio)},s=matchMedia(`(resolution: ${Ze.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Kr.mediaDevices.getDisplayMedia({video:{width:Ze.innerWidth*a,height:Ze.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),l=ue.createElement("video");await new Promise((f,d)=>{l.srcObject=u,l.onloadedmetadata=()=>{o(l,a),u.getTracks().forEach(p=>p.stop()),f()},l.play().catch(d)}),s()})().catch(i)},[])}}function MI(e,t,n){switch(e.type){case"highlight":{t.save(),t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h),t.restore();break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Kt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function ba(e,t){Kt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function va(e,t,n){Kt(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{MI(s,o,t)})})}function OI({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=xI({hooks:t}),i=NI({h:e}),a=CI({h:e}),c={__html:AI(o.styleNonce).innerText},u=r.el.style,l=({screenshot:f})=>{const[d,p]=t.useState("highlight"),[h,m]=t.useState([]),g=t.useRef(null),y=t.useRef(null),S=t.useRef(null),T=t.useRef(null),[b,M]=t.useState(1),I=t.useMemo(()=>{const x=ue.getElementById(o.id);if(!x)return"white";const w=getComputedStyle(x);return w.getPropertyValue("--button-primary-background")||w.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const x=()=>{const w=g.current;w&&(Kt(f.canvas,{alpha:!1},D=>{const N=Math.min(w.clientWidth/D.width,w.clientHeight/D.height);M(N)}),(w.clientHeight===0||w.clientWidth===0)&&setTimeout(x,0))};return x(),Ze.addEventListener("resize",x),()=>{Ze.removeEventListener("resize",x)}},[f]);const k=t.useCallback((x,w)=>{Kt(x,{alpha:!0},(D,N)=>{N.scale(w,w),D.width=f.canvas.width,D.height=f.canvas.height})},[f]);t.useEffect(()=>{k(y.current,f.dpi),ba(y.current,f.canvas)},[f]),t.useEffect(()=>{k(S.current,f.dpi),Kt(S.current,{alpha:!0},(x,w)=>{w.clearRect(0,0,x.width,x.height)}),va(S.current,I,h)},[h,I]),t.useEffect(()=>{k(n,f.dpi),ba(n,f.canvas),Kt(ue.createElement("canvas"),{alpha:!0},(x,w)=>{w.scale(f.dpi,f.dpi),x.width=f.canvas.width,x.height=f.canvas.height,va(x,I,h),ba(n,x)})},[h,f,I]);const R=x=>{if(!d||!T.current)return;const w=T.current.getBoundingClientRect(),D={type:d,x:(x.clientX-w.x)/b,y:(x.clientY-w.y)/b},N=(P,Y)=>{const B=(Y.clientX-w.x)/b,ee=(Y.clientY-w.y)/b;return{type:P.type,x:Math.min(P.x,B),y:Math.min(P.y,ee),w:Math.abs(B-P.x),h:Math.abs(ee-P.y)}},J=P=>{Kt(S.current,{alpha:!0},(Y,B)=>{B.clearRect(0,0,Y.width,Y.height)}),va(S.current,I,[...h,N(D,P)])},Q=P=>{const Y=N(D,P);Y.w*b>=1&&Y.h*b>=1&&m(B=>[...B,Y]),ue.removeEventListener("mousemove",J),ue.removeEventListener("mouseup",Q)};ue.addEventListener("mousemove",J),ue.addEventListener("mouseup",Q)},U=t.useCallback(x=>w=>{w.preventDefault(),w.stopPropagation(),m(D=>{const N=[...D];return N.splice(x,1),N})},[]),E={width:`${f.canvas.width*b}px`,height:`${f.canvas.height*b}px`},O=x=>{x.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:y,id:"background",style:E}),e("canvas",{ref:S,id:"foreground",style:E}),e("div",{ref:T,onMouseDown:R,style:E},h.map((x,w)=>e("div",{key:w,class:"editor__rect",style:{top:`${x.y*b}px`,left:`${x.x*b}px`,width:`${x.w*b}px`,height:`${x.h*b}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:U(w),onMouseDown:O,onMouseUp:O,type:"button"},e(a,null))))))),e(i,{options:o,action:d,setAction:p}))};return function({onError:d}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,g)=>{Kt(ue.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(g,g),y.width=m.videoWidth,y.height=m.videoHeight,S.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:g})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",d(m)},[])}),p?e(l,{screenshot:p}):e("div",null)}}const PI=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ue.createElement("canvas");return{input:OI({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}));let cg=-1;const Pr=()=>cg,Lr=e=>{addEventListener("pageshow",t=>{t.persisted&&(cg=t.timeStamp,e(t))},!0)},Ke=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=((a,c)=>a>c[1]?"poor":a>c[0]?"needs-improvement":"good")(t.value,n),e(t)))}},_u=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},yu=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Co=()=>yu()?.activationStart??0;let Tn=-1;const ug=new Set,Nd=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,fc=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of ug)t();isFinite(Tn)||(Tn=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",fc,!0))}},uo=(e=!1)=>{if(e&&(Tn=1/0),Tn<0){const t=Co();Tn=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(r=>r.name==="hidden"&&r.startTime>=t)?.startTime)??Nd(),addEventListener("visibilitychange",fc,!0),addEventListener("prerenderingchange",fc,!0),Lr(()=>{setTimeout(()=>{Tn=Nd()})})}return{get firstHiddenTime(){return Tn},onHidden(t){ug.add(t)}}},rt=(e,t=-1,n,r=0,o,s,i)=>{const a=yu(),c=a?.navigationId||0;let u="navigate";return n?u=n:Pr()>=0?u="back-forward-cache":a&&(document.prerendering||Co()>0?u="prerender":document.wasDiscarded?u="restore":a.type&&(u=a.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:u,navigationId:r||c,navigationInteractionId:o,navigationURL:s||a?.name,navigationStartTime:i||0}},xd=new WeakMap;function Li(e,t){let n=xd.get(t);return n||(n=new WeakMap,xd.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class LI{t;i=0;o=[];h(t){if(t.hadRecentInput)return;const n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}}const Un=(e,t,n={})=>{try{const r=e.filter(o=>PerformanceObserver.supportedEntryTypes.includes(o));if(r.length>0){const o=new PerformanceObserver(s=>{queueMicrotask(()=>{const i=s.getEntries();r.length>1&&i.sort((a,c)=>a.startTime+a.duration-(c.startTime+c.duration)),t(i)})});for(const s of r)o.observe({type:s,buffered:!0,...n});return o}}catch{}},Ao=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint=="function"&&e&&e.reportSoftNavs,lg=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const n=e.keys().next().value;n!==void 0&&e.delete(n)}},dg=e=>{let t=!1;return()=>{t||(e(),t=!0)}};class DI{l}const Di=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},Ea=[1800,3e3],fg=(e,t={})=>{const n=Ao(t);Di(()=>{const r=Li(t,DI),o=uo();let s,i=rt("FCP");const a=Un(["paint"],c=>{for(const u of c)u.name==="first-contentful-paint"&&(a.disconnect(),u.startTime<o.firstHiddenTime&&(i.value=Math.max(u.startTime-Co(),0),i.entries.push(u),i.navigationId=u.navigationId||i.navigationId,s(!0)))});a&&(s=Ke(e,i,Ea,t.reportAllChanges),Lr(c=>{i=rt("FCP",-1,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Pr()),s=Ke(e,i,Ea,t.reportAllChanges),_u(()=>{i.value=performance.now()-c.timeStamp,s(!0)})})),n&&Un(["soft-navigation"],c=>{c.forEach(u=>{r.l&&u.navigationId&&lg(r.l,u);const l=Math.max((u.presentationTime||u.paintTime||0)-u.startTime,0);i=rt("FCP",l,"soft-navigation",u.navigationId,u.interactionId,u.name,u.startTime),s=Ke(e,i,Ea,t.reportAllChanges),s(!0)})},t)})},Md=[.1,.25],$I=(e,t={})=>{const n=uo();fg(dg(()=>{let r,o=rt("CLS",0);const s=Li(t,LI),i=(d,p,h,m,g)=>{o=rt("CLS",0,d,p,h,m,g),s.i=0,r=Ke(e,o,Md,t.reportAllChanges)},a=(d=!1)=>{s.i>o.value&&(o.value=s.i,o.entries=s.o),r(d)},c=d=>{a(!0),i("soft-navigation",d.navigationId,d.interactionId,d.name,d.startTime)},u=d=>{for(const p of d)p.entryType!=="soft-navigation"?s.h(p):c(p);a()},l=["layout-shift"];Ao(t)&&l.push("soft-navigation");const f=Un(l,u);f&&(r=Ke(e,o,Md,t.reportAllChanges),n.onHidden(()=>{u(f.takeRecords()),r(!0)}),Lr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Pr()),_u(r)}),setTimeout(r))}))};let pg=0,wa=1/0,Qo=0;const FI=e=>{for(const t of e)t.interactionId&&(wa=Math.min(wa,t.interactionId),Qo=Math.max(Qo,t.interactionId),pg=Qo?(Qo-wa)/7+1:0)};let pc;const Od=()=>pc?pg:performance.interactionCount??0,BI=()=>{"interactionCount"in performance||pc||(pc=Un(["event"],FI,{durationThreshold:0}))};class UI{u=0;v=[];m=new Map;p;T;_(){return Od()-this.u}M(){this.u=Od(),this.v.length=0,this.m.clear()}L(t){const n=this._(),r=Math.min(this.v.length-1,Math.floor(n/50));return!n||r!==-1||t!=="soft-navigation"&&t!=="back-forward-cache"?this.v[r]:{P:8,id:-1,entries:[]}}h(t){if(this.p?.(t),!t.interactionId)return;const n=this.v.at(-1);let r=this.m.get(t.interactionId);if(r||this.v.length<10||t.duration>n.P){if(r?t.duration>r.P?(r.entries=[t],r.P=t.duration):t.duration===r.P&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],P:t.duration},this.m.set(r.id,r),this.v.push(r)),this.v.sort((o,s)=>s.P-o.P),this.v.length>10){const o=this.v.splice(10);for(const s of o)this.m.delete(s.id)}this.T?.(r)}}}const hg=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const o=dg(e);let s=-1;const i=()=>{r(s),o()};addEventListener("visibilitychange",i,{once:!0,capture:!0}),s=n(()=>{removeEventListener("visibilitychange",i,{capture:!0}),o()},{timeout:t})}},Pd=[200,500],HI=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=uo();Di(()=>{BI();let r,o=rt("INP");const s=Li(t,UI),i=(d,p,h,m,g)=>{s.M(),o=rt("INP",-1,d,p,h,m,g),r=Ke(e,o,Pd,t.reportAllChanges)},a=()=>{const d=s.L(o.navigationType);d&&d.P!==o.value&&(o.value=d.P,o.entries=d.entries,r())},c=d=>{a(),r(!0),i("soft-navigation",d.navigationId,d.interactionId,d.name,d.startTime)},u=(d,p=!1)=>{hg(()=>{for(const h of d)h.entryType!=="soft-navigation"?s.h(h):c(h);a(),p&&r(!0)})},l=["event","first-input"];Ao(t)&&l.push("soft-navigation");const f=Un(l,u,{...t,durationThreshold:t.durationThreshold??40});r=Ke(e,o,Pd,t.reportAllChanges),f&&(n.onHidden(()=>{u(f.takeRecords(),!0)}),Lr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Pr())}))})};class WI{p;l;h(t){this.p?.(t)}}const Ta=[2500,4e3],zI=(e,t={})=>{let n=!1;const r=Ao(t);Di(()=>{let o,s=uo(),i=rt("LCP");const a=Li(t,WI),c=(p,h,m,g,y)=>{i=rt("LCP",-1,p,h,m,g,y),o=Ke(e,i,Ta,t.reportAllChanges),n=!1,p==="soft-navigation"&&(s=uo(!0))},u=p=>{a.l&&p.navigationId&&lg(a.l,p),n||o(!0),c("soft-navigation",p.navigationId,p.interactionId,p.name,p.startTime);const h=p.getLargestInteractionContentfulPaint?.();h&&l([h])},l=p=>{t.reportAllChanges||r||(p=p.slice(-1));for(const h of p){if(!h)continue;if(h.entryType==="soft-navigation"){u(h);continue}let m=0,g=[],y=h.startTime;if(h.entryType==="largest-contentful-paint")m=Math.max(h.startTime-Co(),0),a.h(h),g=[h];else if(h.entryType==="interaction-contentful-paint"){const S=h;if(!i.navigationId||"interactionId"in S&&S.interactionId!=i.navigationInteractionId)continue;y=S.largestContentfulPaint?.renderTime||0,m=Math.max(y-h.startTime,0),S.largestContentfulPaint&&(a.h(S.largestContentfulPaint),g=[S.largestContentfulPaint])}y<s.firstHiddenTime&&(i.value=m,i.entries=g,o())}},f=["largest-contentful-paint"];r&&f.push("interaction-contentful-paint","soft-navigation");const d=Un(f,l);if(d){o=Ke(e,i,Ta,t.reportAllChanges);const p=["keydown","click","visibilitychange"],h=m=>{if(m.isTrusted&&!n){const g=i.id;hg(()=>{if(!n){if(!r){d.disconnect();for(const y of p)removeEventListener(y,h,{capture:!0})}g===i.id&&(n=!0,o(!0))}})}};for(const m of p)addEventListener(m,h,{capture:!0});Lr(m=>{c("back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Pr()),o=Ke(e,i,Ta,t.reportAllChanges),_u(()=>{i.value=performance.now()-m.timeStamp,n=!0,o(!0)})})}})},Ia=[800,1800],hc=e=>{document.prerendering?Di(()=>hc(e)):document.readyState!=="complete"?addEventListener("load",()=>hc(e),!0):setTimeout(e)},jI=(e,t={})=>{const n=Ao(t);let r=rt("TTFB"),o=Ke(e,r,Ia,t.reportAllChanges);hc(()=>{const s=yu();if(s){const i=s.responseStart;r.value=Math.max(i-Co(),0),r.entries=[s],o(!0),Lr(()=>{r=rt("TTFB",0,"back-forward-cache",r.navigationId,r.navigationInteractionId,r.navigationURL,Pr()),o=Ke(e,r,Ia,t.reportAllChanges),o(!0)}),n&&Un(["soft-navigation"],a=>{a.forEach(c=>{c.navigationId&&(r=rt("TTFB",0,"soft-navigation",c.navigationId,c.interactionId,c.name,c.startTime),r.entries=[c],o=Ke(e,r,Ia,t.reportAllChanges),o(!0))})},t)}})},xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zr={},qs={};let mg,gg,_g,yg,Sg;const bg={};let _r=!1,$i=!1;function qI(){_r=!0}function GI(){$i=!0}function Gs(e,t=!1){return xo("cls",e,YI,mg,t)}function Vs(e,t=!1){return xo("lcp",e,XI,gg,t)}function VI(e){return xo("ttfb",e,JI,_g)}function KI(e){return xo("fcp",e,QI,Sg)}function mc(e){return xo("inp",e,ZI,yg)}function ct(e,t){return vg(e,t),qs[e]||(ek(e),qs[e]=!0),Eg(e,t)}function Dr(e,t){const n=Zr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){xe&&_.error(`Error while triggering instrumentation handler.
|
|
492
|
-
Type: ${e}
|
|
493
|
-
Name: ${Ot(r)}
|
|
494
|
-
Error:`,o)}}function No(e){return t=>{!$i&&t.navigationType==="back-forward-cache"||e(t)}}function YI(){return $I(No(e=>{Dr("cls",{metric:e}),mg=e}),{reportAllChanges:!_r&&!$i,reportSoftNavs:_r})}function XI(){return zI(No(e=>{Dr("lcp",{metric:e}),gg=e}),{reportAllChanges:!_r&&!$i,reportSoftNavs:_r})}function JI(){return jI(No(e=>{Dr("ttfb",{metric:e}),_g=e}))}function QI(){return fg(No(e=>{Dr("fcp",{metric:e}),Sg=e}))}function ZI(){return HI(No(e=>{Dr("inp",{metric:e}),yg=e}),{reportSoftNavs:_r})}function xo(e,t,n,r,o=!1){return vg(e,t),qs[e]||(qs[e]=!0,Promise.resolve().then(()=>{bg[e]=n()})),r&&t({metric:r}),Eg(e,t,o)}function ek(e){const t={type:e,buffered:!0};e==="event"&&(t.durationThreshold=0);try{PerformanceObserver.supportedEntryTypes.includes(e)&&new PerformanceObserver(r=>{Promise.resolve().then(()=>{Dr(e,{entries:r.getEntries()})})}).observe(t)}catch{}}function vg(e,t){Zr[e]=Zr[e]||[],Zr[e].push(t)}function Eg(e,t,n=!1){return()=>{n&&bg[e]?.();const r=Zr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function wg(e){return"duration"in e}const j=$,Tg=5,tk=5;let Zo,es,qr;const Yr=new uu(Tg),Ig=new uu(Tg);let Ld=!1;function Dd(e,t){return Math.abs(e-t)<=tk}function kg(){try{return PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&typeof j.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint=="function"}catch{return!1}}function nk(e){if(Ld||!kg())return;Ld=!0;const t=r=>{r.isTrusted&&(qr=r.timeStamp)};j.addEventListener("click",t,{capture:!0,passive:!0}),j.addEventListener("keydown",t,{capture:!0,passive:!0}),e.on("spanStart",r=>{if(ne(r).attributes?.[H]!=="navigation")return;Zo=void 0;const o=qr;if(o!=null){if(es?.interactionTimestamp===o){Yr.set(es.interactionId,r),es=void 0;return}Zo={span:r,interactionTimestamp:o}}});const n=({entries:r})=>{for(const o of r){if(!wg(o)||!o.interactionId)continue;const s=Zo;if(s&&Dd(o.startTime,s.interactionTimestamp)){Yr.set(o.interactionId,s.span),Zo=void 0;continue}Yr.get(o.interactionId)||qr!=null&&Dd(o.startTime,qr)&&(es={interactionId:o.interactionId,interactionTimestamp:qr})}};ct("event",n),ct("first-input",n),ct("soft-navigation",({entries:r})=>{for(const o of r){const s=Yr.get(o.interactionId);if(!s){xe&&_.log(`[SoftNav] No navigation span found for soft navigation ${o.navigationId}`,o);continue}Ig.set(o.navigationId,s),s.setAttribute(Rp,o.navigationId)}})}function rk(e){if(e.navigationType!=="soft-navigation")return;const t=Ig.get(e.navigationId);return t||(e.navigationInteractionId!=null?Yr.get(e.navigationInteractionId):void 0)}function ka(e){return typeof e=="number"&&isFinite(e)}function Ft(e,t,n,{...r}){const o=Ne(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),sn(e,()=>{const s=yt({startTime:t,...r});return s&&s.end(n),s})}function $r(){return j.addEventListener&&j.performance}function ut(e){return e/1e3}function ok(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Rg(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Cg(e){const t={};if(e.nextHopProtocol!=null){const{name:r,version:o}=ok(e.nextHopProtocol);t["network.protocol.version"]=o,t["network.protocol.name"]=r}if(Le(e.startTime)===void 0)return t;const n=r=>r&&Le(r,e.startTime);return sk({...t,"http.request.redirect_start":n(e.redirectStart),"http.request.redirect_end":n(e.redirectEnd),"http.request.worker_start":n(e.workerStart),"http.request.fetch_start":n(e.fetchStart),"http.request.domain_lookup_start":n(e.domainLookupStart),"http.request.domain_lookup_end":n(e.domainLookupEnd),"http.request.connect_start":n(e.connectStart),"http.request.secure_connection_start":n(e.secureConnectionStart),"http.request.connection_end":n(e.connectEnd),"http.request.request_start":n(e.requestStart),"http.request.response_start":n(e.responseStart),"http.request.response_end":n(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?ut(e.responseStart):void 0})}function sk(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const ik=2147483647;let $d=0;function ak(){ct("longtask",({entries:e})=>{const t=he();if(!t)return;const{attributes:n,start_timestamp:r}=ne(t);for(const o of e){const s=Le(o.startTime);if(!s)continue;const i=ut(o.duration);n[H]==="navigation"&&r&&s<r||Ft(t,s,s+i,{name:Hh,op:Lv,attributes:{[re]:"auto.ui.browser.metrics"}})}})}function ck(){new PerformanceObserver(t=>{const n=he();if(n)for(const r of t.getEntries()){const o=Le(r.startTime);if(!o||!r.scripts[0])continue;const{start_timestamp:s,attributes:{[H]:i}}=ne(n);if(i==="navigation"&&s&&o<s)continue;const a=ut(r.duration),c={[re]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:l,invokerType:f,sourceURL:d,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=l,c["browser.script.invoker_type"]=f,d&&(c[TS]=d),p&&(c[IS]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Ft(n,o,o+a,{name:Hh,op:Dv,attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function uk(e,t){const n=$r();if(!n?.getEntries)return;const{spanStreamingEnabled:r,ignoreResourceSpans:o}=t,s=n.getEntries(),{attributes:i,start_timestamp:a}=ne(e);s.slice($d).forEach(c=>{const u=Le(c.startTime);if(!u)return;const l=ut(Math.max(0,c.duration));if(!(i[H]==="navigation"&&a&&u<a))switch(c.entryType){case"navigation":{dk(e,c,r);break}case"paint":{lk(e,c,u,l);break}case"resource":{mk(e,c,c.name,u,l,o,r);break}}}),$d=Math.max(s.length-1,0),gk(e,r)}function lk(e,t,n,r){Ft(e,n,n+r,{name:t.name,attributes:{[H]:Ov,[re]:"auto.resource.browser.metrics",[ES]:t.name}})}function dk(e,t,n){qt(e,t,"unloadEvent",n),qt(e,t,"redirect",n),qt(e,t,"domContentLoadedEvent",n),qt(e,t,"loadEvent",n),qt(e,t,"connect",n),qt(e,t,"secureConnection",n),qt(e,t,"fetch",n),qt(e,t,"domainLookup",n),hk(e,t,n)}function eo(e,t){return Le(t,e.startTime)}const fk={secureConnection:Mh,fetch:Oh,domainLookup:Ph,unloadEvent:Rh,redirect:Ch,connect:xh,domContentLoadedEvent:Ah,loadEvent:Nh};function qt(e,t,n,r){const o=pk(n),s=t[o],i=t[`${n}Start`];if(!i||!s)return;const a=fk[n],c=be(t.name);Ft(e,eo(t,i),eo(t,s),{name:r?tc[a]:c,attributes:{[H]:a,[re]:"auto.ui.browser.metrics",[De]:c,...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function pk(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function hk(e,t,n){const r=eo(t,t.requestStart),o=eo(t,t.responseEnd),s=eo(t,t.responseStart);if(t.responseEnd){const i=be(t.name);Ft(e,r,o,{name:n?tc[Za]:i,attributes:{[H]:Za,[re]:"auto.ui.browser.metrics",[De]:i}}),Ft(e,s,o,{name:n?tc[ec]:i,attributes:{[H]:ec,[re]:"auto.ui.browser.metrics",[De]:i}})}}function mk(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:Mv;if(s?.includes(a))return;const c={[re]:"auto.resource.browser.metrics"},u=Cn(n);u.protocol&&(c[ZS]=u.protocol.split(":").pop());const l=u.host?.replace(/^.*@/,"");l&&(c[_i]=l);const f=l?.replace(/:\d+$/,"");f&&(c[yi]=f),c[xS]=n.includes(j.location.origin);const d=be(n);c[De]=d,_k(t,c,[["responseStatus",OS],["transferSize",MS],["encodedBodySize",xp],["decodedBodySize","http.response.body.decoded_size"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const p={...c,...Cg(t)},h=r+o;Ft(e,r,h,{name:i?f||zv:d.replace(j.location.origin,""),op:a,attributes:p})}function gk(e,t){const n=j.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?PS:"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?DS:"connectionType",r.type),ka(r.rtt)&&(t?e.setAttribute(LS,r.rtt):ne(e).attributes[H]==="pageload"&&vh("connection.rtt",r.rtt,"millisecond"))),ka(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),ka(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function _k(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<ik||typeof s=="string")&&(t[o]=s)})}const yk=80,En={};try{typeof Node<"u"&&(En.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(En.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,En.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,En.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,En.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(En.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Gt(e,t,n){const r=En[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return typeof o=="function"?o.call(e,n):o}function Xe(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||yk;for(;n&&s++<r&&(u=Sk(n,l),!(u==="html"||s>1&&i+o.length*c+u.length>=f));)o.push(u),i+=u.length,n=Gt(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Sk(e,t){const n=[],r=Gt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=Gt(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const o=t?.length?t.filter(s=>Gt(e,"getAttribute",s)).map(s=>[s,Gt(e,"getAttribute",s)]):null;if(o?.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{const s=Gt(e,"id");s&&n.push(`#${s}`);const i=Gt(e,"className");if(i&&tt(i)){const a=i.split(/\s+/);for(const c of a)n.push(`.${c}`)}}for(const s of["aria-label","type","name","title","alt"]){const i=Gt(e,"getAttribute",s);i&&n.push(`[${s}="${i}"]`)}return n.join("")}const bk=6e4;function Su(e){return e!=null&&e>0&&e<=bk}function Ks(e,t,n){j.document&&j.addEventListener(e,t,n)}function Ag(e,t,n){j.document&&j.removeEventListener(e,t,n)}const bu=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},vu=()=>bu()?.activationStart??0,vk=e=>{Ks("visibilitychange",n=>{j.document?.visibilityState==="hidden"&&e(n)},{capture:!0})};let ar=-1;const Ng=new Set,Ek=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,gc=e=>{if(j.document?.visibilityState==="hidden"&&ar>-1){if(e.type==="visibilitychange")for(const t of Ng)t();isFinite(ar)||(ar=e.type==="visibilitychange"?e.timeStamp:0,Ag("prerenderingchange",gc,!0))}},wk=()=>{if(j.document&&ar<0){const e=vu();ar=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??Ek(),Ks("visibilitychange",gc,!0),Ks("prerenderingchange",gc,!0)}return{get firstHiddenTime(){return ar},onHidden(e){Ng.add(e)}}},Tk=e=>{const t=j.requestIdleCallback||j.setTimeout;if(j.document?.visibilityState==="hidden")e();else{let n=!1;const r=()=>{n||(e(),n=!0)};Ks("visibilitychange",r,{once:!0,capture:!0}),t(()=>{r(),Ag("visibilitychange",r,{capture:!0})})}};let Be={},je,Ys,lo;function Ik({trackCls:e,trackLcp:t}){if($r()&&Cr()){const r=t?Rk():void 0,o=e?kk():void 0,s=Ck(),i=Ak(),a=Nk();return()=>{s(),i(),a(),r?.(),o?.()}}return()=>{}}function kk(){return Gs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Be.cls={value:e.value,unit:""},Ys=t)},!0)}function Rk(){return Vs(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Su(e.value)||(Be.lcp={value:e.value,unit:"millisecond"},je=t)},!0)}function Ck(){return VI(({metric:e})=>{lo=e.navigationType,e.entries[e.entries.length-1]&&(Be.ttfb={value:e.value,unit:"millisecond"})})}function Ak(){return KI(({metric:e})=>{lo=e.navigationType,Be.fcp={value:e.value,unit:"millisecond"}})}function Nk(){return ct("paint",({entries:e})=>{const t=wk();for(const n of e)n.name==="first-paint"&&n.startTime<t.firstHiddenTime&&(Be.fp={value:n.startTime,unit:"millisecond"})})}function xk(e,t){const n=Cr();if(!$r()?.getEntries||!n){Fd();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=ut(n);if(ne(e).attributes[H]==="pageload"){if(Pk(Be),Ok(Be),r){const a=(c,u,l)=>{const f=l??`browser.web_vital.${c}.value`;e.setAttribute(f,u),xe&&_.log("Setting web vital attribute",{[f]:u},"on pageload span")};["ttfb","fp","fcp"].forEach(c=>{Be[c]&&a(c,Be[c].value)}),Be["ttfb.requestTime"]&&a("ttfb.requestTime",Be["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete Be.cls,s||delete Be.lcp,Object.entries(Be).forEach(([a,c])=>{vh(a,c.value,c.unit,e)}),Mk(e,t);lo&&e.setAttribute(mi,lo),e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",vu())}Fd()}function Fd(){je=void 0,Ys=void 0,lo=void 0,Be={}}function Mk(e,t){je&&t.recordLcpOnPageloadSpan&&(je.element&&e.setAttribute("lcp.element",Xe(je.element)),je.id&&e.setAttribute("lcp.id",je.id),je.url&&e.setAttribute("lcp.url",be(je.url.trim()).slice(0,200)),je.loadTime!=null&&e.setAttribute("lcp.loadTime",je.loadTime),je.renderTime!=null&&e.setAttribute("lcp.renderTime",je.renderTime),e.setAttribute("lcp.size",je.size)),Ys?.sources&&t.recordClsOnPageloadSpan&&Ys.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Xe(n.node)))}function Ok(e){const t=e.fp;t&&(t.value=Math.max(t.value-vu(),0))}function Pk(e){const t=bu(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Lk="ElementTiming",Dk=(()=>({name:Lk,setup(){!$r()||!Cr()||ct("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,s=r.name,i=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};s&&(c["ui.element.paint_type"]=s),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=be(r.url)),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),i>0&&Hs("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&Hs("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),rL=Dk,Ra=[],bs=new Map,Xs="<unknown>",Sn=new Map,$k=60,Eu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Fk(e){return e!=null?bs.get(e):void 0}function Bk(){const e=Object.keys(Eu);on()&&e.forEach(o=>{j.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=Xe(s),a=Math.round(o.timeStamp);if(!(!i||i===Xs)&&!Sn.has(a)&&(Sn.set(a,i),Sn.size>50)){const c=Sn.keys().next().value;c!==void 0&&Sn.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=Sn.get(s);if(!i)for(let a=-5;a<=5;a++){const c=Sn.get(s+a);if(c){i=c;break}}return i||Xs}const r=({entries:o})=>{const s=he(),i=s&&Re(s);o.forEach(a=>{if(!wg(a))return;const c=a.interactionId;if(c==null||bs.has(c))return;const u=a.target?Xe(a.target):n(a);if(Ra.length>10){const l=Ra.shift();bs.delete(l)}Ra.push(c),bs.set(c,{span:i,elementName:u})})};ct("event",r),ct("first-input",r)}const Uk=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function xg(){const e=j.navigator;return e?.userAgent?Uk.test(e.userAgent):!1}function Fr(e,t=5){if(!$.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const Hk="Interactions",Wk=((e={})=>({name:Hk,setup(t){if(xg())return;const n={name:void 0,source:void 0,routeId:void 0,urlTemplate:void 0,httpRoute:void 0,urlPath:void 0,urlFull:void 0};let r;function o(s){const{name:i,attributes:a}=ne(s);n.name=i,n.source=a[VS]||a[ce],n.routeId=a[Op],n.urlTemplate=a[We],n.httpRoute=a[Mp],n.urlPath=a[Si],n.urlFull=a[De]}t.on("spanStart",s=>{zk(s)&&(r=s,o(s))}),t.on("spanEnd",s=>{s===r&&(r=void 0,o(s))}),jk(t,n,()=>r,e),qk(t)}})),oL=Wk;function zk(e){if(Re(e)!==e)return!1;const t=ne(e).attributes[H];return t==="pageload"||t==="navigation"}function jk(e,t,n,r){if(!j.document)return;let o;addEventListener("click",()=>{if(n()){xe&&_.warn(`[Tracing] Did not create ${oa} span because a pageload or navigation span is in progress.`);return}if(o&&(o.setAttribute(or,"interactionInterrupted"),o.end(),o=void 0),!t.name){xe&&_.warn(`[Tracing] Did not create ${oa} span because the latest route name is missing.`);return}const s=V(e),i=t.routeId||t.urlTemplate||t.httpRoute,a=i||qv,c=!i||t.routeId?"custom":"route";o=Th({name:s?a:t.name,attributes:{[H]:oa,[ce]:s?c:t.source||"url",[re]:"auto.browser.interactions",...s&&{[Ar]:a},...t.routeId&&{[Op]:t.routeId},...t.urlTemplate&&{[We]:t.urlTemplate},...t.httpRoute&&{[Mp]:t.httpRoute},...t.urlPath&&{[Si]:t.urlPath},...t.urlFull&&{[De]:be(t.urlFull)}}},r)},{capture:!0})}function qk(e){ct("event",({entries:t})=>{const n=he();if(n){for(const r of t)if(r.name==="click"){const o=Le(r.startTime);if(!o)continue;const s=ut(r.duration),i=Xe(r.target),a=Fr(r.target),u={name:V(e)?a||Wh:i,startTime:o,attributes:{[H]:Ls,[re]:"auto.browser.interactions",...i&&i!==Xs&&{[Wc]:i}}};a&&(u.attributes[Nt]=a),Ft(n,o,o+s,u)}}})}function Bt(){try{return j.document?.location.href??""}catch{return""}}const Mg=new WeakMap;function Gk(e,t=v()){if(!t){xe&&_.warn("Cannot set a route provider without a client.");return}xe&&wu(t)&&_.warn("A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve."),Mg.set(t,e)}function wu(e=v()){return e&&Mg.get(e)}function sL(e,t=v()){const n=wu(t);if(!n)return;const r=typeof e=="string"?Og(e):e;if(r)return vt(xe?"Route provider threw while resolving a route:":"",()=>n.resolveRoute(r)||void 0,()=>{})}function Vk(e=v()){const t=wu(e);return vt(xe?"Route provider threw while resolving a route:":"",()=>t?.resolveCurrentRoute()||void 0,()=>{})}function Kk(e){return{resolveRoute:e,resolveCurrentRoute:()=>{const t=Og(Bt());return t&&e(t)}}}function iL(e=50){const t=new uu(e);return{...Kk(n=>t.get(n.pathname)),record(n,r){n&&r&&t.set(n,r)}}}function Og(e){return e?Dn(e,Bt()||void 0):void 0}const Yk="UserTiming",Xk=((e={})=>({name:Yk,setup(t){const n=$r();if(!n?.getEntries)return;let r=0;t.on("beforeIdleSpanEnd",o=>{const{attributes:s,start_timestamp:i}=ne(o),a=s[H];if(a!=="pageload"&&a!=="navigation")return;const c=bu(!1)?.requestStart??0,u=n.getEntries();for(const l of u.slice(r)){if(l.entryType!=="mark"&&l.entryType!=="measure")continue;const f=Le(l.startTime);if(!f||a==="navigation"&&i&&f<i)continue;const d=Le(l.startTime+Math.max(0,l.duration),l.startTime),p=Le(c,l.startTime);Jk(o,l,f,d,p,e.ignore??[])}r=u.length})}})),aL=Xk;function Jk(e,t,n,r,o,s){if(Qk(t)||Ht(t.name,s))return;const i=Math.max(n,o),a={[re]:`auto.browser.user_timing.${t.entryType}`};i!==n&&(a["sentry.browser.measure_happened_before_request"]=!0,a["sentry.browser.measure_start_time"]=i),Zk(a,t),i<=r&&Ft(e,i,r,{name:t.name,op:t.entryType,attributes:a})}function Qk(e){if(e.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Zk(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&<(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(lt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Tu(e){const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,startTime:c,endTime:u,standalone:l,softNavigationId:f,navigationType:d}=e,p=a&&Re(a),h=p?ne(p).name:q().getScopeData().transactionName,m={[re]:r,[H]:n,[yo]:0,[`browser.web_vital.${o}.value`]:s,[XS]:h,[Ar]:h,[Dp]:j.navigator?.userAgent,...i};a&&ne(a).attributes[H]==="pageload"&&(m["sentry.pageload.span_id"]=a.spanContext().spanId),f!=null&&(m[Rp]=f),d&&(m[mi]=d),l&&Object.assign(m,eR());const g=yt({name:t,attributes:m,startTime:c,parentSpan:a,experimental:l?{standalone:!0}:void 0});g&&g.end(u??c)}function eR(){const e=v()?.getIntegrationByName("Replay"),t=e?.getReplayId(!0);return t?{[WS]:t,"sentry._internal.replay_is_buffering":e.getRecordingMode()==="buffer"?!0:void 0}:{}}function Pg(e,t){let n,r=!1;function o(){!r&&n&&t(n),r=!0}vk(()=>{o()});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o(),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}const tR={click:Ls,hover:$v,drag:Fv,press:Bv},nR={click:Wh,hover:Gv,drag:Vv,press:Kv};function Iu(e,t,n){let r;e.on("afterStartPageLoadSpan",s=>{r=s});let o;e.on("spanStart",s=>{const i=ne(s).attributes;i?.[H]===xr&&i[mi]==="back-forward-cache"&&(o=s)}),t(({metric:s})=>{const i=rk(s);if(s.navigationType==="soft-navigation"){i?n(s,i,s.navigationId):xe&&_.log(`[SoftNav] Dropping ${s.name} for uncorrelated soft navigation ${s.navigationId}`);return}if(s.navigationType==="back-forward-cache"){n(s,o,void 0);return}n(s,r,void 0)})}function rR(e,t=!1){if(!Rg("largest-contentful-paint"))return;if(t){Iu(e,Vs,(i,a,c)=>{const u=i.entries[i.entries.length-1];Bd(i.value,u,a,c,i.navigationType,i.navigationStartTime)});return}let n=0,r,o;const s=Vs(({metric:i})=>{o=i.navigationType;const a=i.entries[i.entries.length-1];!a||!Su(i.value)||(n=i.value,r=a)},!0);Pg(e,i=>{Bd(n,r,i,void 0,o),s()})}function Bd(e,t,n,r,o,s){if(!Su(e))return;xe&&_.log(`Sending LCP span (${e})`);const i=s||0,a=Le(i)??ut(i),c=t?Le(t.startTime,i)??ut(t.startTime):a+ut(e),u=t?Xe(t.element):void 0,l=t?.element?Fr(t.element):null,f=v(),p=!!f&&V(f)?l||Dl:u??Dl,h={};u&&(h["browser.web_vital.lcp.element"]=u),l&&(h[Nt]=l),t?.id&&(h["browser.web_vital.lcp.id"]=t.id),t?.url&&(h["browser.web_vital.lcp.url"]=be(t.url,f)),t?.loadTime!=null&&(h["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(h["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(h["browser.web_vital.lcp.size"]=t.size),Tu({name:p,op:Uv,origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:h,parentSpan:n,startTime:a,endTime:c,softNavigationId:r,navigationType:o})}function oR(e,t=!1){if(!Rg("layout-shift"))return;if(t){Iu(e,Gs,(i,a,c)=>{const u=i.entries[i.entries.length-1];Ud(i.value,u,a,c,i.navigationType,i.navigationStartTime)});return}let n=0,r,o;const s=Gs(({metric:i})=>{o=i.navigationType;const a=i.entries[i.entries.length-1];a&&(n=i.value,r=a)},!0);Pg(e,i=>{Ud(n,r,i,void 0,o),s()})}function Ud(e,t,n,r,o,s){xe&&_.log(`Sending CLS span (${e})`);const i=t?.startTime??s??0,a=Le(i)??fe(),c=t?.sources[0]?.node,u=t?Xe(c):void 0,l=c?Fr(c):null,f=v(),p=!!f&&V(f)?l||$l:u??$l,h={};l&&(h[Nt]=l),t?.sources&&t.sources.forEach((m,g)=>{h[`browser.web_vital.cls.source.${g+1}`]=Xe(m.node)}),Tu({name:p,op:Hv,origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:h,parentSpan:n,startTime:a,softNavigationId:r,navigationType:o})}function sR(e,t=!1){if(!$r()||!Cr())return;const r=!V(e);if(t){Iu(e,mc,(s,i,a)=>{Hd(s)&&zd(s.value,Wd(s),r,i,a,s)});return}mc(({metric:s})=>{Hd(s)&&zd(s.value,Wd(s),r,void 0,void 0,s)})}function Hd(e){return e.value!=null&&ut(e.value)<=$k}function Wd(e){return e.entries.find(t=>t.duration===e.value&&Eu[t.name])}function zd(e,t,n=!1,r,o,s){xe&&_.log(`Sending INP span (${e})`);const i=Le(t?.startTime??s?.navigationStartTime??0);if(!i)return;const a=ut(e),c=t&&Eu[t.name],u=c||"click",l=t&&Fk(t.interactionId),f=he(),d=f?Re(f):void 0,p=r||l?.span||d,h=l?.elementName||(t?Xe(t.target):void 0),m=t?.target?Fr(t.target):null,g=v(),y=!!g&&V(g),S=nR[u],T=y?m||S:h??"Interaction to next paint",b={[yo]:t?.duration??e};h&&h!==Xs&&(b[Wc]=h),c&&(b[wS]=c),m&&(b[Nt]=m),Tu({name:T,op:tR[u],origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:b,startTime:i,endTime:i+a,navigationType:s?.navigationType,parentSpan:p,standalone:n,softNavigationId:o})}const iR=1e3;let jd,_c,yc;function qd(e){return typeof e=="boolean"?e:!!e?.capture}function Lg(e){un("dom",e),ln("dom",aR)}function aR(){if(!j.document)return;const e=et.bind(null,"dom"),t=Gd(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=j[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Oe(o,"addEventListener",function(s){return function(i,a,c){if((i==="click"||i=="keypress")&&a)try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},f=qd(c);if(!l.handler){const p=Gd(e);l.handler=p,l.capture=f,s.call(this,i,p,l.capture)}const d=l[f?"captureListeners":"bubbleListeners"];d.has(a)||(typeof c=="object"&&(c?.once||c?.signal)?l.sticky=!0:(d.add(a),l.listenerCount++))}catch{}return s.call(this,i,a,c)}}),Oe(o,"removeEventListener",function(s){return function(i,a,c){if((i==="click"||i=="keypress")&&a)try{const u=this.__sentry_instrumentation_handlers__||{},l=u[i];l?.[qd(c)?"captureListeners":"bubbleListeners"].delete(a)&&(!--l.listenerCount&&!l.sticky&&(s.call(this,i,l.handler,l.capture),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function cR(e){if(e.type!==_c)return!1;try{if(!e.target||e.target._sentryId!==yc)return!1}catch{}return!0}function uR(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Gd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=lR(n);if(uR(n.type,r))return;pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&pe(r,"_sentryId",Pe());const o=n.type==="keypress"?"input":n.type;cR(n)||(e({event:n,name:o,global:t}),_c=n.type,yc=r?r._sentryId:void 0),clearTimeout(jd),jd=j.setTimeout(()=>{yc=void 0,_c=void 0},iR)}}function lR(e){try{return e.target}catch{return null}}let ts;function dR(){return"history"in j&&!!j.history}function Fi(e){const t="history";un(t,e),ln(t,fR)}function fR(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=ts;if(ts=t,n===t)return;et("history",{from:n,to:t})}),!dR())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=ts,s=pR(String(r));if(ts=s,o===s)return t.apply(this,n);et("history",{from:o,to:s})}return t.apply(this,n)}}Oe(j.history,"pushState",e),Oe(j.history,"replaceState",e)}function pR(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const to={};function ku(e){const t=to[e];if(t)return t;let n=j[e];if(cc(n))return to[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){xe&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(to[e]=n.bind(j))}function hR(e){to[e]=void 0}function Mo(...e){try{return ku("setTimeout")(...e)}catch(t){xe&&_.warn("Could not use native setTimeout implementation, falling back to window.setTimeout: ",t);const n=j.setTimeout.bind(j);return to.setTimeout=n,n(...e)}}const Ct="__sentry_xhr_v3__";function Ru(e){un("xhr",e),ln("xhr",mR)}function mR(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error;const s=fe()*1e3,i=tt(r[0])?r[0].toUpperCase():void 0,a=gR(r[1]);if(!i||!a)return t.apply(n,r);n[Ct]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Ct];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const l={endTimestamp:fe()*1e3,startTimestamp:s,xhr:n,virtualError:o};et("xhr",l),o=void 0,n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,l,f){return c(),u.apply(l,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,l,f){const[d,p]=f,h=l[Ct];return h&&tt(d)&&tt(p)&&(h.request_headers[d.toLowerCase()]=p),u.apply(l,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Ct];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:fe()*1e3,xhr:n};return et("xhr",s),t.apply(n,r)}})}function gR(e){if(tt(e))return e;try{return e.toString()}catch{}}const _R=Symbol.for("sentry__originalRequestBody");function Dg(e){return new URLSearchParams(e).toString()}function Js(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Dg(e)];if(!e)return[void 0]}catch(n){return xe&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return xe&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Cu(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][_R];return n!==void 0?n:void 0}}function $g(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return xe&&_.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
495
|
-
`).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function yR(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function SR(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const C=$;let Sc=0;const no=[];function Fg(e){if(Sc>0)return!0;const t=e?no.findIndex(n=>vR(n,e)):-1;return t===-1?!1:(no.splice(t,1),!0)}function bR(e){no.push(e),setTimeout(()=>{const t=no.indexOf(e);t!==-1&&no.splice(t,1)})}function vR(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function ER(){Sc++,setTimeout(()=>{Sc--})}function yr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const s=e.__sentry_wrapped__;return typeof s=="function"?s:e}if(Bc(e))return e}catch{return e}const r=function(...o){$._sentryWrappedDepth=($._sentryWrappedDepth||0)+1;try{const s=o.map(i=>yr(i,t));return e.apply(this,s)}catch(s){throw ER(),Je(i=>{i.addEventProcessor(a=>(t.mechanism&&(Ga(a,void 0),At(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Pn(s)}),s}finally{$._sentryWrappedDepth=($._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}hp(r,e),pe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Qs(e){const t=Bt(),{referrer:n}=C.document||{},{userAgent:r}=C.navigator||{},o={...n&&{Referer:be(n,e)},...r&&{"User-Agent":r}};return{url:t,headers:o}}const wR=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","userTimingIntegration","interactionsIntegration","moduleMetadataIntegration"],TR={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function IR(e){return TR[e]||e.replace("Integration","").toLowerCase()}const Vd=C;async function kR(e,t){const n=wR.includes(e)?IR(e):void 0,r=Vd.Sentry=Vd.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=RR(n),i=C.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((f,d)=>{i.addEventListener("load",()=>f()),i.addEventListener("error",d)}),c=C.document.currentScript,u=C.document.body||C.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const l=r[e];if(typeof l!="function")throw new Error(`Could not load integration: ${e}`);return l}function RR(e){const n=v()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Zt}/${e}.min.js`,n).toString()}const cL=Gm({lazyLoadIntegration:kR}),uL=Gm({getModalIntegration:()=>RI,getScreenshotIntegration:()=>PI});function Au(e,t){const n=Bi(e,t),r={type:Ug(t),value:Hg(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function CR(e,t,n,r){const s=v()?.getOptions().normalizeDepth,i=DR(t),a={__serialized__:Sp(t,s)};if(i)return{exception:{values:[Au(e,i)]},extra:a};const u={exception:{values:[{type:pi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:PR(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=Bi(e,n);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function Ca(e,t){return{exception:{values:[Au(e,t)]}}}function Bi(e,t){const n=t.stacktrace||t.stack||"",r=NR(t),o=xR(t);try{return e(n,r,o)}catch{}return[]}const AR=/Minified React error #\d+;/i;function NR(e){return e&&AR.test(e.message)?1:0}function xR(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Bg(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ug(e){const t=e?.name;return!t&&Bg(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Hg(e){const t=e?.message;return Bg(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?td(t.error):td(e):"No error message"}function MR(e,t,n,r){const o=n?.syntheticException||void 0,s=Ui(e,t,o,r);return At(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),To(s)}function OR(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=bc(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),To(i)}function Ui(e,t,n,r,o){let s;if(fp(t)&&t.error)return Ca(e,t.error);if(al(t)||By(t)){const a=t;if("stack"in t){s=Ca(e,t);const c=s.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const u=Bi(e,n);u.length&&(c.stacktrace={frames:u},At(s,{synthetic:!0}))}}else{const c=a.name||(al(a)?"DOMError":"DOMException"),u=a.message?`${c}: ${a.message}`:c;s=bc(e,u,n,r),Ga(s,u)}return s}if(ke(t))return Ca(e,t);if(Ue(t)||pi(t))return s=CR(e,t,n,o),At(s,{synthetic:!0}),s;const i=String(t);return s=bc(e,i,n,r),Ga(s,i),At(s,{synthetic:!0}),s}function bc(e,t,n,r){const o={};if(r&&n){const s=Bi(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),At(o,{synthetic:!0})}if(fi(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function PR(e,{isUnhandledRejection:t}){const n=Uy(e),r=t?"promise rejection":"exception";return fp(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:pi(e)?`Event \`${LR(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function LR(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function DR(e){return Object.values(e).find(ke)}class $R extends qE{constructor(t){const n=FR(t),r=C.SENTRY_SDK_SOURCE||Xb();wm(n,"browser",["browser"],r),super(n),n.routeProvider&&Gk(n.routeProvider,this),this._unhandledSessionStatus="unhandled";const{userInfo:o}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options,i=()=>{fe()},a=[[C.document,"visibilitychange",()=>{i(),C.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[C.document,"freeze",i],[C.document,"resume",i],[C,"pagehide",i],[C,"pageshow",i]];a.forEach(([c,u,l])=>c?.addEventListener?.(u,l)),this.on("close",()=>a.forEach(([c,u,l])=>c?.removeEventListener?.(u,l))),o&&this.on("beforeSendSession",gw)}eventFromException(t,n){return MR(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return OR(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function FR(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const BR=40;function Wg(e,t=ku("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw hR("fetch"),c}finally{n-=i,r--}}return LE(e,o,su(e.bufferSize||BR))}const L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function UR(){const e=v();if(!e){L&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){L&&_.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function HR(){const e=v();if(!e){L&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){L&&_.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const lL={startProfiler:UR,stopProfiler:HR},WR=10,zR=20,jR=30,qR=40,GR=50;function Sr(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?St:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const VR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,KR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,YR=/\((\S*)(?::(\d+))(?::(\d+))\)/,XR=/at (.+?) ?\(data:(.+?),/,JR=e=>{const t=e.match(XR);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=VR.exec(e);if(n){const[,o,s,i]=n;return Sr(o,St,+s,+i)}const r=KR.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=YR.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=zg(r[1]||St,r[2]);return Sr(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},QR=[jR,JR],ZR=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,eC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tC=e=>{const t=ZR.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=eC.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||St;return[o,r]=zg(o,r),Sr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},nC=[GR,tC],rC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,oC=e=>{const t=rC.exec(e);return t?Sr(t[2],t[1]||St,+t[3],t[4]?+t[4]:void 0):void 0},dL=[qR,oC],sC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,iC=e=>{const t=sC.exec(e);return t?Sr(t[2],t[3]||St,+t[1]):void 0},fL=[WR,iC],aC=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,cC=e=>{const t=aC.exec(e);return t?Sr(t[5],t[3]||t[4]||St,+t[1],+t[2]):void 0},pL=[zR,cC],uC=[QR,nC],lC=cp(...uC),zg=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:St,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function hL(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Wt(r)}},s=dC(e);return ht(o,[s])}function dC(e){return[{type:"user_report"},e]}const ns=1024,fC="Breadcrumbs",pC=((e={})=>{const t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:fC,setup(n){t.dom&&Lg(gC(n,t.dom)),t.xhr&&Ru(_C(n)),t.fetch&&Mi(yC(n)),t.history&&Fi(SC(n)),t.sentry&&n.on("beforeSendEvent",mC(n))}}}),hC=pC;function mC(e){return function(n){v()===e&&Et({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:wn(n)},{event:n})}}function gC(e,t){return function(r){if(v()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>ns&&(L&&_.warn(`\`dom.maxStringLength\` cannot exceed ${ns}, but a value of ${a} was configured. Sentry will use ${ns} instead.`),a=ns),typeof i=="string"&&(i=[i]);try{const u=r.event,l=bC(u)?u.target:u;o=Xe(l,{keyAttrs:i,maxStringLength:a}),s=Fr(l)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),Et(c,{event:r.event,name:r.name,global:r.global})}}function _C(e){return function(n){if(v()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[Ct];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,l={method:i,url:be(a),status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},d={category:"xhr",data:l,type:"http",level:Dm(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,f),Et(d,f)}}function yC(e){return function(n){if(v()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},i={category:"fetch",data:{...n.fetchData,url:be(n.fetchData.url)},level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),Et(i,s)}else{const s=n.response,i={...n.fetchData,url:be(n.fetchData.url),status_code:s?.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Dm(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Et(c,a)}}}function SC(e){return function(n){if(v()!==e)return;let r=n.from,o=n.to;const s=Cn(C.location.href);let i=r?Cn(r):void 0;const a=Cn(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),Et({category:"navigation",data:{from:be(r),to:be(o)}})}}function bC(e){return!!e&&!!e.target}const vC="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),EC="BrowserApiErrors",wC=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:EC,setupOnce(){t.setTimeout&&Oe(C,"setTimeout",Kd),t.setInterval&&Oe(C,"setInterval",Kd),t.requestAnimationFrame&&Oe(C,"requestAnimationFrame",IC),t.XMLHttpRequest&&"XMLHttpRequest"in C&&Oe(XMLHttpRequest.prototype,"send",kC);const n=t.eventTarget;n&&(Array.isArray(n)?n:vC).forEach(o=>RC(o,t))}}}),TC=wC;function Kd(e){return function(...t){const n=t[0];return t[0]=yr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ot(e)}`}}),e.apply(this,t)}}function IC(e){return function(t){return e.apply(this,[yr(t,{mechanism:{data:{handler:Ot(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function kC(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Oe(n,o,function(s){const i={mechanism:{data:{handler:Ot(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Bc(s);return a&&(i.mechanism.data.handler=Ot(a)),yr(s,i)})}),e.apply(this,t)}}function RC(e,t){const r=C[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Oe(r,"addEventListener",function(o){return function(s,i,a){try{CC(i)&&(i.handleEvent=yr(i.handleEvent,{mechanism:{data:{handler:Ot(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&AC(this,s,i),o.apply(this,[s,yr(i,{mechanism:{data:{handler:Ot(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Oe(r,"removeEventListener",function(o){return function(s,i,a){try{if(Object.prototype.hasOwnProperty.call(i,"__sentry_wrapped__")){const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}}catch{}return o.call(this,s,i,a)}}))}function CC(e){return typeof e.handleEvent=="function"}function AC(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const NC=(e={})=>{const t=e.lifecycle??"page";return{name:"BrowserSession",setupOnce(){if(typeof C.document>"u"){L&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Wl({ignoreDuration:!0});let n=!1;Tk(()=>{n||(ia(),n=!0)});const r=me();let o=r.getUser();r.addScopeListener(s=>{const i=s.getUser();(o?.id!==i?.id||o?.ip_address!==i?.ip_address)&&(o=i,n&&ia())}),t==="route"&&Fi(({from:s,to:i})=>{s!==i&&(Wl({ignoreDuration:!0}),ia(),n=!0)})}}},xC="CultureContext",MC=(()=>({name:xC,preprocessEvent(e){const t=Yd();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Yd();t&&On(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),OC=MC;function Yd(){try{const e=C.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const PC="GlobalHandlers",LC=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:PC,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&($C(n),Xd("onerror")),t.onunhandledrejection&&(FC(n),Xd("onunhandledrejection"))}}}),DC=LC;function $C(e){up(t=>{const{stackParser:n,attachStacktrace:r}=Vg();if(v()!==e||Fg(t))return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=Gg(Ui(n,c||o,void 0,r,!1),s,i,a);u.level="error",Io(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function FC(e){lp(t=>{const{stackParser:n,attachStacktrace:r}=Vg();if(v()!==e||Fg())return;const o=jg(t),s=lt(o)?qg(o):Ui(n,o,void 0,r,!0);s.level="error",Io(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function jg(e){if(lt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function qg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Gg(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:BC(t)??Bt(),function:St,in_app:!0}),e}function Xd(e){L&&_.log(`Global Handler attached: ${e}`)}function Vg(){return v()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function BC(e){if(!(!tt(e)||e.length===0))return e.startsWith("data:")?`<${Dt(e,!1)}>`:e}const UC=()=>({name:"HttpContext",preprocessEvent(e,t,n){if(!C.navigator&&!C.location&&!C.document)return;const{url:r,headers:o}=Qs(n),s=n.getDataCollectionOptions().httpHeaders.request,i=Object.entries(e.request?.headers??{}).filter(([c])=>!(c in o)),a={...Ln(o,s),...Object.fromEntries(i)};e.request={url:be(r,n),...e.request,...Object.keys(a).length>0?{headers:a}:{headers:void 0}}},processSpan(e,t){if(!C.navigator&&!C.location&&!C.document)return;const n=Qs(t),r=Ln(n.headers,t.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:s,protocol:i}=C.location||{};On(e,{[Dp]:r["User-Agent"],[BS]:i==="file:"||s==="localhost"||s==="127.0.0.1"||s==="[::1]"||!!s?.endsWith(".localhost"),...e.is_segment&&{[De]:e.attributes?.[H]!=="http.client"?be(n.url):void 0,[`${NS}.referer`]:o?[o]:void 0}})}}),HC="cause",WC=5,zC="LinkedErrors",jC=((e={})=>{const t=e.limit||WC,n=e.key||HC;return{name:zC,preprocessEvent(r,o,s){const i=s.getOptions();Pw(Au,i.stackParser,n,t,r,o)}}}),qC=jC,GC=/^HTML(\w*)Element$/;function Kg(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(yR(e)){const t=VC(e);if(GC.test(t))return`[HTMLElement: ${Xe(e)}]`}}function VC(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function KC(){return YC()?(L&&ft(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function YC(){if(typeof C.window>"u")return!1;const e=C;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Bt();return!(C===C.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function XC(e){return[kw(),ww(),H0(),TC(),hC(),O0(),DC(),qC(),Gw(),UC(),OC(),NC()]}function JC(e={}){const t=!e.skipBrowserExtensionCheck&&KC();let n=e.defaultIntegrations==null?XC():e.defaultIntegrations;const r=Nb({integrations:e.integrations,defaultIntegrations:n}),o={...e,enabled:t?!1:e.enabled,stackParser:Py(e.stackParser||lC),integrations:r,transport:e.transport||Wg};return yp(Kg),YE($R,o)}function mL(){}function gL(e){e()}function Jd(e={}){const t=C.document,n=t?.head||t?.body;if(!n){L&&_.error("[showReportDialog] Global document not defined");return}const r=q(),s=v()?.getDsn();if(!s){L&&_.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||dE()},{onLoad:a,onClose:c,onError:u}=i;if(!i.eventId){L&&_.error("[showReportDialog] No event ID"),u?.(new Error("No event ID to show the report dialog for"));return}const l=C.document.createElement("script");if(l.async=!0,l.crossOrigin="anonymous",l.src=_E(s,i),a&&(l.onload=a),u&&(l.onerror=()=>{u(new Error("Failed to load the report dialog script"))}),c){const f=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{C.removeEventListener("message",f)}};C.addEventListener("message",f),l.addEventListener("error",()=>{C.removeEventListener("message",f)})}n.appendChild(l)}const Yg=$;function QC(){return"ReportingObserver"in Yg}const ZC="ReportingObserver",Qd=new WeakMap,e1=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Qd.has(v()))for(const o of r)Je(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}lE(`${i}: ${a}`)})}return{name:ZC,setupOnce(){if(!QC())return;new Yg.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Qd.set(r,!0)}}}),_L=e1,t1="HttpClient",n1=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:t1,setup(n){u1(n,t),l1(n,t)}}}),yL=n1;function r1(e,t,n,r,o){if(Xg(e,n.status,n.url)){const s=d1(t,r);let i,a,c,u;const l=Qg();if(l.requestHeaders!==!1&&(i=Ln(Zd(s.headers),l.requestHeaders)),l.responseHeaders!==!1&&(a=Ln(Zd(n.headers),l.responseHeaders)),l.cookies!==!1){const d=s.headers.get("Cookie")||void 0;d&&(c=ic(d,l.cookies,"cookie"));const p=n.headers.get("Set-Cookie")||void 0;p&&(u=ic(p,l.cookies,"set-cookie"))}const f=Jg({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});Io(f)}}function o1(e,t,n,r,o){if(Xg(e,t.status,t.responseURL)){let s,i,a;const c=Qg();if(c.cookies!==!1)try{const l=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;l&&(i=ic(l,c.cookies,"set-cookie"))}catch{}if(c.responseHeaders!==!1)try{a=Ln(i1(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=Ln(r,c.requestHeaders));const u=Jg({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});Io(u)}}function s1(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Zd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function i1(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
496
|
-
`).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function a1(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function c1(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function u1(e,t){Mi(n=>{if(v()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&r1(t,a,r,c,s||i)})}function l1(e,t){"XMLHttpRequest"in $&&Ru(n=>{if(v()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[Ct];if(!i)return;const{method:a,request_headers:c}=i;try{o1(t,s,a,c,r||o)}catch(u){L&&_.warn("Error while extracting response event form XHR response",u)}})}function Xg(e,t,n){return c1(e.failedRequestStatusCodes,t)&&a1(e.failedRequestTargets,n)&&!Em(n,v())}function Jg(e){const t=v(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:s1(e.responseHeaders)}}};return At(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function d1(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Qg(){const e=v();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const{cookies:t,httpHeaders:n}=e.getDataCollectionOptions();return{cookies:t,requestHeaders:n.request,responseHeaders:n.response}}const Aa=$,f1=5,p1="ContextLines",h1=((e={})=>({name:p1,processEvent(t,n,r){const o=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??f1;return m1(t,o)}})),SL=h1;function m1(e,t){const n=Aa.document,r=Aa.location&&vm(Aa.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(`
|
|
497
|
-
`),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>g1(u,i,r,t)))}),e}function g1(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Qy(t,e,r),e}const _1="GraphQLClient",y1=(e=>({name:_1,setup(t){S1(t,e),b1(t,e)}}));function S1(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=ne(n).attributes;if(!(s[H]==="http.client"))return;const c=s[De],u=s[gi]||s[AS];if(!tt(c)||!tt(u))return;const{endpoints:l}=t,f=Ht(c,l),d=t_(r);if(f&&d){const p=n_(d);if(p){V(e)||n.updateName(`${u} ${c} (${e_(p)})`);const{operationName:h,operationType:m}=Zg(p);n.setAttribute(RS,h),n.setAttribute(CS,m),Oo(p)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Np,p.query),Po(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function b1(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const l=i?.url,{endpoints:f}=t,d=Ht(l,f),p=t_(r);if(d&&i&&p){const h=n_(p);if(!i.graphql&&h){const m=e_(h);i["graphql.operation"]=m,Oo(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[Np]=h.query),Po(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Zg(e){if(Po(e))return{operationName:e.operationName,operationType:void 0};if(Oo(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=v1(t);return{operationName:r,operationType:o}}return{operationName:void 0,operationType:void 0}}function e_(e){if(Po(e))return`persisted ${e.operationName}`;if(Oo(e)){const{operationName:t,operationType:n}=Zg(e);return t?`${n} ${t}`:`${n}`}return"unknown"}function t_(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Ct];n=r&&Js(r.body)[0]}else{const r=Cu(e.input);n=Js(r)[0]}return n}function v1(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Oo(e){return nt(e)&&typeof e.query=="string"}function Po(e){return nt(e)&&typeof e.operationName=="string"&&nt(e.extensions)&&nt(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function n_(e){try{const t=JSON.parse(e);return Oo(t)||Po(t)?t:void 0}catch{return}}const bL=y1,vL=(e={})=>{const t=["script"];function n(r,o,s=0){if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of i){if(!(a instanceof HTMLElement))continue;const c=Fr(a,1)||void 0,u=a.tagName.toLowerCase();if(t.includes(u))continue;const l=e.onElement?.({element:a,componentName:c,tagName:u,depth:s})||{};if(l==="skip")continue;if(l==="children"){n(a,o,s+1);continue}const{x:f,y:d,width:p,height:h}=a.getBoundingClientRect(),m={identifier:a.id||void 0,type:c||u,visible:!0,alpha:1,height:h,width:p,x:f,y:d,...l},g=[];m.children=g,n(a,m.children,s+1),o.push(m)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||C.document.body,s.windows);const i={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return o.attachments=o.attachments||[],o.attachments.push(i),r}}},ge=$,Nu="sentryReplaySession",E1="replay_event",xu="Unable to send Replay",w1=3e5,T1=9e5,I1=5e3,k1=5500,R1=6e4,C1=5e3,A1=3,ef=15e4,rs=5e3,N1=3e3,x1=300,Mu=2e7,M1=4999,O1=5e4,tf=36e5,P1="sentry.segment.name.source";var L1=Object.defineProperty,D1=(e,t,n)=>t in e?L1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nf=(e,t,n)=>D1(e,typeof t!="symbol"?t+"":t,n),Ie=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ie||{});function r_(e){return e.nodeType===e.ELEMENT_NODE}function cr(e){return e?.host?.shadowRoot===e}function ro(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function $1(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function F1(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Zs(e){try{const t=e.rules||e.cssRules;return t?$1(Array.from(t,o_).join("")):null}catch{return null}}function B1(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function o_(e){let t;if(H1(e))try{t=Zs(e.styleSheet)||F1(e)}catch{}else if(W1(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=B1(e)),r&&(n=U1(n)),r||o)return n}return t||e.cssText}function U1(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function H1(e){return"styleSheet"in e}function W1(e){return"selectorText"in e}let s_=class{constructor(){nf(this,"idNodeMap",new Map),nf(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),r_(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function z1(){return new s_}function Hi({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function fo({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function br(e){return e.toLowerCase()}function vc(e){return e.toUpperCase()}const rf="__rrweb_original__";function j1(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=rf in s?s[rf]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Ou(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?br(t):null}function ei(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function i_(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Na={};function a_(e){const t=Na[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Na[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Na[e]=r}function Ec(...e){return a_("setTimeout")(...e)}function c_(...e){return a_("clearTimeout")(...e)}function u_(e){try{return e.contentDocument}catch{}}function q1(e){try{return e.contentWindow}catch{}}let G1=1;const V1=new RegExp("[^a-z0-9-_:]"),po=-2;function Pu(){return G1++}function K1(e){if(e instanceof HTMLFormElement)return"form";const t=br(e.tagName);return V1.test(t)?"div":t}function Y1(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Vn,of;const X1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,J1=/^(?:[a-z+]+:)?\/\//i,Q1=/^www\..*/i,Z1=/^(data:)([^,]*),(.*)/i;function eA(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function ti(e,t){return(e||"").replace(X1,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(J1.test(c)||Q1.test(c))return`url(${u}${c}${u})`;if(Z1.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Y1(t)+c}${u})`;const l=t.split("/"),f=c.split("/");l.pop();for(const d of f)d!=="."&&(d===".."?l.pop():l.push(d));return`url(${u}${l.join("/")}${u})`})}const tA=/^[^ \t\n\r\u000c]+/,nA=/^[, \t\n\r\u000c]+/;function rA(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(nA),!(n>=t.length);){let s=r(tA);if(s.slice(-1)===",")s=Jn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Jn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const sf=new WeakMap;function Jn(e,t){return!t||t.trim()===""?t:Wi(e,t)}function oA(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Wi(e,t){let n=sf.get(e);if(n||(n=e.createElement("a"),sf.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function l_(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Jn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Jn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Jn(e,r);if(n==="srcset")return rA(e,r);if(n==="style"){let a=ti(r,Wi(e));return i&&i.size>0&&(a=eA(a,i)),a}else if(t==="object"&&n==="data")return Jn(e,r);return typeof s=="function"?s(n,r,o):r}function d_(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function sA(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function iA(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Jt(e,t,n=1/0,r=0){return e?cr(e)?Jt(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Jt(e.parentNode,t,n,r+1):-1}function Qn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(iA(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function vr(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=Jt(i,Qn(r,o)),c<0)return!0;a=Jt(i,Qn(t,n),c>=0?c:1/0)}else{if(a=Jt(i,Qn(t,n)),a<0)return!1;c=Jt(i,Qn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function aA(e,t,n){const r=q1(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Ec(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{c_(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Ec(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function cA(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=Ec(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{c_(s),r=!0,t()})}function uA(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:S,recordCanvas:T,keepIframeSrcFn:b,newlyAddedElement:M=!1,ignoreCSSAttributes:I}=t,k=lA(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ie.Document,childNodes:[],compatMode:e.compatMode}:{type:Ie.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ie.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return fA(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:S,recordCanvas:T,keepIframeSrcFn:b,newlyAddedElement:M,rootId:k,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,ignoreCSSAttributes:I});case e.TEXT_NODE:return dA(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:Ie.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Ie.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function lA(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function dA(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=t,f=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p=f==="STYLE"?!0:void 0,h=f==="SCRIPT"?!0:void 0,m=f==="TEXTAREA"?!0:void 0;if(p&&d){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(d=Zs(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}d=ti(d,Wi(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const g=vr(e,r,s,o,i,n);if(!p&&!h&&!m&&d&&g&&(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||g)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),f==="OPTION"&&d){const y=Hi({type:null,tagName:f,maskInputOptions:c});d=fo({isMasked:vr(e,r,s,o,i,y),element:e,value:d,maskInputFn:u})}return{type:Ie.Text,textContent:d||"",isStyle:p,rootId:l}}function fA(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:T,ignoreCSSAttributes:b}=t,M=sA(e,r,o,s),I=K1(e);let k={};const R=e.attributes.length;for(let E=0;E<R;E++){const O=e.attributes[E];O.name&&!d_(I,O.name,O.value)&&(k[O.name]=l_(n,I,br(O.name),O.value,e,c,b))}if(I==="link"&&i){const E=Array.from(n.styleSheets).find(x=>x.href===e.href);let O=null;E&&(O=Zs(E)),O&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=ti(O,E.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Zs(e.sheet);E&&(k._cssText=ti(E,Wi(n)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const E=e,O=Ou(E),x=ei(E,vc(I),O),w=E.checked;if(O!=="submit"&&O!=="button"&&x){const D=vr(E,g,S,y,T,Hi({type:O,tagName:vc(I),maskInputOptions:a}));k.value=fo({isMasked:D,element:E,value:x,maskInputFn:u})}w&&(k.checked=w)}if(I==="option"&&(e.selected&&!a.select?k.selected=!0:delete k.selected),I==="canvas"&&d){if(e.__context==="2d")j1(e)||(k.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const E=e.toDataURL(l.type,l.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const x=O.toDataURL(l.type,l.quality);E!==x&&(k.rr_dataURL=E)}}if(I==="img"&&f){Vn||(Vn=n.createElement("canvas"),of=Vn.getContext("2d"));const E=e,O=E.currentSrc||E.getAttribute("src")||"<unknown-src>",x=E.crossOrigin,w=()=>{E.removeEventListener("load",w);try{Vn.width=E.naturalWidth,Vn.height=E.naturalHeight,of.drawImage(E,0,0),k.rr_dataURL=Vn.toDataURL(l.type,l.quality)}catch(D){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?w():E.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${O}! Error: ${D}`)}E.crossOrigin==="anonymous"&&(x?k.crossOrigin=x:E.removeAttribute("crossorigin"))};E.complete&&E.naturalWidth!==0?w():E.addEventListener("load",w)}if((I==="audio"||I==="video")&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),M){const{width:E,height:O}=e.getBoundingClientRect();k={class:k.class,rr_width:`${E}px`,rr_height:`${O}px`}}I==="iframe"&&!p(k.src)&&(!M&&!u_(e)&&(k.rr_src=k.src),delete k.src);let U;try{customElements.get(I)&&(U=!0)}catch{}return{type:Ie.Element,tagName:I,attributes:k,childNodes:[],isSVG:oA(e)||void 0,needBlock:M,rootId:m,isCustom:U}}function de(e){return e==null?"":e.toLowerCase()}function pA(e,t){if(t.comment&&e.type===Ie.Comment)return!0;if(e.type===Ie.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&i_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(de(e.attributes.name).match(/^msapplication-tile(image|color)$/)||de(e.attributes.name)==="application-name"||de(e.attributes.rel)==="icon"||de(e.attributes.rel)==="apple-touch-icon"||de(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&de(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(de(e.attributes.property).match(/^(og|twitter|fb):/)||de(e.attributes.name).match(/^(og|twitter):/)||de(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(de(e.attributes.name)==="robots"||de(e.attributes.name)==="googlebot"||de(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(de(e.attributes.name)==="author"||de(e.attributes.name)==="generator"||de(e.attributes.name)==="framework"||de(e.attributes.name)==="publisher"||de(e.attributes.name)==="progid"||de(e.attributes.property).match(/^article:/)||de(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(de(e.attributes.name)==="google-site-verification"||de(e.attributes.name)==="yandex-verification"||de(e.attributes.name)==="csrf-token"||de(e.attributes.name)==="p:domain_verify"||de(e.attributes.name)==="verify-v1"||de(e.attributes.name)==="verification"||de(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Zn(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:T={},inlineImages:b=!1,recordCanvas:M=!1,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R=5e3,onBlockedImageLoad:U,onStylesheetLoad:E,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:w=!1,ignoreCSSAttributes:D}=t;let{preserveWhiteSpace:N=!0}=t;const J=uA(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:T,inlineImages:b,recordCanvas:M,keepIframeSrcFn:x,newlyAddedElement:w,ignoreCSSAttributes:D});if(!J)return console.warn(e,"not serialized"),null;let Q;r.hasNode(e)?Q=r.getId(e):pA(J,S)||!N&&J.type===Ie.Text&&!J.isStyle&&!J.textContent.trim().length?Q=po:Q=Pu();const P=Object.assign(J,{id:Q});if(r.add(e,P),Q===po)return null;I&&I(e);let Y=!d;if(P.type===Ie.Element){Y=Y&&!P.needBlock;const B=e.shadowRoot;B&&ro(B)&&(P.isShadowHost=!0)}if((P.type===Ie.Document||P.type===Ie.Element)&&Y){S.headWhitespace&&P.type===Ie.Element&&P.tagName==="head"&&(N=!1);const B={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:T,inlineImages:b,recordCanvas:M,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onBlockedImageLoad:U,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:x,ignoreCSSAttributes:D},ee=e.childNodes?Array.from(e.childNodes):[];for(const Se of ee){const se=Zn(Se,B);se&&P.childNodes.push(se)}if(r_(e)&&e.shadowRoot)for(const Se of Array.from(e.shadowRoot.childNodes)){const se=Zn(Se,B);se&&(ro(e.shadowRoot)&&(se.isShadow=!0),P.childNodes.push(se))}}if(e.parentNode&&cr(e.parentNode)&&ro(e.parentNode)&&(P.isShadow=!0),P.type===Ie.Element&&P.tagName==="iframe"&&!P.needBlock&&aA(e,()=>{const B=u_(e);if(B&&k){const ee=Zn(B,{doc:B,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:T,inlineImages:b,recordCanvas:M,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:x,ignoreCSSAttributes:D});ee&&k(e,ee)}},R),P.type===Ie.Element&&P.tagName==="img"&&!e.complete&&P.needBlock){const B=e,ee=()=>{if(B.isConnected&&!B.complete&&U)try{const Se=B.getBoundingClientRect();Se.width>0&&Se.height>0&&U(B,P,Se)}catch{}B.removeEventListener("load",ee)};B.isConnected&&B.addEventListener("load",ee)}return P.type===Ie.Element&&P.tagName==="link"&&typeof P.attributes.rel=="string"&&(P.attributes.rel==="stylesheet"||P.attributes.rel==="preload"&&typeof P.attributes.href=="string"&&i_(P.attributes.href)==="css")&&cA(e,()=>{if(E){const B=Zn(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:T,inlineImages:b,recordCanvas:M,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:R,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:x,ignoreCSSAttributes:D});B&&E(e,B)}},O),P.type===Ie.Element&&delete P.needBlock,P}function hA(e,t){const{mirror:n=new s_,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:f=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:S=!1,dataURLOptions:T,preserveWhiteSpace:b,onSerialize:M,onIframeLoad:I,iframeLoadTimeout:k,onBlockedImageLoad:R,onStylesheetLoad:U,stylesheetLoadTimeout:E,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:x=new Set([])}=t||{};return Zn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:T,inlineImages:d,recordCanvas:p,preserveWhiteSpace:b,onSerialize:M,onIframeLoad:I,iframeLoadTimeout:k,onBlockedImageLoad:R,onStylesheetLoad:U,stylesheetLoadTimeout:E,keepIframeSrcFn:O,newlyAddedElement:!1,ignoreCSSAttributes:x})}function He(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Kn=`Please stop import mirror directly. Instead of that,\r
|
|
498
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
499
|
-
or you can use record.mirror to access the mirror instance during recording.`;let af={map:{},getId(){return console.error(Kn),-1},getNode(){return console.error(Kn),null},removeNodeFromMap(){console.error(Kn)},has(){return console.error(Kn),!1},reset(){console.error(Kn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(af=new Proxy(af,{get(e,t,n){return t==="map"&&console.error(Kn),Reflect.get(e,t,n)}}));function ho(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(vA(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=zi(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function f_(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){zi(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>f_(e,t,s||{},!0)}function Lu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let ni=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ni=()=>new Date().getTime());function p_(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function h_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function m_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ge(e,t,n,r,o){if(!e)return!1;const s=g_(e);if(!s)return!1;const i=Qn(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=Jt(s,i);let c=-1;return a<0?!1:(r&&(c=Jt(s,Qn(null,r))),a>-1&&c<0?!0:a<c)}function mA(e,t){return t.getId(e)!==-1}function xa(e,t){return t.getId(e)===po}function __(e,t){if(cr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?__(e.parentNode,t):!0:!0}function wc(e){return!!e.changedTouches}function gA(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function y_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function S_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Tc(e){return!!e?.shadowRoot}class _A{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function b_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function yA(e){let t=e,n;for(;n=b_(t);)t=n;return t}function SA(e){const t=e.ownerDocument;if(!t)return!1;const n=yA(e);return t.contains(n)}function v_(e){const t=e.ownerDocument;return t?t.contains(e)||SA(e):!1}const Ma={};function Du(e){const t=Ma[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Ma[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Ma[e]=r}function bA(...e){return Du("requestAnimationFrame")(...e)}function zi(...e){return Du("setTimeout")(...e)}function vA(...e){return Du("clearTimeout")(...e)}var Z=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Z||{}),G=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(G||{}),Fe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Fe||{}),kt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(kt||{}),Yn=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Yn||{});let oo;function EA(e){oo=e}function wA(){oo=void 0}const oe=e=>oo?((...n)=>{try{return e(...n)}catch(r){if(oo&&oo(r)===!0)return()=>{};throw r}}):e;var cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",TA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var os=0;os<cf.length;os++)TA[cf.charCodeAt(os)]=os;class uf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function $u(e){try{return e.contentDocument}catch{}}function mo(e){try{return e.contentWindow}catch{}}class IA{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{const n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){const n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",t),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function lf(e){return"__ln"in e}class kA{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&lf(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&lf(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const df=(e,t)=>`${e}@${t}`;class RA{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new kA,o=c=>{let u=c,l=po;for(;l===po;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},s=c=>{if(!c.parentNode||!v_(c))return;const u=cr(c.parentNode)?this.mirror.getId(b_(c)):this.mirror.getId(c.parentNode),l=o(c);if(u===-1||l===-1)return r.addNode(c);const f=Zn(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{y_(d,this.mirror)&&!Ge(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),S_(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Tc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(d,p)=>{if(Ge(d,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(d,p);const h=mo(d);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},onBlockedImageLoad:(d,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});f&&(t.push({parentId:u,nextId:l,node:f}),n.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)ff(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!pf(this.droppedSet,c)&&!ff(this.removes,c,this.mirror)||pf(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),l=o(i.value);u!==-1&&l!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const f=this.mirror.getId(l.value.parentNode);if(o(l.value)===-1)continue;if(f!==-1){c=l;break}else{const p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=l;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),f=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+f).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!xa(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:vr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,g_(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=Ou(n),a=n.tagName;o=ei(n,a,i);const c=Hi({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=vr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=fo({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!$u(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!d_(n.tagName,r)&&(s.attributes[r]=l_(this.doc,br(n.tagName),br(r),o,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==(i?.getPropertyValue(a)||"")||u!==(i?.getPropertyPriority(a)||"")?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}if(i)for(const a of Array.from(i))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=cr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ge(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||xa(n,this.mirror)||!mA(n,this.mirror)||(this.addedSet.has(n)?(Ic(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||__(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[df(r,o)]?Ic(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:cr(t.target)&&ro(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(xa(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[df(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ge(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Tc(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]}),this.styleDeclarationParser=new IA(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ic(e,t){e.delete(t),t.childNodes?.forEach(n=>Ic(e,n))}function ff(e,t,n){return e.length===0?!1:CA(e,t,n)}function CA(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function pf(e,t){return e.size===0?!1:E_(e,t)}function E_(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:E_(e,n):!1}const er=[];function Lo(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function w_(e,t){const n=new RA;er.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(oe(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function AA({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=ho(oe(f=>{const d=Date.now()-a;e(i.map(p=>(p.timeOffset-=d,p)),f),i=[],a=null}),s),u=oe(ho(oe(f=>{const d=Lo(f),{clientX:p,clientY:h}=wc(f)?f.changedTouches[0]:f;a||(a=ni()),i.push({x:p,y:h,id:r.getId(d),timeOffset:ni()-a}),c(typeof DragEvent<"u"&&f instanceof DragEvent?G.Drag:f instanceof MouseEvent?G.MouseMove:G.TouchMove)}),o,{trailing:!1})),l=[He("mousemove",u,n),He("touchmove",u,n),He("drag",u,n)];return oe(()=>{l.forEach(f=>f())})}function NA({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const l=f=>d=>{const p=Lo(d);if(Ge(p,r,o,s,!0))return;let h=null,m=f;if("pointerType"in d){switch(d.pointerType){case"mouse":h=kt.Mouse;break;case"touch":h=kt.Touch;break;case"pen":h=kt.Pen;break}h===kt.Touch?Fe[f]===Fe.MouseDown?m="TouchStart":Fe[f]===Fe.MouseUp&&(m="TouchEnd"):kt.Pen}else wc(d)&&(h=kt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===kt.Touch||m.startsWith("Mouse")&&h===kt.Mouse)&&(h=null)):Fe[f]===Fe.Click&&(h=u,u=null);const g=wc(d)?d.changedTouches[0]:d;if(!g)return;const y=n.getId(p),{clientX:S,clientY:T}=g;oe(e)({type:Fe[m],id:y,x:S,y:T,...h!==null&&{pointerType:h}})};return Object.keys(Fe).filter(f=>Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1).forEach(f=>{let d=br(f);const p=l(f);if(window.PointerEvent)switch(Fe[f]){case Fe.MouseDown:case Fe.MouseUp:d=d.replace("mouse","pointer");break;case Fe.TouchStart:case Fe.TouchEnd:return}c.push(He(d,p,t))}),oe(()=>{c.forEach(f=>f())})}function T_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=oe(ho(oe(c=>{const u=Lo(c);if(!u||Ge(u,r,o,s,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const f=p_(t.defaultView);e({id:l,x:f.left,y:f.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return He("scroll",a,t)}function xA({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=oe(ho(oe(()=>{const s=h_(),i=m_();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return He("resize",o,t)}const MA=["INPUT","TEXTAREA","SELECT"],hf=new WeakMap;function OA({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:f,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function g(k){let R=Lo(k);const U=k.isTrusted,E=R&&vc(R.tagName);if(E==="OPTION"&&(R=R.parentElement),!R||!E||MA.indexOf(E)<0||Ge(R,r,o,s,!0))return;const O=R;if(O.classList.contains(i)||a&&O.matches(a))return;const x=Ou(R);let w=ei(O,E,x),D=!1;const N=Hi({maskInputOptions:c,tagName:E,type:x}),J=vr(R,d,h,p,m,N);(x==="radio"||x==="checkbox")&&(D=R.checked),w=fo({isMasked:J,element:R,value:w,maskInputFn:u}),y(R,f?{text:w,isChecked:D,userTriggered:U}:{text:w,isChecked:D});const Q=R.name;x==="radio"&&Q&&D&&t.querySelectorAll(`input[type="radio"][name="${Q}"]`).forEach(P=>{if(P!==R){const Y=fo({isMasked:J,element:P,value:ei(P,E,x),maskInputFn:u});y(P,f?{text:Y,isChecked:!D,userTriggered:!1}:{text:Y,isChecked:!D})}})}function y(k,R){const U=hf.get(k);if(!U||U.text!==R.text||U.isChecked!==R.isChecked){hf.set(k,R);const E=n.getId(k);oe(e)({...R,id:E})}}const T=(l.input==="last"?["change"]:["input","change"]).map(k=>He(k,oe(g),t)),b=t.defaultView;if(!b)return()=>{T.forEach(k=>k())};const M=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),I=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return M&&M.set&&T.push(...I.map(k=>f_(k[0],k[1],{set(){oe(g)({target:this,isTrusted:!1})}},!1,b))),oe(()=>{T.forEach(k=>k())})}function ri(e){const t=[];function n(r,o){if(ss("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ss("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ss("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ss("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Yt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function PA({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:oe((l,f,d)=>{const[p,h]=d,{id:m,styleId:g}=Yt(f,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:p,index:h}]}),l.apply(f,d)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:oe((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Yt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),l.apply(f,d)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:oe((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Yt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),l.apply(f,d)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:oe((l,f,d)=>{const[p]=d,{id:h,styleId:m}=Yt(f,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),l.apply(f,d)})}));const c={};is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([l,f])=>{u[l]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[l].insertRule,{apply:oe((d,p,h)=>{const[m,g]=h,{id:y,styleId:S}=Yt(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:m,index:[...ri(p),g||0]}]}),d.apply(p,h)})}),f.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:oe((d,p,h)=>{const[m]=h,{id:g,styleId:y}=Yt(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...ri(p),m]}]}),d.apply(p,h)})})}),oe(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,f])=>{f.prototype.insertRule=u[l].insertRule,f.prototype.deleteRule=u[l].deleteRule})})}function I_({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),oe(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function LA({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:oe((a,c,u)=>{const[l,f,d]=u;if(n.has(l))return s.apply(c,[l,f,d]);const{id:p,styleId:h}=Yt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:l,value:f,priority:d},index:ri(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:oe((a,c,u)=>{const[l]=u;if(n.has(l))return i.apply(c,[l]);const{id:f,styleId:d}=Yt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:l},index:ri(c.parentRule)}),a.apply(c,u)})}),oe(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function DA({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=oe(u=>ho(oe(l=>{const f=Lo(l);if(!f||Ge(f,t,n,r,!0))return;const{currentTime:d,volume:p,muted:h,playbackRate:m}=f;e({type:u,id:o.getId(f),currentTime:d,volume:p,muted:h,playbackRate:m})}),s.media||500)),c=[He("play",a(Yn.Play),i),He("pause",a(Yn.Pause),i),He("seeked",a(Yn.Seeked),i),He("volumechange",a(Yn.VolumeChange),i),He("ratechange",a(Yn.RateChange),i)];return oe(()=>{c.forEach(u=>u())})}function $A({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,l){const f=new s(c,u,l);return o.set(f,{family:c,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const i=Lu(t.fonts,"add",function(a){return function(c){return zi(oe(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),oe(()=>{r.forEach(a=>a())})}function FA(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=oe(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const l=[],f=u.rangeCount||0;for(let d=0;d<f;d++){const p=u.getRangeAt(d),{startContainer:h,startOffset:m,endContainer:g,endOffset:y}=p;Ge(h,r,o,s,!0)||Ge(g,r,o,s,!0)||l.push({start:n.getId(h),startOffset:m,end:n.getId(g),endOffset:y})}i({ranges:l})});return c(),He("selectionchange",c)}function BA({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Lu(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function UA(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=w_(e,e.doc));const o=AA(e),s=NA(e),i=T_(e),a=xA(e,{win:n}),c=OA(e),u=DA(e);let l=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(l=PA(e,{win:n}),f=I_(e,e.doc),d=LA(e,{win:n}),e.collectFonts&&(p=$A(e)));const h=FA(e),m=BA(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return oe(()=>{er.forEach(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),l(),f(),d(),p(),h(),m(),g.forEach(y=>y())})}function ss(e){return typeof window[e]<"u"}function is(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class kc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class HA{constructor(){this.crossOriginIframeMirror=new kc(Pu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class WA{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new kc(Pu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);const n=mo(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&mo(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=$u(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Z.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Z.IncrementalSnapshot,data:{source:G.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Plugin:return n;case Z.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Z.IncrementalSnapshot:switch(n.data.source){case G.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.Drag:case G.TouchMove:case G.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case G.ViewportResize:return!1;case G.MediaInteraction:case G.MouseInteraction:case G.Scroll:case G.CanvasMutation:case G.Input:return this.replaceIds(n.data,t,["id"]),n;case G.StyleSheetRule:case G.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case G.Font:return n;case G.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case G.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Ie.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class zA{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class jA{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!ro(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=w_({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(T_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),zi(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(I_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=$u(t),r=mo(t);if(!n||!r)return;let o;try{o=r.Element}catch{return}o&&this.patchAttachShadow(o,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Lu(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&v_(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class qA{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new _A,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:o_(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class GA{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,bA(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Ee,oi;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const at=z1();function ot(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:f=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:T,maskTextFn:b,maxCanvasSize:M=null,packFn:I,sampling:k={},dataURLOptions:R={},mousemoveWait:U,recordDOM:E=!0,recordCanvas:O=!1,recordCrossOriginIframes:x=!1,recordAfter:w=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:N=!1,inlineImages:J=!1,plugins:Q,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:B,onMutation:ee,getCanvasManager:Se}=e;EA(B);const se=x?window.parent===window:!0;let $e=!1;if(!se)try{window.parent.document&&($e=!1)}catch{$e=!0}if(se&&!t)throw new Error("emit function is required");if(!se&&!$e)return()=>{};U!==void 0&&k.mousemove===void 0&&(k.mousemove=U),at.reset();const zt=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},Ur=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};gA();let Hr,Wr=0;const zo=F=>{for(const ie of Q||[])ie.eventProcessor&&(F=ie.eventProcessor(F));return I&&!$e&&(F=I(F)),F};Ee=(F,ie)=>{const X=F;if(X.timestamp=ni(),er[0]?.isFrozen()&&X.type!==Z.FullSnapshot&&!(X.type===Z.IncrementalSnapshot&&X.data.source===G.Mutation)&&er.forEach(ae=>ae.unfreeze()),se)t?.(zo(X),ie);else if($e){const ae={type:"rrweb",event:zo(X),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(ae,"*")}if(X.type===Z.FullSnapshot)Hr=X,Wr=0;else if(X.type===Z.IncrementalSnapshot){if(X.data.source===G.Mutation&&X.data.isAttachIframe)return;Wr++;const ae=r&&Wr>=r,K=n&&Hr&&X.timestamp-Hr.timestamp>n;(ae||K)&&mn(!0)}};const pn=F=>{Ee({type:Z.IncrementalSnapshot,data:{source:G.Mutation,...F}})},jo=F=>Ee({type:Z.IncrementalSnapshot,data:{source:G.Scroll,...F}}),Tt=F=>Ee({type:Z.IncrementalSnapshot,data:{source:G.CanvasMutation,...F}}),Qe=F=>Ee({type:Z.IncrementalSnapshot,data:{source:G.AdoptedStyleSheet,...F}}),ze=new qA({mutationCb:pn,adoptedStyleSheetCb:Qe}),qe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new HA:new WA({mirror:at,mutationCb:pn,stylesheetManager:ze,recordCrossOriginIframes:x,wrappedEmit:Ee});for(const F of Q||[])F.getMirror&&F.getMirror({nodeMirror:at,crossOriginIframeMirror:qe.crossOriginIframeMirror,crossOriginIframeStyleMirror:qe.crossOriginIframeStyleMirror});const zn=new GA,jn=KA(Se,{mirror:at,win:window,mutationCb:F=>Ee({type:Z.IncrementalSnapshot,data:{source:G.CanvasMutation,...F}}),recordCanvas:O,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:M,sampling:k.canvas,dataURLOptions:R,errorHandler:B}),hn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new zA:new jA({mutationCb:pn,scrollCb:jo,bypassOptions:{onMutation:ee,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:zt,dataURLOptions:R,maskAttributeFn:S,maskTextFn:b,maskInputFn:T,recordCanvas:O,inlineImages:J,sampling:k,slimDOMOptions:Ur,iframeManager:qe,stylesheetManager:ze,canvasManager:jn,keepIframeSrcFn:P,processedNodeManager:zn,ignoreCSSAttributes:Y},mirror:at}),mn=(F=!1)=>{if(!E)return;Ee({type:Z.Meta,data:{href:window.location.href,width:m_(),height:h_()}},F),ze.reset(),hn.init(),er.forEach(X=>X.lock());const ie=hA(document,{mirror:at,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:zt,maskAttributeFn:S,maskInputFn:T,maskTextFn:b,slimDOM:Ur,dataURLOptions:R,recordCanvas:O,inlineImages:J,onSerialize:X=>{y_(X,at)&&qe.addIframe(X),S_(X,at)&&ze.trackLinkElement(X),Tc(X)&&hn.addShadowRoot(X.shadowRoot,document)},onIframeLoad:(X,ae)=>{qe.attachIframe(X,ae);const K=mo(X);K&&jn.addWindow(K),hn.observeAttachShadow(X)},onStylesheetLoad:(X,ae)=>{ze.attachLinkElement(X,ae)},onBlockedImageLoad:(X,ae,{width:K,height:mt})=>{pn({adds:[],removes:[],texts:[],attributes:[{id:ae.id,attributes:{style:{width:`${K}px`,height:`${mt}px`}}}]})},keepIframeSrcFn:P,ignoreCSSAttributes:Y});if(!ie)return console.warn("Failed to snapshot the document");Ee({type:Z.FullSnapshot,data:{node:ie,initialOffset:p_(window)}}),er.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ze.adoptStyleSheets(document.adoptedStyleSheets,at.getId(document))};oi=mn;try{const F=[],ie=ae=>oe(UA)({onMutation:ee,mutationCb:pn,mousemoveCb:(K,mt)=>Ee({type:Z.IncrementalSnapshot,data:{source:mt,positions:K}}),mouseInteractionCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.MouseInteraction,...K}}),scrollCb:jo,viewportResizeCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.ViewportResize,...K}}),inputCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.Input,...K}}),mediaInteractionCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.MediaInteraction,...K}}),styleSheetRuleCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.StyleSheetRule,...K}}),styleDeclarationCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.StyleDeclaration,...K}}),canvasMutationCb:Tt,fontCb:K=>Ee({type:Z.IncrementalSnapshot,data:{source:G.Font,...K}}),selectionCb:K=>{Ee({type:Z.IncrementalSnapshot,data:{source:G.Selection,...K}})},customElementCb:K=>{Ee({type:Z.IncrementalSnapshot,data:{source:G.CustomElement,...K}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:zt,inlineStylesheet:h,sampling:k,recordDOM:E,recordCanvas:O,inlineImages:J,userTriggeredOnInput:D,collectFonts:N,doc:ae,maskAttributeFn:S,maskInputFn:T,maskTextFn:b,keepIframeSrcFn:P,blockSelector:s,unblockSelector:i,slimDOMOptions:Ur,dataURLOptions:R,mirror:at,iframeManager:qe,stylesheetManager:ze,shadowDomManager:hn,processedNodeManager:zn,canvasManager:jn,ignoreCSSAttributes:Y,plugins:Q?.filter(K=>K.observer)?.map(K=>({observer:K.observer,options:K.options,callback:mt=>Ee({type:Z.Plugin,data:{plugin:K.name,payload:mt}})}))||[]},{});qe.addLoadListener(ae=>{try{F.push(ie(ae.contentDocument))}catch(K){console.warn(K)}});const X=()=>{mn(),F.push(ie(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():(F.push(He("DOMContentLoaded",()=>{Ee({type:Z.DomContentLoaded,data:{}}),w==="DOMContentLoaded"&&X()})),F.push(He("load",()=>{Ee({type:Z.Load,data:{}}),w==="load"&&X()},window))),()=>{F.forEach(ae=>ae()),zn.destroy(),oi=void 0,wA()}}catch(F){console.warn(F)}}function VA(e){if(!oi)throw new Error("please take full snapshot after start recording");oi(e)}ot.mirror=at;ot.takeFullSnapshot=VA;function KA(e,t){try{return e?e(t):new uf}catch{return console.warn("Unable to initialize CanvasManager"),new uf}}var mf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(mf||(mf={}));const YA=3,XA=5;function Fu(e){return e>9999999999?e:e*1e3}function Oa(e){return e>9999999999?e/1e3:e}function Do(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Z.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Te(t,10,1e3)}}),t.category==="console")))}const JA="button,a";function k_(e){return e.closest(JA)||e}function R_(e){const t=C_(e);return!t||!(t instanceof Element)?t:k_(t)}function C_(e){return QA(e)?e.target:e}function QA(e){return nt(e)&&"target"in e}let Xt;function ZA(e){return Xt||(Xt=[],eN()),Xt.push(e),()=>{const t=Xt?Xt.indexOf(e):-1;t>-1&&Xt.splice(t,1)}}function eN(){Oe(ge,"open",function(e){return function(...t){if(Xt)try{Xt.forEach(n=>n())}catch{}return e.apply(ge,t)}})}const tN=new Set([G.Mutation,G.StyleSheetRule,G.StyleDeclaration,G.AdoptedStyleSheet,G.CanvasMutation,G.Selection,G.MediaInteraction]);function nN(e,t,n){e.handleClick(t,n)}class rN{constructor(t,n,r=Do){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=ZA(()=>{this._lastMutation=gf()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(sN(n,this._ignoreSelector)||!iN(t))return;const r={timestamp:Oa(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Oa(t)}registerScroll(t=Date.now()){this._lastScroll=Oa(t)}registerClick(t){const n=k_(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=gf();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,l);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Mo(()=>this._checkClicks(),1e3)}}const oN=["A","BUTTON","INPUT"];function sN(e,t){return!!(!oN.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function iN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function gf(){return Date.now()/1e3}function aN(e,t){try{if(!cN(t))return;const{source:n}=t.data;if(tN.has(n)&&e.registerMutation(t.timestamp),n===G.Scroll&&e.registerScroll(t.timestamp),uN(t)){const{type:r,id:o}=t.data,s=ot.mirror.getNode(o);s instanceof HTMLElement&&r===Fe.Click&&e.registerClick(s)}}catch{}}function cN(e){return e.type===YA}function uN(e){return e.data.source===G.MouseInteraction}function _t(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ji=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ji||{});const A_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),lN=new Set([...A_,"data-sentry-element"]);function dN(e){const t={};for(const n in e)if(A_.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return!t["data-sentry-component"]&&e["data-sentry-element"]&&(t["data-sentry-component"]=e["data-sentry-element"]),t}const fN=e=>t=>{if(!e.isEnabled())return;const n=pN(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&nN(e.clickDetector,n,R_(t.event)),Do(e,n)};function N_(e,t){const n=ot.mirror.getId(e),r=n&&ot.mirror.getNode(n),o=r&&ot.mirror.getMeta(r),s=o&&mN(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===ji.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:dN(s.attributes)}}:{}}}function pN(e){const{target:t,message:n}=hN(e);return _t({category:`ui.${e.name}`,...N_(t,n)})}function hN(e){const t=e.name==="click";let n,r=null;try{r=t?R_(e.event):C_(e.event),n=Xe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function mN(e){return e.type===ji.Element}function gN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=_N(t);n&&Do(e,n)}function _N(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||yN(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=Xe(i,{maxStringLength:200})||"<unknown>",l=N_(i,u);return _t({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function yN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const SN={resource:TN,paint:EN,navigation:wN};function Pa(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function bN(e){return e.map(vN).filter(Boolean)}function vN(e){const t=SN[e.entryType];return t?t(e):null}function Er(e,t=e){return Le(e,t)}function EN(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Er(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function wN(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:f,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:Er(p),end:Er(s,p),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:f,domComplete:s,redirectCount:d}}}function TN(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Er(s),end:Er(o,s),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function IN(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Bu(e,"largest-contentful-paint",n)}function kN(e){return e.sources!==void 0}function RN(e){const t=[],n=[];for(const r of e.entries)if(kN(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=ot.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Bu(e,"cumulative-layout-shift",n,t)}function CN(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Bu(e,"interaction-to-next-paint",n)}function Bu(e,t,n,r){const o=e.value,s=e.rating,i=e.entries[e.entries.length-1],a=Er(i?.startTime??(e.navigationStartTime??0)+o);return{type:"web-vital",name:t,start:a,end:a,data:{value:o,size:o,rating:s,nodeIds:n?n.map(c=>ot.mirror.getId(c)):void 0,attributions:r}}}function AN(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(ct(o,n))}),r.push(Vs(Pa(IN,e)),Gs(Pa(RN,e)),mc(Pa(CN,e))),()=>{r.forEach(o=>o())}}const W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,NN='var t=Uint8Array,r=Uint16Array,n=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new r(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new n(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new r(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,n,e){for(var i=t.length,s=0,a=new r(n);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new r(n);for(s=1;s<n;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new r(1<<n);var f=15-n;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=n-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new r(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(r,n,e){return(null==e||e>r.length)&&(e=r.length),new t(r.subarray(n,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,r,n){var e=new Error(r||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!n)throw e;return e},z=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8},_=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8,t[e+2]|=n>>16},x=function(n,e){for(var i=[],s=0;s<n.length;++s)n[s]&&i.push({s:s,f:n[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,r){return t.f-r.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new r(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,r){return p[r.s]-p[t.s]||t.f-r.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,r,n){return-1==t.s?Math.max(A(t.l,r,n+1),A(t.r,r,n+1)):r[t.s]=n},D=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=n;++h)if(t[h]==s&&h!=n)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:n}},T=function(t,r){for(var n=0,e=0;e<r.length;++e)n+=t[e]*r[e];return n},k=function(t,r,n){var e=n.length,i=m(r+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=n[s];return 8*(i+4+e)},U=function(t,n,a,o,h,f,l,u,c,v,m){z(n,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new r(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(n,m,t.subarray(c,c+v));if(z(n,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(n,m,S-257),z(n,m+5,j-1),z(n,m+10,K-4),m+=14;for(B=0;B<K;++B)z(n,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var rt=31&tt[B];z(n,m,Y[rt]),m+=H[rt],rt>15&&(z(n,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var nt=o[B];if(nt>255){_(n,m,N[(rt=nt>>18&31)+257]),m+=P[rt+257],rt>7&&(z(n,m,nt>>23&31),m+=e[rt]);var et=31&nt;_(n,m,Q[et]),m+=R[et],et>3&&(_(n,m,nt>>5&8191),m+=i[et])}else _(n,m,N[nt]),m+=P[nt]}return _(n,m,N[256]),m+P[256]},C=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),r=0;r<256;++r){for(var n=r,e=9;--e;)n=(1&n&&-306674912)^n>>>1;t[r]=n}return t}(),S=function(){var t=1,r=0;return{p:function(n){for(var e=t,i=r,s=0|n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=n[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,r=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(r%=65521))<<8|r>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new r(32768),x=c.h||new r(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new n(25e3),I=new r(288),S=new r(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),rt=0;for(P=0;P<tt;++P){var nt=j-W+P&32767,et=nt-_[nt]&32767;et>rt&&(rt=et,K=nt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,r,n){for(;n;++r)t[r]=n,n>>>=8},j=function(){function r(r,n){if("function"==typeof r&&(n=r,r={}),this.ondata=n,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return r.prototype.p=function(t,r){this.ondata(L(t,this.o,0,0,this.s),r)},r.prototype.push=function(r,n){this.ondata||E(5),this.s.l&&E(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(r.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(s),32768),this.s.z=r.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=F)},r.prototype.flush=function(r){if(this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var n=new t(6);n[0]=this.s.r>>3;var e=k(n,this.s.r,F);this.s.r=0,this.ondata(n.subarray(0,e>>3),!1)}},r}();function q(t,r){r||(r={});var n=function(){var t=-1;return{p:function(r){for(var n=t,e=0;e<r.length;++e)n=I[255&n^r[e]]^n>>>8;t=n},d:function(){return~t}}}(),e=t.length;n.p(t);var i,s=L(t,r,10+((i=r).filename?i.filename.length+1:0),8),a=s.length;return function(t,r){var n=r.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=r.level<2?4:9==r.level?2:0,t[9]=3,0!=r.mtime&&O(t,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),n){t[3]=8;for(var e=0;e<=n.length;++e)t[e+10]=n.charCodeAt(e)}}(s,r),O(s,a-8,n.d()),O(s,a-4,e),s}var B=function(){function t(t,r){this.c=S(),this.v=1,j.call(this,t,r)}return t.prototype.push=function(t,r){this.c.p(t),j.prototype.push.call(this,t,r)},t.prototype.p=function(t,r){var n=L(t,this.o,this.v&&(this.o.dictionary?6:2),r&&4,this.s);this.v&&(function(t,r){var n=r.level,e=0==n?0:n<6?1:9==n?3:2;if(t[0]=120,t[1]=e<<6|(r.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,r.dictionary){var i=S();i.p(r.dictionary),O(t,2,i.d())}}(n,this.o),this.v=0),r&&O(n,n.length-4,this.c.d()),this.ondata(n,r)},t.prototype.flush=function(t){j.prototype.flush.call(this,t)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,r){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=r||!1)},t}();function K(r,n){if(G)return G.encode(r);for(var e=r.length,i=new t(r.length+(r.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=r.charCodeAt(o);f<128||n?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&r.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const r=this._hasEvents?",":"";this.stream.push(r+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let r=0;for(const n of t)r+=n.length;const n=new Uint8Array(r);for(let r=0,e=0,i=t.length;r<i;r++){const i=t[r];n.set(i,e),e+=i.length}return n}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,r)=>{this._deflatedData.push(t)},this.stream=new J((t,r)=>{this.deflate.push(t,r)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const r=t.data.method,n=t.data.id,e=t.data.arg;if(r in P&&"function"==typeof P[r])try{const t=P[r](e);postMessage({id:n,method:r,success:!0,response:t})}catch(t){postMessage({id:n,method:r,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function xN(){const e=new Blob([NN],{type:"text/javascript"});return URL.createObjectURL(e)}const _f=["log","warn","error"],vs="[Replay] ";function La(e,t="info"){Et({category:"console",data:{logger:"replay"},level:t,message:`${vs}${e}`},{level:t})}function MN(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return W?(_f.forEach(r=>{n[r]=(...o)=>{_[r](vs,...o),t&&La(o.join(""),Bs(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(vs,r),e?Pn(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&La(r,"error")},n.infoTick=(...r)=>{_.log(vs,...r),t&&setTimeout(()=>La(r[0]),0)}):_f.forEach(r=>{n[r]=()=>{}}),n}const z=MN();class Uu extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Mu}.`)}}class x_ extends Error{constructor(){super("Worker destroyed")}}class M_{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Mu)throw new Uu;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:Fu(t)}}class ON{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const o=this._pending.get(r.id);if(!(!o||o.method!==r.method)){if(this._pending.delete(r.id),!r.success){W&&z.error("Error in compression worker: ",r.response),o.reject(new Error("Error in compression worker"));return}o.resolve(r.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(W&&z.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{W&&z.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){W&&z.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new x_)),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{this._pending.set(r,{method:t,resolve:o,reject:s});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),s(i)}})}_getAndIncrementId(){return this._id++}}class PN{constructor(t){this._worker=new ON(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Fu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Mu?Promise.reject(new Uu):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{W&&z.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class LN{constructor(t){this._fallback=new M_,this._compression=new PN(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){W&&z.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){if(s instanceof x_)return;W&&z.exception(s,"Failed to add events when switching buffers.")}}}function DN({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=$N(t);if(n)return n}return W&&z.log("Using simple buffer"),new M_}function $N(e){try{const t=e||FN();if(!t)return;W&&z.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new LN(n)}catch(t){W&&z.exception(t,"Failed to create compression worker")}}function FN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?xN():""}function Hu(){try{return"sessionStorage"in ge&&!!ge.sessionStorage}catch{return!1}}function BN(e){UN(),e.session=void 0}function UN(){if(Hu())try{ge.sessionStorage.removeItem(Nu)}catch{}}function O_(e){return e===void 0?!1:Math.random()<e}function qi(e){if(Hu())try{ge.sessionStorage.setItem(Nu,JSON.stringify(e))}catch{}}function P_(e){const t=Date.now(),n=e.id||Pe(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function HN(e,t){return O_(e)?"session":t?"buffer":!1}function yf({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=HN(e,t),s=P_({sampled:o,previousSessionId:r});return n&&qi(s),s}function WN(){if(!Hu())return null;try{const e=ge.sessionStorage.getItem(Nu);if(!e)return null;const t=JSON.parse(e);return W&&z.infoTick("Loading existing session"),P_(t)}catch{return null}}function Rc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function zN(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Rc(e.started,t,r)||Rc(e.lastActivity,n,r)}function si(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!zN(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Da({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&WN();return o?si(o,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&z.infoTick("Session in sessionStorage is expired, creating new one..."),yf(r,{previousSessionId:o.id})):o:(W&&z.infoTick("Creating new session"),yf(r,{previousSessionId:n}))}function jN(e){return e.type===Z.Custom}function Wu(e,t,n){return D_(e,t)?(L_(e,t,n),!0):!1}function qN(e,t,n){return D_(e,t)?L_(e,t,n):Promise.resolve(null)}async function L_(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=GN(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const i=s&&s instanceof Uu,a=i?"eventBufferOverflow":"eventBufferError",c=v();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}function D_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Fu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(W&&z.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function GN(e,t){try{if(typeof t=="function"&&jN(e))return t(e)}catch(n){return W&&z.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const Sf=100;function $_(e,t,n){const r=e.getContext();t&&r.traceIds.size<Sf&&r.traceIds.add(t),n&&r.segmentNames.size<Sf&&r.segmentNames.add(n)}function VN(e){return t=>{e.isEnabled()&&$_(e,t.trace_id,t.name||void 0)}}function zu(e){return!e.type}function Cc(e){return e.type==="transaction"}function KN(e){return e.type==="replay_event"}function bf(e){return e.type==="feedback"}function YN(e){return(t,n)=>{if(!e.isEnabled()||!zu(t)&&!Cc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Cc(t)){XN(e,t);return}JN(e,t)}}}function XN(e,t){$_(e,t.contexts?.trace?.trace_id,t.transaction)}function JN(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Mo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function QN(e){return t=>{!e.isEnabled()||!zu(t)||ZN(e,t)}}function ZN(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=_t({category:"replay.hydrate-error",data:{url:Bt()}});Do(e,r)}}function ex(e){const t=v();t&&t.on("beforeAddBreadcrumb",n=>tx(e,n))}function tx(e,t){if(!e.isEnabled()||!F_(t))return;const n=nx(t);n&&Do(e,n)}function nx(e){return!F_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?rx(e):_t(e)}function rx(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return _t(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>rs?(n=!0,`${o.slice(0,rs)}…`):o;if(typeof o=="object")try{const s=Te(o,7);return JSON.stringify(s).length>rs?(n=!0,`${JSON.stringify(s,null,2).slice(0,rs)}…`):s}catch{}return o});return _t({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function F_(e){return!!e.category}function ox(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function ii(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=he();if(t){const n=st(t);delete n.replay_id}}function vf(e){const t=q().getPropagationContext().dsc;t&&(t.replay_id=e);const n=he();if(n){const r=st(n);r.replay_id=e}}function sx(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Z.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function ix(e,t){return e.recordingMode!=="buffer"||t.message===xu||!t.exception||t.type?!1:O_(e.getOptions().errorSampleRate)}function ax(e){return Object.assign((t,n)=>{if(e.session&&si(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&ii(),!e.isEnabled()||e.isPaused())return t;if(KN(t))return delete t.breadcrumbs,t;if(!zu(t)&&!Cc(t)&&!bf(t))return t;if(!e.checkAndHandleExpiredSession())return ii(),t;if(bf(t)){const i=e.getSessionId(),a=t.contexts.feedback.replay_id;return a&&a!==i||(e.flush(),t.contexts.feedback.replay_id=i,sx(e,t)),t}if(ox(t,n)&&!e.getOptions()._experiments.captureExceptions)return W&&z.log("Ignoring error from rrweb internals",t),null;const o=ix(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&qi(i)}return t},{id:"Replay"})}function Gi(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:Z.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function cx(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function ux(e){return t=>{if(!e.isEnabled())return;const n=cx(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Gi(e,[n]),!1)))}}function lx(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:Em(t,v())}function B_(e,t){e.isEnabled()&&t!==null&&(lx(e,t.name)||e.addUpdate(()=>(Gi(e,[t]),!0)))}function Vi(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Dg(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function U_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ai(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function H_(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function go(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function tn(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=dx(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Ac(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function dx(e){if(!e||typeof e!="string")return{body:e};const t=e.length>ef,n=fx(e);if(t){const r=e.slice(0,ef);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function fx(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ci(e,t){const n=px(e);return Ht(n,t)}function px(e,t=ge.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ge.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function hx(e,t,n){try{const r=await gx(e,t,n),o=H_("resource.fetch",r);B_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture fetch breadcrumb")}}function mx(e,t){const{input:n,response:r}=t,o=n?Cu(n):void 0,s=Vi(o),i=r?U_(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function gx(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=e.data,f=ci(i,n.networkDetailAllowUrls)&&!ci(i,n.networkDetailDenyUrls),d=f?_x(n,t.input,u):go(u),p=await yx(f,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d,response:p}}function _x({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?vx(n,t):{};if(!e)return tn(o,r,void 0);const s=Cu(n),[i,a]=Js(s,z),c=tn(o,r,i);return a?ai(c,a):c}async function yx(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return go(o);const s=r?W_(r.headers,n):{};if(!r||!t&&o!==void 0)return tn(s,o,void 0);const[i,a]=await bx(r),c=Sx(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?ai(c,a):c}function Sx(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Vi(e):n;return r?t?tn(o,s,e):tn(o,s,void 0):go(s)}catch(s){return W&&z.exception(s,"Failed to serialize response body"),tn(o,n,void 0)}}async function bx(e){const t=Ex(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await wx(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&z.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&z.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function W_(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function vx(e,t){return e.length===1&&typeof e[0]!="string"?Ef(e[0],t):e.length===2?Ef(e[1],t):{}}function Ef(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?W_(n,t):Array.isArray(n)?{}:Ac(n,t):{}}function Ex(e){try{return e.clone()}catch(t){W&&z.exception(t,"Failed to clone response body")}}function wx(e){return new Promise((t,n)=>{const r=Mo(()=>n(new Error("Timeout while trying to read response body")),500);Tx(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function Tx(e){return e.text()}async function Ix(e,t,n){try{const r=Rx(e,t,n),o=H_("resource.xhr",r);B_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture xhr breadcrumb")}}function kx(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Vi(r),s=n.getResponseHeader("content-length")?U_(n.getResponseHeader("content-length")):Nx(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function Rx(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:l=0,request_body_size:f,response_body_size:d}=e.data;if(!c)return null;if(!a||!ci(c,n.networkDetailAllowUrls)||ci(c,n.networkDetailDenyUrls)){const I=go(f),k=go(d);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:I,response:k}}const p=a[Ct],h=p?Ac(p.request_headers,n.networkRequestHeaders):{},m=Ac($g(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?Js(i,z):[void 0],[S,T]=n.networkCaptureBodies?Cx(a):[void 0],b=tn(h,f,g),M=tn(m,d,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:l,request:y?ai(b,y):b,response:T?ai(M,T):M}}function Cx(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Ax(e.response,e.responseType)}catch(n){t.push(n)}return W&&z.warn("Failed to get xhr response body",...t),[void 0]}function Ax(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&nt(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return W&&z.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return W&&z.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Nx(e,t){try{const n=t==="json"&&nt(e)?JSON.stringify(e):e;return Vi(n)}catch{return}}function xx(e){const t=v();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>Mx(a,c,u))}catch{}}function Mx(e,t,n){if(t.data)try{Ox(t)&&Lx(n)&&(kx(t,n),Ix(t,n,e)),Px(t)&&Dx(n)&&(mx(t,n),hx(t,n,e))}catch(r){W&&z.exception(r,"Error when enriching network breadcrumb")}}function Ox(e){return e.category==="xhr"}function Px(e){return e.category==="fetch"}function Lx(e){return e?.xhr}function Dx(e){return e?.input!==void 0}function $x(e){const t=v();Lg(fN(e)),Fi(ux(e)),ex(e),xx(e);const n=ax(e);if(pE(n),t){t.on("beforeSendEvent",QN(e)),t.on("afterSendEvent",YN(e)),t.on("createDsc",o=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=s)}),t.on("processSegmentSpan",VN(e)),t.on("spanStart",o=>{e.lastActiveSpan=o}),t.on("spanEnd",o=>{e.lastActiveSpan=o});let r;t.on("beforeSendFeedback",async(o,s)=>{const i=o.contexts?.feedback;if(!s?.includeReplay||!i)return;if(i.source==="widget"&&r){i.replay_id=r,r=void 0;return}const a=e.getSessionId();e.isEnabled()&&a&&(i.source==="api"&&await e.sendBufferedReplayOrFlush(),i.replay_id=a)}),t.on("openFeedbackWidget",async()=>{r=void 0,await e.sendBufferedReplayOrFlush(),r=e.isEnabled()?e.getSessionId():void 0})}}async function Fx(e){try{return await Promise.all(Gi(e,[Bx(ge.performance.memory)]))}catch{return[]}}function Bx(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ux(e,t,n){return wv(e,t,{...n,setTimeoutImpl:Mo})}const as=$.navigator;function Hx(){return/iPhone|iPad|iPod/i.test(as?.userAgent??"")||/Macintosh/i.test(as?.userAgent??"")&&as?.maxTouchPoints&&as?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Wx(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){W&&z.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,zx(n),e.clickDetector&&aN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Wu(e,n,o))return!0;if(!o)return!1;const s=e.session;if(qx(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(W&&z.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&qi(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function zx(e){const t=e.data;if(!(e.type!==Z.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==G.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=ot.mirror.getNode(n.id),o=r&&ot.mirror.getMeta(r);if(!r||o?.type!==ji.Element)continue;const s={...o.attributes};let i=!1;for(const[a,c]of Object.entries(n.attributes))lN.has(a)&&(c===null?delete s[a]:s[a]=c,i=!0);i&&ot.mirror.add(r,{...o,attributes:s})}}function jx(e){const t=e.getOptions();return{type:Z.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function qx(e,t){!t||e.session?.segmentId!==0||Wu(e,jx(e),!1)}function Gx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Vx(e,t,n,r){return ht(yh(e,vo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Kx({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
500
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function Yx({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await Gh(e.getOptions(),r,s,t,e,me());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:l}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:l},i}async function Xx({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=Kx({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:l,initialTimestamp:f}=r,d=v(),p=q(),h=d?.getTransport(),m=d?.getDsn();if(!d||!h||!m||!s.sampled)return Promise.resolve({});const g={type:E1,replay_start_timestamp:f/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await Yx({scope:p,client:d,replayId:t,event:g});if(!y)return W&&z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const S=Vx(y,i,m,d.getOptions().tunnel);let T;try{T=await h.send(S)}catch(M){const I=new Error(xu);try{I.cause=M}catch{}throw I}const b=im({},T);if(sm(b,"replay"))throw new ju(b);if(typeof T.statusCode=="number"&&(T.statusCode<200||T.statusCode>=300))throw new z_(T.statusCode);return T}class z_ extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class ju extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class wf extends Error{constructor(){super("Session is too long, not sending replay")}}async function j_(e,t={count:0,interval:C1}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Xx(e),!0}catch(o){if(o instanceof z_||o instanceof ju)throw o;if(Vh("Replays",{_retryCount:t.count}),r&&r(o),t.count>=A1){const s=new Error(`${xu} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{Mo(async()=>{try{await j_(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const q_="__THROTTLED",Jx="__SKIPPED";function Qx(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,l)=>{l<c&&r.delete(l)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const l=i;return i=!0,l?Jx:q_}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Zx{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:w1,sessionIdleExpire:T1},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Ux(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Qx((i,a)=>qN(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(N1,r),timeout:r,scrollTimeout:x1,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new rN(this,s)),W){const i=t._experiments;z.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ge.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=_t({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=_t({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{gN(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){W&&z.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){W&&z.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&z.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){W&&z.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&z.log("Buffering is in progress, call `flush()` to save the replay");return}W&&z.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Da({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){W&&z.log("Buffering is in progress, call `flush()` to save the replay");return}W&&z.infoTick("Starting replay in buffer mode");const t=Da({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=ot({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:R1}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Wx(this),...Hx(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";v()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{W&&z.log(`Stopping Replay triggered by ${r}`),ii(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,BN(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&z.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&z.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();W&&z.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession(),vf(this.session.id)),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Rc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ge.location.pathname}${ge.location.hash}${ge.location.search}`,n=`${ge.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===q_){const o=_t({category:"replay.throttled"});this.addUpdate(()=>!Wu(this,{type:XA,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||he(),n=t&&Re(t);if(!n)return;const r=ne(n),o=r.attributes[P1];if(!(!o||!["route","custom"].includes(o)))return r.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=DN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&v()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&vf(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Da({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return si(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{ge.document.addEventListener("visibilitychange",this._handleVisibilityChange),ge.addEventListener("blur",this._handleWindowBlur),ge.addEventListener("focus",this._handleWindowFocus),ge.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||($x(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=AN(this)}_removeListeners(){try{ge.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ge.removeEventListener("blur",this._handleWindowBlur),ge.removeEventListener("focus",this._handleWindowFocus),ge.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(si(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){ii();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){W&&z.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Z.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=bN(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Gi(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){W&&z.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await Fx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new wf;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await j_({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=v();if(r){let o;n instanceof ju?o="ratelimit_backoff":n instanceof wf?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){W&&z.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){W&&z.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&W&&z.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&qi(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=Gx(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=_t({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Gr(e,t){return[...e,...t].join(",")}function eM({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=Gr(e,[".sentry-mask","[data-sentry-mask]"]),a=Gr(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:Gr(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Gr(r,[]),ignoreSelector:Gr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function tM({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}const Tf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',nM=["content-length","content-type","accept"],rM=Symbol.for("sentry__originalRequestBody");let If=!1,kf=!1;function oM(){if(typeof Request>"u"||kf)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[rM]=r.body),o};t.prototype=e.prototype,$.Request=t,kf=!0}catch{}}const wL=(e=>new sM(e));class sM{constructor({flushMinDelay:t=I1,flushMaxDelay:n=k1,minReplayDuration:r=M1,maxReplayDuration:o=tf,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:T=[],networkResponseHeaders:b=[],mask:M=[],maskAttributes:I=["title","placeholder","aria-label"],unmask:k=[],block:R=[],unblock:U=[],ignore:E=[],maskFn:O,beforeAddRecordingEvent:x,beforeErrorSampling:w,onError:D,attachRawBodyFromRequest:N=!1}={}){this.name="Replay";const J=eM({mask:M,unmask:k,block:R,unblock:U,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:O,maskInputFn:O,maskAttributeFn:(Q,P,Y)=>tM({maskAttributes:I,maskAllText:u,privacyOptions:J,key:Q,value:P,el:Y}),...J,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:Q=>{try{Q.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,O1),maxReplayDuration:Math.min(o,tf),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:f,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:Rf(T),networkResponseHeaders:Rf(b),beforeAddRecordingEvent:x,beforeErrorSampling:w,onError:D,attachRawBodyFromRequest:N,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Tf}`:Tf,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&on())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return If}set _isInitialized(t){If=t}afterAllSetup(t){!on()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&oM(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:t?.flush??this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){const n=this.getReplayId(!0);n&&(On(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&On(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=iM(this._initialOptions,t);this._replay=new Zx({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function iM(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=xn(n.replaysSessionSampleRate),s=xn(n.replaysOnErrorSampleRate);return o==null&&s==null&&ft(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function Rf(e){return[...nM,...e.map(t=>t.toLowerCase())]}function TL(){return v()?.getIntegrationByName("Replay")}var aM=Object.defineProperty,cM=(e,t,n)=>t in e?aM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cf=(e,t,n)=>cM(e,typeof t!="symbol"?t+"":t,n);function uM(e){return e.nodeType===e.ELEMENT_NODE}function lM(e){return e?.host?.shadowRoot===e}class dM{constructor(){Cf(this,"idNodeMap",new Map),Cf(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),uM(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function fM(){return new dM}function pM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ui(e,t,n=1/0,r=0){return e?lM(e)?ui(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ui(e.parentNode,t,n,r+1):-1}function Af(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(pM(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Xn=`Please stop import mirror directly. Instead of that,\r
|
|
501
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
502
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Nf={map:{},getId(){return console.error(Xn),-1},getNode(){return console.error(Xn),null},removeNodeFromMap(){console.error(Xn)},has(){return console.error(Xn),!1},reset(){console.error(Xn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Nf=new Proxy(Nf,{get(e,t,n){return t==="map"&&console.error(Xn),Reflect.get(e,t,n)}}));function qu(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){V_(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>qu(e,t,s||{},!0)}function Gu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function hM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ki(e,t,n,r,o){if(!e)return!1;const s=hM(e);if(!s)return!1;const i=Af(t,n),a=ui(s,i);let c=-1;return a<0?!1:(r&&(c=ui(s,Af(null,r))),a>-1&&c<0?!0:a<c)}const $a={};function G_(e){const t=$a[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return $a[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return $a[e]=r}function bn(...e){return G_("requestAnimationFrame")(...e)}function V_(...e){return G_("setTimeout")(...e)}var wr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(wr||{});let Es;function mM(e){Es=e}const Fa=e=>Es?((...n)=>{try{return e(...n)}catch(r){if(Es&&Es(r)===!0)return()=>{};throw r}}):e;var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var cs=0;cs<tr.length;cs++)gM[tr.charCodeAt(cs)]=cs;var _M=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=tr[t[n]>>2],o+=tr[(t[n]&3)<<4|t[n+1]>>4],o+=tr[(t[n+1]&15)<<2|t[n+2]>>6],o+=tr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const xf=new Map;function yM(e,t){let n=xf.get(e);return n||(n=new Map,xf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const K_=(e,t,n)=>{if(!e||!(X_(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=yM(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function ws(e,t,n){if(e instanceof Array)return e.map(r=>ws(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=_M(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ws(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ws(e.data,t,n),e.width,e.height]};if(X_(e,t)||typeof e=="object"){const r=e.constructor.name,o=K_(e,t,n);return{rr_type:r,index:o}}}}return e}const Y_=(e,t,n)=>e.map(r=>ws(r,t,n)),X_=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function SM(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Gu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Ki(this.canvas,n,r,o,!0)||V_(()=>{const f=Y_(l,t,this);e(this.canvas,{type:wr["2D"],property:a,args:f})},0),u.apply(this,l)}});s.push(c)}catch{const c=qu(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:wr["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function bM(e){return e==="experimental-webgl"?"webgl":e}function Mf(e,t,n,r,o){const s=[];try{const i=Gu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ki(this,t,n,r,!0)){const l=bM(c);if("__context"in this||(this.__context=l),o&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){const f=u[0];f.preserveDrawingBuffer||(f.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Of(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const f=Gu(e,l,function(d){return function(...p){const h=d.apply(this,p);if(K_(h,a,this),"tagName"in this.canvas&&!Ki(this.canvas,r,o,s,!0)){const m=Y_(p,a,this),g={type:t,property:l,args:m};n(this.canvas,g)}return h}});c.push(f)}catch{const f=qu(e,l,{set(d){n(this.canvas,{type:t,property:l,args:[d],setter:!0})}});c.push(f)}return c}function vM(e,t,n,r,o,s){const i=[];return i.push(...Of(t.WebGLRenderingContext.prototype,wr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Of(t.WebGL2RenderingContext.prototype,wr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const EM='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function wM(){const e=new Blob([EM]);return URL.createObjectURL(e)}class TM{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&mM(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&Fa(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Fa(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Mf(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),t);return}bn(r=>this.takeSnapshot(r,t))}initFPSWorker(){const t=new Worker(wM());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:wr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r),t=bn(n)};t=bn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Mf(t,n,r,o,!1),i=SM(this.processMutation.bind(this),t,n,r,o),a=vM(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{Ki(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n){const{sampling:r,blockClass:o,blockSelector:s,unblockSelector:i,dataURLOptions:a,maxCanvasSize:c}=this.options,l=1e3/(r==="all"?2:r||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(n?[n]:this.getCanvasElements(o,s,i)).forEach(p=>{const h=this.mirror.getId(p);!this.mirror.hasNode(p)||!p.width||!p.height||this.snapshotInProgressMap.get(h)||(this.snapshotInProgressMap.set(h,!0),createImageBitmap(p).then(m=>{this.worker?.postMessage({id:h,bitmap:m,width:p.width,height:p.height,dataURLOptions:a,maxCanvasSize:c},[m])}).catch(m=>{Fa(()=>{throw this.snapshotInProgressMap.delete(h),m})()}))}),!0)}startPendingCanvasMutationFlusher(){bn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,bn(t)};bn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),bn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}fM();var Pf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Pf||(Pf={}));const Lf={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},IM="ReplayCanvas",us=1280,kM=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,us):us,n?Math.min(n,us):us]};let o,s;const i=new Promise(a=>s=a);return{name:IM,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:l=>{const f=new TM({...l,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return o=f,s(f),f},...Lf[a]||Lf.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),IL=kM;function RM(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function J_(e){try{return new URL(e,C.location.origin).href}catch{return}}function CM(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Q_(e){try{return new Headers(e)}catch{return}}const Z_={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function AM(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...Z_,...t},u=typeof o=="function"?o:p=>!0,l=p=>xM(p,i),f={},d=e.getOptions().propagateTraceparent;n&&Mi(p=>{const h=W0(p,u,l,f,{propagateTraceparent:d,onRequestSpanEnd:c,urlBase:C.location?.origin});if(h){const m=J_(p.fetchData.url),g=m?Cn(m).host?.replace(/^.*@/,""):void 0,y=m?Dt(m):void 0;h.setAttributes({[De]:be(y),[_i]:g}),s&&Df(h,e),a?.(h,{headers:p.headers})}}),r&&Ru(p=>{const h=MM(p,u,l,f,d,c);h&&(s&&Df(h,e),a?.(h,{headers:Q_(p.xhr.__sentry_xhr_v3__?.request_headers)}))})}const NM=300;function Df(e,t){const n=ne(e).attributes[De];if(!n||typeof n!="string")return;let r=()=>{setTimeout(o)};if(V(t)){const s=e.end.bind(e);e.end=i=>{const a=i??fe();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(l))};r=u;const l=setTimeout(u,NM)}}const o=ct("resource",({entries:s})=>{s.forEach(i=>{CM(i)&&i.name.endsWith(n)&&(e.setAttributes(Cg(i)),r())})})}function xM(e,t){const n=Bt();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?pa(r.toString(),t)||s&&pa(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?pa(e,t):r}}function MM(e,t,n,r,o,s){const i=e.xhr,a=i?.[Ct];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,l=Ye()&&t(c);if(e.endTimestamp){const k=i.__sentry_xhr_span_id__;if(!k)return;const R=r[k];R&&(l&&a.status_code!==void 0&&(Cs(R,a.status_code),R.end(),s?.(R,{headers:Q_($g(i)),error:e.error})),delete r[k]);return}const f=J_(c),d=Cn(f||c),p=f?Dt(f):void 0,h=Dt(vm(c)),m=v(),g=!!he(),y=g||!!m&&V(m),S=d?.host?.replace(/^.*@/,""),T=au(f||c),b=T?`${u} ${T}`:u,M=l&&y?yt({name:m&&V(m)?b:`${u} ${h}`,attributes:{type:"xhr",[gi]:u,[De]:be(p),[_i]:S,[yi]:T,[re]:"auto.http.browser",[H]:Fh,[Lp]:_m(Sm(d?.search)),[Pp]:bm(d?.hash)}}):new Mn,I=Ri(M)&&g?void 0:M;return l&&!y&&m?.recordDroppedEvent("no_parent_span","span"),i.__sentry_xhr_span_id__=M.spanContext().spanId,r[i.__sentry_xhr_span_id__]=M,n(c)&&OM(i,Ye()&&y?I:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",M,e),M}function OM(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Tm({span:t,propagateTraceparent:n});r&&PM(e,r,o,s)}function PM(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!RM(s))&&e.setRequestHeader("baggage",n)}}catch{}}const ey="WebVitals",LM=(e={})=>{const{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,o=new Set(t);return{name:ey,setup(s){const i=V(s),a=n&&i&&kg(),c=r&&i,u=a||c;a&&(qI(),nk(s)),c&&GI();const l=!i&&!o.has("cls"),f=!i&&!o.has("lcp"),d=Ik({trackCls:l,trackLcp:f}),p=new WeakSet;s.on("afterStartPageLoadSpan",h=>{p.add(h)}),s.on("spanEnd",h=>{p.delete(h)&&(d(),xk(h,{recordClsOnPageloadSpan:l,recordLcpOnPageloadSpan:f,spanStreamingEnabled:i}))}),i&&(o.has("lcp")||rR(s,u),o.has("cls")||oR(s,u)),o.has("inp")||sR(s,u)},afterAllSetup(){o.has("inp")||Bk()}}};function DM(){C.document?C.document.addEventListener("visibilitychange",()=>{const e=he();if(!e)return;const t=Re(e);if(C.document.hidden&&t){const n="cancelled",{attributes:{[H]:r},status:o}=ne(t);L&&_.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o==="ok"&&t.setStatus({code:we,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):L&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const $M=3600,ty="sentry_previous_trace",FM="sentry.previous_trace";function BM(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?WM():void 0;e.on("spanStart",i=>{if(Re(i)!==i)return;const a=q().getPropagationContext();o=UM(o,i,a),r&&HM(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=q(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Nc(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Nc(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[$p]:o.sampleRate}})}function UM(e,t,n){const r=ne(t);function o(){try{const a=Number(r.attributes[jc]??n.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=$M&&(L&&_.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.attributes[H],...t.spanContext()})}\``),t.addLink({context:i,attributes:{[US]:"previous_trace"}}),t.setAttribute(FM,`${i.traceId}-${i.spanId}-${Nc(i)?1:0}`)),s)}function HM(e){try{C.sessionStorage.setItem(ty,JSON.stringify(e))}catch(t){L&&_.warn("Could not store previous trace in sessionStorage",t)}}function WM(){try{const e=C.sessionStorage?.getItem(ty);return JSON.parse(e)}catch{return}}function Nc(e){return e.traceFlags===1}const zM="BrowserTracing",jM={...fs,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,...Z_},$o=((e={})=>{"enableElementTiming"in e&&ft(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t=C.document,{enableInp:n,enableLongTask:r,enableLongAnimationFrame:o,webVitals:s,beforeStartSpan:i,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:l,traceFetch:f,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:h,ignoreResourceSpans:m,instrumentPageLoad:g,instrumentNavigation:y,instrumentBfcacheRestore:S,detectRedirects:T,linkPreviousTrace:b,consistentTraceSampling:M,enableReportPageLoaded:I,onRequestSpanStart:k,onRequestSpanEnd:R}={...jM,...e},U=xg();let E,O;function x(w,D,N=!0,J){const Q=D.op==="pageload",P=D.name,Y=i?i(D):D,B=Dn(J||Bt()),ee={...B?.pathname&&{[Si]:B.pathname},...B&&!Ai(B)&&{[De]:be(B.href)},...Y.attributes};if(P!==Y.name&&(ee[ce]="custom"),Y.attributes=ee,!N){const $e=Hn();yt({...Y,startTime:$e}).end($e);return}const Se=Th(Y,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:Q,trimIdleSpanEndTimestamp:!I});Q&&I&&(O=Se),Bf(w,Se);function se(){t&&["interactive","complete"].includes(t.readyState)&&(w.emit("idleSpanEnableAutoFinish",Se),t.removeEventListener("readystatechange",se))}Q&&!I&&t&&(t.addEventListener("readystatechange",se),se())}return{name:zM,setup(w){if(U){L&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(Ib(),o&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?ck():r&&ak(),T&&t){const N=()=>{E=fe()};addEventListener("click",N,{capture:!0}),addEventListener("keydown",N,{capture:!0,passive:!0})}function D(){const N=nr(w);N&&!ne(N).end_timestamp&&(L&&_.log(`[Tracing] Finishing current active span with op: ${ne(N).attributes[H]}`),N.setAttribute(or,"cancelled"),N.end())}w.on("beforeIdleSpanEnd",N=>{if(nr(w)!==N)return;uk(N,{ignoreResourceSpans:m,spanStreamingEnabled:V(w)}),Bf(w,void 0);const J=q(),Q=J.getPropagationContext();J.setPropagationContext({...Q,traceId:N.spanContext().traceId,sampled:pt(N),dsc:st(N)}),O===N&&(O=void 0)}),w.on("startNavigationSpan",(N,J)=>{if(v()!==w)return;if(J?.isRedirect){L&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),x(w,{op:xv,...N},!1,J.url);return}E=void 0,D();const Q=q();Q.setPropagationContext({traceId:dn(),sampleRand:Math.random(),propagationSpanId:Ye()?void 0:rn()}),Q.setSDKProcessingMetadata({normalizedRequest:void 0}),x(w,{op:xr,...N,parentSpan:null},!0,J?.url)}),w.on("startPageLoadSpan",(N,J={})=>{if(v()!==w)return;D();const Q=J.sentryTrace||$f("sentry-trace")||Ff("sentry-trace"),P=J.baggage||$f("baggage")||Ff("baggage"),Y=Jp(Q,P),B=q();B.setPropagationContext(Y),Ye()||(B.getPropagationContext().propagationSpanId=rn());const ee=Qs(w);B.setSDKProcessingMetadata({normalizedRequest:{...ee,url:be(ee.url,w)}}),x(w,{op:wo,...N})}),w.on("endPageloadSpan",()=>{I&&O&&(O.setAttribute(or,"reportPageLoaded"),O.end())}),C.addEventListener?.("pagehide",()=>{const N=nr(w);N&&!ne(N).end_timestamp&&(N.setAttribute(or,"documentHidden"),N.end()),w.flush()})},afterAllSetup(w){if(U)return;if(Eo(w),w.addIntegration&&!w.getIntegrationByName?.(ey)){const N=s?.ignore??[];w.addIntegration(LM({...s,ignore:n||N.includes("inp")?N:[...N,"inp"]}))}let D=Bt();b!=="off"&&BM(w,{linkPreviousTrace:b,consistentTraceSampling:M}),C.location&&(g&&Fo(w,{name:V(w)?Lt:C.location.pathname,attributes:{[ce]:"url",[re]:"auto.pageload.browser"}}),y&&Fi(({to:N,from:J})=>{if(J===void 0&&D!==void 0&&D.indexOf(N)!==-1){D=void 0;return}D=void 0;const Q=Dn(N),P=nr(w),Y=P&&T&&qM(P,E);Tr(w,{name:V(w)?dt:Q?.pathname||C.location.pathname,attributes:{[ce]:"url",[re]:"auto.navigation.browser"}},{url:N,isRedirect:Y})}),S&&C.addEventListener?.("pageshow",N=>{N.persisted&&(D=void 0,Tr(w,{name:V(w)?dt:C.location?.pathname||"/",attributes:{[ce]:"url",[re]:"auto.navigation.browser.bfcache",[mi]:"back-forward-cache"}},{url:C.location?.href}))})),l&&DM(),AM(w,{traceFetch:f,traceXHR:d,tracePropagationTargets:w.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:p,enableHTTPTimings:h,onRequestSpanStart:k,onRequestSpanEnd:R})}}});function Fo(e,t,n){const r=t.name===Lt;q().setTransactionName(r?C.location?.pathname:t.name);const o=Cr(),s={...t,startTime:t.startTime??(o?o/1e3:void 0)};e.emit("startPageLoadSpan",s,n);const i=nr(e);return i&&e.emit("afterStartPageLoadSpan",i),i}function Tr(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=q(),i=t.name===dt;return s.setTransactionName(i?r&&Dn(r)?.pathname||C.location?.pathname:t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Qs(e),url:be(r,e)}}),nr(e)}function $f(e){return C.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Ff(e){return C.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}const ny="_sentry_idleSpan";function nr(e){return e[ny]}function Bf(e,t){pe(e,ny,t)}const Uf=1.5;function qM(e,t){const n=ne(e),r=Hn(),o=n.start_timestamp;return!(r-o>Uf||t&&r-t<=Uf)}function kL(e=v()){e?.emit("endPageloadSpan")}function RL(e){const t=he();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,o,s){return io(n,t),Reflect.apply(r,o,s)}}),io(n,e)}const Hf=new WeakMap,Wf=new WeakMap,GM=9e4,VM=["text/event-stream","application/x-ndjson","application/stream+json"],CL=()=>({name:"FetchStreamPerformance",setup(e){J0(t=>{if(t.response){const n=Hf.get(t.response);if(n&&t.endTimestamp){n.end(t.endTimestamp);const r=Wf.get(t.response);r&&clearTimeout(r)}}}),Mi(t=>{if(t.endTimestamp&&t.response){const n=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!VM.some(f=>n.startsWith(f)))return;const r=t.fetchData?.url||"",o=t.fetchData?.method||"GET",s=Dn(r),i=r.startsWith("data:")?Dt(r):s?ym(s):r,a=au(r,C.location?.origin),c=a?`${o} ${a}`:o,u=yt({name:V(e)?c:`${o} ${i}`,startTime:t.endTimestamp,attributes:{[De]:be(Dt(r)),[yi]:a,[gi]:o,type:"fetch",[H]:Wv,[re]:"auto.http.browser.stream"}});Hf.set(t.response,u);const l=setTimeout(()=>{u.isRecording()&&u.end()},GM);Wf.set(t.response,l)}})}}),xc="BfcacheMetrics",AL=(e={})=>{const t=XM(e.maxReasons);return{name:xc,setupOnce(){if(!C.addEventListener||!C.performance?.getEntriesByType){L&&_.log(`[${xc}] Browser APIs unavailable, skipping instrumentation.`);return}function n(r){const o=YM();if(r.persisted){zf("hit",0,o);return}const s=C.performance.getEntriesByType("navigation")[0];if(s?.type!=="back_forward")return;const i=JM(s.notRestoredReasons,t);zf("miss",i.length,o),typeof s.duration=="number"&&s.duration>0&&Hs("browser.bfcache.reload.duration",s.duration,{unit:"millisecond",attributes:Vu({[Ar]:o})}),i.forEach(a=>KM(a,o))}C.addEventListener("pageshow",n,!0)}}};function zf(e,t,n){du("browser.bfcache.navigation",1,{attributes:Vu({[bS]:e,[SS]:t||void 0,[Ar]:n})})}function KM({reason:e,frame:t},n){du("browser.bfcache.not_restored",1,{attributes:Vu({[vS]:e,[yS]:t,[Ar]:n})})}function YM(){return Vk()||q().getScopeData().transactionName||C.location?.pathname}function XM(e){return e==null?1/0:e<1?(L&&_.warn(`[${xc}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1):e}function JM(e,t){const n=[];return!e||t<=0||ry(e,"top",n,t),n}function ry(e,t,n,r){n.length>=r||(e.reasons?.forEach(o=>{if(n.length>=r)return;const s=typeof o=="string"?o:o.reason;s&&n.push({reason:s,frame:t})}),e.children?.forEach(o=>{ry(o,"child",n,r)}))}function Vu(e){return e[re]="auto.browser.bfcache",e}function Ir(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function QM(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ir(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function Ku(e){return Ir(e.getAllKeys())}function ZM(e,t,n){return e(r=>Ku(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Ir(r.transaction)}))}function eO(e,t,n){return e(r=>Ku(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Ir(r.transaction)}))}function tO(e){return e(t=>Ku(t).then(n=>{const r=n[0];if(r!=null)return Ir(t.get(r)).then(o=>(t.delete(r),Ir(t.transaction).then(()=>o)))}))}function nO(e){let t;function n(){return t==null&&(t=QM(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=Ps(r);await ZM(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=Ps(r);await eO(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await tO(n());if(r)return Gb(r)}catch{}}}}function rO(e){return t=>{const n=e({...t,createStore:nO});return C.addEventListener("online",async r=>{await n.flush()}),n}}function NL(e=Wg){return rO(ew(e))}const oO="window"in $&&$.window===$&&typeof importScripts>"u",Mc=String(0),oy=oO?"main":"worker";function sO(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=aO(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:Pe(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||Pe(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:cO(e.resources)},profile:r}}function iO(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function aO(e){const t=[];for(let o=0;o<e.frames.length;o++){const s=e.frames[o];s&&(t[o]={function:s.name,abs_path:typeof s.resourceId=="number"?e.resources[s.resourceId]:void 0,lineno:s.line,colno:s.column})}const n=[];for(let o=0;o<e.stacks.length;o++){const s=e.stacks[o];if(!s)continue;const i=[];let a=s;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[o]=i}const r=[];for(let o=0;o<e.samples.length;o++){const s=e.samples[o];if(!s)continue;const i=Le(s.timestamp);r[o]={stack_id:s.stackId??0,thread_id:Mc,timestamp:i}}return{frames:t,stacks:n,samples:r,thread_metadata:{[Mc]:{name:oy}}}}function cO(e){const r=v()?.getOptions()?.stackParser;return r?Zv(r,e):[]}function uO(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(L&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(L&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}let sy=!1;const lO=3e4;function dO(e){return typeof e=="function"}function fO(){const e=C.Profiler;if(!dO(e)){L&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(lO/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{L&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),sy=!0}}function pO(e){if(sy)return L&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return L&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return uO(t)?t?Math.random()<=t:(L&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(L&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function jf(e){e.setAttribute("thread.id",Mc),e.setAttribute("thread.name",oy)}const hO=6e4,mO=3e5;class gO{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=pO(t.getOptions());L&&_.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||L&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Pe(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&jf(o)})}start(){if(this._lifecycleMode==="trace"){L&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){L&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){L&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){L&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){L&&_.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled||!t.isRecording())return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(L&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&jf(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,L&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),rr().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){L&&_.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{L&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&rr().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){L&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Re(n))return;if(!n.isRecording()){L&&_.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(L&&_.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;L&&_.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(s=>{L&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,rr().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),mO);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=fO();if(!t){L&&_.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{L&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},hO))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(L&&_.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=sO(n,this._client,this._profilerId),o=iO(r);if("reason"in o){L&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),L&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){L&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=vo(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=ht({event_id:Pe(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Wt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,a=>{L&&_.error("Error while sending profile chunk envelope:",a)})}}const _O="BrowserProfiling",yO=(()=>({name:_O,setup(e){const t=e.getOptions(),n=new gO;t.profileLifecycle||(t.profileLifecycle="manual");const r=he(),o=r&&Re(r),s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!Ye(t)){L&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),C.setTimeout(()=>{const i=he(),a=i&&Re(i);a&&n.notifyRootSpanActive(a)},0)}}})),xL=yO,SO="SpotlightBrowser",bO=[{op:Ls,name:"#sentry-spotlight"},{op:Ls,attributes:{[Wc]:"#sentry-spotlight"}}],vO=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:SO,setup:()=>{L&&_.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...bO]},afterAllSetup:n=>{EO(n,t)}}});function EO(e,t){const n=ku("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Ps(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const ML=vO,OL=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Mr(e)}});function PL(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{$n(e,t.value),Fn(e,t.value)}}}const LL=()=>({name:"OpenFeature",processEvent(e,t,n){return Mr(e)}});class DL{after(t,n){$n(n.flagKey,n.value),Fn(n.flagKey,n.value)}error(t,n,r){$n(t.flagKey,t.defaultValue),Fn(t.flagKey,t.defaultValue)}}const $L=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Oe(t,"isEnabled",wO)},processEvent(t,n,r){return Mr(t)}});function wO(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?($n(n,r),Fn(n,r)):L&&_.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const FL=(({growthbookClass:e})=>F0({growthbookClass:e})),BL=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{$n(n.gate.name,n.gate.value),Fn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Mr(t)}});async function UL(){const e=v();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await mv(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const TO="WebWorker",IO=20,HL=({worker:e})=>({name:TO,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>qf(t))},addWorker:t=>qf(t)});function qf(e){const t=[];e.addEventListener("error",({message:n,filename:r,lineno:o,colno:s})=>{const i=t.findIndex(a=>a.message===n&&a.url===r&&a.lineno===o&&a.colno===s);i!==-1&&(t.splice(0,i+1),bR({msg:n,url:r,line:o,column:s}))}),e.addEventListener("message",n=>{if(AO(n.data)){if(n.stopImmediatePropagation(),n.data._sentryDebugIds&&(L&&_.log("Sentry debugId web worker message received",n.data),C._sentryDebugIds={...n.data._sentryDebugIds,...C._sentryDebugIds}),n.data._sentryModuleMetadata&&(L&&_.log("Sentry module metadata web worker message received",n.data),C._sentryModuleMetadata={...n.data._sentryModuleMetadata,...C._sentryModuleMetadata}),n.data._sentryWasmImages){L&&_.log("Sentry WASM images web worker message received",n.data);const r=C._sentryWasmImages||[],o=n.data._sentryWasmImages.filter(s=>Ue(s)&&typeof s.code_file=="string"&&!r.some(i=>i.code_file===s.code_file));C._sentryWasmImages=[...r,...o]}if(n.data._sentryWorkerError){L&&_.log("Sentry worker error message received",n.data._sentryWorkerError);const{kind:r,message:o,url:s,lineno:i,colno:a}=n.data._sentryWorkerError;r==="error"&&t.push({message:o,url:s,lineno:i,colno:a})>IO&&t.shift(),kO(n.data._sentryWorkerError)}}})}function kO(e){const{reason:t,kind:n,name:r,filename:o,url:s,lineno:i,colno:a,plainError:c}=e,u=n!=="error",l=c&&Ue(t)?CO(t):t;r&&ke(l)&&l.name!==r&&pe(l,"name",r);const f=v();if(!f)return;const{stackParser:d,attachStacktrace:p}=f.getOptions(),h=u&<(l)?qg(l):Ui(d,l,void 0,p,u);u||Gg(h,s||o,i,a),h.level="error",o&&(h.contexts={...h.contexts,worker:{filename:o}}),Io(h,{originalException:l,mechanism:{handled:!1,type:u?"auto.browser.web_worker.onunhandledrejection":"auto.browser.web_worker.onerror"}}),L&&_.log(`Captured worker ${u?"unhandled rejection":"error"}`,l)}function WL({self:e}){Error.stackTraceLimit=50,e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0});const t=n=>{const{reason:r}=n;L&&_.log(`[Sentry Worker] Forwarding ${n.kind} to parent`,n),RO(e,{...n,filename:e.location?.href,name:ke(r)?Ug(r):void 0})};e.addEventListener("error",n=>{const{error:r,message:o,filename:s,lineno:i,colno:a}=n;t({kind:"error",reason:r??o,message:o,url:s,lineno:i,colno:a})}),e.addEventListener("unhandledrejection",n=>{t({kind:"unhandledrejection",reason:jg(n)})}),L&&_.log("[Sentry Worker] Registered worker with error and unhandled rejection handling")}function RO(e,t){try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:t});return}catch{}const{reason:n}=t,r=ke(n),o=r?{message:Hg(n),stack:n.stack}:Te(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:o,plainError:r}})}catch{}}function CO(e){const t=new Error(String(e.message));return t.stack=typeof e.stack=="string"?e.stack:void 0,t}function AO(e){if(!Ue(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(Ue(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Ue(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Ue(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>Ue(s)&&typeof s.code_file=="string")))}function NO(e){return Ue(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function zL(e){const t={...e};wm(t,"react"),Vh("react",{version:_e.version});const n=JC(t);return yp(xO),n}function xO(e){return NO(e)?"[SyntheticEvent]":Kg(e)}function MO(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return ke(o.cause)?(n.add(o),r(o.cause,s)):void 0;o.cause=s}}r(e,t)}function iy(e,{componentStack:t},n){if(ke(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,MO(e,r)}return Pn(e,n)}function jL(e){return(t,n)=>{const r=!!e,o=iy(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const OO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},PO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},LO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},DO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$O=Symbol.for("react.forward_ref"),FO=Symbol.for("react.memo"),Yu={};Yu[$O]=LO;Yu[FO]=DO;function Gf(e){const t=e.$$typeof;return t&&Yu[t]||OO}const BO=Object.defineProperty.bind(Object),UO=Object.getOwnPropertyNames.bind(Object),Vf=Object.getOwnPropertySymbols?.bind(Object),Kf=Object.getOwnPropertyDescriptor.bind(Object),HO=Object.getPrototypeOf.bind(Object),Yf=Object.prototype;function Bo(e,t,n){if(typeof t!="string"){if(Yf){const i=HO(t);i&&i!==Yf&&Bo(e,i)}let r=UO(t);Vf&&(r=r.concat(Vf(t)));const o=Gf(e),s=Gf(t);for(const i of r)if(!PO[i]&&!s?.[i]&&!o?.[i]&&!Kf(e,i)){const a=Kf(t,i);if(a)try{BO(e,i,a)}catch{}}}return e}const ur="unknown";class ay extends _e.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;if(r)return;const o=v(),s=!!o&&V(o),i=`<${n}>`,a=n===ur?void 0:n;this._mountSpan=yt({name:s?a||Bh:i,onlyIfParent:!0,attributes:{[H]:Dh,[re]:"auto.ui.react.profiler",...a&&{[Nt]:a},...s&&{[Jr]:i}}})}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=fe();this._updateSpan=sn(this._mountSpan,()=>{const s=v(),i=!!s&&V(s),a=`<${this.props.name}>`,c=this.props.name===ur?void 0:this.props.name;return yt({name:i?c||jv:a,onlyIfParent:!0,startTime:o,attributes:{[H]:Pv,[re]:"auto.ui.react.profiler",...c&&{[Nt]:c},"ui.react.changed_props":r,...i&&{[Jr]:a}}})})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=fe(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=ne(this._mountSpan).end_timestamp;sn(this._mountSpan,()=>{const s=v(),i=!!s&&V(s),a=`<${n}>`,c=n===ur?void 0:n,u=yt({onlyIfParent:!0,name:i?c||Uh:a,startTime:o,attributes:{[H]:Lh,[re]:"auto.ui.react.profiler",...c&&{[Nt]:c},...i&&{[Jr]:a}}});u&&u.end(t)})}}render(){return this.props.children}}Object.assign(ay,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function qL(e,t){const n=t?.name||e.displayName||e.name||ur,r=o=>_e.createElement(ay,{...t,name:n,updateProps:o},_e.createElement(e,{...o}));return r.displayName=`profiler(${n})`,Bo(r,e),r}function GL(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=_e.useState(()=>{if(t?.disabled)return;const r=v(),o=!!r&&V(r),s=`<${e}>`,i=e===ur?void 0:e;return yt({name:o?i||Bh:s,onlyIfParent:!0,attributes:{[H]:Dh,[re]:"auto.ui.react.profiler",...i&&{[Nt]:i},...o&&{[Jr]:s}}})});_e.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=ne(n).end_timestamp,o=fe(),s=v(),i=!!s&&V(s),a=`<${e}>`,c=e===ur?void 0:e,u=yt({name:i?c||Uh:a,onlyIfParent:!0,startTime:r,attributes:{[H]:Lh,[re]:"auto.ui.react.profiler",...c&&{[Nt]:c},...i&&{[Jr]:a}}});u&&u.end(o)}}),[])}const Ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WO="unknown",Ba={componentStack:null,error:null,eventId:null};class zO extends _e.Component{constructor(t){super(t),this.state=Ba,this._openFallbackReportDialog=!0;const n=v();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Jd({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Je(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,l=iy(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,l),i&&(this._lastEventId=l,this._openFallbackReportDialog&&Jd({...a,eventId:l})),this.setState({error:t,componentStack:r,eventId:l})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===Ba?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(Ba)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?_e.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return _e.isValidElement(o)?o:(t&&Ce&&_.warn("fallback did not produce a valid ReactElement"),null)}}function VL(e,t){const n=e.displayName||e.name||WO,r=_e.memo(o=>_e.createElement(zO,{...t},_e.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,Bo(r,e),r}const jO="redux.action",qO="info",GO={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function KL(e){const t={...GO,...e};return n=>(r,o)=>{t.attachReduxState&&rr().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const l=a(c,u),f=q(),d=t.actionTransformer(u);typeof d<"u"&&d!==null&&Et({category:jO,data:d,type:qO});const p=t.stateTransformer(l);if(typeof p<"u"&&p!==null){const y=v()?.getOptions()?.normalizeDepth||3,S={state:{type:"redux",value:p}};Wy(S,3+y),f.setContext("state",S)}else f.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(f,l),l}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function YL(e){const t=$o({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&C.location&&Xf(r,C.location,o,(c,u="url")=>{Fo(a,{name:u==="route"||!V(a)?c:Lt,attributes:{[H]:wo,[re]:"auto.pageload.react.reactrouter_v3",[ce]:u,...u==="route"&&{[We]:c}}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&Xf(r,c,o,(u,l="url")=>{Tr(a,{name:l==="route"||!V(a)?u:dt,attributes:{[H]:xr,[re]:"auto.navigation.react.reactrouter_v3",[ce]:l,...l==="route"&&{[We]:u}}})})})}}}function Xf(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=VO(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function VO(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function XL(e,t={}){const n=e,r=$o({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=(l,f)=>{const d=n.matchRoutes(l,f,{preload:!1,throwOnError:!1}),p=d[d.length-1];return p?.routeId!=="__root__"?p:void 0},c=(l,f,d,p)=>{l.updateName(f?f.routeId:p),l.setAttribute(ce,f?"route":"url"),l.setAttributes({...f&&{[We]:f.routeId},...KO(n,d),...Ua(f)})},u=C.location;if(o&&u){const l=n.state?.location,f=l?a(l.pathname,l.search):a(u.pathname,n.options.parseSearch(u.search)),d=Fo(i,{name:f?f.routeId:V(i)?Lt:u.pathname,attributes:{[H]:wo,[re]:"auto.pageload.react.tanstack_router",[ce]:f?"route":"url",...f&&{[We]:f.routeId},...Ua(f)}}),p=n.subscribe("onResolved",h=>{if(p(),!d)return;const{toLocation:m}=h,g=a(m.pathname,m.search);c(d,g,m,V(i)?Lt:m.pathname)})}if(s){let l;n.subscribe("onBeforeLoad",f=>{const{toLocation:d,fromLocation:p}=f;if(!p||d.state===p.state)return;const h=a(d.pathname,d.search),m=V(i)?dt:C.location?.pathname||d.pathname;if(l){c(l,h,d,m);return}l=Tr(i,{name:h?h.routeId:m,attributes:{[H]:xr,[re]:"auto.navigation.react.tanstack_router",[ce]:h?"route":"url",...h&&{[We]:h.routeId},...Ua(h)}},{url:cy(n,d)})}),n.subscribe("onResolved",f=>{const d=l;if(l=void 0,!d)return;const{toLocation:p}=f,h=a(p.pathname,p.search);h&&c(d,h,p,V(i)?dt:C.location?.pathname||p.pathname)})}}}}function cy(e,t){const n=e.options.stringifySearch?.(t.search)??"",r=`${t.pathname}${n&&n!=="?"?n:""}`;return SR(r)}function KO(e,t){const n=cy(e,t);return{[Si]:t.pathname,[De]:be(n)}}function Ua(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`${QS}.${n}`]=r,t[`${$S}.${n}`]=r}),t}function JL(e){const t=$o({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),uy(a,s,i,n,"reactrouter_v4",r,o)}}}function QL(e){const t=$o({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),uy(a,s,i,n,"reactrouter_v5",r,o)}}}function uy(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(C.location)return C.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const l=ly(s,u,i);for(const f of l)if(f.match.isExact)return[f.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[l,f]=c(u);Fo(e,{name:f==="route"||!V(e)?l:Lt,attributes:{[H]:wo,[re]:`auto.pageload.react.${o}`,[ce]:f,...f==="route"&&{[We]:l}}})}}n&&r.listen&&r.listen((u,l)=>{if(l&&(l==="PUSH"||l==="POP")){const[f,d]=c(u.pathname);Tr(e,{name:d==="route"||!V(e)?f:dt,attributes:{[H]:xr,[re]:`auto.navigation.react.${o}`,[ce]:d,...d==="route"&&{[We]:f}}})}})}function ly(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:YO(t);return s&&(r.push({route:o,match:s}),o.routes&&ly(o.routes,t,n,r)),!!s}),r}function YO(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function ZL(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=XO();q().setTransactionName(o),s&&(s.updateName(o),s.setAttributes({[ce]:"route",[We]:o}))}return _e.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,Bo(n,e),n}function XO(){const e=he(),t=e&&Re(e);if(!t)return;const n=ne(t).attributes[H];return n==="navigation"||n==="pageload"?t:void 0}function Br(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}const Jf=new WeakMap;function JO(e,t,n){if(!e||!t?.length)return null;const r=n?Br(e,n):e;let o=Jf.get(t);o||(o=rP(t),Jf.set(t,o),Ce&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(QO(r,s))return Ce&&_.log("[React Router] Matched pathname",r,"to pattern",s),s;return Ce&&_.log("[React Router] No manifest match found for pathname:",r),null}function QO(e,t){if(t==="/")return e==="/"||e==="";const n=Zf(e),r=Zf(t);if(r.length>0&&r[r.length-1]==="*"){const s=r.slice(0,-1);if(n.length<s.length)return!1;for(const[i,a]of s.entries())if(!Qf(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!Qf(n[s],i))return!1;return!0}function Qf(e,t){return e===void 0||t===void 0?!1:dy.test(t)?!0:e===t}function Zf(e){return e.split("/").filter(Boolean)}const dy=/^:[\w-]+$/,ZO=10,eP=3,tP=1,nP=-2;function ep(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=nP);for(const r of t)r!=="*"&&(dy.test(r)?n+=eP:r===""?n+=tP:n+=ZO);return n}function rP(e){return[...e].sort((t,n)=>{const r=ep(t);return ep(n)-r})}const nn=[],oP=10;function sP(e,t){const n={};return nn.length>=oP&&(Ce&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),nn.shift()),nn.push({token:n,targetPath:e,span:t}),n}function iP(e){nn[nn.length-1]?.token===e&&nn.pop()}function fy(){const e=nn.length;return e>0?nn[e-1]??null:null}function aP(e){return hy(e.route.path||"")}function py(e){return e.params["*"]||""}function hy(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function An(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function my(e){return e.endsWith("*")}function an(e){return e.includes("/*")||e.endsWith("*")}function tp(e,t){return my(e)&&!!t.route.children?.length||!1}function gy(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function cP(e,t,n,r){const o=e&&e.length>0?e:r?Br(t,n):t;let s=o.slice(-2)==="/*"?o.slice(0,-2):o;return s.length>1&&s[s.length-1]==="/"&&(s=s.slice(0,-1)),[s,"route"]}function np(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Qt(e){return e[0]==="/"?e:`/${e}`}function Xu(e,t,n){const r=n(e,t);if(!r||r.length===0)return"";for(const o of r)if(o.route.path&&o.route.path!=="*"){const s=aP(o),i=Br(t.pathname,Qt(o.pathnameBase));return t.pathname===i?An(i):An(An(s||"")+Qt(Xu(e.filter(a=>a!==o.route),{pathname:i},n)))}return""}function uP(e,t,n,r){const o=t.filter(gy);if(!o.length)return;const s=r(o,e),i=s?.[s.length-1];if(!i||!py(i))return;const a=An(hy(i.route.path||""));if(!a)return;const c=Qt(a),u=a.split("/")[0],l=u?.startsWith(":")&&n?.split("/").includes(u);if(n===c||n?.startsWith(`${c}/`)||l)return;const f=Br(e.pathname,Qt(i.pathnameBase))||"/",d=Xu(t.filter(p=>p!==i.route),{pathname:f},r);return d?Qt(`${a}${Qt(d)}`):void 0}function Uo(e){const t=new Set(e.flatMap(n=>n.children??[]));return e.filter(n=>!t.has(n))}function lP(e,t,n){return _y(n(Uo(t),e))}function _y(e){return!!e?.some(t=>gy(t.route)&&py(t))}function rp(e,t,n){return n?Br(e.pathname,t):e.pathname||""}function dP(e,t,n,r="",o=!1){if(!e||e.length===0)return[o?Br(t.pathname,r):t.pathname,"url"];if(!n)return[rp(t,r,o),"url"];let s="";for(const i of n){const a=i.route;if(!a)continue;if(a.index)return cP(s,i.pathname,r,o);const c=a.path;if(!c||tp(c,i))continue;const u=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s=An(s)+Qt(u),An(t.pathname)===An(r+i.pathname))return np(s)!==np(i.pathname)&&!my(s)?[(o?"":r)+u,"route"]:(tp(s,i)&&(s=s.slice(0,-1)),[(o?"":r)+s,"route"])}return[rp(t,r,o),"url"]}function Yi(e,t,n,r,o){const{matchRoutes:s,stripBasename:i,basename:a,lazyRouteManifest:c,enableAsyncRouteHandlers:u}=o;if(u&&c&&c.length>0){const h=JO(e.pathname,c,a);if(h)return[(i?"":a)+h,"route"]}let l,f="url";const d=a?lP(e,n,s):_y(r);d&&(l=Qt(Xu(n,e,s)),f="route"),(!d||!l)&&([l,f]=dP(t,e,r,a,i));const p=uP(e,n,l,s);return p?[p,"route"]:[l||e.pathname,f]}function wt(){const e=he(),t=e?Re(e):void 0;if(!t)return;const n=ne(t).attributes[H];return n==="navigation"||n==="pageload"?t:void 0}function fP(){const e=fy();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof C<"u")try{const t=C.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Ce&&_.warn("[React Router] Could not access window.location")}return null}function pP(){const e=fy();return e?e.span:wt()}function hP(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=fP(),u=pP(),l=s.apply(i,a);return mP(l,t,n,r,c,u),l}});return pe(o,"__sentry_proxied__",!0),o}function mP(e,t,n,r,o,s){Pt(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Ce&&_.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function Xi(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=hP(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)Xi(n,t)}const yy=new WeakMap;function Ji(e){return e?yy.get(e):void 0}const li=C?.document?_e.useLayoutEffect:_e.useEffect,In=new WeakMap,Ae=new Set,Ts=new WeakMap,Oc=new WeakMap;function gP(e){return C?.requestAnimationFrame?C.requestAnimationFrame(e):setTimeout(e,0)}function op(e){C?.cancelAnimationFrame?C.cancelAnimationFrame(e):clearTimeout(e)}function Sy(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function sp(e){return e.includes(":")||e.includes("*")}function _P(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const s=!!e.routeName&&an(e.routeName),i=an(n),a=!!e.routeName&&sp(e.routeName),c=sp(n),u=s&&!i,l=!a&&c,f=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!i;return{skip:!0,shouldUpdate:!!(e.routeName&&(u||l||f))}}return{skip:!1,shouldUpdate:!1}}function by(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}function vy(e,t){let n=Ts.get(e);n||(n=new Set,Ts.set(e,n)),n.add(t),t.finally(()=>{const r=Ts.get(e);r&&r.delete(t)})}function Ey(e){const t=new Promise(n=>{Oc.set(e,n)});vy(e,t)}function yP(e){const t=Oc.get(e);t&&(t(),Oc.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function Ju(e,t,n,r=null,o){e.forEach(i=>{Ae.add(i),t.enableAsyncRouteHandlers&&Xi(i,(a,c,u,l)=>Ju(a,t,c,u,l))}),n&&by(e,n);const s=o??wt();if(s){const{end_timestamp:i,attributes:a}=ne(s);if(i){Ce&&_.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const c=a[H];let u=r;if(!u&&!o&&typeof C<"u"){const l=C.location;l?.pathname&&(u={pathname:l.pathname})}u&&(c==="pageload"?Wo({activeRootSpan:s,location:{pathname:u.pathname},routes:Array.from(Ae),allRoutes:Array.from(Ae),config:t}):c==="navigation"&&Pc(s,u,Array.from(Ae),!1,t))}}function Pc(e,t,n,r=!1,o){const{name:s,end_timestamp:i,attributes:a}=ne(e),c=e?.__sentry_navigation_pathname__;if(c!==void 0&&c!==t.pathname){Ce&&_.log(`[React Router] Not renaming the navigation span for "${c}" with the route of "${t.pathname}"`);return}const u=e?.__sentry_navigation_name_set__,l=s&&an(s);if((!u||r||l)&&!i){const d=o.matchRoutes(Uo(n),t),[p,h]=Yi(t,n,n,d||[],o),m=a[ce];if(p&&(!s||!u&&(m!=="route"||h==="route")||m!=="route"&&h==="route"||m==="route"&&h==="route"&&l)){const y=v(),S=h!=="route"&&!!y&&V(y);e.updateName(S?dt:p),e.setAttribute(ce,h),h==="route"&&e.setAttribute(We,p),!an(p)&&h==="route"&&pe(e,"__sentry_navigation_name_set__",!0)}}}function wy(e,t,n,r,o){let s=!1,i=!!r&&ne(r).attributes[H]==="pageload",a=!1,c=null,u=null;e.subscribe(l=>{if(!s){const d=wt();d&&ne(d).attributes[H]==="pageload"?i=!0:i&&(l.historyAction==="POP"&&!a?a=!0:s=!0)}if(l.historyAction==="PUSH"||l.historyAction==="POP"&&s){const d=Sy(l.location),p=()=>{u!==d&&(u=d,c=null,nl({location:l.location,routes:t,navigationType:l.historyAction,version:n,allRoutes:Array.from(Ae),config:o}))};l.navigation.state!=="idle"?(u!==d&&(u=null),c!==null&&op(c),c=gP(p)):(c!==null&&(op(c),c=null),p())}})}function Qu(e,t){return function(n,r){const o=Ji(v());if(!o)return Ce&&_.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createRouter\` function because the React Router browser tracing integration was not set up. Make sure \`Sentry.init()\` runs before the router is created.`),e(n,r);const s={...o,basename:r?.basename||""};if(Ho(n),s.enableAsyncRouteHandlers)for(const l of n)Xi(l,(f,d,p,h)=>Ju(f,s,d,p,h));const i=wt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(pe(i,"__sentry_may_have_lazy_routes__",!0),Ey(i));const c=Ty(r,!1,i,s),u=e(n,c);return u.state.historyAction==="POP"&&i&&Wo({activeRootSpan:i,location:u.state.location,routes:n,allRoutes:Array.from(Ae),config:s}),wy(u,n,t,i,s),u}}function Zu(e,t){return function(n,r){const o=Ji(v());if(!o)return Ce&&_.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createMemoryRouter\` function because the React Router browser tracing integration was not set up. Make sure \`Sentry.init()\` runs before the router is created.`),e(n,r);const s={...o,basename:r?.basename||""};if(Ho(n),s.enableAsyncRouteHandlers)for(const y of n)Xi(y,(S,T,b,M)=>Ju(S,s,T,b,M));const i=wt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&i&&(pe(i,"__sentry_may_have_lazy_routes__",!0),Ey(i));const c=Ty(r,!0,i,s),u=e(n,c);let l;const f=r?.initialEntries,d=r?.initialIndex,p=f?.length===1,h=d!==void 0&&f?.[d];l=p?f[0]:h?f[d]:void 0;const m=l?typeof l=="string"?{pathname:l}:l:u.state.location,g=wt();return u.state.historyAction==="POP"&&g&&Wo({activeRootSpan:g,location:m,routes:n,allRoutes:Array.from(Ae),config:s}),wy(u,n,t,g,s),u}}function el(e,t){const n=$o({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a,enableAsyncRouteHandlers:c=!1,instrumentPageLoad:u=!0,instrumentNavigation:l=!0,lazyRouteTimeout:f,lazyRouteManifest:d}=e;return Mb(n,{setup(p){const h=e.finalTimeout??3e4,m=(e.idleTimeout??1e3)*3,g=f??m;let y;g===1/0?(y=h,Ce&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",h,"ms to prevent indefinite hangs")):Number.isNaN(g)?(Ce&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",m),y=m):g<0?(Ce&&_.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",g,"falling back to:",m),y=m):y=g,typeof r=="function"&&typeof o=="function"&&typeof s=="function"&&typeof i=="function"?yy.set(p,{useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a||!1,enableAsyncRouteHandlers:c,instrumentNavigation:l,lazyRouteTimeout:y,lazyRouteManifest:d,basename:""}):Ce&&_.warn("[React Router] Skipping route instrumentation because `useLocation`, `useNavigationType`, `createRoutesFromChildren` or `matchRoutes` was not provided. Pass them to `reactRouterBrowserTracingIntegration`, or import it from `@sentry/react/react-router` to have them supplied automatically.")},afterAllSetup(p){const h=C.location?.pathname;u&&h&&Fo(p,{name:V(p)?Lt:h,attributes:{[ce]:"url",[H]:wo,[re]:`auto.pageload.react.reactrouter${t?`_v${t}`:""}`}})}})}function tl(e,t){const n=({config:o,routes:s,locationArg:i})=>{const a=_e.useRef(!0),c=o.useLocation(),u=o.useNavigationType(),l=typeof i=="string"||i?.pathname?i:c;return li(()=>{const f=Ho(s);return()=>Iy(f)}),li(()=>{const f=typeof l=="string"?{pathname:l}:l;a.current?(Wo({activeRootSpan:wt(),location:f,routes:s,allRoutes:Array.from(Ae),config:o}),a.current=!1):nl({location:f,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ae),config:o})},[u,l]),null},r=({routes:o,locationArg:s})=>{const i=Ji(v()),a=e(o,s);return _e.createElement(_e.Fragment,null,a,i?_e.createElement(n,{config:i,routes:o,locationArg:s}):null)};return(o,s)=>_e.createElement(r,{routes:o,locationArg:s})}function Ty(e,t,n,r){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const o=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async s=>{const i=s?.path,a=wt()??n;if(!t){const u=s?.patch,l=s?.matches;u&&(s.patch=(f,d)=>{if(Ho(d),l&&l.length>0){const m=l[l.length-1]?.route;if(m){const g=Array.from(Ae).find(y=>{const S=y.id!==void 0&&y.id===f,T=y===m,b=y.path!==void 0&&m.path!==void 0&&y.path===m.path;return S||T||b});g&&by(d,g)}}const p=a?ne(a):void 0;return i&&a&&p&&!p.end_timestamp&&p.attributes[H]==="navigation"&&Pc(a,{pathname:i,search:"",hash:"",state:null,key:"default"},Array.from(Ae),!0,r),u(f,d)})}const c=(async()=>{const u=sP(i,a);let l;try{l=await o(s)}finally{iP(u),a&&yP(a)}const f=a?ne(a):void 0;if(a&&f&&!f.end_timestamp&&f.attributes[H]==="navigation"){const d=i;d&&Pc(a,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from(Ae),!1,r)}return l})();return a&&vy(a,c),c}}}function nl(e){const{location:t,routes:n,navigationType:r,version:o,config:s,matches:i,allRoutes:a}=e,c=Array.isArray(i)?i:s.matchRoutes(Uo(a||n),t,s.basename),u=v();if(!u||!s.instrumentNavigation)return;const l=wt();if(!(l&&ne(l).attributes[H]==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[f,d]=Yi(t,a||n,a||n,c,s),p=Sy(t),h=In.get(u),m=h&&!h.isPlaceholder?!!ne(h.span).end_timestamp:!1,{skip:g,shouldUpdate:y}=_P(h,p,f,m);if(g){if(y&&h){const M=h.routeName;if(h.isPlaceholder)h.routeName=f,Ce&&_.log(`[Tracing] Updated placeholder navigation name from "${M}" to "${f}" (will apply to real span)`);else{const I=d!=="route"&&V(u);h.span.updateName(I?dt:f),h.span.setAttribute(ce,d),d==="route"&&h.span.setAttribute(We,f),pe(h.span,"__sentry_navigation_name_set__",!0),h.routeName=f,Ce&&_.log(`[Tracing] Updated navigation span name from "${M}" to "${f}"`)}}else Ce&&_.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const T={span:{end:()=>{}},routeName:f,pathname:t.pathname,locationKey:p,isPlaceholder:!0};In.set(u,T);let b;try{b=Tr(u,{name:d==="route"||!V(u)?T.routeName:dt,attributes:{[ce]:d,[H]:xr,[re]:`auto.navigation.react.reactrouter${o?`_v${o}`:""}`,...d==="route"&&{[We]:T.routeName}}})}catch(M){throw In.delete(u),M}b?(pe(b,"__sentry_navigation_pathname__",t.pathname),In.set(u,{span:b,routeName:T.routeName,pathname:t.pathname,locationKey:p}),Lc(b,t,n,"navigation",s)):In.delete(u)}}function Ho(e){const t=[];return e.forEach(n=>{ky(n).forEach(o=>{Ae.add(o),t.push(o)})}),t}function Iy(e){e.forEach(t=>{Ae.delete(t)})}function ky(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{ky(n,t).forEach(o=>{t.add(o)})})),t}function Wo({activeRootSpan:e,location:t,routes:n,config:r,matches:o,allRoutes:s}){const i=Array.isArray(o)?o:r.matchRoutes(Uo(s||n),t,r.basename);if(i){const[a,c]=Yi(t,s||n,s||n,i,r);if(q().setTransactionName(a||"/"),e){const u=v(),l=c!=="route"&&!!u&&V(u);e.updateName(l?Lt:a),e.setAttribute(ce,c),c==="route"&&e.setAttribute(We,a),Lc(e,t,n,"pageload",r)}}else e&&Lc(e,t,n,"pageload",r)}function SP(e,t,n,r,o=!1){return n?!!(!e&&o||e&&an(e)&&r==="route"&&!an(n)||t!=="route"&&r==="route"):!1}function Ha(e,t,n,r,o,s,i,a){try{const c=t.attributes[ce];if(c==="route"&&n&&!an(n))return;const u=Array.from(i),l=u.length>0?u:o,f=a.matchRoutes(Uo(l),r,a.basename);if(!f)return;const[d,p]=Yi(r,l,l,f,a),h=SP(n,c,d,p,!0),m=s==="pageload"||!t.end_timestamp;if(h&&m){const g=v(),y=p!=="route"&&!!g&&V(g),S=s==="pageload"?Lt:dt;e.updateName(y?S:d),e.setAttribute(ce,p),p==="route"&&e.setAttribute(We,d)}}catch(c){Ce&&_.warn(`Error updating span details before ending: ${c}`)}}function Lc(e,t,n,r,o){const s=`__sentry_${r}_end_patched__`;if(e?.[s]||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...l){if(c)return;c=!0;const f=l.length>0?l[0]:Date.now()/1e3,d=ne(e),p=d.name,h=d.attributes[ce],m=()=>{const b=v();b&&r==="navigation"&&In.get(b)?.span===e&&In.delete(b)},g=Ts.get(e),y=e.__sentry_may_have_lazy_routes__;if((g&&g.size>0||y)&&p&&(an(p)||h!=="route")){if(o.lazyRouteTimeout===0){Ha(e,d,p,t,n,r,Ae,o),m(),a(f);return}const b=new Promise(I=>setTimeout(I,o.lazyRouteTimeout));let M;if(g&&g.size>0){const I=Promise.allSettled(g).then(()=>{});M=o.lazyRouteTimeout===1/0?I:Promise.race([I,b])}else M=b;M.then(()=>{const I=ne(e);Ha(e,I,I.name,t,n,r,Ae,o),m(),a(f)}).catch(()=>{m(),a(f)});return}Ha(e,d,p,t,n,r,Ae,o),m(),a(f)},pe(e,s,!0)}function rl(e,t){const n=({config:o,routeChildren:s})=>{const i=_e.useRef(!0),a=o.useLocation(),c=o.useNavigationType(),u=o.createRoutesFromChildren(s);return li(()=>{const l=Ho(u);return()=>Iy(l)}),li(()=>{i.current?(Wo({activeRootSpan:wt(),location:a,routes:u,allRoutes:Array.from(Ae),config:o}),i.current=!1):nl({location:a,routes:u,navigationType:c,version:t,allRoutes:Array.from(Ae),config:o})},[a,c]),null},r=o=>{const s=Ji(v());return _e.createElement(_e.Fragment,null,_e.createElement(e,{...o}),s?_e.createElement(n,{config:s,routeChildren:o.children}):null)};return Bo(r,e),r}function eD(e){return el(e,"6")}function tD(e){return tl(e,"6")}function nD(e){return Qu(e,"6")}function rD(e){return Zu(e,"6")}function oD(e){return rl(e,"6")}function sD(e){return el(e,"7")}function iD(e){return rl(e,"7")}function aD(e){return Qu(e,"7")}function cD(e){return Zu(e,"7")}function uD(e){return tl(e,"7")}function lD(e){return el(e,"")}function dD(e){return rl(e,"")}function fD(e){return Qu(e,"")}function pD(e){return Zu(e,"")}function hD(e){return tl(e,"")}export{$R as BrowserClient,zO as ErrorBoundary,fa as MULTIPLEXED_TRANSPORT_EXTRA_KEY,DL as OpenFeatureIntegrationHook,ay as Profiler,Zt as SDK_VERSION,EP as SEMANTIC_ATTRIBUTE_SENTRY_OP,wP as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,jc as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,bt as Scope,C as WINDOW,Et as addBreadcrumb,pE as addEventProcessor,El as addIntegration,AL as bfcacheMetricsIntegration,xP as bindScopeToEmitter,hC as breadcrumbsIntegration,TC as browserApiErrorsIntegration,xL as browserProfilingIntegration,NC as browserSessionIntegration,$o as browserTracingIntegration,PL as buildLaunchDarklyFlagUsedHandler,qP as captureConsoleIntegration,Io as captureEvent,Pn as captureException,nT as captureFeedback,lE as captureMessage,iy as captureReactException,ia as captureSession,QR as chromeStackLineParser,HP as close,O0 as consoleIntegration,ZP as consoleLoggingIntegration,SL as contextLinesIntegration,CP as continueTrace,iL as createCachedRouteProvider,tL as createConsolaReporter,KL as createReduxEnhancer,LE as createTransport,Kk as createUrlRouteProvider,hL as createUserFeedbackEnvelope,OC as cultureContextIntegration,Gw as dedupeIntegration,Z_ as defaultRequestInstrumentationOptions,uC as defaultStackLineParsers,lC as defaultStackParser,UL as diagnoseSdkConnectivity,rL as elementTimingIntegration,Kh as endSession,kw as eventFiltersIntegration,MR as eventFromException,OR as eventFromMessage,Au as exceptionFromError,GP as extraErrorDataIntegration,JP as featureFlagsIntegration,cL as feedbackAsyncIntegration,uL as feedbackIntegration,uL as feedbackSyncIntegration,CL as fetchStreamPerformanceIntegration,UP as flush,mL as forceLoad,ww as functionToStringIntegration,nC as geckoStackLineParser,SR as getAbsoluteUrl,he as getActiveSpan,v as getClient,q as getCurrentScope,XC as getDefaultIntegrations,nL as getFeedback,rr as getGlobalScope,me as getIsolationScope,TL as getReplay,Re as getRootSpan,wu as getRouteProvider,ds as getSpanDescendants,ib as getSpanStatusFromHttpCode,Tm as getTraceData,DC as globalHandlersIntegration,bL as graphqlClientIntegration,FL as growthbookIntegration,yL as httpClientIntegration,UC as httpContextIntegration,zL as init,AM as instrumentOutgoingRequests,g0 as instrumentSupabaseClient,oL as interactionsIntegration,xg as isBotUserAgent,fE as isEnabled,WP as isInitialized,dE as lastEventId,OL as launchDarklyIntegration,kR as lazyLoadIntegration,qC as linkedErrorsIntegration,QP as logger,NL as makeBrowserOfflineTransport,Wg as makeFetchTransport,zP as makeMultiplexedTransport,eL as metrics,jP as moduleMetadataIntegration,Kg as normalizeStringifyValue,gL as onLoad,LL as openFeatureIntegration,fL as opera10StackLineParser,pL as opera11StackLineParser,hw as parameterize,jL as reactErrorHandler,lD as reactRouterBrowserTracingIntegration,YL as reactRouterV3BrowserTracingIntegration,JL as reactRouterV4BrowserTracingIntegration,QL as reactRouterV5BrowserTracingIntegration,eD as reactRouterV6BrowserTracingIntegration,sD as reactRouterV7BrowserTracingIntegration,Ib as registerSpanErrorInstrumentation,WL as registerWebWorker,IL as replayCanvasIntegration,wL as replayIntegration,kL as reportPageLoaded,_L as reportingObserverIntegration,Vk as resolveCurrentRoute,sL as resolveRoute,VP as rewriteFramesIntegration,HT as sendFeedback,RL as setActiveSpanInBrowser,$P as setAttribute,DP as setAttributes,Vh as setContext,BP as setConversationId,QE as setCurrentClient,OP as setExtra,MP as setExtras,Cs as setHttpStatus,vh as setMeasurement,Gk as setRouteProvider,LP as setTag,PP as setTags,FP as setUser,Jd as showReportDialog,rv as spanStreamingIntegration,IP as spanToBaggageHeader,ne as spanToJSON,Ne as spanToStaticSpanJSON,Eb as spanToTraceHeader,ML as spotlightBrowserIntegration,Tr as startBrowserTracingNavigationSpan,Fo as startBrowserTracingPageLoadSpan,yt as startInactiveSpan,gv as startNewTrace,Wl as startSession,AP as startSpan,NP as startSpanManual,BL as statsigIntegration,KP as supabaseIntegration,mv as suppressTracing,XL as tanstackRouterBrowserTracingIntegration,XP as thirdPartyErrorFilterIntegration,lL as uiProfiler,$L as unleashIntegration,TP as updateSpanName,GL as useProfiler,aL as userTimingIntegration,vL as viewHierarchyIntegration,LM as webVitalsIntegration,HL as webWorkerIntegration,dL as winjsStackLineParser,sn as withActiveSpan,VL as withErrorBoundary,vP as withIsolationScope,qL as withProfiler,Je as withScope,oD as withSentryReactRouterV6Routing,iD as withSentryReactRouterV7Routing,ZL as withSentryRouting,kP as withStaticSpan,RP as withStreamedSpan,fD as wrapCreateBrowserRouter,nD as wrapCreateBrowserRouterV6,aD as wrapCreateBrowserRouterV7,pD as wrapCreateMemoryRouter,rD as wrapCreateMemoryRouterV6,cD as wrapCreateMemoryRouterV7,dD as wrapReactRouterRouting,hD as wrapUseRoutes,tD as wrapUseRoutesV6,uD as wrapUseRoutesV7,YP as zodErrorsIntegration};
|