tokentracker-cli 1.4.6 → 1.4.9
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/README.md +9 -1
- package/README.zh-CN.md +1 -1
- package/bin/tracker.js +6 -0
- package/dashboard/dist/assets/{AchievementBadge-BmWRsZMx.js → AchievementBadge-_dRLgxnp.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-CyIP2nck.js → AchievementsPage-DtvlZLlv.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BeNyJ0LW.js → AchievementsSection-OgzKkbes.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-DIFnFzkv.js → BadgeDetailModal-D4Rlm_um.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-CKVeJHit.js → BotAnimated-errJ5IvB.js} +1 -1
- package/dashboard/dist/assets/{Card-lQmyKbh4.js → Card-esELVQcD.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-B_8y6dyX.js → CloudCheckoutPage-3sH4Dbx9.js} +1 -1
- package/dashboard/dist/assets/CloudPage-Bi_vgiqE.js +2 -0
- package/dashboard/dist/assets/{CommandPalette-BV9LqokI.js → CommandPalette-I0aze2EJ.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-WELxKEFc.js → CommunityStatsModal-CEn2g4J9.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-B8H5o8c_.js → ConfirmModal-D7SfFCaf.js} +1 -1
- package/dashboard/dist/assets/{Controls-9ynPx9rF.js → Controls-Dyb5Vmk_.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-CMHX8zDq.js +1 -0
- package/dashboard/dist/assets/{DateRangePopover-DEqWsV_8.js → DateRangePopover-CgmxsHVR.js} +1 -1
- package/dashboard/dist/assets/DevicePage-9R2MfK2Z.js +1 -0
- package/dashboard/dist/assets/{DialogClose-Dlg52bL6.js → DialogClose-DzR109OA.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CdNjUDLZ.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-CduwXjqH.js → DialogTitle-BLH1MgOX.js} +1 -1
- package/dashboard/dist/assets/{ElectricLogo-DFt7_F2f.js → ElectricLogo-DcpBcJIy.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DlyusE6n.js → FadeIn-CBAXe_zb.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-tUtJoFHh.js → HeaderGithubStar-BZjQ3uJo.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-v-zkCqsX.js → HoverTooltip-Bq4HuWOZ.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-C5Y1uVEr.js → IpCheckPage-Oiah1-YB.js} +1 -1
- package/dashboard/dist/assets/LandingPage-Cc1FfkWg.js +2 -0
- package/dashboard/dist/assets/{LeaderboardPage-BBZ_6tCw.js → LeaderboardPage-Bc2j_DQY.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-DakoXIQn.js → LeaderboardProBadge-w1olVHVp.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-CINpES_x.js → LeaderboardProfileModal-mgG7mdl8.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-B6ISf-1l.js → LeaderboardProfilePage-DqxyooT5.js} +1 -1
- package/dashboard/dist/assets/LimitsPage-BIvK0GFj.js +6 -0
- package/dashboard/dist/assets/{LocalOnlyNotice-BJSsmXF1.js → LocalOnlyNotice-DZLgI75v.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-Dggv2aGv.js → LoginCard-DVNU_QtS.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-B8qDd2kY.js → LoginModal-yxi5pCwC.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-Dv66U8yJ.js → LoginPage-CW9pu4mf.js} +1 -1
- package/dashboard/dist/assets/{PetPage-CNwrQdKM.js → PetPage-DwZsq4nC.js} +2 -2
- package/dashboard/dist/assets/{PopoverPopup-CqmvpYOi.js → PopoverPopup-DYGmmoD8.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-BF2Ch7wi.js → ProviderIcon-BKfj89GN.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-B0R8VUU3.js → ResetPasswordPage-gQdgCp9s.js} +1 -1
- package/dashboard/dist/assets/{Select-idAiBnJG.js → Select-DvSR56Lj.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-DPmmPY_D.js → SelectItemText-DXo30s3O.js} +1 -1
- package/dashboard/dist/assets/{SelfHostPage-oR9cPK02.js → SelfHostPage-jA51Nckw.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-CdV9gfGF.js → ServiceStatusPage-DEkRRPx8.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-BkD34VlL.js → SessionsPage-J7hvGPCj.js} +3 -3
- package/dashboard/dist/assets/SettingsPage-ewH1Mzsm.js +5 -0
- package/dashboard/dist/assets/{SkillsPage-CzMk9s3x.js → SkillsPage-BaeBHhU7.js} +1 -1
- package/dashboard/dist/assets/TokenGalaxy-D52pHpzj.js +4426 -0
- package/dashboard/dist/assets/TooltipPopup-mLpESQcv.js +1 -0
- package/dashboard/dist/assets/TrendMonitor-ErowR5GE.js +19 -0
- package/dashboard/dist/assets/{WidgetsPage-Cc16WM0Y.js → WidgetsPage-Bf1uuKE7.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-pMwbM4R7.js → WrappedPage-C8qacvpR.js} +1 -1
- package/dashboard/dist/assets/__vite-browser-external-CIpYjfAT.js +45 -0
- package/dashboard/dist/assets/__vite-browser-external-CnVnsbqV.css +1 -0
- package/dashboard/dist/assets/{agent-logos-Zw7LNkMO.js → agent-logos-tmdKvCcK.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-DycYjE-k.js → arrow-left-CRKi420c.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-uNxLHoJ0.js → arrow-right-C_o_iQbK.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-CmdJ7gd7.js → arrow-up-right-N5YqKKnI.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-CJ33_t5O.js → calendar-days-BJh4FDj9.js} +1 -1
- package/dashboard/dist/assets/{check-Dbubk4Il.js → check-BfHGb92g.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-BwvBVAOs.js → chevron-down-D1pO8Xgc.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-IG-IOpeP.js → cloud-checkout-Ds13TmYz.js} +1 -1
- package/dashboard/dist/assets/{composite-IIgJPPIw.js → composite-DDEsQKPD.js} +1 -1
- package/dashboard/dist/assets/copy-CJTosYLe.js +1 -0
- package/dashboard/dist/assets/{download-DxtH7w6a.js → download-Bkqx3c3y.js} +1 -1
- package/dashboard/dist/assets/{external-link-evKf3mnD.js → external-link-IYUo5LcK.js} +1 -1
- package/dashboard/dist/assets/{flame-D2qOE_W4.js → flame-BD_hiMfM.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-CqDmm-sK.js → format-tokens-DxwbhPag.js} +1 -1
- package/dashboard/dist/assets/{gift-Ge11HK1x.js → gift-DLzFdL-1.js} +1 -1
- package/dashboard/dist/assets/host-mode-Bc_iTzHk.js +1 -0
- package/dashboard/dist/assets/{icons-OmfWvE5K.js → icons-CbrWeFPS.js} +1 -1
- package/dashboard/dist/assets/{index-BsYtyo4U.js → index-3xGpnZnP.js} +1 -1
- package/dashboard/dist/assets/{index-tbe1aERA.js → index-AVEWo-aY.js} +1 -1
- package/dashboard/dist/assets/{index-BYuEzP9p.js → index-DfzCE-FL.js} +1 -1
- package/dashboard/dist/assets/index-Dj1QnoPF.js +502 -0
- package/dashboard/dist/assets/{info-xhrso9aO.js → info-odlIlCnm.js} +1 -1
- package/dashboard/dist/assets/{link-2-BgNpTaO4.js → link-2-Bt28Ey9r.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-DRooZ0e5.js → loader-circle-lGnIhIFS.js} +1 -1
- package/dashboard/dist/assets/local-usage-transfer-DSS0WaL-.js +1 -0
- package/dashboard/dist/assets/{modifiers.esm-D-QAEpOZ.js → modifiers.esm-CitRa_Z1.js} +1 -1
- package/dashboard/dist/assets/module-C2SOSUuR.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-Bwu7__2B.js → monitor-smartphone-1T0GFcOz.js} +1 -1
- package/dashboard/dist/assets/{play-CBPvTiWM.js → play-d6YYOmED.js} +1 -1
- package/dashboard/dist/assets/{plus-B4lFIyP8.js → plus-GrGV9Fkm.js} +1 -1
- package/dashboard/dist/assets/{provider-display-CQlWusXH.js → provider-display-D1v3cgDm.js} +1 -1
- package/dashboard/dist/assets/{react-DDOtS4Bd.js → react-DYCAyQbo.js} +1 -1
- package/dashboard/dist/assets/{safePolygon-BGfBVKoy.js → safePolygon-iPu060Qe.js} +1 -1
- package/dashboard/dist/assets/{search-DVyNq72J.js → search-AQhOTwzm.js} +1 -1
- package/dashboard/dist/assets/{server-EpUTEsOf.js → server-uYTbWPMd.js} +1 -1
- package/dashboard/dist/assets/{shield-check-DRg8cPKV.js → shield-check-DB1NVCDf.js} +1 -1
- package/dashboard/dist/assets/{skills-api-y42dEF96.js → skills-api-D7X10n0t.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-D2S1gXCK.js → sortable.esm-B13KhrCd.js} +1 -1
- package/dashboard/dist/assets/{store-DfGPS2IR.js → store-D6XHiq8o.js} +1 -1
- package/dashboard/dist/assets/{terminal-hXIrrL2b.js → terminal-t37F8qyF.js} +1 -1
- package/dashboard/dist/assets/{trash-cjaASRQl.js → trash-CDHRwGsy.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-B-nipjWt.js → use-community-stats--kaGg0EW.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-DIEYrSzn.js → use-latest-request-guard-ChyODWU3.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-BdHDwBBC.js → use-limits-display-prefs-katFAxOA.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-7w71_h44.js → use-native-settings-i3O4GTY1.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-CSMpK4ar.js → use-ordered-list-BtewEEX_.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-DPacKl9n.js +1 -0
- package/dashboard/dist/assets/{use-transform-sjGGXCNn.js → use-transform-NBAyuphu.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Nml-wUB-.js → use-usage-limits-hsv-93TF.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DAKIY1nR.js → useCurrency-BdsxkAID.js} +1 -1
- package/dashboard/dist/assets/{usePositioner-B7vVQ7th.js → usePositioner-BAN79miB.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-gtgw8k2Z.js → useTokenFormat-CGEO_mX1.js} +1 -1
- package/dashboard/dist/assets/{zap-DFWOiTJ1.js → zap-BDHWp-gL.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/privacy.html +8 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +3 -2
- package/src/cli.js +10 -0
- package/src/commands/sync.js +18 -3
- package/src/lib/codex-rollout-parser.js +29 -2
- package/src/lib/codex-service-tier.js +13 -0
- package/src/lib/commandcode-limits.js +27 -11
- package/src/lib/local-api.js +122 -11
- package/src/lib/local-usage-transfer.js +271 -0
- package/src/lib/opencode-go-limits.js +17 -6
- package/src/lib/pricing/curated-overrides.json +24 -0
- package/src/lib/pricing/index.js +50 -39
- package/src/lib/pricing/matcher.js +9 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/provider-api-key-store.js +110 -0
- package/src/lib/rollout.js +27 -3
- package/src/lib/sentry.js +231 -0
- package/src/lib/session-analytics.js +15 -2
- package/src/lib/static-server.js +15 -2
- package/src/lib/usage-limits.js +54 -16
- package/dashboard/dist/assets/CloudPage-BOQjUGAt.js +0 -2
- package/dashboard/dist/assets/DashboardPage-B8z-U63p.js +0 -1
- package/dashboard/dist/assets/DevicePage-CUOlUySM.js +0 -1
- package/dashboard/dist/assets/DialogDescription-vuQFBlM_.js +0 -1
- package/dashboard/dist/assets/LandingPage-DzOJOAj7.js +0 -2
- package/dashboard/dist/assets/LimitsPage-UVX730CQ.js +0 -9
- package/dashboard/dist/assets/SettingsPage-DsthWCyM.js +0 -5
- package/dashboard/dist/assets/TokenGalaxy-DQ6o8YBp.js +0 -4426
- package/dashboard/dist/assets/TooltipPopup-CMQjA-HE.js +0 -1
- package/dashboard/dist/assets/TrendMonitor-DrV1m8E7.js +0 -19
- package/dashboard/dist/assets/__vite-browser-external-B0m8a6Te.css +0 -1
- package/dashboard/dist/assets/__vite-browser-external-DCy_YLfe.js +0 -45
- package/dashboard/dist/assets/host-mode-8_TNh7yE.js +0 -1
- package/dashboard/dist/assets/module-DOCYJaxl.js +0 -3
- package/dashboard/dist/assets/use-reduced-motion-HUGf223R.js +0 -1
- package/dashboard/dist/assets/use-session-efficiency-pref-BagBVWW6.js +0 -1
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import{r as _e}from"./__vite-browser-external-CIpYjfAT.js";const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Zt="11.8.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 li=["debug","info","warn","error","log","assert","trace"],ky="Sentry Logger ",Ts={};function ft(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(Ts);r.forEach(o=>{const s=Ts[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Ry(){Dc().enabled=!0}function Cy(){Dc().enabled=!1}function sp(){return Dc().enabled}function Ay(...e){Lc("log",...e)}function Ny(...e){Lc("warn",...e)}function xy(...e){Lc("error",...e)}function Lc(e,...t){A&&sp()&&ft(()=>{$.console[e](`${ky}[${e}]:`,...t)})}function Dc(){return A?kr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:Ry,disable:Cy,isEnabled:sp,log:Ay,warn:Ny,error:xy},ip=50,St="?",rl=/\(error: (.*)\)/,ol=/captureMessage|captureException/;function ap(...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=rl.test(c)?c.replace(rl,"$1"):c;if(!u.includes("Error: ")){for(const l of t){const f=l(u);if(f){s.push(f);break}}if(s.length>=ip+o)break}}return Oy(s.slice(o))}}function My(e){return Array.isArray(e)?ap(...e):e}function Oy(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(jo(t).function||"")&&t.pop(),t.reverse(),ol.test(jo(t).function||"")&&(t.pop(),ol.test(jo(t).function||"")&&t.pop()),t.slice(0,ip).map(n=>({...n,filename:n.filename||jo(t).filename,function:n.function||St}))}function jo(e){return e[e.length-1]||{}}const Ji="<anonymous>";function Ot(e){try{return!e||typeof e!="function"?Ji:e.name||Ji}catch{return Ji}}function Ha(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 Py(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Vr={},sl={};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(!sl[e]){sl[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 Qi=null;function cp(e){const t="error";un(t,e),ln(t,Ly)}function Ly(){Qi=$.onerror,$.onerror=function(e,t,n,r,o){return et("error",{column:r,error:o,line:n,msg:e,url:t}),Qi?Qi.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let Zi=null;function up(e){const t="unhandledrejection";un(t,e),ln(t,Dy)}function Dy(){Zi=$.onunhandledrejection,$.onunhandledrejection=function(e){return et("unhandledrejection",e),Zi?Zi.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const lp=Object.prototype.toString;function Ae(e){switch(lp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return pi(e,Error)}}function Rr(e,t){return lp.call(e)===`[object ${t}]`}function dp(e){return Rr(e,"ErrorEvent")}function il(e){return Rr(e,"DOMError")}function $y(e){return Rr(e,"DOMException")}function tt(e){return Rr(e,"String")}function di(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function lt(e){return e===null||di(e)||typeof e!="object"&&typeof e!="function"}function Ue(e){return Rr(e,"Object")}function nt(e){return typeof e=="object"&&e!==null}function fi(e){return typeof Event<"u"&&pi(e,Event)}function fp(e){return Rr(e,"RegExp")}function Pt(e){return!!(e?.then&&typeof e.then=="function")}function pi(e,t){try{return e instanceof t}catch{return!1}}function $c(e){return typeof Request<"u"&&pi(e,Request)}function Me(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&pp(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 pp(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pe(e,"__sentry_original__",t)}catch{}}function Fc(e){return e.__sentry_original__}function hp(e){if(Ae(e))return{message:e.message,name:e.name,stack:e.stack,...al(e)};if(fi(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...al(e)}}return e}function al(e){return nt(e)?Object.fromEntries(Object.entries(e)):{}}function Fy(e){const t=Object.keys(hp(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 mp=Symbol.for("sentry.skipNormalization"),gp=Symbol.for("sentry.overrideNormalizationDepth");function By(e){pe(e,mp,!0)}function Uy(e,t){pe(e,gp,t)}function Hy(e){return!!e[mp]}function Wy(e){const t=e[gp];return typeof t=="number"?t:void 0}let Wa;function _p(e){Wa=e}function Te(e,t=100,n=1/0){try{return za("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function yp(e,t=3,n=100*1024){const r=Te(e,t);return qy(r)>n?yp(e,t-1,n):r}function za(e,t,n=1/0,r=1/0,o=Gy()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Sp(e,t);if(!a.startsWith("[object "))return a;if(Hy(t))return t;const c=Wy(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 za("",h,u-1,r,o)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const p=hp(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]=za(h,m,u-1,r,o),d++}return i(t),f}function Sp(e,t){try{if(Wa){const r=Wa(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 ${zy(t)}]`}catch(n){return`**non-serializable** (${n})`}}function zy(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function jy(e){return~-encodeURI(e).split(/%..|./).length}function qy(e){return jy(JSON.stringify(e))}function Gy(){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 ea(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 ja(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(Sp(void 0,o))}return n.join(t)}function Xr(e,t,n=!1){return tt(e)?fp(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 Vy(){const e=$;return e.crypto||e.msCrypto}let ta;function Ky(){return en()*16}function Oe(e=Vy()){try{if(e?.randomUUID)return lr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return ta||(ta="10000000100040008000"+1e11),ta.replace(/[018]/g,t=>(t^(Ky()&15)>>t/4).toString(16))}function bp(e){return e.exception?.values?.[0]}function wn(e){const{message:t,event_id:n}=e;if(t)return t;const r=bp(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function qa(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=bp(e);n&&vp(n,t)}function Yy(e,t){const n=e.exception?.values,r=n?.find(o=>o.mechanism?.exception_id===0)??n?.[0];r&&vp(r,t)}function vp(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 Xy(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=>ea(i,0));const s=Math.min(r-1,o);t.context_line=ea(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ea(i,0))}function cl(e){if(Jy(e))return!0;try{pe(e,"__sentry_captured__",!0)}catch{}return!1}function Jy(e){try{return e.__sentry_captured__}catch{}}const Bc=1e3,Qy=1e3,Zy=100;function Hn(){return Ut()/Bc}let vn=[];function eS(){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)>Qy&&(t=s-o,n?vn=[{from:0,origin:t}]:(vn.push({from:r,origin:t}),vn.length>Zy&&vn.splice(1,1))),n=!1,r=o,(t+o)/Bc})}function ul(){const{performance:e}=$;return e?.now?lr(()=>e.now()):void 0}let ll,na=!1;function Pe(e,t=e){const n=Cr(t);return n==null?void 0:(n+e)/Bc}function fe(){return(ll??(ll=eS()))()}function Cr(e=0){na||(na=!0,Promise.resolve().then(()=>{na=!1}),fe());let t;for(const n of vn){if(t&&n.from>e)break;t=n}return t?.origin}function tS(e){const t=fe(),n={sid:Oe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>rS(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:Oe()),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 nS(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),dr(e,n)}function rS(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 Oe()}function rn(){return Oe().substring(16)}const oS=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:oS;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||Oe();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||Oe();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||Oe();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 sS(){return kr("defaultCurrentScope",()=>new bt)}function iS(){return kr("defaultIsolationScope",()=>new bt)}const Is="__SENTRY_SUPPRESS_TRACING__",dl=e=>e instanceof Promise&&!e[Ep],Ep=Symbol("chained PromiseLike"),wp=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return dl(r)&&dl(e)?r:aS(e,r)},aS=(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,{[Ep]:!0}),t};class cS{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)?wp(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 cS(sS(),iS())}function Tp(e){return fr().withScope(e)}function uS(e,t){const n=fr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function fl(e){return fr().withScope(()=>e(fr().getIsolationScope()))}function lS(){return{suppressTracing:dS,withIsolationScope:fl,withScope:Tp,withSetScope:uS,withSetIsolationScope:(e,t)=>fl(t),getCurrentScope:()=>fr().getScope(),getIsolationScope:()=>fr().getIsolationScope()}}function dS(e){return Tp(t=>{t.setSDKProcessingMetadata({[Is]:!0});const n=e();return t.setSDKProcessingMetadata({[Is]:void 0}),n})}function fn(e){const t=cn(e);return t.acs?t.acs:lS()}function fS(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function pS(e,t){const{value:n,unit:r}=fS(e)?e:{value:e,unit:void 0},o=hS(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=pS(o,t);s&&(n[r]=s)}return n}function pl(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+=hl(o[0])*o.length:lt(o)?t+=hl(o):t+=100}return t}function hl(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function hS(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 Ip(){return cn(it()).externalPropagationContextProvider?.()}function mS(){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 SP(...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 Uc(e){const t=Ip();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 gS="browser.bfcache.frame",_S="browser.bfcache.not_restored_reason_count",yS="browser.bfcache.outcome",SS="browser.bfcache.reason",kp="browser.navigation.id",hi="browser.navigation.type",bS="browser.paint.type",vS="browser.web_vital.inp.interaction_type",Hc="browser.web_vital.inp.target",ES="code.file.path",wS="code.function.name",Rp="db.operation.name",Cp="db.system.name",TS="gen_ai.conversation.id",Ap="graphql.document",IS="graphql.operation.name",kS="graphql.operation.type",RS="http.method",CS="http.request.header",mi="http.request.method",AS="http.request.same_origin",Np="http.response.body.size",NS="http.response.size",xS="http.response.status_code",xp="http.route",MS="network.connection.effective_type",OS="network.connection.rtt",PS="network.connection.type",LS="params",Mp="router.navigation.route.id",Jr="sentry.description",DS="sentry.environment",yo="sentry.exclusive_time",or="sentry.idle_span_finish_reason",$S="sentry.is_localhost",FS="sentry.link.type",H="sentry.op",re="sentry.origin",Wc="sentry.profile_id",BS="sentry.release",US="sentry.replay_id",HS="sentry.sdk.integrations",WS="sentry.sdk.name",zS="sentry.sdk.version",jS="sentry.segment.id",Ar="sentry.segment.name",ce="sentry.segment.name.source",qS="sentry.source",GS="sentry.status.message",VS="sentry.trace_lifecycle",KS="sentry.transaction",gi="server.address",YS="server.port",Nt="ui.component_name",_i="url.domain",Op="url.fragment",Le="url.full",yi="url.path",XS="url.path.parameter",Pp="url.query",JS="url.scheme",We="url.template",Lp="user_agent.original",QS="user.email",ZS="user.id",eb="user.ip_address",tb="user.name",zc="sentry.sample_rate",Dp="sentry.previous_trace_sample_rate",bP="sentry.op",vP="sentry.origin",$p="sentry.measurement_unit",Fp="sentry.measurement_value",ks="sentry.custom_span_name",nb=["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"],Bp=0,So=1,we=2;function rb(e){return e!=="ok"&&nb.includes(e)}function ob(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 Rs(e,t){e.setAttribute("http.response.status_code",t);const n=ob(t);n.message!=="unknown_error"&&e.setStatus(n)}function Up(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Hp(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const Wp="_sentryScope",zp="_sentryIsolationScope",sb=Symbol.for("sentry.tracerProviderSpan");function Nn(e,t,n){e&&(pe(e,zp,Up(n)),pe(e,Wp,t))}function xt(e){const t=e;return{scope:t[Wp],isolationScope:Hp(t[zp])}}function ib(e){return e[sb]===!0}const Cs="sentry-",ab=8192;function jc(e){const t=cb(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Cs)){const i=o.slice(Cs.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function jp(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Cs}${r}`]=o),n),{});return ub(t)}function cb(e){if(!(!e||!tt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=ml(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):ml(e)}function ml(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 ub(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>ab?(A&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const lb=/^o(\d+)\./,db=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function fb(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 qp(e){const t=db.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 Gp({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Gp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function pb(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+$/)?fb(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 hb(e){return e.match(lb)?.[1]}function Vp(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=hb(n)),r}function Kp(e){const t=typeof e=="string"?qp(e):Gp(e);if(!(!t||!pb(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 Yp=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function mb(e){if(!e)return;const t=e.match(Yp);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 Xp(e,t){const n=mb(e),r=jc(t);if(!n?.traceId)return{traceId:dn(),sampleRand:en()};const o=gb(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 Jp(e=dn(),t=rn(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Qp(e=dn(),t=rn(),n){return`00-${e}-${t}-${n?"01":"00"}`}function gb(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 _b(e,t){const n=Vp(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 Ga="span";function io(e,t){t?e.refs[Ga]=Up(t):delete e.refs[Ga]}function yb(e){return Hp(e.refs[Ga])}const Zp=0,Si=1;function Sb(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 qc(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 bb(e){const{traceId:t,spanId:n}=e.spanContext(),r=pt(e);return Jp(t,n,r)}function vb(e){const{traceId:t,spanId:n}=e.spanContext(),r=pt(e);return Qp(t,n,r)}function eh(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===Si,attributes:s,...o}))}function th(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Si,attributes:o}))}function Mt(e){return typeof e=="number"?gl(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?gl(e.getTime()):fe()}function gl(e){return e>9999999999?e/1e3:e}function Ne(e){if(sh(e))return e.getStaticSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(oh(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:nh(e),start_timestamp:Mt(o),timestamp:Mt(i)||void 0,status:ih(a),op:r[H],origin:r[re],links:eh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:"ok",data:{}}}function ne(e){if(sh(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(oh(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:nh(e),start_timestamp:Mt(o),end_timestamp:Mt(i)||void 0,is_segment:ao(e),status:Gc(a),attributes:ah(r,a),links:th(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",status:"ok",is_segment:ao(e),attributes:{}}}function nh(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function rh(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 oh(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function sh(e){return typeof e.getSpanJSON=="function"}function pt(e){const{traceFlags:t}=e.spanContext();return t===Si}function ih(e){return!e||e.code===Bp||e.code===So?"ok":e.message&&rb(e.message)?e.message:"internal_error"}function Gc(e){return!e||e.code===So||e.code===Bp||e.message==="cancelled"?"ok":"error"}function ah(e,t){const n=Gc(t)==="error"?t?.message:void 0;return{...n&&{[GS]:n},...e}}const Rn="_sentryChildSpans",Va="_sentryRootSpan";function us(e,t){const n=e[Va]||e;pe(t,Va,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 Eb(e,t){e[Rn]&&e[Rn].delete(t)}function ls(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 ke=bi;function bi(e){return e[Va]||e}function ao(e){return e===bi(e)}function he(e){const t=it(),n=fn(t);return n.getActiveSpan?n.getActiveSpan(e):yb(e||q())}function EP(e,t){e.updateName(t),e.setAttributes({[ks]:t}),ch(e,"custom")}function ch(e,t){ao(e)&&e.setAttribute(ce,t)}let _l=!1;function wb(){if(_l)return;function e(){const t=he(),n=t&&ke(t);if(n){const r="internal_error";A&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:we,message:r})}}_l=!0,cp(e),up(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 yl(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function As(e,t){if(!t?.length)return!1;for(const n of t){if(kb(n)){if(e.description&&Xr(e.description,n))return A&&yl(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])=>Tb(e.attributes?.[a],c)):!0;if(o&&s&&i)return A&&yl(e),!0}return!1}function Tb(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 Ib(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 kb(e){return typeof e=="string"||e instanceof RegExp}const Sl=[];function Rb(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 Cb(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 Rb(r)}function Ab(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&uh(e,r,n)}),n}function bl(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function uh(e,t,n){if(n[t.name]){A&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Sl.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Sl.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 vl(e){const t=v();if(!t){A&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Nb(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 vi="production",lh=Symbol.for("sentry.nonRecordingSpan");class Mn{constructor(t={}){this._traceId=t.traceId||dn(),this._spanId=t.spanId||rn(),this.dropReason=t.dropReason,pe(this,lh,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Zp}}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[lh]===!0}const dh="_frozenDsc";function El(e,t){pe(e,dh,t)}function fh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||vi,release:n.release,public_key:r,trace_id:e,org_id:Vp(t)};return t.emit("createDsc",o),o}function Ei(e,t){if(Ip())return;const n=t.getPropagationContext();return n.dsc||fh(n.traceId,e)}function st(e){const t=v();if(!t)return{};const n=ke(e),r=Ne(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[zc]??o[Dp];function a(g){return(typeof i=="number"||typeof i=="string")&&(g.sample_rate=`${i}`),g}const c=n[dh];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&&Ei(t,g);if(y){const S={...y};return l&&(S.sampled="false"),a(S)}}const f=s?.get("sentry.dsc"),d=f&&jc(f);if(d)return a(d);const p=fh(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 wP(e){const t=st(e);return jp(t)}function xb(e,t){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=t;Mb(e,t),Db(e,n),Ob(e,r),Pb(e,o)}function wl(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&&wl(n,e.getScopeData()),t&&wl(n,t.getScopeData()),n}function Mb(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 Ob(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Pb(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Lb(e,t){e.contexts={trace:qc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:st(t),...e.sdkProcessingMetadata};const n=ke(t),r=Ne(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Db(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 Ns=Symbol.for("SentryCallbackError");function vt(e,t,n){let r;try{r=t()}catch(o){return Tl(e,o,n)}return Pt(r)?r.then(void 0,o=>Tl(e,o,n)):r}function Tl(e,t,n){return A&&_.error(e,t),n(t)}function TP(e){return pe(e,"_static",!0),e}function IP(e){return e}function wi(e){return!!e&&typeof e=="function"&&"_static"in e&&!!e._static}function xs(e,t){return vt(A?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":"",()=>t(e),()=>e)||e}function ph(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 rh(t)}function $b(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 hh(e,t){const n=ne(e);n.attributes&&delete n.attributes[ks];const r=bi(e),o=ne(r),{isolationScope:s,scope:i}=xt(e),a=Nr(s,i);Ub(n,o,t,a),t.emit("preprocessSpan",n),n.is_segment&&(Fb(n,a),Bb(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:c,traceLifecycle:u}=t.getOptions(),l=u!=="static"&&c&&!wi(c)?xs(n,c):n;return{...rh(l),_segmentSpan:r}}function Fb(e,t){const n=$b(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 Bb(e,t){const n=t.getIntegrationNames();n.length&&On(e,{[HS]:n})}function mh(e,t,n,r=!0){const o=t.getSdkMetadata(),{release:s,environment:i}=t.getOptions();return{[VS]:"stream",[Ar]:e.name,[jS]:e.span_id,[WS]:o?.sdk?.name,[zS]:o?.sdk?.version,[BS]:s,[DS]:i||vi,[ZS]:n.user?.id,[QS]:n.user?.email,[eb]:n.user?.ip_address,[tb]:n.user?.username,...r?n.attributes:void 0}}function Ub(e,t,n,r){On(e,mh(t,n,r))}function Hb(e,t,n){const r=Ne(e),o=bi(e),s=ne(o),{isolationScope:i,scope:a}=xt(e),c=Nr(i,a),u=mh(s,t,c,!1);Object.entries(u).forEach(([f,d])=>{d!=null&&!(f in r.data)&&(r.data[f]=d)});const l=xs(r,n);return ph(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 Il(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 Ka(e,t){return mr(e,(n,r)=>t.includes(r))}function Ms(e){const t=cn($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Wb(e){const t=cn($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Os(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[Ms(r),s]:r.push(typeof s=="string"?Ms(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:zb(r)}function zb(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 jb(e){let t=typeof e=="string"?Ms(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(Wb(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 qb(e){const t=typeof e.data=="string"?Ms(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const gh={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",trace_metric:"metric"};function Gb(e){return e in gh}function kl(e){return Gb(e)?gh[e]:e}function vo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function _h(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 Ya(e){return e==="replay_event"?"replay":e||"error"}function Vb(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Kb(){return"npm"}function Yb(){return!Vb()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function on(){return typeof window<"u"&&(!Yb()||Xb())}function Xb(){return $.process?.type==="renderer"}function Xa(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=vo(r._metadata),a={sent_at:new Date(Ut()).toISOString(),...Jb(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Wt(o)}};return ht(a,[yh(e,n)])}function yh(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 Jb(e){return!!e.trace_id&&!!e.public_key}function Qb(e){let t=156;if(t+=e.name.length*2,t+=pl(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?pl(r):0);t+=o*e.links.length}return t}const Rl=1e3,Zb=5e6;class ev{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Rl?r:Rl,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:Zb,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+=Qb(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=Xa(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 Cl="SpanStreaming",tv=(e={})=>{const t=e.flushOnSegmentEnd??!0;return{name:Cl,setup(n){if(!V(n)){A&&_.log(`[${Cl}] \`traceLifecycle\` is "static", skipping setup.`);return}const r=new ev(n);n.on("afterSpanEnd",o=>{pt(o)&&r.add(hh(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 nv(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return rv(o,t,n,r)}function rv(e,t,n,r){return Pt(e)?wp(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}const Ja=new WeakMap;function Sh(e){return lt(e)?void 0:e}function ov(e,t){const n=Sh(e);!n||!pt(t)||Ja.has(n)||Ja.set(n,qc(t))}function sv(e,t,n){const r=Sh(t.originalException),o=r&&Ja.get(r);if(!o)return;const s=e.contexts?.trace;(s?.trace_id??(n&&Uc(n).trace_id))===o.trace_id&&(e.contexts={...e.contexts,trace:{...s,...o}})}function iv(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=ke(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 av(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Ne(e),{spanId:r}=e.spanContext(),s=ke(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;_.log(i)}function cv(e,t,n){if(!Ye(e))return[!1];const r=uv(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 uv(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 bh(e,t,n,r=he()){const o=r&&ke(r);o&&(A&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Fp]:t,[$p]:n}))}function Al(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[$p],s=r[Fp];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function Nl(){return cn(it()).segmentSpanCaptureStrategy}const qo=1e3;class Ti{constructor(t={}){this._traceId=t.traceId||dn(),this._spanId=t.spanId||rn(),t.startTimestamp?this._startTime=t.startTimestamp:(this._startTime=fe(),this._startPerformanceNow=ul()),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?Si:Zp}}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,ch(this,"custom"),this)}end(t){this._endTime||(this._endTime=t==null?this._getEndTimeFromDuration():Mt(t),av(this),this._onSpanEnded(),this._frozen=ib(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:ih(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[re],profile_id:this._attributes[Wc],exclusive_time:this._attributes[yo],measurements:Al(this._events),links:eh(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:Gc(this._status),attributes:ah(this._attributes,this._status),links:th(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=xl(n)?n:r||fe(),s=xl(n)?{}:n||{},i={name:t,time:Mt(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){const t=ul();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){dv(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=ke(this);if(n!==this){const s=Nl();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=Nl();if(o)o.onSegmentSpanEnded(s=>this._convertSpanToTransaction(s),r);else{const s=this._convertSpanToTransaction();s&&r.captureEvent(s)}}_convertSpanToTransaction(t={}){if(!Ml(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 ls(this)){if(p===this||lv(p)||t.isSpanAlreadyCaptured?.(p))continue;const h=Ne(p);if(!Ml(h)){t.onSpanCaptured||i++;continue}t.onSpanCaptured?.(p),s.push(h)}const a=n?.getClient()||v();i&&a?.recordDroppedEvent("invalid","span",i),s.length>qo&&a?.recordDroppedEvent("buffer_overflow","span",s.length-qo);const c=this._attributes[ce];delete this._attributes[ks];let u=!1;s.forEach(p=>{delete p.data[ks],p.op?.startsWith("gen_ai.")&&(u=!0)});const l={contexts:{trace:Sb(this)},spans:s.length>qo?s.sort((p,h)=>p.start_timestamp-h.start_timestamp).slice(0,qo):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=Al(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 xl(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ml(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function lv(e){return e instanceof Ti&&e.isStandaloneSpan()}function dv(e,t){const{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if(r==="static"&&wi(n)){const a=Hb(e,t,n),c=st(e);t.sendEnvelope(Xa([a],c,t));return}const{_segmentSpan:o,...s}=hh(e,t),i=st(o);t.sendEnvelope(Xa([s],i,t))}function fv(e,t){const n=Qc(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Je(i,()=>vh(o)(()=>{const c=q(),u=Zc(s??c,o),l=v(),d=e.onlyIfParent&&!u?Xc(c,l):Jc({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),p=!ki(d)||!u;return Eh(d,p,()=>t(d),()=>d.end())}))}function Vc(e,t){const n=Qc(e),{forceTransaction:r,parentSpan:o,scope:s}=e,i=s?.clone();return Je(i,()=>vh(o)(()=>{const c=q(),u=Zc(s??c,o),f=e.onlyIfParent&&!u?Xc(c,v()):Jc({parentSpan:u,spanArguments:n,forceTransaction:r,scope:c}),d=!ki(f)||!u;return Eh(f,d,()=>t(f,()=>f.end()))}))}function Kc(e){const t=Qc(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=Zc(o??i,r),c=v();return e.onlyIfParent&&!a?Xc(i,c):Jc({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}const kP=(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=jc(s);return i&&!_b(i,a?.org_id)?hv(t):Je(c=>{const u=Xp(o,s);return c.setPropagationContext(u),sn(null,t)})};function sn(e,t){const n=Ii();return n.withActiveSpan?n.withActiveSpan(e,t):Je(r=>(io(r,e||void 0),t(r)))}function pv(e){const t=Ii();return t.suppressTracing?t.suppressTracing(e):Je(n=>(n.setSDKProcessingMetadata({[Is]:!0}),e()))}function Yc(e=q()){const t=Ii();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Is]===!0}function hv(e){const t=Ii();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 Xc(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 Jc({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&&us(a,d),Nn(d,i,o),d}const c=v();if(gv(c,t)){Yc(i)||c?.recordDroppedEvent("ignored","span");const l=new Mn({dropReason:"ignored",traceId:a?.spanContext().traceId??i.getPropagationContext().traceId});return a&&!n&&us(a,l),Nn(l,i,o),l}let u;if(a&&!n)u=mv(a,i,t,o),us(a,u);else if(a){const l=st(a),{traceId:f,spanId:d}=a.spanContext(),p=pt(a);u=Ol({traceId:f,parentSpanId:d,...t},i,o,p),El(u,l)}else{const{traceId:l,dsc:f,parentSpanId:d,sampled:p,sampleRand:h}=i.getPropagationContext();if(u=Ol({traceId:l,parentSpanId:d,...t},i,o,p),f){const m=Object.keys(f).length===0&&h!==void 0?{sample_rand:h.toString()}:f;El(u,m)}}return iv(u),u}function Qc(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 Ii(){const e=it();return fn(e)}function Ol(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=Yc(t),[d,p,h,m]=f?[!1]:cv(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:xn(l.dsc?.sample_rate)},l.sampleRand),g=new Ti({...e,attributes:{[ce]:"custom",[zc]: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 mv(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=Yc(t),a=i?!1:pt(e),c=a?new Ti({...n,parentSpanId:o,traceId:s,sampled:a}):new Mn({traceId:s});us(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 Zc(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?ke(n):n}function vh(e){return e!==void 0?t=>sn(e,t):t=>t()}function gv(e,t){const n=e?.getOptions().ignoreSpans;return!e||!V(e)||!n?.length?!1:As({description:t.name||"",op:t.attributes?.[H]||t.op,attributes:t.attributes},n)}function ki(e){return hr(e)&&e.dropReason==="ignored"}function Eh(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())(()=>nv(()=>n(),s=>{ov(s,e);const{status:i}=Ne(e);e.isRecording()&&i==="ok"&&e.setStatus({code:we,message:"internal_error"})},r))}const Pl=new WeakSet;function Eo(e=v()){!e||Pl.has(e)||!V(e)||(Pl.add(e),e.addIntegration(tv()))}function RP(e,t){return Eo(),fv(e,t)}function CP(e,t){return Eo(),Vc(e,t)}function yt(e){return Eo(),Kc(e)}const ds={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},_v="heartbeatFailed",yv="idleTimeout",Sv="finalTimeout",bv="externalFinish";function wh(e,t={}){const n=v();Eo(n);const r=new Map;let o=!1,s,i,a=bv,c=!t.disableAutoFinish;const u=[],{idleTimeout:l=ds.idleTimeout,finalTimeout:f=ds.finalTimeout,childSpanTimeout:d=ds.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=Kc(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=ls(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&&As({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=yv,g.end(R))},l)}function b(R){S(),i=setTimeout(()=>{!o&&c&&(a=_v,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=ls(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)&&(Eb(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 Ti&&R.isStandaloneSpan())return;ls(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=Sv,g.end())},f),g}function vv(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 Ev=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],wv=["removeListener","off","removeEventListener"],Th=Symbol("SentryScopeBoundListeners");let sr;function Tv(e){return sr!==void 0&&(e===sr||e.listener===sr)}function AP(e,t=q()){const n=e;if(Ri(n))return e;eu(n);for(const r of Ev)typeof n[r]=="function"&&(n[r]=kv(n,n[r],t));for(const r of wv)typeof n[r]=="function"&&(n[r]=Rv(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=Cv(n,n.removeAllListeners)),e}function Iv(e,t){return function(...n){return Je(t,()=>e.apply(this,n))}}function Ih(e){return typeof e=="function"}function kv(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!Ih(s)||Tv(s))return t.apply(this,r);const a=Ri(e)||eu(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=Iv(s,n),c.set(s,u));const l=sr;sr=u;try{return t.call(this,o,u,...i)}finally{sr=l}}}function Rv(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=Ih(o)?Ri(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function Cv(e,t){return function(...n){const r=Ri(e);if(r)if(n.length===0)eu(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function eu(e){const t=new Map;return e[Th]=t,t}function Ri(e){return e[Th]}const wo="pageload",xr="navigation",Av="navigation.redirect",Nv="resource.other",xv="browser.paint",kh="browser.unload_event",Rh="browser.redirect",Ch="browser.dom_content_loaded_event",Ah="browser.load_event",Nh="browser.connect",xh="browser.tls_ssl",Mh="browser.cache",Oh="browser.dns",Qa="browser.request",Za="browser.response",Ph="ui.render",Lh="ui.mount",Mv="ui.update",Ov="ui.long_task",Pv="ui.long_animation_frame",Ps="ui.interaction.click",Lv="ui.interaction.hover",Dv="ui.interaction.drag",$v="ui.interaction.press",Fv="ui.webvital.lcp",Bv="ui.webvital.cls",ra="ui.action.click",Dh="db",$h="http.client",Uv="http.client.stream",Lt="Pageload",dt="Navigation",Hv="Resource",Fh="Component mount",Wv="Component update",Bh="Component render",Uh="Main UI thread blocked",zv="Click",Hh="Click",jv="Hover",qv="Drag",Gv="Key press",Ll="Largest contentful paint",Dl="Layout shift",ec={[Mh]:"Cache lookup",[Oh]:"DNS lookup",[Nh]:"Connect",[xh]:"TLS handshake",[Rh]:"Redirect",[Qa]:"Request",[Za]:"Response",[kh]:"Unload event",[Ch]:"DOMContentLoaded event",[Ah]:"Load event"};function Vv(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 Kv(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 Yv(e,t,n,r){const o=vo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Vv(e,n?.sdk);const i=_h(e,o,r,t);return delete e.sdkProcessingMetadata,ht(i,[[{type:s},e]])}const oa=0,$l=1,Fl=2;function To(e){return new co(t=>{t(e)})}function Wh(e){return new co((t,n)=>{n(e)})}class co{constructor(t){this._state=oa,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===oa)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===$l&&n[1](this._value),this._state===Fl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===oa){if(Pt(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n($l,s)},o=s=>{n(Fl,s)};try{t(r,o)}catch(s){o(s)}}}function Xv(e,t,n,r=0,o){try{const s=tc(t,n,e,r,o);return Pt(s)?s:To(s)}catch(s){return Wh(s)}}function tc(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?tc(u,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)):c?tc(c,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)}let yn,Bl,Ul,jt;function zh(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===Bl&&o.length===Ul)return jt;Bl=r.length,Ul=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 Jv(e,t){const n=zh(e);if(!n)return[];const r=[];for(const o of t){const s=Py(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function nc(e){return e.data?.__sentry__===!0}function jh(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 qh(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Oe(),timestamp:t.timestamp||Hn()},u=n.integrations||e.integrations.map(T=>T.name);Qv(c,e),tE(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Zv(c,e.stackParser);const l=rE(r,n.captureContext);n.mechanism&&Yy(c,n.mechanism);const f=o?o.getEventProcessors():[],d=Nr(s,l),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),xb(c,d);const h=he(l);h&&Lb(c,h),sv(c,n,l);const m=[...f,...d.eventProcessors],g=t.type==="transaction",y=t.spans?.length||0;return(nc(n)?To(c):Xv(m,c,n,0,T=>{o&&(o.recordDroppedEvent(T,Ya(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 eE(T),typeof i=="number"&&i>0?nE(T,i,a):T})}function Qv(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||vi,!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 Zv(e,t){const n=zh(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function eE(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 tE(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function nE(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 rE(e,t){if(!t)return e;const n=e?e.clone():new bt;return n.update(t),n}function oE(e){if(e)return sE(e)?{captureContext:e}:aE(e)?{captureContext:e}:e}function sE(e){return e instanceof bt||typeof e=="function"}const iE=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function aE(e){return Object.keys(e).some(t=>iE.includes(t))}function Pn(e,t){return q().captureException(e,oE(t))}function cE(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 Gh(e,t){me().setContext(e,t)}function NP(e){me().setExtras(e)}function xP(e,t){me().setExtra(e,t)}function MP(e){me().setTags(e)}function OP(e,t){me().setTag(e,t)}function PP(e){me().setAttributes(e)}function LP(e,t){me().setAttribute(e,t)}function DP(e){me().setUser(e)}function $P(e){me().setConversationId(e)}function uE(){return me().lastEventId()}async function FP(e){const t=v();return t?t.flush(e):(A&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function BP(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 UP(){return!!v()}function lE(){const e=v();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function dE(e){me().addEventProcessor(e)}function Hl(e){const t=me(),{user:n}=Nr(t,q()),{userAgent:r}=$.navigator||{},o=tS({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&dr(s,{status:"exited"}),Vh(),t.setSession(o),o}function Vh(){const e=me(),n=q().getSession()||e.getSession();n&&nS(n),Kh(),e.setSession()}function Kh(){const e=me(),t=v(),n=e.getSession();n&&t&&t.captureSession(n)}function sa(e=!1){if(e){Vh();return}Kh()}const fE="7";function Yh(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function pE(e){return`${Yh(e)}${e.projectId}/envelope/`}function hE(e,t){const n={sentry_version:fE};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Xh(e,t,n){return t||`${pE(e)}?${hE(e,n)}`}function mE(e,t){const n=Kp(e);if(!n)return"";const r=`${Yh(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 gE="sentry.timestamp.sequence";let ia=0,aa;function Jh(e){const t=Math.floor(e*1e3);aa!==void 0&&t!==aa&&(ia=0);const n=ia;return ia++,aa=t,{key:gE,value:{value:n,type:"integer"}}}function Qh(e,t){return t?Je(t,()=>{const n=he(),r=n?qc(n):Uc(t);return[n?st(n):Ei(e,t),r]}):[void 0,void 0]}const _E={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function yE(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 SE(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,[yE(e,o)])}const bE=100;function gt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function vE(e,t){const n=tu(),r=em(e);r===void 0?n.set(e,[t]):r.length>=bE?(Zh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Ls(e,t=q(),n=vE){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]=Qh(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(di(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)),()=>Ns):T;if(b===Ns){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=Jh(U),O={timestamp:U,level:M,body:rc(String(I)),trace_id:a?.trace_id,severity_number:R??_E[M],attributes:EE({...pr(d),...pr(k,!0),[E.key]:E.value})};n(r,O),r.emit("afterCaptureLog",b)}function Zh(e,t){const n=t??em(e)??[];if(n.length===0)return;const r=e.getOptions(),o=SE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);tu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function em(e){return tu().get(e)}function tu(){return kr("clientToLogBufferMap",()=>new WeakMap)}function EE(e){const t={};for(const[n,r]of Object.entries(e)){const o=rc(n);r.type==="string"?t[o]={...r,value:rc(r.value)}:t[o]=r}return t}function rc(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 wE(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 TE(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,[wE(e,o)])}const IE=1e3;function It(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function kE(e,t){const n=nu(),r=nm(e);r===void 0?n.set(e,[t]):r.length>=IE?(tm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function RE(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 CE(e,t,n,r){const[,o]=Qh(t,n),s=he(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=fe(),u=Jh(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 AE(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??kE,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=RE(e,o,i);o.emit("processMetric",c);const u=s?vt(A?"The `beforeSendMetric` callback threw an error, dropping the metric:":"",()=>s(c),()=>Ns):c;if(u===Ns){o.recordDroppedEvent("callback_error","metric",1);return}if(!u){o.recordDroppedEvent("before_send","metric",1),A&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const l=CE(u,o,n,a);A&&_.log("[Metric]",l),r(o,l),o.emit("afterCaptureMetric",u)}function tm(e,t){const n=t??nm(e)??[];if(n.length===0)return;const r=e.getOptions(),o=TE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);nu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function nm(e){return nu().get(e)}function nu(){return kr("clientToMetricBufferMap",()=>new WeakMap)}function NE(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(ph(o)):r.push(o);if(n.length!==0)return e.spans=r,yh(n,t)}const ru=Symbol.for("SentryBufferFullError");function ou(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Wh(ru);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 xE=60*1e3;function rm(e,t=Ut()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?xE:r-t}function ME(e,t){return e[t]||e.all||0}function om(e,t,n=Ut()){return ME(e,t)>n}function sm(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+rm(i,r):t===429&&(o.all=r+60*1e3);return o}const im=64;function OE(e,t,n=ou(e.bufferSize||im)){let r={};const o=a=>n.drain(a);function s(a,[c,u],l){const f=kl(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)=>{om(r,kl(p))?s("ratelimit_backoff",d,p):c.push(d)}),c.length===0)return Promise.resolve({});const u=ht(a[0],c),l=d=>{if(Ka(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:Os(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=sm(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===ru)return A&&_.error("Skipped sending event because buffer is full."),l("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function PE(e,t,n){const r=[{type:"client_report"},{timestamp:Hn(),discarded_events:e}];return ht(t?{dsn:t}:{},[r])}function LE(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?.[Wc],exclusive_time:i?.[yo],measurements:e.measurements,is_segment:!0}}function DE(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&&{[Wc]:e.profile_id},...e.exclusive_time&&{[yo]:e.exclusive_time}}}},measurements:e.measurements}}function $E(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 Fe={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},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function FE(e){return typeof e=="boolean"||"allow"in e||"deny"in e}function BE(e){return e===void 0?{...Fe.httpHeaders}:FE(e)?{request:e,response:e}:{request:e.request??Fe.httpHeaders.request,response:e.response??Fe.httpHeaders.response}}function UE(e){const t=e.dataCollection??{};return{userInfo:t.userInfo??Fe.userInfo,cookies:t.cookies??Fe.cookies,httpHeaders:BE(t.httpHeaders),httpBodies:t.httpBodies??Fe.httpBodies,urlQueryParams:t.urlQueryParams??Fe.urlQueryParams,graphQL:{document:t.graphQL?.document??Fe.graphQL.document,variables:t.graphQL?.variables??Fe.graphQL.variables},genAI:{inputs:t.genAI?.inputs??Fe.genAI.inputs,outputs:t.genAI?.outputs??Fe.genAI.outputs},databaseQueryData:t.databaseQueryData??Fe.databaseQueryData,queues:t.queues??Fe.queues,stackFrameVariables:t.stackFrameVariables??Fe.stackFrameVariables,frameContextLines:t.frameContextLines??Fe.frameContextLines}}const Wl="Not capturing exception because it's already been captured.",zl="Discarded session because of missing or non-string release",am=Symbol.for("SentryInternalError"),cm=Symbol.for("SentryDoNotSendEventError"),HE=5e3,um=Symbol.for("SentryClosedClient");function WE(e){return um in e}function jl(e){return{message:e,[am]:!0}}function ca(e){return{message:e,[cm]:!0}}function ql(e){return nt(e)&&am in e}function Gl(e){return nt(e)&&cm in e}function Vl(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??HE;u>0&&(a=!0,i=bo(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class zE{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=ou(t.transportOptions?.bufferSize??im),this._dataCollection=UE(t),this._unhandledSessionStatus="crashed",t.dsn?this._dsn=Kp(t.dsn):A&&_.warn("No DSN provided, client will not send events.");const{beforeSendSpan:n,traceLifecycle:r}=this._options;if(A&&n&&wi(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=Xh(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})}Vl(this,"afterCaptureLog","flushLogs",GE,Zh),Vl(this,"afterCaptureMetric","flushMetrics",qE,tm)}captureException(t,n,r){const o=Oe();if(cl(t))return A&&_.log(Wl),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:Oe(),...r},i=di(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=Oe();if(n?.originalException&&cl(n.originalException))return A&&_.log(Wl),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Ya(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,um,{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(),$E(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),uh(this,t,this._integrations),n||bl(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=NE(t,this);let o=Yv(t,this._dsn,this._options._metadata,this._options.tunnel);if(!nc(n))for(const s of n.attachments||[])o=Il(o,qb(s));r&&(o=Il(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=vi}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){A&&_.warn(zl);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){A&&_.warn(zl);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=Kv(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=Ab(this,t),bl(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),qh(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Uc(r)},...a.contexts};const c=Ei(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),o=me()){return A&&oc(t)&&_.log(`Captured error event \`${jh(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{A&&(Gl(s)?_.log(s.message):ql(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=lm(t),c=oc(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=Ya(t.type);let m=0;return this._prepareEvent(t,n,r,o).then(g=>{if(g===null)throw ca("An event processor returned `null`, will not send event.");return m=g.spans?.length||0,nc(n)?g:jE(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 jl(`${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 ca(`${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"),ca(`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 Gl(g)||ql(g)?g:(this.captureException(g,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:g}),jl(`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===ru&&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=PE(t,this._options.tunnel&&Wt(this._dsn));this.sendEnvelope(n)}}function jE(e,t,n,r,o){const{beforeSend:s,ignoreSpans:i,beforeSendTransaction:a}=e,c=wi(e.beforeSendSpan)&&e.beforeSendSpan;let u=t;if(oc(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(lm(u)){if(c||i){const l=LE(u);if(i?.length&&As({description:l.description,op:l.op,attributes:l.data},i))return r("ignored"),null;if(c){const f=xs(l,c);u=_o(t,DE(f))}if(u.spans){const f=[],d=u.spans;for(const p of d){if(i?.length&&As({description:p.description,op:p.op,attributes:p.data},i)){Ib(d,p);continue}c?f.push(xs(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 oc(e){return e.type===void 0}function lm(e){return e.type==="transaction"}function qE(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+dm(e.attributes)}function GE(e){let t=0;return e.message&&(t+=e.message.length*2),t+dm(e.attributes)}function dm(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Kl(n[0]):lt(n)?t+=Kl(n):t+=100}),t}function Kl(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function VE(e,t){t.debug===!0&&(A?_.enable():ft(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),YE(),q().update(t.initialScope);const r=new e(t);return XE(r),r.init(),r}function KE(){const e=v();return e&&!WE(e)?e:void 0}function YE(){KE()&&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 XE(e){q().setClient(e)}const ua=100,la=5e3,JE=36e5;function QE(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=la,i;function a(f,d,p){return Ka(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,JE))}async function l(f,d=!1){if(!d&&Ka(f,["replay_event","replay_recording"]))return await o.push(f),c(ua),{};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=ua;if(p){if(p.headers?.["retry-after"])h=rm(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=la,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=la,c(ua)),r.flush(f))}}}const da="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function fm(e,t){let n;return mr(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function ZE(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=fm(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function ew(e,t){return ht(t?{...e[0],dsn:t}:e[0],e[1])}function HP(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const l=u.getEvent();return l?.extra?.[da]&&Array.isArray(l.extra[da])?l.extra[da]:[]});function i(u,l){const f=l?`${u}:${l}`:u;let d=o.get(f);if(!d){const p=qp(u);if(!p)return;const h=Xh(p,n.tunnel);d=l?ZE(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 fm(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(ew(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 su="[Filtered]",Yl=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],tw=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function nw(e,t){return t.some(n=>e.includes(n))}function pm(e,t,n){if(t===!1)return!0;const r=e.toLowerCase(),o=n!=null?[...Yl,...n]:Yl;if(nw(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]=pm(o,t,n)?su:e[o];return r}function rw(e,t){return(Array.isArray(e)?e:[e]).flatMap(r=>typeof r!="string"?[]:t==="set-cookie"?ow(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 ow(e){return e.split(/,(?=[^;=,]*=)/)}function sw(e){const t={};for(const[n,r]of e)t[n]===void 0&&(t[n]=n===""?su:iw(r));return t}function iw(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 sc(e,t,n){if(t===!1)return{};const r=sw(rw(e,n));return Ln(r,t,tw)}function hm(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&&pm(s,t)?`${o}=${su}`:n}).join("&")}function aw(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=hm(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}function mm(e){return(e??v())?.getDataCollectionOptions().urlQueryParams??!0}function be(e,t){return e===void 0?void 0:aw(e,mm(t))}function gm(e,t){return e?hm(e,mm(t)):void 0}const cw="thismessage:/";function Ci(e){return"isRelative"in e}function Dn(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?cw: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 _m(e){if(Ci(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 ym(e){return e?.replace(/^\?/,"")||void 0}function Sm(e){return e?.replace(/^#/,"")||void 0}function iu(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 bm(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 vm(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return lw(e,n)||uw(e,r)}function uw(e,t){return t?Xl(e)===Xl(t):!1}function lw(e,t){const n=Dn(e);return!n||Ci(n)||!t?!1:dw(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function dw(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function Xl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function fw(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 pw=fw;function hw(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 Em(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 wm(e={}){const t=e.client||v();if(!lE()||!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&&mS())return{};const a=s&&!i?bb(s):mw(o),c=s?st(s):Ei(t,o),u=jp(c);if(!Yp.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?vb(s):gw(o)),f}function mw(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Jp(t,r,n)}function gw(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Qp(t,r,n)}const Jl=new WeakMap;function _w(e){const t=`${e.flags.replace(/[gy]/g,"")}${e.ignoreCase?"":"i"}`;if(t===e.flags)return e;const n=Jl.get(e);if(n)return n;const r=new RegExp(e.source,t);return Jl.set(e,r),r}function fa(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(fp(o)&&_w(o).test(e))return!0;return!1}const yw=100;function Et(e,t){const n=v(),r=me();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=yw}=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 Sw="FunctionToString",Ql=new WeakMap,bw=(()=>({name:Sw,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Fc(this);let r;try{Ql.has(v())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Ql.set(e,!0)}})),vw=bw,Ew=[/^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$/],ww="EventFilters",Tw=(e={})=>{let t;return{name:ww,setup(n){const r=n.getOptions();t=Zl(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=Zl(e,s)}return Iw(n,t)?null:n}}};function Zl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ew],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Iw(e,t){if(e.type){if(e.type==="transaction"&&Rw(e,t.ignoreTransactions))return A&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
+
Event: ${wn(e)}`),!0}else{if(kw(e,t.ignoreErrors))return A&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
+
Event: ${wn(e)}`),!0;if(xw(e))return A&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
+
Event: ${wn(e)}`),!0;if(Cw(e,t.denyUrls))return A&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
+
Event: ${wn(e)}.
|
|
15
|
+
Url: ${Ds(e)}`),!0;if(!Aw(e,t.allowUrls))return A&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
+
Event: ${wn(e)}.
|
|
17
|
+
Url: ${Ds(e)}`),!0}return!1}function kw(e,t){return t?.length?jh(e).some(n=>Ht(n,t)):!1}function Rw(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Ht(n,t):!1}function Cw(e,t){if(!t?.length)return!1;const n=Ds(e);return n?Ht(n,t):!1}function Aw(e,t){if(!t?.length)return!0;const n=Ds(e);return n?Ht(n,t):!0}function Nw(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 Ds(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Nw(n):null}catch{return A&&_.error(`Cannot extract url for event ${wn(e)}`),null}}function xw(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Mw(e,t,n,r,o,s){if(!o.exception?.values||!s||!Ae(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=fs(e,t,r,s.originalException,n,o.exception.values,i,0))}function fs(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Ae(r[o])){pa(i,a,r);const u=e(t,r[o]),l=c.length;ha(u,o,l,a),c=fs(e,t,n,r[o],o,[u,...c],u,l)}return Tm(r)&&r.errors.forEach((u,l)=>{if(Ae(u)){pa(i,a,r);const f=e(t,u),d=c.length;ha(f,`errors[${l}]`,d,a),c=fs(e,t,n,u,o,[f,...c],f,d)}}),Ow(r)&&["error","suppressed"].forEach(u=>{const l=r[u];if(Ae(l)){pa(i,a,r);const f=e(t,l),d=c.length;ha(f,u,d,a),c=fs(e,t,n,l,o,[f,...c],f,d)}}),c}function Tm(e){return Array.isArray(e.errors)}function Ow(e){return"error"in e&&"suppressed"in e}function pa(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Tm(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ha(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Pw(e){return Ae(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ed(e){return Pw(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Im=new Map,td=new Set;function Lw(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(td.has(t))continue;td.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){Im.set(o.filename,n);break}}}function Dw(e,t){return Lw(e),Im.get(t)}function km(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Dw(e,r.filename);o&&(r.module_metadata=o)})})}function Rm(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const WP=()=>({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&&(Rm(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;km(n,t)})}}),$s=new Set([]);function au(e){const t="console",n=un(t,e);return ln(t,Fw),n}function $w(e){for(const t of e)$s.add(t);return()=>{for(const t of e)$s.delete(t)}}const nd=new Set;function Fw(){"console"in $&&li.forEach(function(e){nd.has(e)||!(e in $.console)||(nd.add(e),Me($.console,e,function(t){return Ts[e]=t,function(...n){const r=n[0],o=Ts[e],s=$s.size&&typeof r=="string"&&Ht(r,$s);s||et("console",{args:n,level:e}),(!s||A&&_.isEnabled())&&o?.apply($.console,n)}}))})}function Fs(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Bw="CaptureConsole",Uw=((e={})=>{const t=e.levels||li,n=e.handled??!0;return{name:Bw,setup(r){"console"in $&&au(({args:o,level:s})=>{v()!==r||!t.includes(s)||Hw(o,s,n)})}}}),zP=Uw;function Hw(e,t,n){const r=Fs(t),o=new Error,s={level:Fs(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: ${ja(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=ja(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const Ww="Dedupe",zw=(()=>{let e;return{name:Ww,processEvent(t){if(t.type)return t;try{if(qw(t,e))return A&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),jw=zw;function qw(e,t){return t?!!(Gw(e,t)||Vw(e,t)):!1}function Gw(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Am(e,t)||!Cm(e,t))}function Vw(e,t){const n=rd(t),r=rd(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Am(e,t)||!Cm(e,t))}function Cm(e,t){const n=Ha(e),r=Ha(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 Am(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 rd(e){return e.exception?.values?.[0]}const Kw="ExtraErrorData",Yw=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Kw,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return Xw(r,o,t,n,i)}}}),jP=Yw;function Xw(e,t={},n,r,o){if(!t.originalException||!Ae(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Nm(t.originalException,r,o);if(i){const a={...e.contexts},c=Te(i,n);return Ue(c)&&(By(c),a[s]=c),{...e,contexts:a}}return e}function Nm(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]=Ae(i)||typeof i=="string"?n?so(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(Ae(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:Nm(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]=Ae(a)?a.toString():a}}return o}catch(r){A&&_.error("Unable to extract extra data from the Error object:",r)}return null}function Jw(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 Qw=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Zw(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Qw.exec(t);return n?n.slice(1):[]}function od(...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=Jw(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function sd(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 e0(e,t){e=od(e).slice(1),t=od(t).slice(1);const n=sd(e.split("/")),r=sd(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 t0(e,t){return Zw(e)[2]||""}const n0="RewriteFrames",qP=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,o=e.iteratee||r0({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:n0,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function r0({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?e0(t,i):t0(i);r.filename=`${n}${a}`}return r}}const o0=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],s0=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],i0={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"},xm=["select","insert","upsert","update","delete"];function Ai(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Ni(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Mm(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function a0(e,t){return Mm(e,t)!==void 0}function Om(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 c0(e,t={}){switch(e){case"GET":case"QUERY":return"select";case"POST":return Om(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function u0(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&&i0[n]||"filter",`${o}(${e}, ${r.join(".")})`}function id(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 Vc({name:a,attributes:{[re]:"auto.db.supabase",[H]:Dh,[Cp]:"postgresql",[Rp]: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 l0(e){const t=e.auth;if(!(!t||Ni(e.auth))){for(const n of o0){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=id(r))}for(const n of s0){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=id(r,!0))}Ai(e.auth)}}function d0(e,t){Ni(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 p0(i,t),s}}),Ai(e.prototype.from))}function f0(e,t){Ni(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){const s=xm,i=r,a=c0(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(u0(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=Mm(i.body,f),m=a==="select"?"":`${a}${a0(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":Om(i.headers,"X-Client-Info"),[Cp]:"postgresql",[Rp]:a,[re]:"auto.db.supabase",[H]:Dh};return l.length&&p&&(b["db.query"]=l),h!==void 0&&p&&(b["db.body"]=h),Vc({name:T,attributes:b},M=>Reflect.apply(n,r,[]).then(I=>{if(M&&(I&&typeof I=="object"&&"status"in I&&Rs(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&&(Rs(M,500),M.end()),I}).then(...o))}}),Ai(e.prototype.then))}function p0(e,t){for(const n of xm)Ni(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`),f0(a,t),i}}),Ai(e.prototype[n]))}const h0=(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;d0(n,t),l0(e)},m0="Supabase",g0=((e,t)=>({setupOnce(){h0(e,t)},name:m0})),GP=e=>g0(e.supabaseClient,{sendOperationData:e.sendOperationData}),_0=10,y0="ZodErrors";function S0(e){return Ae(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function b0(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 v0(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function E0(e){const t=new Set;for(const r of e.issues){const o=v0(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 w0(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!S0(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(b0);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:E0(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 T0=((e={})=>{const t=e.limit??_0;return{name:y0,processEvent(n,r){return w0(t,e.saveZodIssuesAsAttachment,n,r)}}}),VP=T0,KP=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&&(Rm(i),o[1]=i)}})}),n.on("applyFrameMetadata",r=>{if(r.type)return;const o=n.getOptions().stackParser;km(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=k0(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 I0(e,t,n){if(t!==0)return!1;if(n&&R0(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(A0))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(C0))return!0}return!1}function k0(e,t,n){const r=Ha(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!I0(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(ad)).map(s=>s.slice(ad.length)):[])}function R0(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const ad="_sentryBundlerPluginAppKey:",C0="Attempt to invoke user-land function",A0="fn.apply(this, wrappedArguments)",N0="Console",x0=(e={})=>{const t=new Set(e.levels||li);return{name:N0,setup(n){const r=au(({args:o,level:s})=>{v()!==n||!t.has(s)||M0(s,o)});if(n.registerCleanup(r),e.filter){const o=$w(e.filter);n.registerCleanup(o)}}}};function M0(e,t){const n={category:"console",data:{arguments:t,logger:"console"},level:Fs(e),message:cd(t)};if(e==="assert")if(t[0]===!1){const r=t.slice(1);n.message=r.length>0?`Assertion failed: ${cd(r)}`:"Assertion failed",n.data.arguments=r}else return;Et(n,{input:t,level:e})}function cd(e){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):ja(e," ")}const O0=100,P0=10,Go="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=O0){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;L0(o,e,t,n)}function L0(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=P0){if(typeof t!="boolean")return;const r=he();if(!r)return;const o=Ne(r).data;if(`${Go}${e}`in o){r.setAttribute(`${Go}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(Go)).length<n&&r.setAttribute(`${Go}${e}`,t)}const YP=()=>({name:"FeatureFlags",processEvent(e,t,n){return Mr(e)},addFeatureFlag(e,t){$n(e,t),Fn(e,t)}}),D0=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Me(t,"isOn",ud),typeof t.getFeatureValue=="function"&&Me(t,"getFeatureValue",ud)},processEvent(t,n,r){return Mr(t)}});function ud(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 $0="ConversationId",F0=(()=>({name:$0,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(TS,o)}})}})),B0=F0;function U0(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&&(z0(y,e),H0(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?Kc(G0(i,s,c,f,l)):new Mn,m=ki(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=W0(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 H0(e,t,n){n?.onRequestSpanEnd?.(e,{headers:t.response?.headers,error:t.error})}function W0(e,t,n,r){const o=wm({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||($c(e)?e.headers:void 0);if(c)if(j0(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?Vo(l)||u.set("baggage",`${l},${i}`):u.set("baggage",i)}return u}else if(q0(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"&&Vo(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=>Vo(m)):Vo(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 z0(e,t){if(t.response){Rs(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute(Np,r)}}else t.error&&e.setStatus({code:we,message:"internal_error"});e.end()}function Vo(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Cs))}function j0(e){return typeof Headers<"u"&&pi(e,Headers)}function q0(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function G0(e,t,n,r,o){const s=!!r&&V(r),i=iu(e,o);if(e.startsWith("data:")){const u=Dt(e);return{name:s?t:`${t} ${u}`,attributes:ld(e,void 0,t,n,r,i)}}const a=Dn(e),c=a?_m(a):e;return{name:s?i?`${t} ${i}`:t:`${t} ${c}`,attributes:ld(e,a,t,n,r,i)}}function ld(e,t,n,r,o,s){const i={[Le]:be(Dt(e),o),type:"fetch",[mi]:n,[re]:r,[H]:$h,[_i]:s};return t&&(Ci(t)||(i[Le]=be(Dt(t.href),o),i[gi]=t.hostname,i[YS]=t.port?Number(t.port):void 0),i[Pp]=gm(ym(t.search),o),i[Op]=Sm(t.hash)),i}const ic=$;function V0(){if(!("fetch"in ic))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ac(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function K0(){if(typeof EdgeRuntime=="string")return!0;if(!V0())return!1;if(ac(ic.fetch))return!0;let e=!1;const t=ic.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ac(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 xi(e){const t="fetch",n=un(t,e);return ln(t,()=>Pm()),n}function Y0(e){const t="fetch-body-resolved",n=un(t,e);return ln(t,()=>Pm(J0)),n}function Pm(e){on()&&!K0()||Me($,"fetch",function(t){return new Proxy(t,{apply(n,r,o){const s=new Error,{method:i,url:a}=Q0(o),c={args:o,fetchData:{method:i,url:a},startTimestamp:fe()*1e3,virtualError:s,headers:Z0(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}),Ae(u)&&u.stack===void 0&&(u.stack=s.stack,pe(u,"framesToPop",1));const f=v()?.getOptions().enhanceFetchErrorMessages??"always";if(f!==!1&&Ae(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 X0(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 J0(e){let t;try{t=e.clone()}catch{return}X0(t,()=>{et("fetch-body-resolved",{endTimestamp:fe()*1e3,response:e})})}function ps(e,t){return nt(e)&&!!e[t]}function dd(e){return typeof e=="string"?e:e?ps(e,"url")?e.url:e.toString?e.toString():"":""}function Q0(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:dd(n),method:ps(r,"method")?String(r.method).toUpperCase():$c(n)&&ps(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:dd(t),method:ps(t,"method")?String(t.method).toUpperCase():"GET"}}function Z0(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if($c(t))return new Headers(t.headers)}catch{}}function Lm(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}class cu{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 eT(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){Ls({level:e,message:t,attributes:n,severityNumber:o},r)}function tT(e,t,{scope:n}={}){Or("trace",e,t,n)}function nT(e,t,{scope:n}={}){Or("debug",e,t,n)}function rT(e,t,{scope:n}={}){Or("info",e,t,n)}function oT(e,t,{scope:n}={}){Or("warn",e,t,n)}function sT(e,t,{scope:n}={}){Or("error",e,t,n)}function iT(e,t,{scope:n}={}){Or("fatal",e,t,n)}const XP=Object.freeze(Object.defineProperty({__proto__:null,debug:nT,error:sT,fatal:iT,fmt:pw,info:rT,trace:tT,warn:oT},Symbol.toStringTag,{value:"Module"}));function Bs(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):aT(e,t,n)}function aT(e,t,n){return e.map(r=>lt(r)?String(r):JSON.stringify(Te(r,t,n))).join(" ")}function Dm(e){return/%[sdifocO]/.test(e)}function $m(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 cT="ConsoleLogs",fd={[re]:"auto.log.console"},uT=((e={})=>{const t=e.levels||li;return{name:cT,setup(n){const{normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=n.getOptions(),s=au(({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: ${Bs(u,r,o)}`:"Assertion failed";Ls({level:"error",message:d,attributes:fd})}return}const l=a==="log",f={...fd};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"&&!Dm(c)){const p=$m(c,u);for(const[h,m]of Object.entries(p))f[h]=h.startsWith("sentry.message.parameter.")?Te(m,r,o):m}Ls({level:l?"info":a,message:Bs(i,r,o),severityNumber:l?10:void 0,attributes:f})});n.registerCleanup(s)}}}),JP=uT;function uu(e,t,n,r){AE({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function lu(e,t=1,n){uu("counter",e,t,n)}function lT(e,t,n){uu("gauge",e,t,n)}function Us(e,t,n){uu("distribution",e,t,n)}const QP=Object.freeze(Object.defineProperty({__proto__:null,count:lu,distribution:Us,gauge:lT},Symbol.toStringTag,{value:"Module"})),dT=["trace","debug","info","warn","error","fatal"];function ZP(e={}){const t=new Set(e.levels??dT),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=hT(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=gT(mT(a,p,h),p,h);g?.attributes&&Object.assign(m,g.attributes),Ls({level:d,message:g?.message||i||a&&Bs(a,p,h)||"",attributes:m})}}}const fT={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"},pT={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function hT(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=fT[e];if(n)return n}if(typeof t=="number"){const n=pT[t];if(n)return n}return"info"}function mT(e,t,n){if(!e?.length)return{message:""};const r=Bs(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"&&!Dm(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function gT(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=$m(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,Fm="Report a Bug",_T="Cancel",yT="Send Bug Report",ST="Confirm",bT="Report a Bug",vT="your.email@example.org",ET="Email",wT="What's the bug? What did you expect?",TT="Description",IT="Your Name",kT="Name",RT="Thank you for your report!",CT="(required)",AT="Add a screenshot",NT="Remove screenshot",xT="Highlight",MT="Hide",OT="Remove",Bm="Unable to submit feedback with empty message",Um="No client setup, cannot send feedback.",Hm="Unable to determine if Feedback was correctly sent.",Wm="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",zm="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",PT="widget",LT="api",DT=5e3,$T={ERROR_EMPTY_MESSAGE:Bm,ERROR_NO_CLIENT:Um,ERROR_TIMEOUT:Hm,ERROR_FORBIDDEN:Wm,ERROR_GENERIC:zm};function FT(e,t){return t?.[e]??$T[e]}function jr(e,t){return new Error(FT(e,t))}const BT=(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=eT({source:LT,url:UT(),...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 UT(){try{return Ze.document.location.href}catch{return""}}const hs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function HT(){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 Ko(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 WT(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,zT="http://www.w3.org/2000/svg";function jT(){const e=a=>Ze.document.createElementNS(zT,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 qT({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||Fm,o.appendChild(jT()),e){const i=ue.createElement("span");i.appendChild(ue.createTextNode(e)),o.appendChild(i)}const s=WT(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 jm="rgba(88, 74, 192, 1)",GT={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:jm,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%)"},pd={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:jm,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 hd(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 md({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
|
+
${hd(e==="dark"?{...pd,...t}:{...GT,...n})}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${e==="system"?`
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:host {
|
|
101
|
+
color-scheme: only dark;
|
|
102
|
+
|
|
103
|
+
${hd({...pd,...t})}
|
|
104
|
+
}
|
|
105
|
+
}`:""}
|
|
106
|
+
`,r&&o.setAttribute("nonce",r),o}const qm=({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=AT,cancelButtonLabel:b=_T,confirmButtonLabel:M=ST,emailLabel:I=ET,emailPlaceholder:k=vT,formTitle:R=bT,isRequiredLabel:U=CT,messageLabel:E=TT,messagePlaceholder:O=wT,nameLabel:x=kT,namePlaceholder:w=IT,removeScreenshotButtonLabel:D=NT,submitButtonLabel:N=yT,successMessageText:J=RT,triggerLabel:Q=Fm,triggerAriaLabel:P="",highlightToolText:Y=xT,hideToolText:B=MT,removeHighlightText:ee=OT,errorEmptyMessageText:Se=Bm,errorNoClientText:se=Um,errorTimeoutText:De=Hm,errorForbiddenText:zt=Wm,errorGenericText:Ur=zm,onFormOpen:Hr,onFormClose:Wr,onSubmitSuccess:Wo,onSubmitError:pn,onFormSubmitted:zo}={})=>{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:De,errorForbiddenText:zt,errorGenericText:Ur,onFormClose:Wr,onFormOpen:Hr,onSubmitError:pn,onSubmitSuccess:Wo,onFormSubmitted:zo};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=md(F),Qe.appendChild(ze)}return Qe},jn=async F=>{const ie=F.enableScreenshot&&HT();let X,ae;try{X=(t?t():await e("feedbackModalIntegration",m))(),vl(X)}catch{throw hs&&_.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(),vl(ae))}catch{hs&&_.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,Iy)=>BT(_n,{includeReplay:!0,...Iy,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=Ko(Tt,ie),ae=typeof F=="string"?ue.querySelector(F):typeof F.addEventListener=="function"?F:null;if(!ae)throw hs&&_.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=Ko(Tt,F),X=zn(ie),ae=qT({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(Ko(Tt,F));return ie.appendToDom(),ie},async createForm(F={}){return jn(Ko(Tt,F))},setTheme(F){if(Tt.colorScheme=F,Qe){const ie=md(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 eL(){return v()?.getIntegrationByName("Feedback")}var Mi,ye,Gm,Vt,gd,Vm,Km,ma,ms,Qr,Ym,du,cc,uc,Hs={},Ws=[],VT=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Oi=Array.isArray;function Rt(e,t){for(var n in t)e[n]=t[n];return e}function fu(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?Mi.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 gs(e,i,r,o,null)}function gs(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??++Gm,__i:-1,__u:0};return o==null&&ye.vnode!=null&&ye.vnode(s),s}function ko(e){return e.children}function _s(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 KT(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),pu(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,eg(r,s,o),t.__e=t.__=null,s.__e!=n&&Xm(s)}}function Xm(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}),Xm(e)}function _d(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!zs.__r++||gd!=ye.debounceRendering)&&((gd=ye.debounceRendering)||Vm)(zs)}function zs(){try{for(var e,t=1;Vt.length;)Vt.length>t&&Vt.sort(Km),e=Vt.shift(),t=Vt.length,KT(e)}finally{Vt.length=zs.__r=0}}function Jm(e,t,n,r,o,s,i,a,c,u,l){var f,d,p,h,m,g,y=r&&r.__k||Ws,S=t.length;for(c=YT(n,t,y,c,S),f=0;f<S;f++)(p=n.__k[f])!=null&&(d=p.__i!=-1&&y[p.__i]||Hs,p.__i=f,g=pu(e,p,d,o,s,i,a,c,u,l),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&hu(d.ref,null,p),l.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),4&p.__u?(c=Qm(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 YT(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]=gs(null,i,null,null,null):Oi(i)?i=e.__k[s]=gs(ko,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?i=e.__k[s]=gs(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=XT(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)),ng(a,a));return r}function Qm(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=Qm(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 XT(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 yd(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||VT.test(t)?n:n+"px"}function Yo(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||yd(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||yd(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(Ym,"$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]=du,e.addEventListener(t,s?uc:cc,s)):e.removeEventListener(t,s?uc:cc,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 Sd(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[ms]==null)t[ms]=du++;else if(t[ms]<n[Qr])return;return n(ye.event?ye.event(t):t)}}}function pu(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 _s(S,M),d.constructor=E,d.render=QT),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)}),Ws.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),Ws.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?tg(l.props.children):l,a=Jm(e,Oi(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--;)fu(s[U])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),O.then||Zm(t),ye.__e(O,t,n)}}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=JT(n.__e,t,n,r,o,s,i,c,u);return(l=ye.diffed)&&l(t),128&t.__u?void 0:a}function Zm(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Zm))}function eg(e,t,n){for(var r=0;r<n.length;r++)hu(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 tg(e){return typeof e!="object"||e==null||e.__b>0?e:Oi(e)?e.map(tg):e.constructor!==void 0?null:Rt({},e)}function JT(e,t,n,r,o,s,i,a,c){var u,l,f,d,p,h,m,g=n.props||Hs,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&&Mi.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||Yo(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||Yo(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=""),Jm(t.type=="template"?e.content:e,Oi(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--;)fu(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])&&Yo(e,u,h,g[u],o),u="checked",m!=null&&m!=e[u]&&Yo(e,u,m,g[u],o))}return e}function hu(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 ng(e,t,n){var r,o;if(ye.unmount&&ye.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||hu(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]&&ng(r[o],t,n||typeof e.type!="function");n||fu(e.__e),e.__c=e.__=e.__e=void 0}function QT(e,t,n){return this.constructor(e,n)}function ZT(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=[],pu(t,e=t.__k=te(ko,null,[e]),o||Hs,Hs,t.namespaceURI,o?null:t.firstChild?Mi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),eg(s,e,i),e.props.children=null}Mi=Ws.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}},Gm=0,_s.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),_d(this))},_s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_d(this))},_s.prototype.render=ko,Vt=[],Vm=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Km=function(e,t){return e.__v.__b-t.__v.__b},zs.__r=0,ma=Math.random().toString(8),ms="__d"+ma,Qr="__a"+ma,Ym=/(PointerCapture)$|Capture$/i,du=0,cc=Sd(!1),uc=Sd(!0);var $t,le,ga,bd,gr=0,rg=[],ve=ye,vd=ve.__b,Ed=ve.__r,wd=ve.diffed,Td=ve.__c,Id=ve.unmount,kd=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,og(ig,e)}function og(e,t,n){var r=Wn($t++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ig(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 eI(e,t){var n=Wn($t++,3);!ve.__s&&mu(n.__H,t)&&(n.__=e,n.u=t,le.__H.__h.push(n))}function sg(e,t){var n=Wn($t++,4);!ve.__s&&mu(n.__H,t)&&(n.__=e,n.u=t,le.__h.push(n))}function tI(e){return gr=5,Ro(function(){return{current:e}},[])}function nI(e,t,n){gr=6,sg(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 mu(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 rI(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 oI(e,t){ve.useDebugValue&&ve.useDebugValue(t?t(e):e)}function sI(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 iI(){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 aI(){for(var e;e=rg.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ys),t.__h.some(lc),t.__h=[]}catch(n){t.__h=[],ve.__e(n,e.__v)}}}ve.__b=function(e){le=null,vd&&vd(e)},ve.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),kd&&kd(e,t)},ve.__r=function(e){Ed&&Ed(e),$t=0;var t=(le=e.__c).__H;t&&(ga===le?(t.__h=[],le.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(ys),t.__h.some(lc),t.__h=[],$t=0)),ga=le},ve.diffed=function(e){wd&&wd(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(rg.push(t)!==1&&bd===ve.requestAnimationFrame||((bd=ve.requestAnimationFrame)||cI)(aI)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),ga=le=null},ve.__c=function(e,t){t.some(function(n){try{n.__h.some(ys),n.__h=n.__h.filter(function(r){return!r.__||lc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ve.__e(r,n.__v)}}),Td&&Td(e,t)},ve.unmount=function(e){Id&&Id(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{ys(r)}catch(o){t=o}}),n.__H=void 0,t&&ve.__e(t,n.__v))};var Rd=typeof requestAnimationFrame=="function";function cI(e){var t,n=function(){clearTimeout(r),Rd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rd&&(t=requestAnimationFrame(n))}function ys(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function lc(e){var t=le;e.__c=e.__(),le=t}function mu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ig(e,t){return typeof t=="function"?t(e):t}const uI=Object.defineProperty({__proto__:null,useCallback:ir,useContext:rI,useDebugValue:oI,useEffect:eI,useErrorBoundary:sI,useId:iI,useImperativeHandle:nI,useLayoutEffect:sg,useMemo:Ro,useReducer:og,useRef:tI,useState:kn},Symbol.toStringTag,{value:"Module"}),lI="http://www.w3.org/2000/svg";function dI(){const e=r=>ue.createElementNS(lI,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 fI({options:e}){const t=Ro(()=>({__html:dI().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 pI(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 _a(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function hI({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=pI(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:_a(ee,"name"),email:_a(ee,"email"),message:_a(ee,"message"),attachments:Se?[Se]:void 0};if(!P(se))return;try{const De=await o({name:se.name,email:se.email,message:se.message,source:PT,tags:l},{attachments:se.attachments});s(se,De)}catch(De){hs&&_.error(De);const zt=De;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(ya,{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(ya,{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(ya,{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 ya({label:e,isRequired:t,isRequiredLabel:n}){return te("span",{class:"form__label__text"},e,t&&te("span",{class:"form__label__text--required"},n))}const Xo=16,Cd=17,mI="http://www.w3.org/2000/svg";function gI(){const e=c=>Ze.document.createElementNS(mI,c),t=Ve(e("svg"),{width:`${Xo}`,height:`${Cd}`,viewBox:`0 0 ${Xo} ${Cd}`,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:`${Xo}`,height:`${Xo}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function _I({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Ro(()=>({__html:gI().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)},DT))},[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(fI,{options:r}),te(hI,{...n,onSubmitSuccess:c})))))}const yI=`
|
|
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
|
+
`,SI=`
|
|
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
|
+
`,bI=`
|
|
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
|
+
`,vI=`
|
|
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
|
+
`,EI=`
|
|
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 wI(e){const t=ue.createElement("style");return t.textContent=`
|
|
390
|
+
:host {
|
|
391
|
+
--dialog-inset: var(--inset);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
${yI}
|
|
395
|
+
${SI}
|
|
396
|
+
${bI}
|
|
397
|
+
${vI}
|
|
398
|
+
${EI}
|
|
399
|
+
`,e&&t.setAttribute("nonce",e),t}function TI(){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 II=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=TI(),a=ue.createElement("div"),c=wI(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:uI,dialog:l,options:e}),d=p=>{ZT(te(_I,{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 kI({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 RI(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 CI({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 AI({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 NI(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 Sa(e,t){Kt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function ba(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=>{NI(s,o,t)})})}function xI({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=AI({hooks:t}),i=CI({h:e}),a=kI({h:e}),c={__html:RI(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),Sa(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)}),ba(S.current,I,h)},[h,I]),t.useEffect(()=>{k(n,f.dpi),Sa(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,ba(x,I,h),Sa(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)}),ba(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 MI=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ue.createElement("canvas");return{input:xI({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 ag=-1;const Pr=()=>ag,Lr=e=>{addEventListener("pageshow",t=>{t.persisted&&(ag=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)))}},gu=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},_u=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Co=()=>_u()?.activationStart??0;let Tn=-1;const cg=new Set,Ad=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,dc=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of cg)t();isFinite(Tn)||(Tn=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",dc,!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)??Ad(),addEventListener("visibilitychange",dc,!0),addEventListener("prerenderingchange",dc,!0),Lr(()=>{setTimeout(()=>{Tn=Ad()})})}return{get firstHiddenTime(){return Tn},onHidden(t){cg.add(t)}}},rt=(e,t=-1,n,r=0,o,s,i)=>{const a=_u(),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}},Nd=new WeakMap;function Pi(e,t){let n=Nd.get(t);return n||(n=new WeakMap,Nd.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}class OI{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,ug=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const n=e.keys().next().value;n!==void 0&&e.delete(n)}},lg=e=>{let t=!1;return()=>{t||(e(),t=!0)}};class PI{l}const Li=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},va=[1800,3e3],dg=(e,t={})=>{const n=Ao(t);Li(()=>{const r=Pi(t,PI),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,va,t.reportAllChanges),Lr(c=>{i=rt("FCP",-1,"back-forward-cache",i.navigationId,i.navigationInteractionId,i.navigationURL,Pr()),s=Ke(e,i,va,t.reportAllChanges),gu(()=>{i.value=performance.now()-c.timeStamp,s(!0)})})),n&&Un(["soft-navigation"],c=>{c.forEach(u=>{r.l&&u.navigationId&&ug(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,va,t.reportAllChanges),s(!0)})},t)})},xd=[.1,.25],LI=(e,t={})=>{const n=uo();dg(lg(()=>{let r,o=rt("CLS",0);const s=Pi(t,OI),i=(d,p,h,m,g)=>{o=rt("CLS",0,d,p,h,m,g),s.i=0,r=Ke(e,o,xd,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,xd,t.reportAllChanges),n.onHidden(()=>{u(f.takeRecords()),r(!0)}),Lr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Pr()),gu(r)}),setTimeout(r))}))};let fg=0,Ea=1/0,Jo=0;const DI=e=>{for(const t of e)t.interactionId&&(Ea=Math.min(Ea,t.interactionId),Jo=Math.max(Jo,t.interactionId),fg=Jo?(Jo-Ea)/7+1:0)};let fc;const Md=()=>fc?fg:performance.interactionCount??0,$I=()=>{"interactionCount"in performance||fc||(fc=Un(["event"],DI,{durationThreshold:0}))};class FI{u=0;v=[];m=new Map;p;T;_(){return Md()-this.u}M(){this.u=Md(),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 pg=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")e();else{const o=lg(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})}},Od=[200,500],BI=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=uo();Li(()=>{$I();let r,o=rt("INP");const s=Pi(t,FI),i=(d,p,h,m,g)=>{s.M(),o=rt("INP",-1,d,p,h,m,g),r=Ke(e,o,Od,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)=>{pg(()=>{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,Od,t.reportAllChanges),f&&(n.onHidden(()=>{u(f.takeRecords(),!0)}),Lr(()=>{i("back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,Pr())}))})};class UI{p;l;h(t){this.p?.(t)}}const wa=[2500,4e3],HI=(e,t={})=>{let n=!1;const r=Ao(t);Li(()=>{let o,s=uo(),i=rt("LCP");const a=Pi(t,UI),c=(p,h,m,g,y)=>{i=rt("LCP",-1,p,h,m,g,y),o=Ke(e,i,wa,t.reportAllChanges),n=!1,p==="soft-navigation"&&(s=uo(!0))},u=p=>{a.l&&p.navigationId&&ug(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,wa,t.reportAllChanges);const p=["keydown","click","visibilitychange"],h=m=>{if(m.isTrusted&&!n){const g=i.id;pg(()=>{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,wa,t.reportAllChanges),gu(()=>{i.value=performance.now()-m.timeStamp,n=!0,o(!0)})})}})},Ta=[800,1800],pc=e=>{document.prerendering?Li(()=>pc(e)):document.readyState!=="complete"?addEventListener("load",()=>pc(e),!0):setTimeout(e)},WI=(e,t={})=>{const n=Ao(t);let r=rt("TTFB"),o=Ke(e,r,Ta,t.reportAllChanges);pc(()=>{const s=_u();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,Ta,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,Ta,t.reportAllChanges),o(!0))})},t)}})},xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zr={},js={};let hg,mg,gg,_g,yg;const Sg={};let _r=!1,Di=!1;function zI(){_r=!0}function jI(){Di=!0}function qs(e,t=!1){return xo("cls",e,VI,hg,t)}function Gs(e,t=!1){return xo("lcp",e,KI,mg,t)}function qI(e){return xo("ttfb",e,YI,gg)}function GI(e){return xo("fcp",e,XI,yg)}function hc(e){return xo("inp",e,JI,_g)}function ct(e,t){return bg(e,t),js[e]||(QI(e),js[e]=!0),vg(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=>{!Di&&t.navigationType==="back-forward-cache"||e(t)}}function VI(){return LI(No(e=>{Dr("cls",{metric:e}),hg=e}),{reportAllChanges:!_r&&!Di,reportSoftNavs:_r})}function KI(){return HI(No(e=>{Dr("lcp",{metric:e}),mg=e}),{reportAllChanges:!_r&&!Di,reportSoftNavs:_r})}function YI(){return WI(No(e=>{Dr("ttfb",{metric:e}),gg=e}))}function XI(){return dg(No(e=>{Dr("fcp",{metric:e}),yg=e}))}function JI(){return BI(No(e=>{Dr("inp",{metric:e}),_g=e}),{reportSoftNavs:_r})}function xo(e,t,n,r,o=!1){return bg(e,t),js[e]||(js[e]=!0,Promise.resolve().then(()=>{Sg[e]=n()})),r&&t({metric:r}),vg(e,t,o)}function QI(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 bg(e,t){Zr[e]=Zr[e]||[],Zr[e].push(t)}function vg(e,t,n=!1){return()=>{n&&Sg[e]?.();const r=Zr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function Eg(e){return"duration"in e}const j=$,wg=5,ZI=5;let Qo,Zo,qr;const Yr=new cu(wg),Tg=new cu(wg);let Pd=!1;function Ld(e,t){return Math.abs(e-t)<=ZI}function Ig(){try{return PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&typeof j.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint=="function"}catch{return!1}}function ek(e){if(Pd||!Ig())return;Pd=!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;Qo=void 0;const o=qr;if(o!=null){if(Zo?.interactionTimestamp===o){Yr.set(Zo.interactionId,r),Zo=void 0;return}Qo={span:r,interactionTimestamp:o}}});const n=({entries:r})=>{for(const o of r){if(!Eg(o)||!o.interactionId)continue;const s=Qo;if(s&&Ld(o.startTime,s.interactionTimestamp)){Yr.set(o.interactionId,s.span),Qo=void 0;continue}Yr.get(o.interactionId)||qr!=null&&Ld(o.startTime,qr)&&(Zo={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}Tg.set(o.navigationId,s),s.setAttribute(kp,o.navigationId)}})}function tk(e){if(e.navigationType!=="soft-navigation")return;const t=Tg.get(e.navigationId);return t||(e.navigationInteractionId!=null?Yr.get(e.navigationInteractionId):void 0)}function Ia(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 nk(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 kg(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Rg(e){const t={};if(e.nextHopProtocol!=null){const{name:r,version:o}=nk(e.nextHopProtocol);t["network.protocol.version"]=o,t["network.protocol.name"]=r}if(Pe(e.startTime)===void 0)return t;const n=r=>r&&Pe(r,e.startTime);return rk({...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 rk(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const ok=2147483647;let Dd=0;function sk(){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=Pe(o.startTime);if(!s)continue;const i=ut(o.duration);n[H]==="navigation"&&r&&s<r||Ft(t,s,s+i,{name:Uh,op:Ov,attributes:{[re]:"auto.ui.browser.metrics"}})}})}function ik(){new PerformanceObserver(t=>{const n=he();if(n)for(const r of t.getEntries()){const o=Pe(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[ES]=d),p&&(c[wS]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Ft(n,o,o+a,{name:Uh,op:Pv,attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function ak(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(Dd).forEach(c=>{const u=Pe(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":{uk(e,c,r);break}case"paint":{ck(e,c,u,l);break}case"resource":{pk(e,c,c.name,u,l,o,r);break}}}),Dd=Math.max(s.length-1,0),hk(e,r)}function ck(e,t,n,r){Ft(e,n,n+r,{name:t.name,attributes:{[H]:xv,[re]:"auto.resource.browser.metrics",[bS]:t.name}})}function uk(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),fk(e,t,n)}function eo(e,t){return Pe(t,e.startTime)}const lk={secureConnection:xh,fetch:Mh,domainLookup:Oh,unloadEvent:kh,redirect:Rh,connect:Nh,domContentLoadedEvent:Ch,loadEvent:Ah};function qt(e,t,n,r){const o=dk(n),s=t[o],i=t[`${n}Start`];if(!i||!s)return;const a=lk[n],c=be(t.name);Ft(e,eo(t,i),eo(t,s),{name:r?ec[a]:c,attributes:{[H]:a,[re]:"auto.ui.browser.metrics",[Le]:c,...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function dk(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function fk(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?ec[Qa]:i,attributes:{[H]:Qa,[re]:"auto.ui.browser.metrics",[Le]:i}}),Ft(e,s,o,{name:n?ec[Za]:i,attributes:{[H]:Za,[re]:"auto.ui.browser.metrics",[Le]:i}})}}function pk(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:Nv;if(s?.includes(a))return;const c={[re]:"auto.resource.browser.metrics"},u=Cn(n);u.protocol&&(c[JS]=u.protocol.split(":").pop());const l=u.host?.replace(/^.*@/,"");l&&(c[gi]=l);const f=l?.replace(/:\d+$/,"");f&&(c[_i]=f),c[AS]=n.includes(j.location.origin);const d=be(n);c[Le]=d,mk(t,c,[["responseStatus",xS],["transferSize",NS],["encodedBodySize",Np],["decodedBodySize","http.response.body.decoded_size"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const p={...c,...Rg(t)},h=r+o;Ft(e,r,h,{name:i?f||Hv:d.replace(j.location.origin,""),op:a,attributes:p})}function hk(e,t){const n=j.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?MS:"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?PS:"connectionType",r.type),Ia(r.rtt)&&(t?e.setAttribute(OS,r.rtt):ne(e).attributes[H]==="pageload"&&bh("connection.rtt",r.rtt,"millisecond"))),Ia(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Ia(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function mk(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<ok||typeof s=="string")&&(t[o]=s)})}const gk=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||gk;for(;n&&s++<r&&(u=_k(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 _k(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 yk=6e4;function yu(e){return e!=null&&e>0&&e<=yk}function Vs(e,t,n){j.document&&j.addEventListener(e,t,n)}function Cg(e,t,n){j.document&&j.removeEventListener(e,t,n)}const Su=(e=!0)=>{const t=j.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},bu=()=>Su()?.activationStart??0,Sk=e=>{Vs("visibilitychange",n=>{j.document?.visibilityState==="hidden"&&e(n)},{capture:!0})};let ar=-1;const Ag=new Set,bk=()=>j.document?.visibilityState==="hidden"&&!j.document?.prerendering?0:1/0,mc=e=>{if(j.document?.visibilityState==="hidden"&&ar>-1){if(e.type==="visibilitychange")for(const t of Ag)t();isFinite(ar)||(ar=e.type==="visibilitychange"?e.timeStamp:0,Cg("prerenderingchange",mc,!0))}},vk=()=>{if(j.document&&ar<0){const e=bu();ar=(j.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??bk(),Vs("visibilitychange",mc,!0),Vs("prerenderingchange",mc,!0)}return{get firstHiddenTime(){return ar},onHidden(e){Ag.add(e)}}},Ek=e=>{const t=j.requestIdleCallback||j.setTimeout;if(j.document?.visibilityState==="hidden")e();else{let n=!1;const r=()=>{n||(e(),n=!0)};Vs("visibilitychange",r,{once:!0,capture:!0}),t(()=>{r(),Cg("visibilitychange",r,{capture:!0})})}};let Be={},je,Ks,lo;function wk({trackCls:e,trackLcp:t}){if($r()&&Cr()){const r=t?Ik():void 0,o=e?Tk():void 0,s=kk(),i=Rk(),a=Ck();return()=>{s(),i(),a(),r?.(),o?.()}}return()=>{}}function Tk(){return qs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Be.cls={value:e.value,unit:""},Ks=t)},!0)}function Ik(){return Gs(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!yu(e.value)||(Be.lcp={value:e.value,unit:"millisecond"},je=t)},!0)}function kk(){return qI(({metric:e})=>{lo=e.navigationType,e.entries[e.entries.length-1]&&(Be.ttfb={value:e.value,unit:"millisecond"})})}function Rk(){return GI(({metric:e})=>{lo=e.navigationType,Be.fcp={value:e.value,unit:"millisecond"}})}function Ck(){return ct("paint",({entries:e})=>{const t=vk();for(const n of e)n.name==="first-paint"&&n.startTime<t.firstHiddenTime&&(Be.fp={value:n.startTime,unit:"millisecond"})})}function Ak(e,t){const n=Cr();if(!$r()?.getEntries||!n){$d();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=ut(n);if(ne(e).attributes[H]==="pageload"){if(Mk(Be),xk(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])=>{bh(a,c.value,c.unit,e)}),Nk(e,t);lo&&e.setAttribute(hi,lo),e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",bu())}$d()}function $d(){je=void 0,Ks=void 0,lo=void 0,Be={}}function Nk(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)),Ks?.sources&&t.recordClsOnPageloadSpan&&Ks.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Xe(n.node)))}function xk(e){const t=e.fp;t&&(t.value=Math.max(t.value-bu(),0))}function Mk(e){const t=Su(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Ok="ElementTiming",Pk=(()=>({name:Ok,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&&Us("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&Us("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),tL=Pk,ka=[],Ss=new Map,Ys="<unknown>",Sn=new Map,Lk=60,vu={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 Dk(e){return e!=null?Ss.get(e):void 0}function $k(){const e=Object.keys(vu);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===Ys)&&!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||Ys}const r=({entries:o})=>{const s=he(),i=s&&ke(s);o.forEach(a=>{if(!Eg(a))return;const c=a.interactionId;if(c==null||Ss.has(c))return;const u=a.target?Xe(a.target):n(a);if(ka.length>10){const l=ka.shift();Ss.delete(l)}ka.push(c),Ss.set(c,{span:i,elementName:u})})};ct("event",r),ct("first-input",r)}const Fk=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Ng(){const e=j.navigator;return e?.userAgent?Fk.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 Bk="Interactions",Uk=((e={})=>({name:Bk,setup(t){if(Ng())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[qS]||a[ce],n.routeId=a[Mp],n.urlTemplate=a[We],n.httpRoute=a[xp],n.urlPath=a[yi],n.urlFull=a[Le]}t.on("spanStart",s=>{Hk(s)&&(r=s,o(s))}),t.on("spanEnd",s=>{s===r&&(r=void 0,o(s))}),Wk(t,n,()=>r,e),zk(t)}})),nL=Uk;function Hk(e){if(ke(e)!==e)return!1;const t=ne(e).attributes[H];return t==="pageload"||t==="navigation"}function Wk(e,t,n,r){if(!j.document)return;let o;addEventListener("click",()=>{if(n()){xe&&_.warn(`[Tracing] Did not create ${ra} 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 ${ra} span because the latest route name is missing.`);return}const s=V(e),i=t.routeId||t.urlTemplate||t.httpRoute,a=i||zv,c=!i||t.routeId?"custom":"route";o=wh({name:s?a:t.name,attributes:{[H]:ra,[ce]:s?c:t.source||"url",[re]:"auto.browser.interactions",...s&&{[Ar]:a},...t.routeId&&{[Mp]:t.routeId},...t.urlTemplate&&{[We]:t.urlTemplate},...t.httpRoute&&{[xp]:t.httpRoute},...t.urlPath&&{[yi]:t.urlPath},...t.urlFull&&{[Le]:be(t.urlFull)}}},r)},{capture:!0})}function zk(e){ct("event",({entries:t})=>{const n=he();if(n){for(const r of t)if(r.name==="click"){const o=Pe(r.startTime);if(!o)continue;const s=ut(r.duration),i=Xe(r.target),a=Fr(r.target),u={name:V(e)?a||Hh:i,startTime:o,attributes:{[H]:Ps,[re]:"auto.browser.interactions",...i&&i!==Ys&&{[Hc]:i}}};a&&(u.attributes[Nt]=a),Ft(n,o,o+s,u)}}})}function Bt(){try{return j.document?.location.href??""}catch{return""}}const xg=new WeakMap;function jk(e,t=v()){if(!t){xe&&_.warn("Cannot set a route provider without a client.");return}xe&&Eu(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."),xg.set(t,e)}function Eu(e=v()){return e&&xg.get(e)}function rL(e,t=v()){const n=Eu(t);if(!n)return;const r=typeof e=="string"?Mg(e):e;if(r)return vt(xe?"Route provider threw while resolving a route:":"",()=>n.resolveRoute(r)||void 0,()=>{})}function qk(e=v()){const t=Eu(e);return vt(xe?"Route provider threw while resolving a route:":"",()=>t?.resolveCurrentRoute()||void 0,()=>{})}function Gk(e){return{resolveRoute:e,resolveCurrentRoute:()=>{const t=Mg(Bt());return t&&e(t)}}}function oL(e=50){const t=new cu(e);return{...Gk(n=>t.get(n.pathname)),record(n,r){n&&r&&t.set(n,r)}}}function Mg(e){return e?Dn(e,Bt()||void 0):void 0}const Vk="UserTiming",Kk=((e={})=>({name:Vk,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=Su(!1)?.requestStart??0,u=n.getEntries();for(const l of u.slice(r)){if(l.entryType!=="mark"&&l.entryType!=="measure")continue;const f=Pe(l.startTime);if(!f||a==="navigation"&&i&&f<i)continue;const d=Pe(l.startTime+Math.max(0,l.duration),l.startTime),p=Pe(c,l.startTime);Yk(o,l,f,d,p,e.ignore??[])}r=u.length})}})),sL=Kk;function Yk(e,t,n,r,o,s){if(Xk(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),Jk(a,t),i<=r&&Ft(e,i,r,{name:t.name,op:t.entryType,attributes:a})}function Xk(e){if(e.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Jk(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 wu(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&&ke(a),h=p?ne(p).name:q().getScopeData().transactionName,m={[re]:r,[H]:n,[yo]:0,[`browser.web_vital.${o}.value`]:s,[KS]:h,[Ar]:h,[Lp]:j.navigator?.userAgent,...i};a&&ne(a).attributes[H]==="pageload"&&(m["sentry.pageload.span_id"]=a.spanContext().spanId),f!=null&&(m[kp]=f),d&&(m[hi]=d),l&&Object.assign(m,Qk());const g=yt({name:t,attributes:m,startTime:c,parentSpan:a,experimental:l?{standalone:!0}:void 0});g&&g.end(u??c)}function Qk(){const e=v()?.getIntegrationByName("Replay"),t=e?.getReplayId(!0);return t?{[US]:t,"sentry._internal.replay_is_buffering":e.getRecordingMode()==="buffer"?!0:void 0}:{}}function Og(e,t){let n,r=!1;function o(){!r&&n&&t(n),r=!0}Sk(()=>{o()});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o(),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}const Zk={click:Ps,hover:Lv,drag:Dv,press:$v},eR={click:Hh,hover:jv,drag:qv,press:Gv};function Tu(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[hi]==="back-forward-cache"&&(o=s)}),t(({metric:s})=>{const i=tk(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 tR(e,t=!1){if(!kg("largest-contentful-paint"))return;if(t){Tu(e,Gs,(i,a,c)=>{const u=i.entries[i.entries.length-1];Fd(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||!yu(i.value)||(n=i.value,r=a)},!0);Og(e,i=>{Fd(n,r,i,void 0,o),s()})}function Fd(e,t,n,r,o,s){if(!yu(e))return;xe&&_.log(`Sending LCP span (${e})`);const i=s||0,a=Pe(i)??ut(i),c=t?Pe(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||Ll:u??Ll,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),wu({name:p,op:Fv,origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:h,parentSpan:n,startTime:a,endTime:c,softNavigationId:r,navigationType:o})}function nR(e,t=!1){if(!kg("layout-shift"))return;if(t){Tu(e,qs,(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=qs(({metric:i})=>{o=i.navigationType;const a=i.entries[i.entries.length-1];a&&(n=i.value,r=a)},!0);Og(e,i=>{Bd(n,r,i,void 0,o),s()})}function Bd(e,t,n,r,o,s){xe&&_.log(`Sending CLS span (${e})`);const i=t?.startTime??s??0,a=Pe(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||Dl:u??Dl,h={};l&&(h[Nt]=l),t?.sources&&t.sources.forEach((m,g)=>{h[`browser.web_vital.cls.source.${g+1}`]=Xe(m.node)}),wu({name:p,op:Bv,origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:h,parentSpan:n,startTime:a,softNavigationId:r,navigationType:o})}function rR(e,t=!1){if(!$r()||!Cr())return;const r=!V(e);if(t){Tu(e,hc,(s,i,a)=>{Ud(s)&&Wd(s.value,Hd(s),r,i,a,s)});return}hc(({metric:s})=>{Ud(s)&&Wd(s.value,Hd(s),r,void 0,void 0,s)})}function Ud(e){return e.value!=null&&ut(e.value)<=Lk}function Hd(e){return e.entries.find(t=>t.duration===e.value&&vu[t.name])}function Wd(e,t,n=!1,r,o,s){xe&&_.log(`Sending INP span (${e})`);const i=Pe(t?.startTime??s?.navigationStartTime??0);if(!i)return;const a=ut(e),c=t&&vu[t.name],u=c||"click",l=t&&Dk(t.interactionId),f=he(),d=f?ke(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=eR[u],T=y?m||S:h??"Interaction to next paint",b={[yo]:t?.duration??e};h&&h!==Ys&&(b[Hc]=h),c&&(b[vS]=c),m&&(b[Nt]=m),wu({name:T,op:Zk[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 oR=1e3;let zd,gc,_c;function jd(e){return typeof e=="boolean"?e:!!e?.capture}function Pg(e){un("dom",e),ln("dom",sR)}function sR(){if(!j.document)return;const e=et.bind(null,"dom"),t=qd(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")&&(Me(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=jd(c);if(!l.handler){const p=qd(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)}}),Me(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?.[jd(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 iR(e){if(e.type!==gc)return!1;try{if(!e.target||e.target._sentryId!==_c)return!1}catch{}return!0}function aR(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function qd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=cR(n);if(aR(n.type,r))return;pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&pe(r,"_sentryId",Oe());const o=n.type==="keypress"?"input":n.type;iR(n)||(e({event:n,name:o,global:t}),gc=n.type,_c=r?r._sentryId:void 0),clearTimeout(zd),zd=j.setTimeout(()=>{_c=void 0,gc=void 0},oR)}}function cR(e){try{return e.target}catch{return null}}let es;function uR(){return"history"in j&&!!j.history}function $i(e){const t="history";un(t,e),ln(t,lR)}function lR(){if(j.addEventListener("popstate",()=>{const t=j.location.href,n=es;if(es=t,n===t)return;et("history",{from:n,to:t})}),!uR())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=es,s=dR(String(r));if(es=s,o===s)return t.apply(this,n);et("history",{from:o,to:s})}return t.apply(this,n)}}Me(j.history,"pushState",e),Me(j.history,"replaceState",e)}function dR(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const to={};function Iu(e){const t=to[e];if(t)return t;let n=j[e];if(ac(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 fR(e){to[e]=void 0}function Mo(...e){try{return Iu("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 ku(e){un("xhr",e),ln("xhr",pR)}function pR(){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=hR(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 hR(e){if(tt(e))return e;try{return e.toString()}catch{}}const mR=Symbol.for("sentry__originalRequestBody");function Lg(e){return new URLSearchParams(e).toString()}function Xs(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Lg(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 Ru(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][mR];return n!==void 0?n:void 0}}function Dg(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 gR(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function _R(e){try{return new URL(e,j.location.origin).toString()}catch{return e}}const C=$;let yc=0;const no=[];function $g(e){if(yc>0)return!0;const t=e?no.findIndex(n=>SR(n,e)):-1;return t===-1?!1:(no.splice(t,1),!0)}function yR(e){no.push(e),setTimeout(()=>{const t=no.indexOf(e);t!==-1&&no.splice(t,1)})}function SR(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function bR(){yc++,setTimeout(()=>{yc--})}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(Fc(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 bR(),Je(i=>{i.addEventProcessor(a=>(t.mechanism&&(qa(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{}pp(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 Js(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 vR=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","userTimingIntegration","interactionsIntegration","moduleMetadataIntegration"],ER={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function wR(e){return ER[e]||e.replace("Integration","").toLowerCase()}const Gd=C;async function TR(e,t){const n=vR.includes(e)?wR(e):void 0,r=Gd.Sentry=Gd.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=IR(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 IR(e){const n=v()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Zt}/${e}.min.js`,n).toString()}const iL=qm({lazyLoadIntegration:TR}),aL=qm({getModalIntegration:()=>II,getScreenshotIntegration:()=>MI});function Cu(e,t){const n=Fi(e,t),r={type:Bg(t),value:Ug(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function kR(e,t,n,r){const s=v()?.getOptions().normalizeDepth,i=PR(t),a={__serialized__:yp(t,s)};if(i)return{exception:{values:[Cu(e,i)]},extra:a};const u={exception:{values:[{type:fi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:MR(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=Fi(e,n);l.length&&(u.exception.values[0].stacktrace={frames:l})}return u}function Ra(e,t){return{exception:{values:[Cu(e,t)]}}}function Fi(e,t){const n=t.stacktrace||t.stack||"",r=CR(t),o=AR(t);try{return e(n,r,o)}catch{}return[]}const RR=/Minified React error #\d+;/i;function CR(e){return e&&RR.test(e.message)?1:0}function AR(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Fg(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Bg(e){const t=e?.name;return!t&&Fg(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ug(e){const t=e?.message;return Fg(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ed(t.error):ed(e):"No error message"}function NR(e,t,n,r){const o=n?.syntheticException||void 0,s=Bi(e,t,o,r);return At(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),To(s)}function xR(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=Sc(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),To(i)}function Bi(e,t,n,r,o){let s;if(dp(t)&&t.error)return Ra(e,t.error);if(il(t)||$y(t)){const a=t;if("stack"in t){s=Ra(e,t);const c=s.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const u=Fi(e,n);u.length&&(c.stacktrace={frames:u},At(s,{synthetic:!0}))}}else{const c=a.name||(il(a)?"DOMError":"DOMException"),u=a.message?`${c}: ${a.message}`:c;s=Sc(e,u,n,r),qa(s,u)}return s}if(Ae(t))return Ra(e,t);if(Ue(t)||fi(t))return s=kR(e,t,n,o),At(s,{synthetic:!0}),s;const i=String(t);return s=Sc(e,i,n,r),qa(s,i),At(s,{synthetic:!0}),s}function Sc(e,t,n,r){const o={};if(r&&n){const s=Fi(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),At(o,{synthetic:!0})}if(di(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 MR(e,{isUnhandledRejection:t}){const n=Fy(e),r=t?"promise rejection":"exception";return dp(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:fi(e)?`Event \`${OR(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function OR(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function PR(e){return Object.values(e).find(Ae)}class LR extends zE{constructor(t){const n=DR(t),r=C.SENTRY_SDK_SOURCE||Kb();Em(n,"browser",["browser"],r),super(n),n.routeProvider&&jk(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",hw)}eventFromException(t,n){return NR(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return xR(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 DR(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:C.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const $R=40;function Hg(e,t=Iu("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 fR("fetch"),c}finally{n-=i,r--}}return OE(e,o,ou(e.bufferSize||$R))}const L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function FR(){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 BR(){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 cL={startProfiler:FR,stopProfiler:BR},UR=10,HR=20,WR=30,zR=40,jR=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 qR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,GR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,VR=/\((\S*)(?::(\d+))(?::(\d+))\)/,KR=/at (.+?) ?\(data:(.+?),/,YR=e=>{const t=e.match(KR);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=qR.exec(e);if(n){const[,o,s,i]=n;return Sr(o,St,+s,+i)}const r=GR.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=VR.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=Wg(r[1]||St,r[2]);return Sr(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},XR=[WR,YR],JR=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,QR=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ZR=e=>{const t=JR.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=QR.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]=Wg(o,r),Sr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},eC=[jR,ZR],tC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,nC=e=>{const t=tC.exec(e);return t?Sr(t[2],t[1]||St,+t[3],t[4]?+t[4]:void 0):void 0},uL=[zR,nC],rC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,oC=e=>{const t=rC.exec(e);return t?Sr(t[2],t[3]||St,+t[1]):void 0},lL=[UR,oC],sC=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,iC=e=>{const t=sC.exec(e);return t?Sr(t[5],t[3]||t[4]||St,+t[1],+t[2]):void 0},dL=[HR,iC],aC=[XR,eC],cC=ap(...aC),Wg=(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 fL(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=uC(e);return ht(o,[s])}function uC(e){return[{type:"user_report"},e]}const ts=1024,lC="Breadcrumbs",dC=((e={})=>{const t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:lC,setup(n){t.dom&&Pg(hC(n,t.dom)),t.xhr&&ku(mC(n)),t.fetch&&xi(gC(n)),t.history&&$i(_C(n)),t.sentry&&n.on("beforeSendEvent",pC(n))}}}),fC=dC;function pC(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 hC(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>ts&&(L&&_.warn(`\`dom.maxStringLength\` cannot exceed ${ts}, but a value of ${a} was configured. Sentry will use ${ts} instead.`),a=ts),typeof i=="string"&&(i=[i]);try{const u=r.event,l=yC(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 mC(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:Lm(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,f),Et(d,f)}}function gC(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:Lm(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Et(c,a)}}}function _C(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 yC(e){return!!e&&!!e.target}const SC="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(","),bC="BrowserApiErrors",vC=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:bC,setupOnce(){t.setTimeout&&Me(C,"setTimeout",Vd),t.setInterval&&Me(C,"setInterval",Vd),t.requestAnimationFrame&&Me(C,"requestAnimationFrame",wC),t.XMLHttpRequest&&"XMLHttpRequest"in C&&Me(XMLHttpRequest.prototype,"send",TC);const n=t.eventTarget;n&&(Array.isArray(n)?n:SC).forEach(o=>IC(o,t))}}}),EC=vC;function Vd(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 wC(e){return function(t){return e.apply(this,[yr(t,{mechanism:{data:{handler:Ot(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function TC(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Me(n,o,function(s){const i={mechanism:{data:{handler:Ot(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Fc(s);return a&&(i.mechanism.data.handler=Ot(a)),yr(s,i)})}),e.apply(this,t)}}function IC(e,t){const r=C[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Me(r,"addEventListener",function(o){return function(s,i,a){try{kC(i)&&(i.handleEvent=yr(i.handleEvent,{mechanism:{data:{handler:Ot(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&RC(this,s,i),o.apply(this,[s,yr(i,{mechanism:{data:{handler:Ot(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Me(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 kC(e){return typeof e.handleEvent=="function"}function RC(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const CC=(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}Hl({ignoreDuration:!0});let n=!1;Ek(()=>{n||(sa(),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&&sa())}),t==="route"&&$i(({from:s,to:i})=>{s!==i&&(Hl({ignoreDuration:!0}),sa(),n=!0)})}}},AC="CultureContext",NC=(()=>({name:AC,preprocessEvent(e){const t=Kd();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Kd();t&&On(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),xC=NC;function Kd(){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 MC="GlobalHandlers",OC=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:MC,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(LC(n),Yd("onerror")),t.onunhandledrejection&&(DC(n),Yd("onunhandledrejection"))}}}),PC=OC;function LC(e){cp(t=>{const{stackParser:n,attachStacktrace:r}=Gg();if(v()!==e||$g(t))return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=qg(Bi(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 DC(e){up(t=>{const{stackParser:n,attachStacktrace:r}=Gg();if(v()!==e||$g())return;const o=zg(t),s=lt(o)?jg(o):Bi(n,o,void 0,r,!0);s.level="error",Io(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function zg(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 jg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function qg(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:$C(t)??Bt(),function:St,in_app:!0}),e}function Yd(e){L&&_.log(`Global Handler attached: ${e}`)}function Gg(){return v()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function $C(e){if(!(!tt(e)||e.length===0))return e.startsWith("data:")?`<${Dt(e,!1)}>`:e}const FC=()=>({name:"HttpContext",preprocessEvent(e,t,n){if(!C.navigator&&!C.location&&!C.document)return;const{url:r,headers:o}=Js(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=Js(t),r=Ln(n.headers,t.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:s,protocol:i}=C.location||{};On(e,{[Lp]:r["User-Agent"],[$S]:i==="file:"||s==="localhost"||s==="127.0.0.1"||s==="[::1]"||!!s?.endsWith(".localhost"),...e.is_segment&&{[Le]:e.attributes?.[H]!=="http.client"?be(n.url):void 0,[`${CS}.referer`]:o?[o]:void 0}})}}),BC="cause",UC=5,HC="LinkedErrors",WC=((e={})=>{const t=e.limit||UC,n=e.key||BC;return{name:HC,preprocessEvent(r,o,s){const i=s.getOptions();Mw(Cu,i.stackParser,n,t,r,o)}}}),zC=WC,jC=/^HTML(\w*)Element$/;function Vg(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(gR(e)){const t=qC(e);if(jC.test(t))return`[HTMLElement: ${Xe(e)}]`}}function qC(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function GC(){return VC()?(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 VC(){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 KC(e){return[Tw(),vw(),B0(),EC(),fC(),x0(),PC(),zC(),jw(),FC(),xC(),CC()]}function YC(e={}){const t=!e.skipBrowserExtensionCheck&&GC();let n=e.defaultIntegrations==null?KC():e.defaultIntegrations;const r=Cb({integrations:e.integrations,defaultIntegrations:n}),o={...e,enabled:t?!1:e.enabled,stackParser:My(e.stackParser||cC),integrations:r,transport:e.transport||Hg};return _p(Vg),VE(LR,o)}function pL(){}function hL(e){e()}function Xd(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||uE()},{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=mE(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 Kg=$;function XC(){return"ReportingObserver"in Kg}const JC="ReportingObserver",Jd=new WeakMap,QC=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Jd.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}cE(`${i}: ${a}`)})}return{name:JC,setupOnce(){if(!XC())return;new Kg.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Jd.set(r,!0)}}}),mL=QC,ZC="HttpClient",e1=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:ZC,setup(n){a1(n,t),c1(n,t)}}}),gL=e1;function t1(e,t,n,r,o){if(Yg(e,n.status,n.url)){const s=u1(t,r);let i,a,c,u;const l=Jg();if(l.requestHeaders!==!1&&(i=Ln(Qd(s.headers),l.requestHeaders)),l.responseHeaders!==!1&&(a=Ln(Qd(n.headers),l.responseHeaders)),l.cookies!==!1){const d=s.headers.get("Cookie")||void 0;d&&(c=sc(d,l.cookies,"cookie"));const p=n.headers.get("Set-Cookie")||void 0;p&&(u=sc(p,l.cookies,"set-cookie"))}const f=Xg({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});Io(f)}}function n1(e,t,n,r,o){if(Yg(e,t.status,t.responseURL)){let s,i,a;const c=Jg();if(c.cookies!==!1)try{const l=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;l&&(i=sc(l,c.cookies,"set-cookie"))}catch{}if(c.responseHeaders!==!1)try{a=Ln(o1(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=Ln(r,c.requestHeaders));const u=Xg({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});Io(u)}}function r1(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Qd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function o1(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 s1(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function i1(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function a1(e,t){xi(n=>{if(v()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&t1(t,a,r,c,s||i)})}function c1(e,t){"XMLHttpRequest"in $&&ku(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{n1(t,s,a,c,r||o)}catch(u){L&&_.warn("Error while extracting response event form XHR response",u)}})}function Yg(e,t,n){return i1(e.failedRequestStatusCodes,t)&&s1(e.failedRequestTargets,n)&&!vm(n,v())}function Xg(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:r1(e.responseHeaders)}}};return At(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function u1(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Jg(){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 Ca=$,l1=5,d1="ContextLines",f1=((e={})=>({name:d1,processEvent(t,n,r){const o=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??l1;return p1(t,o)}})),_L=f1;function p1(e,t){const n=Ca.document,r=Ca.location&&bm(Ca.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=>h1(u,i,r,t)))}),e}function h1(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Xy(t,e,r),e}const m1="GraphQLClient",g1=(e=>({name:m1,setup(t){_1(t,e),y1(t,e)}}));function _1(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=ne(n).attributes;if(!(s[H]==="http.client"))return;const c=s[Le],u=s[mi]||s[RS];if(!tt(c)||!tt(u))return;const{endpoints:l}=t,f=Ht(c,l),d=e_(r);if(f&&d){const p=t_(d);if(p){V(e)||n.updateName(`${u} ${c} (${Zg(p)})`);const{operationName:h,operationType:m}=Qg(p);n.setAttribute(IS,h),n.setAttribute(kS,m),Oo(p)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Ap,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 y1(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=e_(r);if(d&&i&&p){const h=t_(p);if(!i.graphql&&h){const m=Zg(h);i["graphql.operation"]=m,Oo(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[Ap]=h.query),Po(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Qg(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}=S1(t);return{operationName:r,operationType:o}}return{operationName:void 0,operationType:void 0}}function Zg(e){if(Po(e))return`persisted ${e.operationName}`;if(Oo(e)){const{operationName:t,operationType:n}=Qg(e);return t?`${n} ${t}`:`${n}`}return"unknown"}function e_(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Ct];n=r&&Xs(r.body)[0]}else{const r=Ru(e.input);n=Xs(r)[0]}return n}function S1(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 t_(e){try{const t=JSON.parse(e);return Oo(t)||Po(t)?t:void 0}catch{return}}const yL=g1,SL=(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=$,Au="sentryReplaySession",b1="replay_event",Nu="Unable to send Replay",v1=3e5,E1=9e5,w1=5e3,T1=5500,I1=6e4,k1=5e3,R1=3,Zd=15e4,ns=5e3,C1=3e3,A1=300,xu=2e7,N1=4999,x1=5e4,ef=36e5,M1="sentry.segment.name.source";var O1=Object.defineProperty,P1=(e,t,n)=>t in e?O1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tf=(e,t,n)=>P1(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 n_(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 L1(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 D1(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 Qs(e){try{const t=e.rules||e.cssRules;return t?L1(Array.from(t,r_).join("")):null}catch{return null}}function $1(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 r_(e){let t;if(B1(e))try{t=Qs(e.styleSheet)||D1(e)}catch{}else if(U1(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=$1(e)),r&&(n=F1(n)),r||o)return n}return t||e.cssText}function F1(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function B1(e){return"styleSheet"in e}function U1(e){return"selectorText"in e}let o_=class{constructor(){tf(this,"idNodeMap",new Map),tf(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)),n_(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 H1(){return new o_}function Ui({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 bc(e){return e.toUpperCase()}const nf="__rrweb_original__";function W1(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=nf in s?s[nf]: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 Mu(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?br(t):null}function Zs(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function s_(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 Aa={};function i_(e){const t=Aa[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 Aa[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Aa[e]=r}function vc(...e){return i_("setTimeout")(...e)}function a_(...e){return i_("clearTimeout")(...e)}function c_(e){try{return e.contentDocument}catch{}}function z1(e){try{return e.contentWindow}catch{}}let j1=1;const q1=new RegExp("[^a-z0-9-_:]"),po=-2;function Ou(){return j1++}function G1(e){if(e instanceof HTMLFormElement)return"form";const t=br(e.tagName);return q1.test(t)?"div":t}function V1(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,rf;const K1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Y1=/^(?:[a-z+]+:)?\/\//i,X1=/^www\..*/i,J1=/^(data:)([^,]*),(.*)/i;function Q1(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 ei(e,t){return(e||"").replace(K1,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(Y1.test(c)||X1.test(c))return`url(${u}${c}${u})`;if(J1.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${V1(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 Z1=/^[^ \t\n\r\u000c]+/,eA=/^[, \t\n\r\u000c]+/;function tA(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(eA),!(n>=t.length);){let s=r(Z1);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 of=new WeakMap;function Jn(e,t){return!t||t.trim()===""?t:Hi(e,t)}function nA(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Hi(e,t){let n=of.get(e);if(n||(n=e.createElement("a"),of.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function u_(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 tA(e,r);if(n==="style"){let a=ei(r,Hi(e));return i&&i.size>0&&(a=Q1(a,i)),a}else if(t==="object"&&n==="data")return Jn(e,r);return typeof s=="function"?s(n,r,o):r}function l_(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function rA(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 oA(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(oA(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 sA(e,t,n){const r=z1(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=vc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{a_(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return vc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function iA(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=vc(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{a_(s),r=!0,t()})}function aA(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=cA(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 lA(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 uA(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 cA(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function uA(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=Qs(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}d=ei(d,Hi(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=Ui({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 lA(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=rA(e,r,o,s),I=G1(e);let k={};const R=e.attributes.length;for(let E=0;E<R;E++){const O=e.attributes[E];O.name&&!l_(I,O.name,O.value)&&(k[O.name]=u_(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=Qs(E)),O&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=ei(O,E.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Qs(e.sheet);E&&(k._cssText=ei(E,Hi(n)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const E=e,O=Mu(E),x=Zs(E,bc(I),O),w=E.checked;if(O!=="submit"&&O!=="button"&&x){const D=vr(E,g,S,y,T,Ui({type:O,tagName:bc(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")W1(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"),rf=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,rf.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&&!c_(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:nA(e)||void 0,needBlock:M,rootId:m,isCustom:U}}function de(e){return e==null?"":e.toLowerCase()}function dA(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"&&s_(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=aA(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):dA(J,S)||!N&&J.type===Ie.Text&&!J.isStyle&&!J.textContent.trim().length?Q=po:Q=Ou();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(n_(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&&sA(e,()=>{const B=c_(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"&&s_(P.attributes.href)==="css")&&iA(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 fA(e,t){const{mirror:n=new o_,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 sf={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&&(sf=new Proxy(sf,{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&&(SA(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Wi(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function d_(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Wi(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>d_(e,t,s||{},!0)}function Pu(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 ti=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ti=()=>new Date().getTime());function f_(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 p_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function h_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function m_(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=m_(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 pA(e,t){return t.getId(e)!==-1}function Na(e,t){return t.getId(e)===po}function g_(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?g_(e.parentNode,t):!0:!0}function Ec(e){return!!e.changedTouches}function hA(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 __(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function y_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function wc(e){return!!e?.shadowRoot}class mA{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 S_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function gA(e){let t=e,n;for(;n=S_(t);)t=n;return t}function _A(e){const t=e.ownerDocument;if(!t)return!1;const n=gA(e);return t.contains(n)}function b_(e){const t=e.ownerDocument;return t?t.contains(e)||_A(e):!1}const xa={};function Lu(e){const t=xa[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 xa[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return xa[e]=r}function yA(...e){return Lu("requestAnimationFrame")(...e)}function Wi(...e){return Lu("setTimeout")(...e)}function SA(...e){return Lu("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||{}),$e=(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))($e||{}),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 bA(e){oo=e}function vA(){oo=void 0}const oe=e=>oo?((...n)=>{try{return e(...n)}catch(r){if(oo&&oo(r)===!0)return()=>{};throw r}}):e;var af="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",EA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var rs=0;rs<af.length;rs++)EA[af.charCodeAt(rs)]=rs;class cf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Du(e){try{return e.contentDocument}catch{}}function mo(e){try{return e.contentWindow}catch{}}class wA{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 uf(e){return"__ln"in e}class TA{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&&uf(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&&uf(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 lf=(e,t)=>`${e}@${t}`;class IA{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 TA,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||!b_(c))return;const u=cr(c.parentNode)?this.mirror.getId(S_(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=>{__(d,this.mirror)&&!Ge(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),y_(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),wc(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)df(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!ff(this.droppedSet,c)&&!df(this.removes,c,this.mirror)||ff(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(!Na(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,m_(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=Mu(n),a=n.tagName;o=Zs(n,a,i);const c=Ui({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(!Du(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"),!l_(n.tagName,r)&&(s.attributes[r]=u_(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)||Na(n,this.mirror)||!pA(n,this.mirror)||(this.addedSet.has(n)?(Tc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||g_(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[lf(r,o)]?Tc(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(Na(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[lf(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)),wc(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 wA(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 Tc(e,t){e.delete(t),t.childNodes?.forEach(n=>Tc(e,n))}function df(e,t,n){return e.length===0?!1:kA(e,t,n)}function kA(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 ff(e,t){return e.size===0?!1:v_(e,t)}function v_(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:v_(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 E_(e,t){const n=new IA;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 RA({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}=Ec(f)?f.changedTouches[0]:f;a||(a=ti()),i.push({x:p,y:h,id:r.getId(d),timeOffset:ti()-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 CA({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?$e[f]===$e.MouseDown?m="TouchStart":$e[f]===$e.MouseUp&&(m="TouchEnd"):kt.Pen}else Ec(d)&&(h=kt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===kt.Touch||m.startsWith("Mouse")&&h===kt.Mouse)&&(h=null)):$e[f]===$e.Click&&(h=u,u=null);const g=Ec(d)?d.changedTouches[0]:d;if(!g)return;const y=n.getId(p),{clientX:S,clientY:T}=g;oe(e)({type:$e[m],id:y,x:S,y:T,...h!==null&&{pointerType:h}})};return Object.keys($e).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($e[f]){case $e.MouseDown:case $e.MouseUp:d=d.replace("mouse","pointer");break;case $e.TouchStart:case $e.TouchEnd:return}c.push(He(d,p,t))}),oe(()=>{c.forEach(f=>f())})}function w_({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=f_(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 AA({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=oe(ho(oe(()=>{const s=p_(),i=h_();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return He("resize",o,t)}const NA=["INPUT","TEXTAREA","SELECT"],pf=new WeakMap;function xA({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&&bc(R.tagName);if(E==="OPTION"&&(R=R.parentElement),!R||!E||NA.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=Mu(R);let w=Zs(O,E,x),D=!1;const N=Ui({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:Zs(P,E,x),maskInputFn:u});y(P,f?{text:Y,isChecked:!D,userTriggered:!1}:{text:Y,isChecked:!D})}})}function y(k,R){const U=pf.get(k);if(!U||U.text!==R.text||U.isChecked!==R.isChecked){pf.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=>d_(k[0],k[1],{set(){oe(g)({target:this,isTrusted:!1})}},!1,b))),oe(()=>{T.forEach(k=>k())})}function ni(e){const t=[];function n(r,o){if(os("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||os("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||os("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||os("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 MA({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={};ss("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ss("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ss("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ss("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:[...ni(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:[...ni(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 T_({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 OA({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:ni(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:ni(c.parentRule)}),a.apply(c,u)})}),oe(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function PA({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 LA({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=Pu(t.fonts,"add",function(a){return function(c){return Wi(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 DA(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 $A({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Pu(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function FA(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=E_(e,e.doc));const o=RA(e),s=CA(e),i=w_(e),a=AA(e,{win:n}),c=xA(e),u=PA(e);let l=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(l=MA(e,{win:n}),f=T_(e,e.doc),d=OA(e,{win:n}),e.collectFonts&&(p=LA(e)));const h=DA(e),m=$A(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 os(e){return typeof window[e]<"u"}function ss(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ic{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 BA{constructor(){this.crossOriginIframeMirror=new Ic(Ou),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class UA{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ic(Ou),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ic(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=Du(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 HA{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class WA{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=E_({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(w_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Wi(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(T_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Du(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(Pu(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&b_(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 zA{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new mA,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:r_(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 jA{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,yA(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Ee,ri;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=H1();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;bA(B);const se=x?window.parent===window:!0;let De=!1;if(!se)try{window.parent.document&&(De=!1)}catch{De=!0}if(se&&!t)throw new Error("emit function is required");if(!se&&!De)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||{};hA();let Hr,Wr=0;const Wo=F=>{for(const ie of Q||[])ie.eventProcessor&&(F=ie.eventProcessor(F));return I&&!De&&(F=I(F)),F};Ee=(F,ie)=>{const X=F;if(X.timestamp=ti(),er[0]?.isFrozen()&&X.type!==Z.FullSnapshot&&!(X.type===Z.IncrementalSnapshot&&X.data.source===G.Mutation)&&er.forEach(ae=>ae.unfreeze()),se)t?.(Wo(X),ie);else if(De){const ae={type:"rrweb",event:Wo(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}})},zo=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 zA({mutationCb:pn,adoptedStyleSheetCb:Qe}),qe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new BA:new UA({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 jA,jn=GA(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 HA:new WA({mutationCb:pn,scrollCb:zo,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:h_(),height:p_()}},F),ze.reset(),hn.init(),er.forEach(X=>X.lock());const ie=fA(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=>{__(X,at)&&qe.addIframe(X),y_(X,at)&&ze.trackLinkElement(X),wc(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:f_(window)}}),er.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ze.adoptStyleSheets(document.adoptedStyleSheets,at.getId(document))};ri=mn;try{const F=[],ie=ae=>oe(FA)({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:zo,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(),ri=void 0,vA()}}catch(F){console.warn(F)}}function qA(e){if(!ri)throw new Error("please take full snapshot after start recording");ri(e)}ot.mirror=at;ot.takeFullSnapshot=qA;function GA(e,t){try{return e?e(t):new cf}catch{return console.warn("Unable to initialize CanvasManager"),new cf}}var hf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(hf||(hf={}));const VA=3,KA=5;function $u(e){return e>9999999999?e:e*1e3}function Ma(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 YA="button,a";function I_(e){return e.closest(YA)||e}function k_(e){const t=R_(e);return!t||!(t instanceof Element)?t:I_(t)}function R_(e){return XA(e)?e.target:e}function XA(e){return nt(e)&&"target"in e}let Xt;function JA(e){return Xt||(Xt=[],QA()),Xt.push(e),()=>{const t=Xt?Xt.indexOf(e):-1;t>-1&&Xt.splice(t,1)}}function QA(){Me(ge,"open",function(e){return function(...t){if(Xt)try{Xt.forEach(n=>n())}catch{}return e.apply(ge,t)}})}const ZA=new Set([G.Mutation,G.StyleSheetRule,G.StyleDeclaration,G.AdoptedStyleSheet,G.CanvasMutation,G.Selection,G.MediaInteraction]);function eN(e,t,n){e.handleClick(t,n)}class tN{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=JA(()=>{this._lastMutation=mf()});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(rN(n,this._ignoreSelector)||!oN(t))return;const r={timestamp:Ma(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=Ma(t)}registerScroll(t=Date.now()){this._lastScroll=Ma(t)}registerClick(t){const n=I_(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=mf();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 nN=["A","BUTTON","INPUT"];function rN(e,t){return!!(!nN.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 oN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function mf(){return Date.now()/1e3}function sN(e,t){try{if(!iN(t))return;const{source:n}=t.data;if(ZA.has(n)&&e.registerMutation(t.timestamp),n===G.Scroll&&e.registerScroll(t.timestamp),aN(t)){const{type:r,id:o}=t.data,s=ot.mirror.getNode(o);s instanceof HTMLElement&&r===$e.Click&&e.registerClick(s)}}catch{}}function iN(e){return e.type===VA}function aN(e){return e.data.source===G.MouseInteraction}function _t(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var zi=(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))(zi||{});const C_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),cN=new Set([...C_,"data-sentry-element"]);function uN(e){const t={};for(const n in e)if(C_.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 lN=e=>t=>{if(!e.isEnabled())return;const n=dN(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&&eN(e.clickDetector,n,k_(t.event)),Do(e,n)};function A_(e,t){const n=ot.mirror.getId(e),r=n&&ot.mirror.getNode(n),o=r&&ot.mirror.getMeta(r),s=o&&pN(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===zi.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:uN(s.attributes)}}:{}}}function dN(e){const{target:t,message:n}=fN(e);return _t({category:`ui.${e.name}`,...A_(t,n)})}function fN(e){const t=e.name==="click";let n,r=null;try{r=t?k_(e.event):R_(e.event),n=Xe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function pN(e){return e.type===zi.Element}function hN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=mN(t);n&&Do(e,n)}function mN(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||gN(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=A_(i,u);return _t({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function gN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const _N={resource:EN,paint:bN,navigation:vN};function Oa(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function yN(e){return e.map(SN).filter(Boolean)}function SN(e){const t=_N[e.entryType];return t?t(e):null}function Er(e,t=e){return Pe(e,t)}function bN(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 vN(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 EN(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 wN(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Fu(e,"largest-contentful-paint",n)}function TN(e){return e.sources!==void 0}function IN(e){const t=[],n=[];for(const r of e.entries)if(TN(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 Fu(e,"cumulative-layout-shift",n,t)}function kN(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Fu(e,"interaction-to-next-paint",n)}function Fu(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 RN(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(Gs(Oa(wN,e)),qs(Oa(IN,e)),hc(Oa(kN,e))),()=>{r.forEach(o=>o())}}const W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,CN='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 AN(){const e=new Blob([CN],{type:"text/javascript"});return URL.createObjectURL(e)}const gf=["log","warn","error"],bs="[Replay] ";function Pa(e,t="info"){Et({category:"console",data:{logger:"replay"},level:t,message:`${bs}${e}`},{level:t})}function NN(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return W?(gf.forEach(r=>{n[r]=(...o)=>{_[r](bs,...o),t&&Pa(o.join(""),Fs(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(bs,r),e?Pn(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Pa(r,"error")},n.infoTick=(...r)=>{_.log(bs,...r),t&&setTimeout(()=>Pa(r[0]),0)}):gf.forEach(r=>{n[r]=()=>{}}),n}const z=NN();class Bu extends Error{constructor(){super(`Event buffer exceeded maximum size of ${xu}.`)}}class N_ extends Error{constructor(){super("Worker destroyed")}}class x_{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>xu)throw new Bu;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:$u(t)}}class xN{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 N_)),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 MN{constructor(t){this._worker=new xN(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=$u(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>xu?Promise.reject(new Bu):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 ON{constructor(t){this._fallback=new x_,this._compression=new MN(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 N_)return;W&&z.exception(s,"Failed to add events when switching buffers.")}}}function PN({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=LN(t);if(n)return n}return W&&z.log("Using simple buffer"),new x_}function LN(e){try{const t=e||DN();if(!t)return;W&&z.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new ON(n)}catch(t){W&&z.exception(t,"Failed to create compression worker")}}function DN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?AN():""}function Uu(){try{return"sessionStorage"in ge&&!!ge.sessionStorage}catch{return!1}}function $N(e){FN(),e.session=void 0}function FN(){if(Uu())try{ge.sessionStorage.removeItem(Au)}catch{}}function M_(e){return e===void 0?!1:Math.random()<e}function ji(e){if(Uu())try{ge.sessionStorage.setItem(Au,JSON.stringify(e))}catch{}}function O_(e){const t=Date.now(),n=e.id||Oe(),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 BN(e,t){return M_(e)?"session":t?"buffer":!1}function _f({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=BN(e,t),s=O_({sampled:o,previousSessionId:r});return n&&ji(s),s}function UN(){if(!Uu())return null;try{const e=ge.sessionStorage.getItem(Au);if(!e)return null;const t=JSON.parse(e);return W&&z.infoTick("Loading existing session"),O_(t)}catch{return null}}function kc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function HN(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return kc(e.started,t,r)||kc(e.lastActivity,n,r)}function oi(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!HN(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function La({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&UN();return o?oi(o,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&z.infoTick("Session in sessionStorage is expired, creating new one..."),_f(r,{previousSessionId:o.id})):o:(W&&z.infoTick("Creating new session"),_f(r,{previousSessionId:n}))}function WN(e){return e.type===Z.Custom}function Hu(e,t,n){return L_(e,t)?(P_(e,t,n),!0):!1}function zN(e,t,n){return L_(e,t)?P_(e,t,n):Promise.resolve(null)}async function P_(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=jN(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 Bu,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 L_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=$u(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 jN(e,t){try{if(typeof t=="function"&&WN(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 yf=100;function D_(e,t,n){const r=e.getContext();t&&r.traceIds.size<yf&&r.traceIds.add(t),n&&r.segmentNames.size<yf&&r.segmentNames.add(n)}function qN(e){return t=>{e.isEnabled()&&D_(e,t.trace_id,t.name||void 0)}}function Wu(e){return!e.type}function Rc(e){return e.type==="transaction"}function GN(e){return e.type==="replay_event"}function Sf(e){return e.type==="feedback"}function VN(e){return(t,n)=>{if(!e.isEnabled()||!Wu(t)&&!Rc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Rc(t)){KN(e,t);return}YN(e,t)}}}function KN(e,t){D_(e,t.contexts?.trace?.trace_id,t.transaction)}function YN(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 XN(e){return t=>{!e.isEnabled()||!Wu(t)||JN(e,t)}}function JN(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 QN(e){const t=v();t&&t.on("beforeAddBreadcrumb",n=>ZN(e,n))}function ZN(e,t){if(!e.isEnabled()||!$_(t))return;const n=ex(t);n&&Do(e,n)}function ex(e){return!$_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?tx(e):_t(e)}function tx(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>ns?(n=!0,`${o.slice(0,ns)}…`):o;if(typeof o=="object")try{const s=Te(o,7);return JSON.stringify(s).length>ns?(n=!0,`${JSON.stringify(s,null,2).slice(0,ns)}…`):s}catch{}return o});return _t({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function $_(e){return!!e.category}function nx(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function si(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=he();if(t){const n=st(t);delete n.replay_id}}function bf(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 rx(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 ox(e,t){return e.recordingMode!=="buffer"||t.message===Nu||!t.exception||t.type?!1:M_(e.getOptions().errorSampleRate)}function sx(e){return Object.assign((t,n)=>{if(e.session&&oi(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&si(),!e.isEnabled()||e.isPaused())return t;if(GN(t))return delete t.breadcrumbs,t;if(!Wu(t)&&!Rc(t)&&!Sf(t))return t;if(!e.checkAndHandleExpiredSession())return si(),t;if(Sf(t)){const i=e.getSessionId(),a=t.contexts.feedback.replay_id;return a&&a!==i||(e.flush(),t.contexts.feedback.replay_id=i,rx(e,t)),t}if(nx(t,n)&&!e.getOptions()._experiments.captureExceptions)return W&&z.log("Ignoring error from rrweb internals",t),null;const o=ox(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&&ji(i)}return t},{id:"Replay"})}function qi(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 ix(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 ax(e){return t=>{if(!e.isEnabled())return;const n=ix(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(qi(e,[n]),!1)))}}function cx(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:vm(t,v())}function F_(e,t){e.isEnabled()&&t!==null&&(cx(e,t.name)||e.addUpdate(()=>(qi(e,[t]),!0)))}function Gi(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=Lg(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function B_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function ii(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 U_(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}=ux(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function Cc(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 ux(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Zd,n=lx(e);if(t){const r=e.slice(0,Zd);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 lx(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ai(e,t){const n=dx(e);return Ht(n,t)}function dx(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 fx(e,t,n){try{const r=await hx(e,t,n),o=U_("resource.fetch",r);F_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture fetch breadcrumb")}}function px(e,t){const{input:n,response:r}=t,o=n?Ru(n):void 0,s=Gi(o),i=r?B_(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 hx(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=ai(i,n.networkDetailAllowUrls)&&!ai(i,n.networkDetailDenyUrls),d=f?mx(n,t.input,u):go(u),p=await gx(f,n,t.response,l);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d,response:p}}function mx({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?Sx(n,t):{};if(!e)return tn(o,r,void 0);const s=Ru(n),[i,a]=Xs(s,z),c=tn(o,r,i);return a?ii(c,a):c}async function gx(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return go(o);const s=r?H_(r.headers,n):{};if(!r||!t&&o!==void 0)return tn(s,o,void 0);const[i,a]=await yx(r),c=_x(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?ii(c,a):c}function _x(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?Gi(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 yx(e){const t=bx(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await vx(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 H_(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Sx(e,t){return e.length===1&&typeof e[0]!="string"?vf(e[0],t):e.length===2?vf(e[1],t):{}}function vf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?H_(n,t):Array.isArray(n)?{}:Cc(n,t):{}}function bx(e){try{return e.clone()}catch(t){W&&z.exception(t,"Failed to clone response body")}}function vx(e){return new Promise((t,n)=>{const r=Mo(()=>n(new Error("Timeout while trying to read response body")),500);Ex(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function Ex(e){return e.text()}async function wx(e,t,n){try{const r=Ix(e,t,n),o=U_("resource.xhr",r);F_(n.replay,o)}catch(r){W&&z.exception(r,"Failed to capture xhr breadcrumb")}}function Tx(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=Gi(r),s=n.getResponseHeader("content-length")?B_(n.getResponseHeader("content-length")):Cx(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function Ix(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||!ai(c,n.networkDetailAllowUrls)||ai(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?Cc(p.request_headers,n.networkRequestHeaders):{},m=Cc(Dg(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?Xs(i,z):[void 0],[S,T]=n.networkCaptureBodies?kx(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?ii(b,y):b,response:T?ii(M,T):M}}function kx(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Rx(e.response,e.responseType)}catch(n){t.push(n)}return W&&z.warn("Failed to get xhr response body",...t),[void 0]}function Rx(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 Cx(e,t){try{const n=t==="json"&&nt(e)?JSON.stringify(e):e;return Gi(n)}catch{return}}function Ax(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)=>Nx(a,c,u))}catch{}}function Nx(e,t,n){if(t.data)try{xx(t)&&Ox(n)&&(Tx(t,n),wx(t,n,e)),Mx(t)&&Px(n)&&(px(t,n),fx(t,n,e))}catch(r){W&&z.exception(r,"Error when enriching network breadcrumb")}}function xx(e){return e.category==="xhr"}function Mx(e){return e.category==="fetch"}function Ox(e){return e?.xhr}function Px(e){return e?.input!==void 0}function Lx(e){const t=v();Pg(lN(e)),$i(ax(e)),QN(e),Ax(e);const n=sx(e);if(dE(n),t){t.on("beforeSendEvent",XN(e)),t.on("afterSendEvent",VN(e)),t.on("createDsc",o=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=s)}),t.on("processSegmentSpan",qN(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 Dx(e){try{return await Promise.all(qi(e,[$x(ge.performance.memory)]))}catch{return[]}}function $x(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 Fx(e,t,n){return vv(e,t,{...n,setTimeoutImpl:Mo})}const is=$.navigator;function Bx(){return/iPhone|iPad|iPod/i.test(is?.userAgent??"")||/Macintosh/i.test(is?.userAgent??"")&&is?.maxTouchPoints&&is?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Ux(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,Hx(n),e.clickDetector&&sN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Hu(e,n,o))return!0;if(!o)return!1;const s=e.session;if(zx(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&&ji(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function Hx(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!==zi.Element)continue;const s={...o.attributes};let i=!1;for(const[a,c]of Object.entries(n.attributes))cN.has(a)&&(c===null?delete s[a]:s[a]=c,i=!0);i&&ot.mirror.add(r,{...o,attributes:s})}}function Wx(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 zx(e,t){!t||e.session?.segmentId!==0||Hu(e,Wx(e),!1)}function jx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function qx(e,t,n,r){return ht(_h(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 Gx({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 Vx({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 qh(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 Kx({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=Gx({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:b1,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 Vx({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=qx(y,i,m,d.getOptions().tunnel);let T;try{T=await h.send(S)}catch(M){const I=new Error(Nu);try{I.cause=M}catch{}throw I}const b=sm({},T);if(om(b,"replay"))throw new zu(b);if(typeof T.statusCode=="number"&&(T.statusCode<200||T.statusCode>=300))throw new W_(T.statusCode);return T}class W_ extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class zu extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Ef extends Error{constructor(){super("Session is too long, not sending replay")}}async function z_(e,t={count:0,interval:k1}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Kx(e),!0}catch(o){if(o instanceof W_||o instanceof zu)throw o;if(Gh("Replays",{_retryCount:t.count}),r&&r(o),t.count>=R1){const s=new Error(`${Nu} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{Mo(async()=>{try{await z_(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const j_="__THROTTLED",Yx="__SKIPPED";function Xx(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?Yx:j_}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Jx{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:v1,sessionIdleExpire:E1},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=Fx(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Xx((i,a)=>zN(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(C1,r),timeout:r,scrollTimeout:A1,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new tN(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=>{hN(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=La({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=La({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:I1}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Ux(this),...Bx(),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}`),si(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,$N(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(),bf(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&&kc(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===j_){const o=_t({category:"replay.throttled"});this.addUpdate(()=>!Hu(this,{type:KA,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||he(),n=t&&ke(t);if(!n)return;const r=ne(n),o=r.attributes[M1];if(!(!o||!["route","custom"].includes(o)))return r.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=PN({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&&bf(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=La({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 oi(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||(Lx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=RN(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(oi(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){si();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=yN(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(qi(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 Dx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Ef;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await z_({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 zu?o="ratelimit_backoff":n instanceof Ef?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&&ji(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=jx(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 Qx({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 Zx({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 wf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',eM=["content-length","content-type","accept"],tM=Symbol.for("sentry__originalRequestBody");let Tf=!1,If=!1;function nM(){if(typeof Request>"u"||If)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[tM]=r.body),o};t.prototype=e.prototype,$.Request=t,If=!0}catch{}}const vL=(e=>new rM(e));class rM{constructor({flushMinDelay:t=w1,flushMaxDelay:n=T1,minReplayDuration:r=N1,maxReplayDuration:o=ef,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=Qx({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)=>Zx({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,x1),maxReplayDuration:Math.min(o,ef),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:kf(T),networkResponseHeaders:kf(b),beforeAddRecordingEvent:x,beforeErrorSampling:w,onError:D,attachRawBodyFromRequest:N,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${wf}`:wf,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 Tf}set _isInitialized(t){Tf=t}afterAllSetup(t){!on()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&nM(),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=oM(this._initialOptions,t);this._replay=new Jx({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function oM(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 kf(e){return[...eM,...e.map(t=>t.toLowerCase())]}function EL(){return v()?.getIntegrationByName("Replay")}var sM=Object.defineProperty,iM=(e,t,n)=>t in e?sM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rf=(e,t,n)=>iM(e,typeof t!="symbol"?t+"":t,n);function aM(e){return e.nodeType===e.ELEMENT_NODE}function cM(e){return e?.host?.shadowRoot===e}class uM{constructor(){Rf(this,"idNodeMap",new Map),Rf(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)),aM(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 lM(){return new uM}function dM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function ci(e,t,n=1/0,r=0){return e?cM(e)?ci(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ci(e.parentNode,t,n,r+1):-1}function Cf(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(dM(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 Af={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&&(Af=new Proxy(Af,{get(e,t,n){return t==="map"&&console.error(Xn),Reflect.get(e,t,n)}}));function ju(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){G_(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>ju(e,t,s||{},!0)}function qu(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 fM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Vi(e,t,n,r,o){if(!e)return!1;const s=fM(e);if(!s)return!1;const i=Cf(t,n),a=ci(s,i);let c=-1;return a<0?!1:(r&&(c=ci(s,Cf(null,r))),a>-1&&c<0?!0:a<c)}const Da={};function q_(e){const t=Da[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 Da[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Da[e]=r}function bn(...e){return q_("requestAnimationFrame")(...e)}function G_(...e){return q_("setTimeout")(...e)}var wr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(wr||{});let vs;function pM(e){vs=e}const $a=e=>vs?((...n)=>{try{return e(...n)}catch(r){if(vs&&vs(r)===!0)return()=>{};throw r}}):e;var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var as=0;as<tr.length;as++)hM[tr.charCodeAt(as)]=as;var mM=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 Nf=new Map;function gM(e,t){let n=Nf.get(e);return n||(n=new Map,Nf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const V_=(e,t,n)=>{if(!e||!(Y_(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=gM(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Es(e,t,n){if(e instanceof Array)return e.map(r=>Es(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=mM(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Es(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:[Es(e.data,t,n),e.width,e.height]};if(Y_(e,t)||typeof e=="object"){const r=e.constructor.name,o=V_(e,t,n);return{rr_type:r,index:o}}}}return e}const K_=(e,t,n)=>e.map(r=>Es(r,t,n)),Y_=(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 _M(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=qu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...l){return Vi(this.canvas,n,r,o,!0)||G_(()=>{const f=K_(l,t,this);e(this.canvas,{type:wr["2D"],property:a,args:f})},0),u.apply(this,l)}});s.push(c)}catch{const c=ju(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 yM(e){return e==="experimental-webgl"?"webgl":e}function xf(e,t,n,r,o){const s=[];try{const i=qu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Vi(this,t,n,r,!0)){const l=yM(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 Mf(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=qu(e,l,function(d){return function(...p){const h=d.apply(this,p);if(V_(h,a,this),"tagName"in this.canvas&&!Vi(this.canvas,r,o,s,!0)){const m=K_(p,a,this),g={type:t,property:l,args:m};n(this.canvas,g)}return h}});c.push(f)}catch{const f=ju(e,l,{set(d){n(this.canvas,{type:t,property:l,args:[d],setter:!0})}});c.push(f)}return c}function SM(e,t,n,r,o,s){const i=[];return i.push(...Mf(t.WebGLRenderingContext.prototype,wr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Mf(t.WebGL2RenderingContext.prototype,wr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const bM='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 vM(){const e=new Blob([bM]);return URL.createObjectURL(e)}class EM{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&&pM(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&$a(()=>{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}$a(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=xf(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(vM());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=xf(t,n,r,o,!1),i=_M(this.processMutation.bind(this),t,n,r,o),a=SM(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=>{Vi(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=>{$a(()=>{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)}lM();var Of;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Of||(Of={}));const Pf={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}}},wM="ReplayCanvas",cs=1280,TM=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,cs):cs,n?Math.min(n,cs):cs]};let o,s;const i=new Promise(a=>s=a);return{name:wM,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:l=>{const f=new EM({...l,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return o=f,s(f),f},...Pf[a]||Pf.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),wL=TM;function IM(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function X_(e){try{return new URL(e,C.location.origin).href}catch{return}}function kM(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function J_(e){try{return new Headers(e)}catch{return}}const Q_={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function RM(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...Q_,...t},u=typeof o=="function"?o:p=>!0,l=p=>AM(p,i),f={},d=e.getOptions().propagateTraceparent;n&&xi(p=>{const h=U0(p,u,l,f,{propagateTraceparent:d,onRequestSpanEnd:c,urlBase:C.location?.origin});if(h){const m=X_(p.fetchData.url),g=m?Cn(m).host?.replace(/^.*@/,""):void 0,y=m?Dt(m):void 0;h.setAttributes({[Le]:be(y),[gi]:g}),s&&Lf(h,e),a?.(h,{headers:p.headers})}}),r&&ku(p=>{const h=NM(p,u,l,f,d,c);h&&(s&&Lf(h,e),a?.(h,{headers:J_(p.xhr.__sentry_xhr_v3__?.request_headers)}))})}const CM=300;function Lf(e,t){const n=ne(e).attributes[Le];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,CM)}}const o=ct("resource",({entries:s})=>{s.forEach(i=>{kM(i)&&i.name.endsWith(n)&&(e.setAttributes(Rg(i)),r())})})}function AM(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?fa(r.toString(),t)||s&&fa(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?fa(e,t):r}}function NM(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&&(Rs(R,a.status_code),R.end(),s?.(R,{headers:J_(Dg(i)),error:e.error})),delete r[k]);return}const f=X_(c),d=Cn(f||c),p=f?Dt(f):void 0,h=Dt(bm(c)),m=v(),g=!!he(),y=g||!!m&&V(m),S=d?.host?.replace(/^.*@/,""),T=iu(f||c),b=T?`${u} ${T}`:u,M=l&&y?yt({name:m&&V(m)?b:`${u} ${h}`,attributes:{type:"xhr",[mi]:u,[Le]:be(p),[gi]:S,[_i]:T,[re]:"auto.http.browser",[H]:$h,[Pp]:gm(ym(d?.search)),[Op]:Sm(d?.hash)}}):new Mn,I=ki(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)&&xM(i,Ye()&&y?I:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",M,e),M}function xM(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=wm({span:t,propagateTraceparent:n});r&&MM(e,r,o,s)}function MM(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||!IM(s))&&e.setRequestHeader("baggage",n)}}catch{}}const Z_="WebVitals",OM=(e={})=>{const{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,o=new Set(t);return{name:Z_,setup(s){const i=V(s),a=n&&i&&Ig(),c=r&&i,u=a||c;a&&(zI(),ek(s)),c&&jI();const l=!i&&!o.has("cls"),f=!i&&!o.has("lcp"),d=wk({trackCls:l,trackLcp:f}),p=new WeakSet;s.on("afterStartPageLoadSpan",h=>{p.add(h)}),s.on("spanEnd",h=>{p.delete(h)&&(d(),Ak(h,{recordClsOnPageloadSpan:l,recordLcpOnPageloadSpan:f,spanStreamingEnabled:i}))}),i&&(o.has("lcp")||tR(s,u),o.has("cls")||nR(s,u)),o.has("inp")||rR(s,u)},afterAllSetup(){o.has("inp")||$k()}}};function PM(){C.document?C.document.addEventListener("visibilitychange",()=>{const e=he();if(!e)return;const t=ke(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 LM=3600,ey="sentry_previous_trace",DM="sentry.previous_trace";function $M(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?UM():void 0;e.on("spanStart",i=>{if(ke(i)!==i)return;const a=q().getPropagationContext();o=FM(o,i,a),r&&BM(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(Ac(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Ac(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Dp]:o.sampleRate}})}function FM(e,t,n){const r=ne(t);function o(){try{const a=Number(r.attributes[zc]??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<=LM&&(L&&_.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.attributes[H],...t.spanContext()})}\``),t.addLink({context:i,attributes:{[FS]:"previous_trace"}}),t.setAttribute(DM,`${i.traceId}-${i.spanId}-${Ac(i)?1:0}`)),s)}function BM(e){try{C.sessionStorage.setItem(ey,JSON.stringify(e))}catch(t){L&&_.warn("Could not store previous trace in sessionStorage",t)}}function UM(){try{const e=C.sessionStorage?.getItem(ey);return JSON.parse(e)}catch{return}}function Ac(e){return e.traceFlags===1}const HM="BrowserTracing",WM={...ds,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,...Q_},$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}={...WM,...e},U=Ng();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&&{[yi]:B.pathname},...B&&!Ci(B)&&{[Le]:be(B.href)},...Y.attributes};if(P!==Y.name&&(ee[ce]="custom"),Y.attributes=ee,!N){const De=Hn();yt({...Y,startTime:De}).end(De);return}const Se=wh(Y,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:Q,trimIdleSpanEndTimestamp:!I});Q&&I&&(O=Se),Ff(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:HM,setup(w){if(U){L&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(wb(),o&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?ik():r&&sk(),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;ak(N,{ignoreResourceSpans:m,spanStreamingEnabled:V(w)}),Ff(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:Av,...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||Df("sentry-trace")||$f("sentry-trace"),P=J.baggage||Df("baggage")||$f("baggage"),Y=Xp(Q,P),B=q();B.setPropagationContext(Y),Ye()||(B.getPropagationContext().propagationSpanId=rn());const ee=Js(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?.(Z_)){const N=s?.ignore??[];w.addIntegration(OM({...s,ignore:n||N.includes("inp")?N:[...N,"inp"]}))}let D=Bt();b!=="off"&&$M(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&&$i(({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&&zM(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",[hi]:"back-forward-cache"}},{url:C.location?.href}))})),l&&PM(),RM(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:{...Js(e),url:be(r,e)}}),nr(e)}function Df(e){return C.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function $f(e){return C.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}const ty="_sentry_idleSpan";function nr(e){return e[ty]}function Ff(e,t){pe(e,ty,t)}const Bf=1.5;function zM(e,t){const n=ne(e),r=Hn(),o=n.start_timestamp;return!(r-o>Bf||t&&r-t<=Bf)}function TL(e=v()){e?.emit("endPageloadSpan")}function IL(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 Uf=new WeakMap,Hf=new WeakMap,jM=9e4,qM=["text/event-stream","application/x-ndjson","application/stream+json"],kL=()=>({name:"FetchStreamPerformance",setup(e){Y0(t=>{if(t.response){const n=Uf.get(t.response);if(n&&t.endTimestamp){n.end(t.endTimestamp);const r=Hf.get(t.response);r&&clearTimeout(r)}}}),xi(t=>{if(t.endTimestamp&&t.response){const n=t.response.headers?.get("content-type")||"";if(t.response.headers?.get("content-length")||!qM.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?_m(s):r,a=iu(r,C.location?.origin),c=a?`${o} ${a}`:o,u=yt({name:V(e)?c:`${o} ${i}`,startTime:t.endTimestamp,attributes:{[Le]:be(Dt(r)),[_i]:a,[mi]:o,type:"fetch",[H]:Uv,[re]:"auto.http.browser.stream"}});Uf.set(t.response,u);const l=setTimeout(()=>{u.isRecording()&&u.end()},jM);Hf.set(t.response,l)}})}}),Nc="BfcacheMetrics",RL=(e={})=>{const t=KM(e.maxReasons);return{name:Nc,setupOnce(){if(!C.addEventListener||!C.performance?.getEntriesByType){L&&_.log(`[${Nc}] Browser APIs unavailable, skipping instrumentation.`);return}function n(r){const o=VM();if(r.persisted){Wf("hit",0,o);return}const s=C.performance.getEntriesByType("navigation")[0];if(s?.type!=="back_forward")return;const i=YM(s.notRestoredReasons,t);Wf("miss",i.length,o),typeof s.duration=="number"&&s.duration>0&&Us("browser.bfcache.reload.duration",s.duration,{unit:"millisecond",attributes:Gu({[Ar]:o})}),i.forEach(a=>GM(a,o))}C.addEventListener("pageshow",n,!0)}}};function Wf(e,t,n){lu("browser.bfcache.navigation",1,{attributes:Gu({[yS]:e,[_S]:t||void 0,[Ar]:n})})}function GM({reason:e,frame:t},n){lu("browser.bfcache.not_restored",1,{attributes:Gu({[SS]:e,[gS]:t,[Ar]:n})})}function VM(){return qk()||q().getScopeData().transactionName||C.location?.pathname}function KM(e){return e==null?1/0:e<1?(L&&_.warn(`[${Nc}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1):e}function YM(e,t){const n=[];return!e||t<=0||ny(e,"top",n,t),n}function ny(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=>{ny(o,"child",n,r)}))}function Gu(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 XM(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 Vu(e){return Ir(e.getAllKeys())}function JM(e,t,n){return e(r=>Vu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Ir(r.transaction)}))}function QM(e,t,n){return e(r=>Vu(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Ir(r.transaction)}))}function ZM(e){return e(t=>Vu(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 eO(e){let t;function n(){return t==null&&(t=XM(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=Os(r);await JM(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=Os(r);await QM(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await ZM(n());if(r)return jb(r)}catch{}}}}function tO(e){return t=>{const n=e({...t,createStore:eO});return C.addEventListener("online",async r=>{await n.flush()}),n}}function CL(e=Hg){return tO(QE(e))}const nO="window"in $&&$.window===$&&typeof importScripts>"u",xc=String(0),ry=nO?"main":"worker";function rO(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=sO(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:Oe(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||Oe(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:iO(e.resources)},profile:r}}function oO(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 sO(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=Pe(s.timestamp);r[o]={stack_id:s.stackId??0,thread_id:xc,timestamp:i}}return{frames:t,stacks:n,samples:r,thread_metadata:{[xc]:{name:ry}}}}function iO(e){const r=v()?.getOptions()?.stackParser;return r?Jv(r,e):[]}function aO(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 oy=!1;const cO=3e4;function uO(e){return typeof e=="function"}function lO(){const e=C.Profiler;if(!uO(e)){L&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(cO/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.")),oy=!0}}function dO(e){if(oy)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 aO(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 zf(e){e.setAttribute("thread.id",xc),e.setAttribute("thread.name",ry)}const fO=6e4,pO=3e5;class hO{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=dO(t.getOptions());L&&_.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||L&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Oe(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&zf(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)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&&zf(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!==ke(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),pO);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=lO();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()}},fO))}_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=rO(n,this._client,this._profilerId),o=oO(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:Oe(),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 mO="BrowserProfiling",gO=(()=>({name:mO,setup(e){const t=e.getOptions(),n=new hO;t.profileLifecycle||(t.profileLifecycle="manual");const r=he(),o=r&&ke(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&&ke(i);a&&n.notifyRootSpanActive(a)},0)}}})),AL=gO,_O="SpotlightBrowser",yO=[{op:Ps,name:"#sentry-spotlight"},{op:Ps,attributes:{[Hc]:"#sentry-spotlight"}}],SO=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:_O,setup:()=>{L&&_.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...yO]},afterAllSetup:n=>{bO(n,t)}}});function bO(e,t){const n=Iu("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:Os(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 NL=SO,xL=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Mr(e)}});function ML(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{$n(e,t.value),Fn(e,t.value)}}}const OL=()=>({name:"OpenFeature",processEvent(e,t,n){return Mr(e)}});class PL{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 LL=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Me(t,"isEnabled",vO)},processEvent(t,n,r){return Mr(t)}});function vO(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 DL=(({growthbookClass:e})=>D0({growthbookClass:e})),$L=({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 FL(){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 pv(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const EO="WebWorker",wO=20,BL=({worker:e})=>({name:EO,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>jf(t))},addWorker:t=>jf(t)});function jf(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),yR({msg:n,url:r,line:o,column:s}))}),e.addEventListener("message",n=>{if(RO(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})>wO&&t.shift(),TO(n.data._sentryWorkerError)}}})}function TO(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)?kO(t):t;r&&Ae(l)&&l.name!==r&&pe(l,"name",r);const f=v();if(!f)return;const{stackParser:d,attachStacktrace:p}=f.getOptions(),h=u&<(l)?jg(l):Bi(d,l,void 0,p,u);u||qg(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 UL({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),IO(e,{...n,filename:e.location?.href,name:Ae(r)?Bg(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:zg(n)})}),L&&_.log("[Sentry Worker] Registered worker with error and unhandled rejection handling")}function IO(e,t){try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:t});return}catch{}const{reason:n}=t,r=Ae(n),o=r?{message:Ug(n),stack:n.stack}:Te(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:o,plainError:r}})}catch{}}function kO(e){const t=new Error(String(e.message));return t.stack=typeof e.stack=="string"?e.stack:void 0,t}function RO(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 CO(e){return Ue(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function HL(e){const t={...e};Em(t,"react"),Gh("react",{version:_e.version});const n=YC(t);return _p(AO),n}function AO(e){return CO(e)?"[SyntheticEvent]":Vg(e)}function NO(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function sy(e,{componentStack:t},n){if(Ae(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,NO(e,r)}return Pn(e,n)}function WL(e){return(t,n)=>{const r=!!e,o=sy(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const xO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},MO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},OO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},PO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},LO=Symbol.for("react.forward_ref"),DO=Symbol.for("react.memo"),Ku={};Ku[LO]=OO;Ku[DO]=PO;function qf(e){const t=e.$$typeof;return t&&Ku[t]||xO}const $O=Object.defineProperty.bind(Object),FO=Object.getOwnPropertyNames.bind(Object),Gf=Object.getOwnPropertySymbols?.bind(Object),Vf=Object.getOwnPropertyDescriptor.bind(Object),BO=Object.getPrototypeOf.bind(Object),Kf=Object.prototype;function Bo(e,t,n){if(typeof t!="string"){if(Kf){const i=BO(t);i&&i!==Kf&&Bo(e,i)}let r=FO(t);Gf&&(r=r.concat(Gf(t)));const o=qf(e),s=qf(t);for(const i of r)if(!MO[i]&&!s?.[i]&&!o?.[i]&&!Vf(e,i)){const a=Vf(t,i);if(a)try{$O(e,i,a)}catch{}}}return e}const ur="unknown";class iy 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||Fh:i,onlyIfParent:!0,attributes:{[H]:Lh,[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||Wv:a,onlyIfParent:!0,startTime:o,attributes:{[H]:Mv,[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||Bh:a,startTime:o,attributes:{[H]:Ph,[re]:"auto.ui.react.profiler",...c&&{[Nt]:c},...i&&{[Jr]:a}}});u&&u.end(t)})}}render(){return this.props.children}}Object.assign(iy,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function zL(e,t){const n=t?.name||e.displayName||e.name||ur,r=o=>_e.createElement(iy,{...t,name:n,updateProps:o},_e.createElement(e,{...o}));return r.displayName=`profiler(${n})`,Bo(r,e),r}function jL(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||Fh:s,onlyIfParent:!0,attributes:{[H]:Lh,[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||Bh:a,onlyIfParent:!0,startTime:r,attributes:{[H]:Ph,[re]:"auto.ui.react.profiler",...c&&{[Nt]:c},...i&&{[Jr]:a}}});u&&u.end(o)}}),[])}const Re=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,UO="unknown",Fa={componentStack:null,error:null,eventId:null};class HO extends _e.Component{constructor(t){super(t),this.state=Fa,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&&Xd({...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=sy(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,l),i&&(this._lastEventId=l,this._openFallbackReportDialog&&Xd({...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===Fa?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(Fa)}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&&Re&&_.warn("fallback did not produce a valid ReactElement"),null)}}function qL(e,t){const n=e.displayName||e.name||UO,r=_e.memo(o=>_e.createElement(HO,{...t},_e.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,Bo(r,e),r}const WO="redux.action",zO="info",jO={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function GL(e){const t={...jO,...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:WO,data:d,type:zO});const p=t.stateTransformer(l);if(typeof p<"u"&&p!==null){const y=v()?.getOptions()?.normalizeDepth||3,S={state:{type:"redux",value:p}};Uy(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 VL(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&&Yf(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")&&Yf(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 Yf(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=qO(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function qO(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 KL(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},...GO(n,d),...Ba(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},...Ba(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},...Ba(h)}},{url:ay(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 ay(e,t){const n=e.options.stringifySearch?.(t.search)??"",r=`${t.pathname}${n&&n!=="?"?n:""}`;return _R(r)}function GO(e,t){const n=ay(e,t);return{[yi]:t.pathname,[Le]:be(n)}}function Ba(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`${XS}.${n}`]=r,t[`${LS}.${n}`]=r}),t}function YL(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),cy(a,s,i,n,"reactrouter_v4",r,o)}}}function XL(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),cy(a,s,i,n,"reactrouter_v5",r,o)}}}function cy(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=uy(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 uy(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:VO(t);return s&&(r.push({route:o,match:s}),o.routes&&uy(o.routes,t,n,r)),!!s}),r}function VO(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function JL(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=KO();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 KO(){const e=he(),t=e&&ke(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 Xf=new WeakMap;function YO(e,t,n){if(!e||!t?.length)return null;const r=n?Br(e,n):e;let o=Xf.get(t);o||(o=tP(t),Xf.set(t,o),Re&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(XO(r,s))return Re&&_.log("[React Router] Matched pathname",r,"to pattern",s),s;return Re&&_.log("[React Router] No manifest match found for pathname:",r),null}function XO(e,t){if(t==="/")return e==="/"||e==="";const n=Qf(e),r=Qf(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(!Jf(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!Jf(n[s],i))return!1;return!0}function Jf(e,t){return e===void 0||t===void 0?!1:ly.test(t)?!0:e===t}function Qf(e){return e.split("/").filter(Boolean)}const ly=/^:[\w-]+$/,JO=10,QO=3,ZO=1,eP=-2;function Zf(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=eP);for(const r of t)r!=="*"&&(ly.test(r)?n+=QO:r===""?n+=ZO:n+=JO);return n}function tP(e){return[...e].sort((t,n)=>{const r=Zf(t);return Zf(n)-r})}const nn=[],nP=10;function rP(e,t){const n={};return nn.length>=nP&&(Re&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),nn.shift()),nn.push({token:n,targetPath:e,span:t}),n}function oP(e){nn[nn.length-1]?.token===e&&nn.pop()}function dy(){const e=nn.length;return e>0?nn[e-1]??null:null}function sP(e){return py(e.route.path||"")}function fy(e){return e.params["*"]||""}function py(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 hy(e){return e.endsWith("*")}function an(e){return e.includes("/*")||e.endsWith("*")}function ep(e,t){return hy(e)&&!!t.route.children?.length||!1}function my(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}function iP(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 tp(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Qt(e){return e[0]==="/"?e:`/${e}`}function Yu(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=sP(o),i=Br(t.pathname,Qt(o.pathnameBase));return t.pathname===i?An(i):An(An(s||"")+Qt(Yu(e.filter(a=>a!==o.route),{pathname:i},n)))}return""}function aP(e,t,n,r){const o=t.filter(my);if(!o.length)return;const s=r(o,e),i=s?.[s.length-1];if(!i||!fy(i))return;const a=An(py(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=Yu(t.filter(p=>p!==i.route),{pathname:f},r);return d?Qt(`${a}${Qt(d)}`):void 0}function cP(e,t,n){const r=n(t,e);if(r){for(const o of r)if(my(o.route)&&fy(o))return!0}return!1}function np(e,t,n){return n?Br(e.pathname,t):e.pathname||""}function uP(e,t,n,r="",o=!1){if(!e||e.length===0)return[o?Br(t.pathname,r):t.pathname,"url"];if(!n)return[np(t,r,o),"url"];let s="";for(const i of n){const a=i.route;if(!a)continue;if(a.index)return iP(s,i.pathname,r,o);const c=a.path;if(!c||ep(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 tp(s)!==tp(i.pathname)&&!hy(s)?[(o?"":r)+u,"route"]:(ep(s,i)&&(s=s.slice(0,-1)),[(o?"":r)+s,"route"])}return[np(t,r,o),"url"]}function Ki(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=YO(e.pathname,c,a);if(h)return[(i?"":a)+h,"route"]}let l,f="url";const d=cP(e,n,s);d&&(l=Qt(Yu(n,e,s)),f="route"),(!d||!l)&&([l,f]=uP(t,e,r,a,i));const p=aP(e,n,l,s);return p?[p,"route"]:[l||e.pathname,f]}function wt(){const e=he(),t=e?ke(e):void 0;if(!t)return;const n=ne(t).attributes[H];return n==="navigation"||n==="pageload"?t:void 0}function lP(){const e=dy();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{Re&&_.warn("[React Router] Could not access window.location")}return null}function dP(){const e=dy();return e?e.span:wt()}function fP(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=lP(),u=dP(),l=s.apply(i,a);return pP(l,t,n,r,c,u),l}});return pe(o,"__sentry_proxied__",!0),o}function pP(e,t,n,r,o,s){Pt(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Re&&_.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function Yi(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]=fP(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)Yi(n,t)}const gy=new WeakMap;function Xi(e){return e?gy.get(e):void 0}const ui=C?.document?_e.useLayoutEffect:_e.useEffect,In=new WeakMap,Ce=new Set,ws=new WeakMap,Mc=new WeakMap;function hP(e){return C?.requestAnimationFrame?C.requestAnimationFrame(e):setTimeout(e,0)}function rp(e){C?.cancelAnimationFrame?C.cancelAnimationFrame(e):clearTimeout(e)}function _y(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function op(e){return e.includes(":")||e.includes("*")}function mP(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&&op(e.routeName),c=op(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 yy(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 Sy(e,t){let n=ws.get(e);n||(n=new Set,ws.set(e,n)),n.add(t),t.finally(()=>{const r=ws.get(e);r&&r.delete(t)})}function by(e){const t=new Promise(n=>{Mc.set(e,n)});Sy(e,t)}function gP(e){const t=Mc.get(e);t&&(t(),Mc.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function Xu(e,t,n,r=null,o){e.forEach(i=>{Ce.add(i),t.enableAsyncRouteHandlers&&Yi(i,(a,c,u,l)=>Xu(a,t,c,u,l))}),n&&yy(e,n);const s=o??wt();if(s){const{end_timestamp:i,attributes:a}=ne(s);if(i){Re&&_.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"?Ho({activeRootSpan:s,location:{pathname:u.pathname},routes:Array.from(Ce),allRoutes:Array.from(Ce),config:t}):c==="navigation"&&Oc(s,u,Array.from(Ce),!1,t))}}function Oc(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){Re&&_.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(n,t),[p,h]=Ki(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 vy(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=_y(l.location),p=()=>{u!==d&&(u=d,c=null,tl({location:l.location,routes:t,navigationType:l.historyAction,version:n,allRoutes:Array.from(Ce),config:o}))};l.navigation.state!=="idle"?(u!==d&&(u=null),c!==null&&rp(c),c=hP(p)):(c!==null&&(rp(c),c=null),p())}})}function Ju(e,t){return function(n,r){const o=Xi(v());if(!o)return Re&&_.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(Uo(n),s.enableAsyncRouteHandlers)for(const l of n)Yi(l,(f,d,p,h)=>Xu(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),by(i));const c=Ey(r,!1,i,s),u=e(n,c);return u.state.historyAction==="POP"&&i&&Ho({activeRootSpan:i,location:u.state.location,routes:n,allRoutes:Array.from(Ce),config:s}),vy(u,n,t,i,s),u}}function Qu(e,t){return function(n,r){const o=Xi(v());if(!o)return Re&&_.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(Uo(n),s.enableAsyncRouteHandlers)for(const y of n)Yi(y,(S,T,b,M)=>Xu(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),by(i));const c=Ey(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&&Ho({activeRootSpan:g,location:m,routes:n,allRoutes:Array.from(Ce),config:s}),vy(u,n,t,g,s),u}}function Zu(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 Nb(n,{setup(p){const h=e.finalTimeout??3e4,m=(e.idleTimeout??1e3)*3,g=f??m;let y;g===1/0?(y=h,Re&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",h,"ms to prevent indefinite hangs")):Number.isNaN(g)?(Re&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",m),y=m):g<0?(Re&&_.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"?gy.set(p,{useLocation:r,useNavigationType:o,createRoutesFromChildren:s,matchRoutes:i,stripBasename:a||!1,enableAsyncRouteHandlers:c,instrumentNavigation:l,lazyRouteTimeout:y,lazyRouteManifest:d,basename:""}):Re&&_.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 el(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 ui(()=>{const f=Uo(s);return()=>wy(f)}),ui(()=>{const f=typeof l=="string"?{pathname:l}:l;a.current?(Ho({activeRootSpan:wt(),location:f,routes:s,allRoutes:Array.from(Ce),config:o}),a.current=!1):tl({location:f,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ce),config:o})},[u,l]),null},r=({routes:o,locationArg:s})=>{const i=Xi(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 Ey(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(Uo(d),l&&l.length>0){const m=l[l.length-1]?.route;if(m){const g=Array.from(Ce).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&&yy(d,g)}}const p=a?ne(a):void 0;return i&&a&&p&&!p.end_timestamp&&p.attributes[H]==="navigation"&&Oc(a,{pathname:i,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!0,r),u(f,d)})}const c=(async()=>{const u=rP(i,a);let l;try{l=await o(s)}finally{oP(u),a&&gP(a)}const f=a?ne(a):void 0;if(a&&f&&!f.end_timestamp&&f.attributes[H]==="navigation"){const d=i;d&&Oc(a,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!1,r)}return l})();return a&&Sy(a,c),c}}}function tl(e){const{location:t,routes:n,navigationType:r,version:o,config:s,matches:i,allRoutes:a}=e,c=Array.isArray(i)?i:s.matchRoutes(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]=Ki(t,a||n,a||n,c,s),p=_y(t),h=In.get(u),m=h&&!h.isPlaceholder?!!ne(h.span).end_timestamp:!1,{skip:g,shouldUpdate:y}=mP(h,p,f,m);if(g){if(y&&h){const M=h.routeName;if(h.isPlaceholder)h.routeName=f,Re&&_.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,Re&&_.log(`[Tracing] Updated navigation span name from "${M}" to "${f}"`)}}else Re&&_.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}),Pc(b,t,n,"navigation",s)):In.delete(u)}}function Uo(e){const t=[];return e.forEach(n=>{Ty(n).forEach(o=>{Ce.add(o),t.push(o)})}),t}function wy(e){e.forEach(t=>{Ce.delete(t)})}function Ty(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{Ty(n,t).forEach(o=>{t.add(o)})})),t}function Ho({activeRootSpan:e,location:t,routes:n,config:r,matches:o,allRoutes:s}){const i=Array.isArray(o)?o:r.matchRoutes(s||n,t,r.basename);if(i){const[a,c]=Ki(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),Pc(e,t,n,"pageload",r)}}else e&&Pc(e,t,n,"pageload",r)}function _P(e,t,n,r,o=!1){return n?!!(!e&&o||e&&an(e)&&r==="route"&&!an(n)||t!=="route"&&r==="route"):!1}function Ua(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(l,r,a.basename);if(!f)return;const[d,p]=Ki(r,l,l,f,a),h=_P(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){Re&&_.warn(`Error updating span details before ending: ${c}`)}}function Pc(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=ws.get(e),y=e.__sentry_may_have_lazy_routes__;if((g&&g.size>0||y)&&p&&(an(p)||h!=="route")){if(o.lazyRouteTimeout===0){Ua(e,d,p,t,n,r,Ce,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);Ua(e,I,I.name,t,n,r,Ce,o),m(),a(f)}).catch(()=>{m(),a(f)});return}Ua(e,d,p,t,n,r,Ce,o),m(),a(f)},pe(e,s,!0)}function nl(e,t){const n=({config:o,routeChildren:s})=>{const i=_e.useRef(!0),a=o.useLocation(),c=o.useNavigationType(),u=o.createRoutesFromChildren(s);return ui(()=>{const l=Uo(u);return()=>wy(l)}),ui(()=>{i.current?(Ho({activeRootSpan:wt(),location:a,routes:u,allRoutes:Array.from(Ce),config:o}),i.current=!1):tl({location:a,routes:u,navigationType:c,version:t,allRoutes:Array.from(Ce),config:o})},[a,c]),null},r=o=>{const s=Xi(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 QL(e){return Zu(e,"6")}function ZL(e){return el(e,"6")}function eD(e){return Ju(e,"6")}function tD(e){return Qu(e,"6")}function nD(e){return nl(e,"6")}function rD(e){return Zu(e,"7")}function oD(e){return nl(e,"7")}function sD(e){return Ju(e,"7")}function iD(e){return Qu(e,"7")}function aD(e){return el(e,"7")}function cD(e){return Zu(e,"")}function uD(e){return nl(e,"")}function lD(e){return Ju(e,"")}function dD(e){return Qu(e,"")}function fD(e){return el(e,"")}export{LR as BrowserClient,HO as ErrorBoundary,da as MULTIPLEXED_TRANSPORT_EXTRA_KEY,PL as OpenFeatureIntegrationHook,iy as Profiler,Zt as SDK_VERSION,bP as SEMANTIC_ATTRIBUTE_SENTRY_OP,vP as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,zc as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,bt as Scope,C as WINDOW,Et as addBreadcrumb,dE as addEventProcessor,vl as addIntegration,RL as bfcacheMetricsIntegration,AP as bindScopeToEmitter,fC as breadcrumbsIntegration,EC as browserApiErrorsIntegration,AL as browserProfilingIntegration,CC as browserSessionIntegration,$o as browserTracingIntegration,ML as buildLaunchDarklyFlagUsedHandler,zP as captureConsoleIntegration,Io as captureEvent,Pn as captureException,eT as captureFeedback,cE as captureMessage,sy as captureReactException,sa as captureSession,XR as chromeStackLineParser,BP as close,x0 as consoleIntegration,JP as consoleLoggingIntegration,_L as contextLinesIntegration,kP as continueTrace,oL as createCachedRouteProvider,ZP as createConsolaReporter,GL as createReduxEnhancer,OE as createTransport,Gk as createUrlRouteProvider,fL as createUserFeedbackEnvelope,xC as cultureContextIntegration,jw as dedupeIntegration,Q_ as defaultRequestInstrumentationOptions,aC as defaultStackLineParsers,cC as defaultStackParser,FL as diagnoseSdkConnectivity,tL as elementTimingIntegration,Vh as endSession,Tw as eventFiltersIntegration,NR as eventFromException,xR as eventFromMessage,Cu as exceptionFromError,jP as extraErrorDataIntegration,YP as featureFlagsIntegration,iL as feedbackAsyncIntegration,aL as feedbackIntegration,aL as feedbackSyncIntegration,kL as fetchStreamPerformanceIntegration,FP as flush,pL as forceLoad,vw as functionToStringIntegration,eC as geckoStackLineParser,_R as getAbsoluteUrl,he as getActiveSpan,v as getClient,q as getCurrentScope,KC as getDefaultIntegrations,eL as getFeedback,rr as getGlobalScope,me as getIsolationScope,EL as getReplay,ke as getRootSpan,Eu as getRouteProvider,ls as getSpanDescendants,ob as getSpanStatusFromHttpCode,wm as getTraceData,PC as globalHandlersIntegration,yL as graphqlClientIntegration,DL as growthbookIntegration,gL as httpClientIntegration,FC as httpContextIntegration,HL as init,RM as instrumentOutgoingRequests,h0 as instrumentSupabaseClient,nL as interactionsIntegration,Ng as isBotUserAgent,lE as isEnabled,UP as isInitialized,uE as lastEventId,xL as launchDarklyIntegration,TR as lazyLoadIntegration,zC as linkedErrorsIntegration,XP as logger,CL as makeBrowserOfflineTransport,Hg as makeFetchTransport,HP as makeMultiplexedTransport,QP as metrics,WP as moduleMetadataIntegration,Vg as normalizeStringifyValue,hL as onLoad,OL as openFeatureIntegration,lL as opera10StackLineParser,dL as opera11StackLineParser,fw as parameterize,WL as reactErrorHandler,cD as reactRouterBrowserTracingIntegration,VL as reactRouterV3BrowserTracingIntegration,YL as reactRouterV4BrowserTracingIntegration,XL as reactRouterV5BrowserTracingIntegration,QL as reactRouterV6BrowserTracingIntegration,rD as reactRouterV7BrowserTracingIntegration,wb as registerSpanErrorInstrumentation,UL as registerWebWorker,wL as replayCanvasIntegration,vL as replayIntegration,TL as reportPageLoaded,mL as reportingObserverIntegration,qk as resolveCurrentRoute,rL as resolveRoute,qP as rewriteFramesIntegration,BT as sendFeedback,IL as setActiveSpanInBrowser,LP as setAttribute,PP as setAttributes,Gh as setContext,$P as setConversationId,XE as setCurrentClient,xP as setExtra,NP as setExtras,Rs as setHttpStatus,bh as setMeasurement,jk as setRouteProvider,OP as setTag,MP as setTags,DP as setUser,Xd as showReportDialog,tv as spanStreamingIntegration,wP as spanToBaggageHeader,ne as spanToJSON,Ne as spanToStaticSpanJSON,bb as spanToTraceHeader,NL as spotlightBrowserIntegration,Tr as startBrowserTracingNavigationSpan,Fo as startBrowserTracingPageLoadSpan,yt as startInactiveSpan,hv as startNewTrace,Hl as startSession,RP as startSpan,CP as startSpanManual,$L as statsigIntegration,GP as supabaseIntegration,pv as suppressTracing,KL as tanstackRouterBrowserTracingIntegration,KP as thirdPartyErrorFilterIntegration,cL as uiProfiler,LL as unleashIntegration,EP as updateSpanName,jL as useProfiler,sL as userTimingIntegration,SL as viewHierarchyIntegration,OM as webVitalsIntegration,BL as webWorkerIntegration,uL as winjsStackLineParser,sn as withActiveSpan,qL as withErrorBoundary,SP as withIsolationScope,zL as withProfiler,Je as withScope,nD as withSentryReactRouterV6Routing,oD as withSentryReactRouterV7Routing,JL as withSentryRouting,TP as withStaticSpan,IP as withStreamedSpan,lD as wrapCreateBrowserRouter,eD as wrapCreateBrowserRouterV6,sD as wrapCreateBrowserRouterV7,dD as wrapCreateMemoryRouter,tD as wrapCreateMemoryRouterV6,iD as wrapCreateMemoryRouterV7,uD as wrapReactRouterRouting,fD as wrapUseRoutes,ZL as wrapUseRoutesV6,aD as wrapUseRoutesV7,VP as zodErrorsIntegration};
|