@atproto/oauth-provider-ui 0.0.2

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.
Files changed (208) hide show
  1. package/.linguirc +57 -0
  2. package/CHANGELOG.md +7 -0
  3. package/CONTRIBUTING.md +6 -0
  4. package/LICENSE.txt +7 -0
  5. package/dist/assets/COdVzed-.css +3 -0
  6. package/dist/assets/COdVzed-.js +100 -0
  7. package/dist/assets/COdVzed-.js.map +1 -0
  8. package/dist/assets/Cqnfnbvc.js +6 -0
  9. package/dist/assets/Cqnfnbvc.js.map +1 -0
  10. package/dist/assets/bundle-manifest.json +630 -0
  11. package/dist/assets/error-view-Bu4y7Nd8.js +208 -0
  12. package/dist/assets/error-view-Bu4y7Nd8.js.map +1 -0
  13. package/dist/assets/index-DXlCRM6V.js +36 -0
  14. package/dist/assets/index-DXlCRM6V.js.map +1 -0
  15. package/dist/assets/messages-2GoTm2qL.js +4 -0
  16. package/dist/assets/messages-2GoTm2qL.js.map +1 -0
  17. package/dist/assets/messages-6Cn2Jbhw.js +4 -0
  18. package/dist/assets/messages-6Cn2Jbhw.js.map +1 -0
  19. package/dist/assets/messages-75hFgOK2.js +4 -0
  20. package/dist/assets/messages-75hFgOK2.js.map +1 -0
  21. package/dist/assets/messages-B3OK4k0O.js +4 -0
  22. package/dist/assets/messages-B3OK4k0O.js.map +1 -0
  23. package/dist/assets/messages-BNXlPzKV.js +4 -0
  24. package/dist/assets/messages-BNXlPzKV.js.map +1 -0
  25. package/dist/assets/messages-BUygB8mD.js +4 -0
  26. package/dist/assets/messages-BUygB8mD.js.map +1 -0
  27. package/dist/assets/messages-BVPPcwNr.js +4 -0
  28. package/dist/assets/messages-BVPPcwNr.js.map +1 -0
  29. package/dist/assets/messages-BbbWUQS8.js +4 -0
  30. package/dist/assets/messages-BbbWUQS8.js.map +1 -0
  31. package/dist/assets/messages-BibKCYyW.js +4 -0
  32. package/dist/assets/messages-BibKCYyW.js.map +1 -0
  33. package/dist/assets/messages-BlPrr9_7.js +4 -0
  34. package/dist/assets/messages-BlPrr9_7.js.map +1 -0
  35. package/dist/assets/messages-ByVCw40U.js +4 -0
  36. package/dist/assets/messages-ByVCw40U.js.map +1 -0
  37. package/dist/assets/messages-C5DU1neP.js +4 -0
  38. package/dist/assets/messages-C5DU1neP.js.map +1 -0
  39. package/dist/assets/messages-C6IgUtbX.js +4 -0
  40. package/dist/assets/messages-C6IgUtbX.js.map +1 -0
  41. package/dist/assets/messages-C92Zzt2o.js +4 -0
  42. package/dist/assets/messages-C92Zzt2o.js.map +1 -0
  43. package/dist/assets/messages-CGZqYT14.js +4 -0
  44. package/dist/assets/messages-CGZqYT14.js.map +1 -0
  45. package/dist/assets/messages-CGlsy4wt.js +4 -0
  46. package/dist/assets/messages-CGlsy4wt.js.map +1 -0
  47. package/dist/assets/messages-CPT1nd0u.js +4 -0
  48. package/dist/assets/messages-CPT1nd0u.js.map +1 -0
  49. package/dist/assets/messages-CTTdXyw_.js +4 -0
  50. package/dist/assets/messages-CTTdXyw_.js.map +1 -0
  51. package/dist/assets/messages-ChK_C_Pj.js +4 -0
  52. package/dist/assets/messages-ChK_C_Pj.js.map +1 -0
  53. package/dist/assets/messages-CjJbk7Uf.js +4 -0
  54. package/dist/assets/messages-CjJbk7Uf.js.map +1 -0
  55. package/dist/assets/messages-CoiLjLYO.js +4 -0
  56. package/dist/assets/messages-CoiLjLYO.js.map +1 -0
  57. package/dist/assets/messages-Cwx6B4Ti.js +4 -0
  58. package/dist/assets/messages-Cwx6B4Ti.js.map +1 -0
  59. package/dist/assets/messages-D0uXAp_H.js +4 -0
  60. package/dist/assets/messages-D0uXAp_H.js.map +1 -0
  61. package/dist/assets/messages-DG0_arU0.js +4 -0
  62. package/dist/assets/messages-DG0_arU0.js.map +1 -0
  63. package/dist/assets/messages-DOXFJh9K.js +4 -0
  64. package/dist/assets/messages-DOXFJh9K.js.map +1 -0
  65. package/dist/assets/messages-DPK7nOoC.js +4 -0
  66. package/dist/assets/messages-DPK7nOoC.js.map +1 -0
  67. package/dist/assets/messages-Duccgtu0.js +4 -0
  68. package/dist/assets/messages-Duccgtu0.js.map +1 -0
  69. package/dist/assets/messages-DxTqgsHq.js +4 -0
  70. package/dist/assets/messages-DxTqgsHq.js.map +1 -0
  71. package/dist/assets/messages-E5_lTg7A.js +4 -0
  72. package/dist/assets/messages-E5_lTg7A.js.map +1 -0
  73. package/dist/assets/messages-UhunAjh1.js +4 -0
  74. package/dist/assets/messages-UhunAjh1.js.map +1 -0
  75. package/dist/assets/messages-Xg_3YLGw.js +4 -0
  76. package/dist/assets/messages-Xg_3YLGw.js.map +1 -0
  77. package/dist/assets/messages-iliBQHY2.js +4 -0
  78. package/dist/assets/messages-iliBQHY2.js.map +1 -0
  79. package/dist/assets/messages-lRprpIl-.js +4 -0
  80. package/dist/assets/messages-lRprpIl-.js.map +1 -0
  81. package/dist/assets/messages-pbPHQbz1.js +4 -0
  82. package/dist/assets/messages-pbPHQbz1.js.map +1 -0
  83. package/dist/assets/messages-q-O7ZQGs.js +4 -0
  84. package/dist/assets/messages-q-O7ZQGs.js.map +1 -0
  85. package/dist/lib/index.d.ts +19 -0
  86. package/dist/lib/index.d.ts.map +1 -0
  87. package/dist/lib/index.js +47 -0
  88. package/dist/lib/index.js.map +1 -0
  89. package/dist/tsconfig.backend.tsbuildinfo +1 -0
  90. package/lib/index.ts +72 -0
  91. package/package.json +73 -0
  92. package/rollup.config.js +102 -0
  93. package/src/authorization-page.html +183 -0
  94. package/src/authorization-page.tsx +55 -0
  95. package/src/backend-data.ts +35 -0
  96. package/src/components/forms/button-toggle-visibility.tsx +43 -0
  97. package/src/components/forms/button.tsx +60 -0
  98. package/src/components/forms/fieldset.tsx +55 -0
  99. package/src/components/forms/form-card-async.tsx +103 -0
  100. package/src/components/forms/form-card.tsx +49 -0
  101. package/src/components/forms/input-checkbox.tsx +78 -0
  102. package/src/components/forms/input-container.tsx +107 -0
  103. package/src/components/forms/input-email-address.tsx +65 -0
  104. package/src/components/forms/input-new-password.tsx +62 -0
  105. package/src/components/forms/input-password.tsx +87 -0
  106. package/src/components/forms/input-text.tsx +82 -0
  107. package/src/components/forms/input-token.tsx +94 -0
  108. package/src/components/forms/wizard-card.tsx +116 -0
  109. package/src/components/layouts/layout-title-page.tsx +77 -0
  110. package/src/components/layouts/layout-welcome.tsx +73 -0
  111. package/src/components/utils/account-identifier.tsx +23 -0
  112. package/src/components/utils/account-image.tsx +33 -0
  113. package/src/components/utils/admonition.tsx +52 -0
  114. package/src/components/utils/client-name.tsx +45 -0
  115. package/src/components/utils/error-card.tsx +93 -0
  116. package/src/components/utils/error-message.tsx +88 -0
  117. package/src/components/utils/help-card.tsx +46 -0
  118. package/src/components/utils/icons.tsx +88 -0
  119. package/src/components/utils/link-anchor.tsx +28 -0
  120. package/src/components/utils/link-title.tsx +26 -0
  121. package/src/components/utils/multi-lang-string.tsx +56 -0
  122. package/src/components/utils/password-strength-label.tsx +37 -0
  123. package/src/components/utils/password-strength-meter.tsx +58 -0
  124. package/src/components/utils/url-viewer.tsx +73 -0
  125. package/src/cookies.ts +11 -0
  126. package/src/error-page.html +125 -0
  127. package/src/error-page.tsx +29 -0
  128. package/src/hooks/use-api.ts +182 -0
  129. package/src/hooks/use-async-action.ts +120 -0
  130. package/src/hooks/use-bound-dispatch.ts +5 -0
  131. package/src/hooks/use-browser-color-scheme.ts +31 -0
  132. package/src/hooks/use-csrf-token.ts +5 -0
  133. package/src/hooks/use-random-string.ts +37 -0
  134. package/src/hooks/use-stepper.ts +87 -0
  135. package/src/index.html +13 -0
  136. package/src/lib/api.ts +234 -0
  137. package/src/lib/backend-data.ts +6 -0
  138. package/src/lib/clsx.ts +6 -0
  139. package/src/lib/json-client.ts +97 -0
  140. package/src/lib/password.ts +98 -0
  141. package/src/lib/ref.ts +17 -0
  142. package/src/lib/util.ts +13 -0
  143. package/src/locales/an/messages.po +487 -0
  144. package/src/locales/ast/messages.po +487 -0
  145. package/src/locales/ca/messages.po +487 -0
  146. package/src/locales/da/messages.po +487 -0
  147. package/src/locales/de/messages.po +487 -0
  148. package/src/locales/el/messages.po +487 -0
  149. package/src/locales/en/messages.po +487 -0
  150. package/src/locales/en-GB/messages.po +487 -0
  151. package/src/locales/es/messages.po +487 -0
  152. package/src/locales/eu/messages.po +487 -0
  153. package/src/locales/fi/messages.po +487 -0
  154. package/src/locales/fr/messages.po +487 -0
  155. package/src/locales/ga/messages.po +487 -0
  156. package/src/locales/gl/messages.po +487 -0
  157. package/src/locales/hi/messages.po +487 -0
  158. package/src/locales/hu/messages.po +487 -0
  159. package/src/locales/ia/messages.po +487 -0
  160. package/src/locales/id/messages.po +487 -0
  161. package/src/locales/it/messages.po +487 -0
  162. package/src/locales/ja/messages.po +487 -0
  163. package/src/locales/km/messages.po +487 -0
  164. package/src/locales/ko/messages.po +487 -0
  165. package/src/locales/load.ts +8 -0
  166. package/src/locales/locale-context.ts +19 -0
  167. package/src/locales/locale-provider.tsx +112 -0
  168. package/src/locales/locale-selector.tsx +58 -0
  169. package/src/locales/locales.ts +168 -0
  170. package/src/locales/ne/messages.po +487 -0
  171. package/src/locales/nl/messages.po +487 -0
  172. package/src/locales/pl/messages.po +487 -0
  173. package/src/locales/pt-BR/messages.po +487 -0
  174. package/src/locales/ro/messages.po +487 -0
  175. package/src/locales/ru/messages.po +487 -0
  176. package/src/locales/sv/messages.po +487 -0
  177. package/src/locales/th/messages.po +487 -0
  178. package/src/locales/tr/messages.po +487 -0
  179. package/src/locales/uk/messages.po +487 -0
  180. package/src/locales/vi/messages.po +487 -0
  181. package/src/locales/zh-CN/messages.po +487 -0
  182. package/src/locales/zh-HK/messages.po +487 -0
  183. package/src/locales/zh-TW/messages.po +487 -0
  184. package/src/styles.css +33 -0
  185. package/src/views/authorize/accept/accept-form.tsx +150 -0
  186. package/src/views/authorize/accept/accept-view.tsx +70 -0
  187. package/src/views/authorize/authorize-view.tsx +183 -0
  188. package/src/views/authorize/reset-password/reset-password-confirm-form.tsx +88 -0
  189. package/src/views/authorize/reset-password/reset-password-request-form.tsx +80 -0
  190. package/src/views/authorize/reset-password/reset-password-view.tsx +127 -0
  191. package/src/views/authorize/sign-in/sign-in-form.tsx +242 -0
  192. package/src/views/authorize/sign-in/sign-in-picker.tsx +116 -0
  193. package/src/views/authorize/sign-in/sign-in-view.tsx +145 -0
  194. package/src/views/authorize/sign-up/sign-up-account-form.tsx +142 -0
  195. package/src/views/authorize/sign-up/sign-up-disclaimer.tsx +51 -0
  196. package/src/views/authorize/sign-up/sign-up-handle-form.tsx +287 -0
  197. package/src/views/authorize/sign-up/sign-up-hcaptcha-form.tsx +108 -0
  198. package/src/views/authorize/sign-up/sign-up-view.tsx +158 -0
  199. package/src/views/authorize/welcome/welcome-view.tsx +56 -0
  200. package/src/views/error/error-view.tsx +31 -0
  201. package/tailwind.config.js +31 -0
  202. package/tsconfig.backend.json +8 -0
  203. package/tsconfig.frontend.json +10 -0
  204. package/tsconfig.frontend.tsbuildinfo +1 -0
  205. package/tsconfig.json +8 -0
  206. package/tsconfig.tools.json +8 -0
  207. package/tsconfig.tools.tsbuildinfo +1 -0
  208. package/vite.config.mjs +16 -0
@@ -0,0 +1,36 @@
1
+ import { r as reactExports } from './error-view-Bu4y7Nd8.js';
2
+
3
+ function e$2(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
4
+
5
+ function t$1(e,o){return t$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t$1(e,o)}
6
+
7
+ function o$2(o,e){o.prototype=Object.create(e.prototype),o.prototype.constructor=o,t$1(o,e);}
8
+
9
+ let e$1,t,n$1,r;var i=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o$1=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,l=(e,t,n)=>t in e?i(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,d=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&l(e,n,t[n]);if(o$1)for(var n of o$1(t))u.call(t,n)&&l(e,n,t[n]);return e},_=(e,t)=>s(e,a(t)),p=(e,t)=>{var n={};for(var r in e)c.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&o$1)for(var r of o$1(e))0>t.indexOf(r)&&u.call(e,r)&&(n[r]=e[r]);return n},h=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:true});},f=(e,t,n)=>new Promise((r,i)=>{var s=e=>{try{o(n.next(e));}catch(e){i(e);}},a=e=>{try{o(n.throw(e));}catch(e){i(e);}},o=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);o((n=n.apply(e,t)).next());});function m(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return {document:t,window:n}}function g(e){return e||document.head}var y="hCaptchaOnLoad",E="script-error",v="@hCaptcha/loader",S=Object.prototype.toString;function T(e){switch(S.call(e)){case "[object Error]":case "[object Exception]":case "[object DOMException]":return true;default:return C(e,Error)}}function b(e,t){return S.call(e)===`[object ${t}]`}function R(e){return b(e,"ErrorEvent")}function x(e){return b(e,"DOMError")}function D(e){return b(e,"String")}function N(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function w(e){return b(e,"Object")}function k(e){return "undefined"!=typeof Event&&C(e,Event)}function U(e){return !!(e&&e.then&&"function"==typeof e.then)}function B(e){return "number"==typeof e&&e!=e}function C(e,t){try{return e instanceof t}catch(e){return false}}function Y(e){return !!("object"==typeof e&&null!==e&&(e.__isVue||e._isVue))}function I(e,t=0){return "string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function G(e,t){if(!Array.isArray(e))return "";let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Y(r)?n.push("[VueViewModel]"):n.push(String(r));}catch(e){n.push("[value cannot be serialized]");}}return n.join(t)}function O(e,t=[],n=false){return t.some(t=>(function(e,t,n=false){return !!D(e)&&(b(t,"RegExp")?t.test(e):!!D(t)&&(n?e===t:e.includes(t)))})(e,t,n))}function $(e,t){e.mechanism=e.mechanism||{type:"generic",handled:true},e.mechanism=_(d({},e.mechanism),{is_exception_group:true,exception_id:t});}function P(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:true},e.mechanism=_(d({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r});}function j(e){return e&&e.Math==Math?e:void 0}var L="object"==typeof globalThis&&j(globalThis)||"object"==typeof window&&j(window)||"object"==typeof self&&j(self)||"object"==typeof global&&j(global)||function(){return this}()||{};function A(e,t,n){let r=n||L,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}function M(e,t={}){try{let n=e,r=[],i=0,s=0,a,o=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(a=function(e,t){let n=[],r,i,s,a,o;if(!e||!e.tagName)return "";n.push(e.tagName.toLowerCase());let c=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(c&&c.length)c.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`);});else if(e.id&&n.push(`#${e.id}`),(r=e.className)&&D(r))for(i=r.split(/\s+/),o=0;o<i.length;o++)n.push(`.${i[o]}`);let u=["aria-label","type","name","title","alt"];for(o=0;o<u.length;o++)s=u[o],(a=e.getAttribute(s))&&n.push(`[${s}="${a}"]`);return n.join("")}(n,o),!("html"===a||i>1&&s+3*r.length+a.length>=c));)r.push(a),s+=a.length,n=n.parentNode;return r.reverse().join(" > ")}catch(e){return "<unknown>"}}var q=["debug","info","warn","error","log","assert","trace"],H={};function F(e){if(!("console"in L))return e();let t=L.console,n={},r=Object.keys(H);r.forEach(e=>{let r=H[e];n[e]=t[e],t[e]=r;});try{return e()}finally{r.forEach(e=>{t[e]=n[e];});}}var z=(e$1=false,t={enable:()=>{e$1=true;},disable:()=>{e$1=false;}},"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?q.forEach(n=>{t[n]=(...t)=>{e$1&&F(()=>{L.console[n](`Sentry Logger [${n}]:`,...t);});};}):q.forEach(e=>{t[e]=()=>{};}),t),W=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function J(e,t=false){let{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=e;return `${o}://${c}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}function V(e){return {protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}var X=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t;}};function K(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);"function"==typeof i&&Z(i,r),e[t]=i;}function Q(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0});}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`Failed to add non-enumerable property "${t}" to object`,e);}}function Z(e,t){try{e.prototype=t.prototype=t.prototype||{},Q(e,"__sentry_original__",t);}catch(e){}}function ee(e){return e.__sentry_original__}function et(e){if(T(e))return d({message:e.message,name:e.name,stack:e.stack},er(e));if(!k(e))return e;{let t=d({type:e.type,target:en(e.target),currentTarget:en(e.currentTarget)},er(e));return "undefined"!=typeof CustomEvent&&C(e,CustomEvent)&&(t.detail=e.detail),t}}function en(e){try{return "undefined"!=typeof Element&&C(e,Element)?M(e):Object.prototype.toString.call(e)}catch(e){return "<unknown>"}}function er(e){if("object"!=typeof e||null===e)return {};{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}}function ei(e){return function e(t,n){if(w(t)){let r=n.get(t);if(void 0!==r)return r;let i={};for(let r of(n.set(t,i),Object.keys(t))) void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){let r=n.get(t);if(void 0!==r)return r;let i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n));}),i}return t}(e,new Map)}var es=/\(error: (.*)\)/,ea=/captureMessage|captureException/,eo="<anonymous>";function ec(e){try{return e&&"function"==typeof e&&e.name||eo}catch(e){return eo}}function eu(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var el="__sentry_xhr_v2__",ed={},e_={};function ep(e,t){ed[e]=ed[e]||[],ed[e].push(t),function(e){if(!e_[e])switch(e_[e]=true,e){case "console":"console"in L&&q.forEach(function(e){e in L.console&&K(L.console,e,function(t){return H[e]=t,function(...t){eh("console",{args:t,level:e});let n=H[e];n&&n.apply(L.console,t);}});});break;case "dom":(function(){if(!L.document)return;let e=eh.bind(null,"dom"),t=eg(e,true);L.document.addEventListener("click",t,false),L.document.addEventListener("keypress",t,false),["EventTarget","Node"].forEach(t=>{let n=L[t]&&L[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(K(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){let r=eg(e);s.handler=r,t.call(this,n,r,i);}s.refCount++;}catch(e){}return t.call(this,n,r,i)}}),K(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__);}catch(e){}return e.call(this,t,n,r)}}));});})();break;case "xhr":(function(){if(!L.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;K(e,"open",function(e){return function(...t){let n=t[1],r=this[el]={method:D(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};D(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=true);let i=()=>{let e=this[el];if(e&&4===this.readyState){try{e.status_code=this.status;}catch(e){}eh("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this});}};return "onreadystatechange"in this&&"function"==typeof this.onreadystatechange?K(this,"onreadystatechange",function(e){return function(...t){return i(),e.apply(this,t)}}):this.addEventListener("readystatechange",i),K(this,"setRequestHeader",function(e){return function(...t){let[n,r]=t,i=this[el];return i&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),K(e,"send",function(e){return function(...t){let n=this[el];return n&&void 0!==t[0]&&(n.body=t[0]),eh("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}});})();break;case "fetch":(function(){if(!function(){if(!("fetch"in L))return false;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return false}}())return false;if(eu(L.fetch))return true;let e=false,t=L.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=eu(n.contentWindow.fetch)),t.head.removeChild(n);}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e);}return e})()&&K(L,"fetch",function(e){return function(...t){let{method:n,url:r}=function(e){if(0===e.length)return {method:"GET",url:""};if(2===e.length){let[t,n]=e;return {url:em(t),method:ef(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return {url:em(t),method:ef(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return eh("fetch",d({},i)),e.apply(L,t).then(e=>(eh("fetch",_(d({},i),{endTimestamp:Date.now(),response:e})),e),e=>{throw eh("fetch",_(d({},i),{endTimestamp:Date.now(),error:e})),e})}});break;case "history":(function(){let e,t,n;if(t=(e=L.chrome)&&e.app&&e.app.runtime,n="history"in L&&!!L.history.pushState&&!!L.history.replaceState,t||!n)return;let r=L.onpopstate;function i(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=tx,t=String(n);tx=t,eh("history",{from:e,to:t});}return e.apply(this,t)}}L.onpopstate=function(...e){let t=L.location.href,n=tx;if(tx=t,eh("history",{from:n,to:t}),r)try{return r.apply(this,e)}catch(e){}},K(L.history,"pushState",i),K(L.history,"replaceState",i);})();break;case "error":ey=L.onerror,L.onerror=function(e,t,n,r,i){return eh("error",{column:r,error:i,line:n,msg:e,url:t}),!!ey&&!ey.__SENTRY_LOADER__&&ey.apply(this,arguments)},L.onerror.__SENTRY_INSTRUMENTED__=true;break;case "unhandledrejection":eE=L.onunhandledrejection,L.onunhandledrejection=function(e){return eh("unhandledrejection",e),!eE||!!eE.__SENTRY_LOADER__||eE.apply(this,arguments)},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=true;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("unknown instrumentation type:",e);return}}(e);}function eh(e,t){if(!(!e||!ed[e]))for(let n of ed[e]||[])try{n(t);}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error(`Error while triggering instrumentation handler.
10
+ Type: ${e}
11
+ Name: ${ec(n)}
12
+ Error:`,t);}}function ef(e,t){return !!e&&"object"==typeof e&&!!e[t]}function em(e){return "string"==typeof e?e:e?ef(e,"url")?e.url:e.toString?e.toString():"":""}function eg(e,t=false){return n=>{if(!n||tN===n||function(e){if("keypress"!==e.type)return false;try{let t=e.target;if(!t||!t.tagName)return !0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return !1}catch(e){}return true}(n))return;let r="keypress"===n.type?"input":n.type;void 0===tD?(e({event:n,name:r,global:t}),tN=n):function(e,t){if(!e||e.type!==t.type)return true;try{if(e.target!==t.target)return !0}catch(e){}return false}(tN,n)&&(e({event:n,name:r,global:t}),tN=n),clearTimeout(tD),tD=L.setTimeout(()=>{tD=void 0;},1e3);}}var ey=null,eE=null;function ev(){let e=L.crypto||L.msCrypto,t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>e.getRandomValues(new Uint8Array(1))[0]);}catch(e){}return "10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function eS(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function eT(e){let{message:t,event_id:n}=e;if(t)return t;let r=eS(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function eb(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error");}function eR(e,t){let n=eS(e);if(!n)return;let r=n.mechanism;if(n.mechanism=d(d(d({},{type:"generic",handled:true}),r),t),t&&"data"in t){let e=d(d({},r&&r.data),t.data);n.mechanism.data=e;}}function ex(e){if(e&&e.__sentry_captured__)return true;try{Q(e,"__sentry_captured__",!0);}catch(e){}return false}function eD(e,t=100,i=1/0){try{return function e(t,i,s=1/0,a=1/0,o=(r=(n$1="function"==typeof WeakSet)?new WeakSet:[],[function(e){if(n$1)return !!r.has(e)||(r.add(e),!1);for(let t=0;t<r.length;t++)if(r[t]===e)return !0;return r.push(e),!1},function(e){if(n$1)r.delete(e);else for(let t=0;t<r.length;t++)if(r[t]===e){r.splice(t,1);break}}])){let[c,u]=o;if(null==i||["number","boolean","string"].includes(typeof i)&&!B(i))return i;let l=function(e,t){try{var n;let r;if("domain"===e&&t&&"object"==typeof t&&t._events)return "[Domain]";if("domainEmitter"===e)return "[DomainEmitter]";if("undefined"!=typeof global&&t===global)return "[Global]";if("undefined"!=typeof window&&t===window)return "[Window]";if("undefined"!=typeof document&&t===document)return "[Document]";if(Y(t))return "[VueViewModel]";if(w(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t)return "[SyntheticEvent]";if("number"==typeof t&&t!=t)return "[NaN]";if("function"==typeof t)return `[Function: ${ec(t)}]`;if("symbol"==typeof t)return `[${String(t)}]`;if("bigint"==typeof t)return `[BigInt: ${String(t)}]`;let i=(n=t,(r=Object.getPrototypeOf(n))?r.constructor.name:"null prototype");return /^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return `**non-serializable** (${e})`}}(t,i);if(!l.startsWith("[object "))return l;if(i.__sentry_skip_normalization__)return i;let d="number"==typeof i.__sentry_override_normalization_depth__?i.__sentry_override_normalization_depth__:s;if(0===d)return l.replace("object ","");if(c(i))return "[Circular ~]";if(i&&"function"==typeof i.toJSON)try{let t=i.toJSON();return e("",t,d-1,a,o)}catch(e){}let _=Array.isArray(i)?[]:{},p=0,h=et(i);for(let t in h){if(!Object.prototype.hasOwnProperty.call(h,t))continue;if(p>=a){_[t]="[MaxProperties ~]";break}let n=h[t];_[t]=e(t,n,d-1,a,o),p++;}return u(i),_}("",e,t,i)}catch(e){return {ERROR:`**non-serializable** (${e})`}}}function eN(e){return new ek(t=>{t(e);})}function ew(e){return new ek((t,n)=>{n(e);})}(tw=tk||(tk={}))[tw.PENDING=0]="PENDING",tw[tw.RESOLVED=1]="RESOLVED",tw[tw.REJECTED=2]="REJECTED";var ek=class{then(e,t){return new ek((n,r)=>{this._handlers.push([false,t=>{if(e)try{n(e(t));}catch(e){r(e);}else n(t);},e=>{if(t)try{n(t(e));}catch(e){r(e);}else r(e);}]),this._executeHandlers();})}catch(e){return this.then(e=>e,e)}finally(e){return new ek((t,n)=>{let r,i;return this.then(t=>{i=false,r=t,e&&e();},t=>{i=true,r=t,e&&e();}).then(()=>{if(i){n(r);return}t(r);})})}__init(){this._resolve=e=>{this._setResult(tk.RESOLVED,e);};}__init2(){this._reject=e=>{this._setResult(tk.REJECTED,e);};}__init3(){this._setResult=(e,t)=>{if(this._state===tk.PENDING){if(U(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers();}};}__init4(){this._executeHandlers=()=>{if(this._state===tk.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===tk.RESOLVED&&e[1](this._value),this._state===tk.REJECTED&&e[2](this._value),e[0]=true);});};}constructor(e){ek.prototype.__init.call(this),ek.prototype.__init2.call(this),ek.prototype.__init3.call(this),ek.prototype.__init4.call(this),this._state=tk.PENDING,this._handlers=[];try{e(this._resolve,this._reject);}catch(e){this._reject(e);}}};function eU(e){if(!e)return {};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return {};let 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}}var eB=["fatal","error","warning","log","info","debug"],eC={nowSeconds:()=>Date.now()/1e3},eY="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(){let{performance:e}=L;if(e&&e.now)return {now:()=>e.now(),timeOrigin:Date.now()-e.now()}}():function(){try{return module.require("perf_hooks").performance}catch(e){return}}(),eI=void 0===eY?eC:{nowSeconds:()=>(eY.timeOrigin+eY.now())/1e3},eG=eC.nowSeconds.bind(eC),eO=eI.nowSeconds.bind(eI),e$=(()=>{let{performance:e}=L;if(!e||!e.now)return;let t=e.now(),n=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,i=e.timing&&e.timing.navigationStart,s="number"==typeof i?Math.abs(i+t-n):36e5;return r<36e5||s<36e5?r<=s?e.timeOrigin:i:n})(),eP="baggage",ej="sentry-",eL=/^sentry-/;function eA(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?i:`${e},${i}`;return s.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${ej}${t}`]=n),e),{}))}function eM(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}var eq=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function eH(e=ev(),t=ev().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function eF(e,t=[]){return [e,t]}function ez(e,t){for(let n of e[1]){let e=n[0].type;if(t(n,e))return true}return false}function eW(e,t){return (t||new TextEncoder).encode(e)}var eJ={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function eV(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return {name:t,version:n}}var eX="production";function eK(){return A("globalEventProcessors",()=>[])}function eQ(e){eK().push(e);}function eZ(e,t,n,r=0){return new ek((i,s)=>{let a=e[r];if(null===t||"function"!=typeof a)i(t);else {let o=a(d({},t),n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&z.log(`Event processor "${a.id}" dropped event`),U(o)?o.then(t=>eZ(e,t,n,r+1).then(i)).then(null,s):eZ(e,o,n,r+1).then(i).then(null,s);}})}function e0(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||eO(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ev()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else {let t=e.timestamp-e.started;e.duration=t>=0?t:0;}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status);}var e1=class{static clone(e){let t=new e1;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags=d({},e._tags),t._extra=d({},e._extra),t._contexts=d({},e._contexts),t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata=d({},e._sdkProcessingMetadata),t._propagationContext=d({},e._propagationContext)),t}addScopeListener(e){this._scopeListeners.push(e);}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&e0(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=d(d({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=_(d({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=d(d({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=_(d({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){let t=e(this);return t instanceof e1?t:this}return e instanceof e1?(this._tags=d(d({},this._tags),e._tags),this._extra=d(d({},this._extra),e._extra),this._contexts=d(d({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):w(e)&&(this._tags=d(d({},this._tags),e.tags),this._extra=d(d({},this._extra),e.extra),this._contexts=d(d({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=e3(),this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r=d({timestamp:eG()},e),i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra=d(d({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=d(d({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=d(d({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=d(d({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=d({trace:this._span.getTraceContext()},e.contexts);let t=this._span.transaction;if(t){e.sdkProcessingMetadata=d({dynamicSamplingContext:t.getDynamicSamplingContext()},e.sdkProcessingMetadata);let n=t.name;n&&(e.tags=d({transaction:n},e.tags));}}this._applyFingerprint(e);let r=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...r];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata=_(d(d({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),{propagationContext:this._propagationContext}),eZ([...n||[],...eK(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=d(d({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=true,this._scopeListeners.forEach(e=>{e(this);}),this._notifyingListeners=false);}_applyFingerprint(e){var t;e.fingerprint=e.fingerprint?Array.isArray(t=e.fingerprint)?t:[t]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint;}constructor(){this._notifyingListeners=false,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=e3();}};function e3(){return {traceId:ev(),spanId:ev().substring(16)}}var e2=class{isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations();}pushScope(){let e=e1.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return !(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){let t=this.pushScope();try{e(t);}finally{this.popScope();}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:ev(),r=Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(e,_(d({originalException:e,syntheticException:r},t),{event_id:n}),s);}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:ev(),i=Error(e);return this._withClient((s,a)=>{s.captureMessage(e,t,_(d({originalException:e,syntheticException:i},n),{event_id:r}),a);}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:ev();return e.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,_(d({},t),{event_id:n}),i);}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=100}=r.getOptions&&r.getOptions()||{};if(s<=0)return;let a=d({timestamp:eG()},e),o=i?F(()=>i(a,t)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,s));}setUser(e){this.getScope().setUser(e);}setTags(e){this.getScope().setTags(e);}setExtras(e){this.getScope().setExtras(e);}setTag(e,t){this.getScope().setTag(e,t);}setExtra(e,t){this.getScope().setExtra(e,t);}setContext(e,t){this.getScope().setContext(e,t);}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t);}run(e){let t=e5(this);try{e(this);}finally{e5(t);}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod("startTransaction",e,t);return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n&&console.warn(this.getClient()?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
13
+ Sentry.addTracingExtensions();
14
+ Sentry.init({...});
15
+ `:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=false){if(e)return this.endSession();this._sendSessionUpdate();}endSession(){let e,t=this.getStackTop().scope,n=t.getSession();n&&(e={},"ok"===n.status&&(e={status:"exited"}),e0(n,e)),this._sendSessionUpdate(),t.setSession();}startSession(e){var t;let n,r;let{scope:i,client:s}=this.getStackTop(),{release:a,environment:o=eX}=s&&s.getOptions()||{},{userAgent:c}=L.navigator||{},u=(t=d(d({release:a,environment:o,user:i.getUser()},c&&{userAgent:c}),e),n=eO(),r={sid:ev(),init:true,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:false,toJSON:()=>{var e;return e=r,ei({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}},t&&e0(r,t),r),l=i.getSession&&i.getSession();return l&&"ok"===l.status&&e0(l,{status:"exited"}),this.endSession(),i.setSession(u),u}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return !!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n);}_withClient(e){let{scope:t,client:n}=this.getStackTop();n&&e(n,t);}_callExtensionMethod(e,...t){let n=e4().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Extension method ${e} couldn't be found, doing nothing.`);}constructor(e,t=new e1,n=4){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e);}};function e4(){return L.__SENTRY__=L.__SENTRY__||{extensions:{},hub:void 0},L}function e5(e){let t=e4(),n=e8(t);return e9(t,e),n}function e6(){let e=e4();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=e4()){var t;return (!((t=e)&&t.__SENTRY__&&t.__SENTRY__.hub)||e8(e).isOlderThan(4))&&e9(e,new e2),e8(e)}(e)}function e8(e){return A("hub",()=>new e2,e)}function e9(e,t){return !!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,true)}function e7(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return false;let t=e6().getClient(),n=e||t&&t.getOptions();return !!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function te(e){return (e6()).getScope().getTransaction()}var tt=false;function tn(){let e=te();if(e){let t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t);}}tn.tag="sentry_tracingErrorCallback";var tr=class{add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e);}constructor(e=1e3){this._maxlen=e,this.spans=[];}},ti=class{get name(){return this.description||""}set name(e){this.setName(e);}startChild(e){let t=new ti(_(d({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){let n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",i=t.transaction.spanId,s=`[Tracing] Starting '${n}' span on transaction '${r}' (${i}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:s},z.log(s);}return t}setTag(e,t){return this.tags=_(d({},this.tags),{[e]:t}),this}setData(e,t){return this.data=_(d({},this.data),{[e]:t}),this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let t=function(e){if(e<400&&e>=100)return "ok";if(e>=400&&e<500)switch(e){case 401:return "unauthenticated";case 403:return "permission_denied";case 404:return "not_found";case 409:return "already_exists";case 413:return "failed_precondition";case 429:return "resource_exhausted";default:return "invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return "unimplemented";case 503:return "unavailable";case 504:return "deadline_exceeded";default:return "internal_error"}return "unknown_error"}(e);return "unknown_error"!==t&&this.setStatus(t),this}setName(e){this.description=e;}isSuccess(){return "ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&z.log(e.replace("Starting","Finishing"));}this.endTimestamp="number"==typeof e?e:eO();}toTraceparent(){return eH(this.traceId,this.spanId,this.sampled)}toContext(){return ei({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return ei({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ei({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}constructor(e={}){this.traceId=e.traceId||ev(),this.spanId=e.spanId||ev().substring(16),this.startTimestamp=e.startTimestamp||eO(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp);}};function ts(e,t,n){let r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},a=ei({environment:r.environment||eX,release:r.release,user_segment:s,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}var ta=class extends ti{get name(){return this._name}set name(e){this.setName(e);}setName(e,t="custom"){this._name=e,this.metadata.source=t;}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new tr(e)),this.spanRecorder.add(this);}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t;}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n};}setMetadata(e){this.metadata=d(d({},this.metadata),e);}finish(e){let t=this._finishTransaction(e);if(t)return this._hub.captureEvent(t)}toContext(){return ei(_(d({},super.toContext()),{name:this.name,trimEnd:this._trimEnd}))}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||e6(),t=e.getClient();if(!t)return {};let n=e.getScope(),r=ts(this.traceId,t,n),i=this.metadata.sampleRate;void 0!==i&&(r.sample_rate=`${i}`);let s=this.metadata.source;return s&&"url"!==s&&(r.transaction=this.name),void 0!==this.sampled&&(r.sampled=String(this.sampled)),r}setHub(e){this._hub=e;}_finishTransaction(e){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),true!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&e.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e).endTimestamp);let r=this.metadata,i=d({contexts:_(d({},this._contexts),{trace:this.getTraceContext()}),spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:_(d({},r),{dynamicSamplingContext:this.getDynamicSamplingContext()})},r.source&&{transaction_info:{source:r.source}});return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),i}constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||e6(),this._name=e.name||"",this.metadata=_(d({source:"custom"},e.metadata),{spanMetadata:{}}),this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext=d({},n));}},to={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},tc=class extends tr{add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:eO(),this._popActivity(e.spanId);},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e);}constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n;}},tu=class extends ta{finish(e=eO()){if(this._finished=true,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){for(let t of(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op),this._beforeFinishCallbacks))t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return true;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));let n=t.startTimestamp<e,r=(this._finalTimeout+this._idleTimeout)/1e3,i=t.endTimestamp-this.startTimestamp<r;if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){let e=JSON.stringify(t,void 0,2);n?i||z.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):z.log("[Tracing] discarding Span since it happened after Transaction was finished",e);}return n&&i}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] flushing IdleTransaction");}else ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] No active IdleTransaction");if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0);}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e);}initSpanRecorder(e){this.spanRecorder||(this.spanRecorder=new tc(e=>{this._finished||this._pushActivity(e);},e=>{this._finished||this._popActivity(e);},this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this);}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:true}){this._idleTimeoutCanceledPermanently=false===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason="cancelled",this.finish(e)));}setFinishReason(e){this._finishReason=e;}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason="idleTimeout",this.finish(e));},this._idleTimeout);}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=true,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] new activities count",Object.keys(this.activities).length);}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] popActivity ${e}`),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){let e=eO();this._idleTimeoutCanceledPermanently?(this._finishReason="cancelled",this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3);}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason="heartbeatFailed",this.finish()):this._pingHeartbeat();}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat();},this._heartbeatInterval);}constructor(e,t,n=to.idleTimeout,r=to.finalTimeout,i=to.heartbeatInterval,s=false){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=false,this._idleTimeoutCanceledPermanently=false,this._beforeFinishCallbacks=[],this._finishReason="externalFinish",s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope(e=>e.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason="finalTimeout",this.finish());},this._finalTimeout);}};function tl(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function td(e,t,n){var r;let i;return e7(t)?void 0!==e.sampled?e.setMetadata({sampleRate:Number(e.sampled)}):("function"==typeof t.tracesSampler?(i=t.tracesSampler(n),e.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:void 0!==t.tracesSampleRate?(i=t.tracesSampleRate,e.setMetadata({sampleRate:Number(i)})):(i=1,e.setMetadata({sampleRate:i})),(B(r=i)||"number"!=typeof r&&"boolean"!=typeof r?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),1):(r<0||r>1)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),1))?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=false):i?(e.sampled=Math.random()<i,e.sampled?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] starting ${e.op} transaction - ${e.name}`):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Discarding transaction because ${"function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=false)):e.sampled=false,e}function t_(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=e.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.
16
+ The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=false);let a=new ta(e,this);return (a=td(a,r,d({parentSampled:e.parentSampled,transactionContext:e},t))).sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function tp(e,t,n,r,i,s,a){let o=e.getClient(),c=o&&o.getOptions()||{},u=new tu(t,e,n,r,a,i);return (u=td(u,c,d({parentSampled:t.parentSampled,transactionContext:t},s))).sampled&&u.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",u),u}var th=[];function tf(e,t,n){if(n[t.name]=t,-1===th.indexOf(t.name)&&(t.setupOnce(eQ,e6),th.push(t.name)),e.on&&"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e));}if(e.addEventProcessor&&"function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r);}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`Integration installed: ${t.name}`);}var tm=new WeakMap,tg="Not capturing exception because it's already been captured.",ty=class{captureException(e,t,n){if(ex(e)){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(tg);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e;})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,s=N(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e;})),i}captureEvent(e,t,n){if(t&&t.originalException&&ex(t.originalException)){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(tg);return}let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e;})),r}captureSession(e){"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),e0(e,{init:false}));}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):eN(true)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=false,e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e);}setupIntegrations(e){var t,n;let r;(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=(t=this,n=this._options.integrations,r={},n.forEach(e=>{e&&tf(t,e,r);}),r),this._integrationsInitialized=true);}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){tf(this,e,this._integrations);}sendEvent(e,t={}){var n,r,i,s;let a,o,c,u;this.emit("beforeSendEvent",e,t);let l=(n=this._dsn,r=this._options._metadata,i=this._options.tunnel,a=eV(r),o=e.type&&"replay_event"!==e.type?e.type:"event",(s=r&&r.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||s.name,e.sdk.version=e.sdk.version||s.version,e.sdk.integrations=[...e.sdk.integrations||[],...s.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...s.packages||[]]),c=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext,u=d(d(d({event_id:e.event_id,sent_at:new Date().toISOString()},a&&{sdk:a}),!!i&&n&&{dsn:J(n)}),c&&{trace:ei(d({},c))}),delete e.sdkProcessingMetadata,eF(u,[[{type:o},e]]));for(let e of t.attachments||[])l=function(e,t){let[n,r]=e;return [n,[...r,t]]}(l,function(e,t){let n="string"==typeof e.data?eW(e.data,t):e.data;return [ei({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let _=this._sendEnvelope(l);_&&_.then(t=>this.emit("afterSendEvent",e,t),null);}sendSession(e){var t,n,r;let i;let s=(t=this._dsn,n=this._options._metadata,r=this._options.tunnel,i=eV(n),eF(d(d({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:J(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]]));this._sendEnvelope(s);}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1;}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t);}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t));}_updateSessionFromEvent(e,t){let n=false,r=false,i=t.exception&&t.exception.values;if(i)for(let e of(r=true,i)){let t=e.mechanism;if(t&&false===t.handled){n=true;break}}let s="ok"===e.status;(s&&0===e.errors||s&&n)&&(e0(e,_(d({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e));}_isClientDoneProcessing(e){return new ek(t=>{let n=0,r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(true)):(n+=1,e&&n>=e&&(clearInterval(r),t(false)));},1);})}_isEnabled(){return false!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n){let r=this.getOptions(),i=Object.keys(this._integrations);return !t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),(function(e,t,n,r,i){var s,a;let{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=e,u=_(d({},t),{event_id:t.event_id||n.event_id||ev(),timestamp:t.timestamp||eG()}),l=n.integrations||e.integrations.map(e=>e.name);((function(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:eX),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=I(e.message,s));let a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=I(a.value,s));let o=e.request;o&&o.url&&(o.url=I(o.url,s));}))(u,e),s=u,(a=l).length>0&&(s.sdk=s.sdk||{},s.sdk.integrations=[...s.sdk.integrations||[],...a]),void 0===t.type&&function(e,t){let n=L._sentryDebugIds;if(!n)return;let r,i=tm.get(t);i?r=i:(r=new Map,tm.set(t,r));let s=Object.keys(n).reduce((e,i)=>{let s,a=r.get(i);a?s=a:(s=t(i),r.set(i,s));for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.filename){e[r.filename]=n[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=s[e.filename]);});});}catch(e){}}(u,e.stackParser);let p=r;n.captureContext&&(p=e1.clone(p).update(n.captureContext));let h=eN(u),f=i&&i.getEventProcessors?i.getEventProcessors():[];if(p){if(p.getAttachments){let e=[...n.attachments||[],...p.getAttachments()];e.length&&(n.attachments=e);}h=p.applyToEvent(u,n,f);}else h=eZ([...f,...eK()],u,n);return h.then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id);});});}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]});});}(e),"number"==typeof o&&o>0?function(e,t,n){if(!e)return null;let r=d(d(d(d(d({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>d(d({},e),e.data&&{data:eD(e.data,t,n)}))}),e.user&&{user:eD(e.user,t,n)}),e.contexts&&{contexts:eD(e.contexts,t,n)}),e.extra&&{extra:eD(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=eD(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=eD(e.data,t,n)),e))),r}(e,o,c):e))})(r,e,t,n,this).then(e=>{if(null===e)return e;let{propagationContext:t}=e.sdkProcessingMetadata||{};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:i,parentSpanId:s,dsc:a}=t;e.contexts=d({trace:{trace_id:r,span_id:i,parent_span_id:s}},e.contexts),e.sdkProcessingMetadata=d({dynamicSamplingContext:a||ts(r,this,n)},e.sdkProcessingMetadata);}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&("log"===e.logLevel?z.log(e.message):z.warn(e));})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=tv(e),a=tE(e),o=e.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),ew(new X(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let u="replay_event"===o?"replay":o;return this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new X("An event processor returned `null`, will not send event.","log");return t.data&&true===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(U(e))return e.then(e=>{if(!w(e)&&null!==e)throw new X(n);return e},e=>{throw new X(`${t} rejected with ${e}`)});if(!w(e)&&null!==e)throw new X(n);return e}(function(e,t,n){let{beforeSend:r,beforeSendTransaction:i}=e;return tE(t)&&r?r(t,n):tv(t)&&i?i(t,n):t}(r,n,t),c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",u,e),new X(`${c} returned \`null\`, will not send event.`,"log");let i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);let a=r.transaction_info;return s&&a&&r.transaction!==e.transaction&&(r.transaction_info=_(d({},a),{source:"custom"})),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof X?e:(this.captureException(e,{data:{__sentry__:true},originalException:e}),new X(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
17
+ Reason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e));}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error("Error while sending event:",e);});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error("Transport disabled");}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return {reason:n,category:r,quantity:e[t]}})}constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=false,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){let t="string"==typeof e?function(e){let t=W.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}let[n,r,i="",s,a="",o]=t.slice(1),c="",u=o,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0]);}return V({host:s,pass:i,path:c,projectId:u,port:a,protocol:n,publicKey:r})}(e):V(e);if(!(!t||!function(e){if(!("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__))return true;let{port:t,projectId:n,protocol:r}=e;return !["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(z.error(`Invalid Sentry Dsn: ${t} missing`),true))&&(n.match(/^\d+$/)?"http"===r||"https"===r?!(t&&isNaN(parseInt(t,10)))||(z.error(`Invalid Sentry Dsn: Invalid port ${t}`),false):(z.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),false):(z.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),false))}(t)))return t}(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("No DSN provided, client will not send events."),this._dsn){let t=function(e,t={}){var n;let r,i,s="string"==typeof t?t:t.tunnel,a="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return s||`${r=e.protocol?`${e.protocol}:`:"",i=e.port?`:${e.port}`:"",`${r}//${e.host}${i}${e.path?`/${e.path}`:""}/api/`}${e.projectId}/envelope/?${Object.keys(n=d({sentry_key:e.publicKey,sentry_version:"7"},a&&{sentry_client:`${a.name}/${a.version}`})).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&")}`}(this._dsn,e);this._transport=e.transport(_(d({recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}));}}};function tE(e){return void 0===e.type}function tv(e){return "transaction"===e.type}function tS(e,t,n=function(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return {$:t,add:function(r){if(!(void 0===e||t.length<e))return ew(new X("Not adding Promise because buffer limit was reached."));let i=r();return -1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new ek((n,r)=>{let i=t.length;if(!i)return n(true);let s=setTimeout(()=>{e&&e>0&&n(false);},e);t.forEach(e=>{eN(e).then(()=>{--i||(clearTimeout(s),n(true));},r);});})}}}(e.bufferSize||30)){let r={};function i(i){let s=[];if(ez(i,(t,n)=>{let i=eJ[n];if(function(e,t,n=Date.now()){return (e[t]||e.all||0)>n}(r,i)){let r=tT(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r);}else s.push(t);}),0===s.length)return eN();let a=eF(i[0],s),o=t=>{ez(a,(n,r)=>{let i=tT(n,r);e.recordDroppedEvent(t,eJ[r],i);});};return n.add(()=>t({body:function(e,t){let[n,r]=e,i=JSON.stringify(n);function s(e){"string"==typeof i?i="string"==typeof e?i+e:[eW(i,t),e]:i.push("string"==typeof e?eW(e,t):e);}for(let e of r){let[t,n]=e;if(s(`
18
+ ${JSON.stringify(t)}
19
+ `),"string"==typeof n||n instanceof Uint8Array)s(n);else {let e;try{e=JSON.stringify(n);}catch(t){e=JSON.stringify(eD(n));}s(e);}}return "string"==typeof i?i:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(i)}(a,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){let i=d({},e),s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(let e of s.trim().split(",")){let[t,n]=e.split(":",2),s=parseInt(t,10),a=(isNaN(s)?60:s)*1e3;if(n)for(let e of n.split(";"))i[e]=r+a;else i.all=r+a;}else a?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}(r,e),e),e=>{throw o("network_error"),e})).then(e=>e,e=>{if(e instanceof X)return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error("Skipped sending event because buffer is full."),o("queue_overflow"),eN();throw e})}return i.__sentry__baseTransport__=true,{send:i,flush:e=>n.drain(e)}}function tT(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}var tb="7.73.0",tR={};h(tR,{FunctionToString:()=>tB,InboundFilters:()=>tI});var tx,tD,tN,tw,tk,tU,tB=class{static __initStatic(){this.id="FunctionToString";}setupOnce(){tU=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ee(this)||this;return tU.apply(t,e)};}catch(e){}}constructor(){this.name=tB.id;}};tB.__initStatic();var tC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],tY=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],tI=class{static __initStatic(){this.id="InboundFilters";}setupOnce(e,t){}processEvent(e,t,n){var r,i,s,a;let o=n.getOptions();return (r=e,(i=function(e={},t={}){return {allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:tC],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:tY],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(this._options,o)).ignoreInternal&&function(e){try{return "SentryError"===e.exception.values[0].type}catch(e){}return false}(r)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Event dropped due to being internal Sentry Error.
20
+ Event: ${eT(r)}`),0):(s=r,a=i.ignoreErrors,!s.type&&a&&a.length&&(function(e){let t,n=[];e.message&&n.push(e.message);try{t=e.exception.values[e.exception.values.length-1];}catch(e){}return t&&t.value&&(n.push(t.value),t.type&&n.push(`${t.type}: ${t.value}`)),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&0===n.length&&z.error(`Could not extract message for event ${eT(e)}`),n})(s).some(e=>O(e,a)))?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
21
+ Event: ${eT(r)}`),0):!function(e,t){if("transaction"!==e.type||!t||!t.length)return false;let n=e.transaction;return !!n&&O(n,t)}(r,i.ignoreTransactions)?!function(e,t){if(!t||!t.length)return false;let n=tG(e);return !!n&&O(n,t)}(r,i.denyUrls)?function(e,t){if(!t||!t.length)return true;let n=tG(e);return !n||O(n,t)}(r,i.allowUrls)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Event dropped due to not being matched by \`allowUrls\` option.
22
+ Event: ${eT(r)}.
23
+ Url: ${tG(r)}`),0):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Event dropped due to being matched by \`denyUrls\` option.
24
+ Event: ${eT(r)}.
25
+ Url: ${tG(r)}`),0):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
26
+ Event: ${eT(r)}`),0))?e:null}constructor(e={}){this.name=tI.id,this._options=e;}};function tG(e){try{let t;try{t=e.exception.values[0].stacktrace.frames;}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.error(`Cannot extract url for event ${eT(e)}`),null}}tI.__initStatic();var tO=0;function t$(e,t={},n){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return t;if(ee(e))return e}catch(t){return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let i=r.map(e=>t$(e,t));return e.apply(this,i)}catch(e){throw tO++,setTimeout(()=>{tO--;}),e6().withScope(n=>{n.addEventProcessor(e=>(t.mechanism&&(eb(e,void 0),eR(e,t.mechanism)),e.extra=_(d({},e.extra),{arguments:r}),e)),e6().captureException(e,{captureContext:void 0});}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);}catch(e){}Z(r,e),Q(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name});}catch(e){}return r}function tP(e,t){var n;let r;let i=tL(e,t),s={type:t&&t.name,value:(r=(n=t)&&n.message)?r.error&&"string"==typeof r.error.message?r.error.message:r:"No error message"};return i.length&&(s.stacktrace={frames:i}),void 0===s.type&&""===s.value&&(s.value="Unrecoverable error caught"),s}function tj(e,t){return {exception:{values:[tP(e,t)]}}}function tL(e,t){let n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(tA.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return []}var tA=/Minified React error #\d+;/i;function tM(e,t,n,r,i){let s;if(R(t)&&t.error)return tj(e,t.error);if(x(t)||b(t,"DOMException")){if("stack"in t)s=tj(e,t);else {let i=t.name||(x(t)?"DOMError":"DOMException"),a=t.message?`${i}: ${t.message}`:i;eb(s=tq(e,a,n,r),a);}return "code"in t&&(s.tags=_(d({},s.tags),{"DOMException.code":`${t.code}`})),s}return T(t)?tj(e,t):(w(t)||k(t)?eR(s=function(e,t,n,r){let i=e6().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:k(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(et(e));if(n.sort(),!n.length)return "[object has no keys]";if(n[0].length>=t)return I(n[0],t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:I(r,t)}return ""}(e),r=t?"promise rejection":"exception";return R(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:k(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:{__serialized__:function e(t,n=3,r=102400){let i=eD(t,n);return ~-encodeURI(JSON.stringify(i)).split(/%..|./).length>r?e(t,n-1,r):i}(t,s)}};if(n){let t=tL(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t});}return a}(e,t,n,i),{synthetic:true}):(eb(s=tq(e,t,n,r),`${t}`),eR(s,{synthetic:true})),s)}function tq(e,t,n,r){let i={message:t};if(r&&n){let r=tL(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]});}return i}var tH=class extends ty{eventFromException(e,t){var n,r;let i;return n=this._options.stackParser,r=this._options.attachStacktrace,eR(i=tM(n,e,t&&t.syntheticException||void 0,r)),i.level="error",t&&t.event_id&&(i.event_id=t.event_id),eN(i)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){let s=tq(e,t,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),eN(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("SDK not enabled, will not capture user feedback.");return}let t=function(e,{metadata:t,tunnel:n,dsn:r}){return eF(d(d({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:J(r)}),[[{type:"user_report"},e]])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t);}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){var e;let t=this._clearOutcomes();if(0===t.length){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("No outcomes to send");return}if(!this._dsn){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("No dsn provided, will not send outcomes");return}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("Sending outcomes:",t);let n=eF((e=this._options.tunnel&&J(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:eG(),discarded_events:t}]]);this._sendEnvelope(n);}constructor(e){let t=L.SENTRY_SDK_SOURCE||"npm";e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:tb}],version:tb},super(e),e.sendClientReports&&L.document&&L.document.addEventListener("visibilitychange",()=>{"hidden"===L.document.visibilityState&&this._flushOutcomes();});}};function tF(e,t=function(){if(n$)return n$;if(eu(L.fetch))return n$=L.fetch.bind(L);let e=L.document,t=L.fetch;if(e&&"function"==typeof e.createElement)try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n);}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e);}return n$=t.bind(L)}()){let n=0,r=0;return tS(e,function(i){let s=i.body.length;n+=s,r++;let a=d({body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{return t(e.url,a).then(e=>(n-=s,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return n$=void 0,n-=s,r--,ew(e)}})}function tz(e){return tS(e,function(t){return new ek((n,r)=>{let i=new XMLHttpRequest;for(let t in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}});},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body);})})}function tW(e,t,n,r){let i={filename:e,function:t,in_app:true};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var tJ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tV=/\((\S*)(?::(\d+))(?::(\d+))\)/,tX=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tK=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tQ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,tZ=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return (e,n=0)=>{let r=[],i=e.split(`
27
+ `);for(let e=n;e<i.length;e++){let n=i[e];if(n.length>1024)continue;let s=es.test(n)?n.replace(es,"$1"):n;if(!s.match(/\S*Error: /)){for(let e of t){let t=e(s);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return [];let t=Array.from(e);return /sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ea.test(t[t.length-1].function||"")&&(t.pop(),ea.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map(e=>_(d({},e),{filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(r)}}([30,e=>{let t=tJ.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){let e=tV.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3]);}let[e,n]=t0(t[1]||"?",t[2]);return tW(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{let t=tX.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=tK.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="");}let e=t[3],n=t[1]||"?";return [n,e]=t0(n,e),tW(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{let t=tQ.exec(e);return t?tW(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]),t0=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},t1=class{static __initStatic(){this.id="GlobalHandlers";}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let n in e){var t;let r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0);}}constructor(e){this.name=t1.id,this._options=d({onerror:true,onunhandledrejection:true},e),this._installFunc={onerror:t3,onunhandledrejection:t2};}};function t3(){ep("error",e=>{var t,n,r,i;let s,a,o,[c,u,l]=t6();if(!c.getIntegration(t1))return;let{msg:d,url:_,line:p,column:h,error:f}=e;if(tO>0||f&&f.__sentry_own_request__)return;let m=void 0===f&&D(d)?(t=d,n=_,r=p,i=h,s=R(t)?t.message:t,a="Error",(o=s.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i))&&(a=o[1],s=o[2]),t4({exception:{values:[{type:a,value:s}]}},n,r,i)):t4(tM(u,f||d,void 0,l,false),_,p,h);m.level="error",t5(c,f,m,"onerror");});}function t2(){ep("unhandledrejection",e=>{var t;let[n,r,i]=t6();if(!n.getIntegration(t1))return;let s=e;try{"reason"in e?s=e.reason:"detail"in e&&"reason"in e.detail&&(s=e.detail.reason);}catch(e){}if(tO>0||s&&s.__sentry_own_request__)return true;let a=N(s)?(t=s,{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}):tM(r,s,void 0,i,true);a.level="error",t5(n,s,a,"onunhandledrejection");});}function t4(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=D(t)&&t.length>0?t:function(){try{return L.document.location.href}catch(e){return ""}}();return 0===c.length&&c.push({colno:u,filename:d,function:"?",in_app:true,lineno:l}),e}function t5(e,t,n,r){eR(n,{handled:false,type:r}),e.captureEvent(n,{originalException:t});}function t6(){let e=e6(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:false};return [e,n.stackParser,n.attachStacktrace]}t1.__initStatic();var t8=["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"],t9=class{static __initStatic(){this.id="TryCatch";}setupOnce(){this._options.setTimeout&&K(L,"setTimeout",t7),this._options.setInterval&&K(L,"setInterval",t7),this._options.requestAnimationFrame&&K(L,"requestAnimationFrame",ne),this._options.XMLHttpRequest&&"XMLHttpRequest"in L&&K(XMLHttpRequest.prototype,"send",nt);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:t8).forEach(nn);}constructor(e){this.name=t9.id,this._options=d({XMLHttpRequest:true,eventTarget:true,requestAnimationFrame:true,setInterval:true,setTimeout:true},e);}};function t7(e){return function(...t){let n=t[0];return t[0]=t$(n,{mechanism:{data:{function:ec(e)},handled:false,type:"instrument"}}),e.apply(this,t)}}function ne(e){return function(t){return e.apply(this,[t$(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ec(e)},handled:false,type:"instrument"}})])}}function nt(e){return function(...t){let n=this;return ["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&K(n,e,function(t){let n={mechanism:{data:{function:e,handler:ec(t)},handled:false,type:"instrument"}},r=ee(t);return r&&(n.mechanism.data.handler=ec(r)),t$(t,n)});}),e.apply(this,t)}}function nn(e){let t=L[e]&&L[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&(K(t,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=t$(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ec(r),target:e},handled:!1,type:"instrument"}}));}catch(e){}return t.apply(this,[n,t$(r,{mechanism:{data:{function:"addEventListener",handler:ec(r),target:e},handled:false,type:"instrument"}}),i])}}),K(t,"removeEventListener",function(e){return function(t,n,r){try{let i=n&&n.__sentry_wrapped__;i&&e.call(this,t,i,r);}catch(e){}return e.call(this,t,n,r)}}));}t9.__initStatic();var nr=class{static __initStatic(){this.id="Breadcrumbs";}setupOnce(){var e;if(this.options.console&&ep("console",ns),this.options.dom&&ep("dom",(e=this.options.dom,function(t){let n,r="object"==typeof e?e.serializeAttribute:void 0,i="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{var s;let e=t.event;n=(s=e)&&s.target?M(e.target,{keyAttrs:r,maxStringLength:i}):M(e,{keyAttrs:r,maxStringLength:i});}catch(e){n="<unknown>";}0!==n.length&&e6().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global});})),this.options.xhr&&ep("xhr",na),this.options.fetch&&ep("fetch",no),this.options.history&&ep("history",nc),this.options.sentry){let e=e6().getClient();e&&e.on&&e.on("beforeSendEvent",ni);}}constructor(e){this.name=nr.id,this.options=d({console:true,dom:true,fetch:true,history:true,sentry:true,xhr:true},e);}};function ni(e){e6().addBreadcrumb({category:`sentry.${"transaction"===e.type?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:eT(e)},{event:e});}function ns(e){var t;let n={category:"console",data:{arguments:e.args,logger:"console"},level:"warn"===(t=e.level)?"warning":eB.includes(t)?t:"log",message:G(e.args," ")};if("assert"===e.level){if(false!==e.args[0])return;n.message=`Assertion failed: ${G(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1);}e6().addBreadcrumb(n,{input:e.args,level:e.level});}function na(e){let{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[el];if(!t||!n||!r)return;let{method:i,url:s,status_code:a,body:o}=r,c={xhr:e.xhr,input:o,startTimestamp:t,endTimestamp:n};e6().addBreadcrumb({category:"xhr",data:{method:i,url:s,status_code:a},type:"http"},c);}function no(e){let{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method)){if(e.error){let r=e.fetchData,i={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};e6().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i);}else {let r=_(d({},e.fetchData),{status_code:e.response&&e.response.status}),i={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};e6().addBreadcrumb({category:"fetch",data:r,type:"http"},i);}}}function nc(e){let t=e.from,n=e.to,r=eU(L.location.href),i=eU(t),s=eU(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),e6().addBreadcrumb({category:"navigation",data:{from:t,to:n}});}nr.__initStatic();var nu=class{static __initStatic(){this.id="LinkedErrors";}setupOnce(){}preprocessEvent(e,t,n){let r=n.getOptions();!function(e,t,n=250,r,i,s,a){var o,c;if(!s.exception||!s.exception.values||!a||!C(a.originalException,Error))return;let u=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;u&&(s.exception.values=(o=function e(t,n,r,i,s,a,o,c){if(a.length>=r+1)return a;let u=[...a];if(C(i[s],Error)){$(o,c);let a=t(n,i[s]),l=u.length;P(a,s,l,c),u=e(t,n,r,i[s],s,[a,...u],a,l);}return Array.isArray(i.errors)&&i.errors.forEach((i,a)=>{if(C(i,Error)){$(o,c);let l=t(n,i),d=u.length;P(l,`errors[${a}]`,d,c),u=e(t,n,r,i,s,[l,...u],l,d);}}),u}(e,t,i,a.originalException,r,s.exception.values,u,0),c=n,o.map(e=>(e.value&&(e.value=I(e.value,c)),e))));}(tP,r.stackParser,r.maxValueLength,this._key,this._limit,e,t);}constructor(e={}){this.name=nu.id,this._key=e.key||"cause",this._limit=e.limit||5;}};nu.__initStatic();var nl=class{static __initStatic(){this.id="HttpContext";}setupOnce(){}preprocessEvent(e){if(!L.navigator&&!L.location&&!L.document)return;let t=e.request&&e.request.url||L.location&&L.location.href,{referrer:n}=L.document||{},{userAgent:r}=L.navigator||{},i=d(d(d({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r});e.request=_(d(d({},e.request),t&&{url:t}),{headers:i});}constructor(){this.name=nl.id;}};nl.__initStatic();var nd=class{static __initStatic(){this.id="Dedupe";}setupOnce(e,t){}processEvent(e){if(e.type)return e;try{var t,n,r,i,s,a;let o,c,u,l;if(t=e,(n=this._previousEvent)&&(r=t,i=n,o=r.message,c=i.message,(o||c)&&(!o||c)&&(o||!c)&&o===c&&np(r,i)&&n_(r,i)||(s=t,a=n,u=nh(a),l=nh(s),u&&l&&u.type===l.type&&u.value===l.value&&np(s,a)&&n_(s,a))))return ("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return this._previousEvent=e}constructor(){this.name=nd.id;}};function n_(e,t){let n=nf(e),r=nf(t);if(!n&&!r)return true;if(n&&!r||!n&&r||r.length!==n.length)return false;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return false}return true}function np(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return true;if(n&&!r||!n&&r)return false;try{return n.join("")===r.join("")}catch(e){return false}}function nh(e){return e.exception&&e.exception.values&&e.exception.values[0]}function nf(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}nd.__initStatic();var nm={};h(nm,{Breadcrumbs:()=>nr,Dedupe:()=>nd,GlobalHandlers:()=>t1,HttpContext:()=>nl,LinkedErrors:()=>nu,TryCatch:()=>t9});var ng=(e,t,n)=>{let r,i;return s=>{t.value>=0&&(s||n)&&((i=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=i,e(t));}},ny=()=>`v3-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,nE=()=>{let e=L.performance.timing,t=L.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(let t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n},nv=()=>L.__WEB_VITALS_POLYFILL__?L.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||nE()):L.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],nS=()=>{let e=nv();return e&&e.activationStart||0},nT=(e,t)=>{let n=nv(),r="navigate";return n&&(r=L.document.prerendering||nS()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:ny(),navigationType:r}},nb=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries());});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},nR=(e,t)=>{let n=r=>{("pagehide"===r.type||"hidden"===L.document.visibilityState)&&(e(r),t&&(removeEventListener("visibilitychange",n,true),removeEventListener("pagehide",n,true)));};addEventListener("visibilitychange",n,true),addEventListener("pagehide",n,true);},nx=e=>{let t=nT("CLS",0),n,r=0,i=[],s=e=>{e.forEach(e=>{if(!e.hadRecentInput){let s=i[0],a=i[i.length-1];r&&0!==i.length&&e.startTime-a.startTime<1e3&&e.startTime-s.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e]),r>t.value&&(t.value=r,t.entries=i,n&&n());}});},a=nb("layout-shift",s);if(a){n=ng(e,t);let r=()=>{s(a.takeRecords()),n(true);};return nR(r),r}},nD=-1,nN=()=>"hidden"!==L.document.visibilityState||L.document.prerendering?1/0:0,nw=()=>{nR(({timeStamp:e})=>{nD=e;},true);},nk=()=>(nD<0&&(nD=nN(),nw()),{get firstHiddenTime(){return nD}}),nU=e=>{let t=nk(),n=nT("FID"),r,i=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),r(true));},s=e=>{e.forEach(i);},a=nb("first-input",s);r=ng(e,n),a&&nR(()=>{s(a.takeRecords()),a.disconnect();},true);},nB={},nC=e=>{let t=nk(),n=nT("LCP"),r,i=e=>{let i=e[e.length-1];if(i){let e=Math.max(i.startTime-nS(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[i],r());}},s=nb("largest-contentful-paint",i);if(s){r=ng(e,n);let t=()=>{nB[n.id]||(i(s.takeRecords()),s.disconnect(),nB[n.id]=true,r(true));};return ["keydown","click"].forEach(e=>{addEventListener(e,t,{once:true,capture:true});}),nR(t,true),t}};function nY(e){return "number"==typeof e&&isFinite(e)}function nI(e,t){var{startTimestamp:n}=t,r=p(t,["startTimestamp"]);return n&&e.startTimestamp>n&&(e.startTimestamp=n),e.startChild(d({startTimestamp:n},r))}function nG(e){return e/1e3}function nO(){return L&&L.addEventListener&&L.performance}var n$,nP,nj,nL=0,nA={};function nM(e,t,n,r,i,s){let a=s?t[s]:t[`${n}End`],o=t[`${n}Start`];o&&a&&nI(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+nG(o),endTimestamp:r+nG(a)});}var nq=["localhost",/^\/(?!\/)/],nH={traceFetch:true,traceXHR:true,enableHTTPTimings:true,tracingOrigins:nq,tracePropagationTargets:nq};function nF(e){let t=e.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&((function(e){let{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(let i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i;}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),e$?[...r,["http.request.redirect_start",nz(e.redirectStart)],["http.request.fetch_start",nz(e.fetchStart)],["http.request.domain_lookup_start",nz(e.domainLookupStart)],["http.request.domain_lookup_end",nz(e.domainLookupEnd)],["http.request.connect_start",nz(e.connectStart)],["http.request.secure_connection_start",nz(e.secureConnectionStart)],["http.request.connection_end",nz(e.connectEnd)],["http.request.request_start",nz(e.requestStart)],["http.request.response_start",nz(e.responseStart)],["http.request.response_end",nz(e.responseEnd)]]:r})(r).forEach(t=>e.setData(...t)),n.disconnect());});});n.observe({entryTypes:["resource"]});}function nz(e=0){return ((e$||performance.timeOrigin)+e)/1e3}function nW(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(eP,n);}catch(e){}}var nJ=d(_(d({},to),{markBackgroundTransactions:true,routingInstrumentation:function(e,t=true,n=true){if(!L||!L.location){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("Could not initialize routing instrumentation due to invalid location");return}let r=L.location.href,i;t&&(i=e({name:L.location.pathname,startTimestamp:e$?e$/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&ep("history",({to:t,from:n})=>{if(void 0===n&&r&&-1!==r.indexOf(t)){r=void 0;return}n!==t&&(r=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=e({name:L.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}));});},startTransactionOnLocationChange:true,startTransactionOnPageLoad:true,enableLongTask:true,_experiments:{}}),nH),nV=class{setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:a,markBackgroundTransactions:o,traceFetch:c,traceXHR:u,shouldCreateSpanForRequest:l,enableHTTPTimings:p,_experiments:h}=this.options,f=r&&r.tracePropagationTargets,m=f||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&f&&z.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),i(e=>{let n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n},a,s),o&&(L&&L.document?L.document.addEventListener("visibilitychange",()=>{let e=te();if(L.document.hidden&&e){let t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish();}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn("[Tracing] Could not set up background tab detection due to lack of global document")),h.enableInteractions&&this._registerInteractionListener(),function(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:a}=d({traceFetch:nH.traceFetch,traceXHR:nH.traceXHR},e),o="function"==typeof s?s:e=>true,c=e=>O(e,r||i||nq),u={};t&&ep("fetch",e=>{let t=function(e,t,n,r){if(!e7()||!e.fetchData)return;let i=t(e.fetchData.url);if(e.endTimestamp&&i){let t=e.fetchData.__span;if(!t)return;let n=r[t];if(n){if(e.response){n.setHttpStatus(e.response.status);let t=parseInt(e.response&&e.response.headers&&e.response.headers.get("content-length"));t>0&&n.setData("http.response_content_length",t);}else e.error&&n.setStatus("internal_error");n.finish(),delete r[t];}return}let s=e6(),a=s.getScope(),o=s.getClient(),c=a.getSpan(),{method:u,url:l}=e.fetchData,p=i&&c?c.startChild({data:{url:l,type:"fetch","http.method":u},description:`${u} ${l}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(p&&(e.fetchData.__span=p.spanId,r[p.spanId]=p),n(e.fetchData.url)&&o){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=function(e,t,n,r,i){let s=i||n.getSpan(),a=s&&s.transaction,{traceId:o,sampled:c,dsc:u}=n.getPropagationContext(),l=s?s.toTraceparent():eH(o,void 0,c),p=eA(a?a.getDynamicSamplingContext():u||ts(o,t,n)),h="undefined"!=typeof Request&&C(e,Request)?e.headers:r.headers;if(!h)return {"sentry-trace":l,baggage:p};if("undefined"!=typeof Headers&&C(h,Headers)){let e=new Headers(h);return e.append("sentry-trace",l),p&&e.append(eP,p),e}if(Array.isArray(h)){let e=[...h,["sentry-trace",l]];return p&&e.push([eP,p]),e}{let e="baggage"in h?h.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),p&&t.push(p),_(d({},h),{"sentry-trace":l,baggage:t.length>0?t.join(","):void 0})}}(t,o,a,n,p);}return p}(e,o,c,u);a&&t&&nF(t);}),n&&ep("xhr",e=>{let t=function(e,t,n,r){let i=e.xhr,s=i&&i[el];if(!e7()||i&&i.__sentry_own_request__||!i||!s)return;let a=t(s.url);if(e.endTimestamp&&a){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&(t.setHttpStatus(s.status_code),t.finish(),delete r[e]);return}let o=e6(),c=o.getScope(),u=c.getSpan(),l=a&&u?u.startChild({data:_(d({},s.data),{type:"xhr","http.method":s.method,url:s.url}),description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(l&&(i.__sentry_xhr_span_id__=l.spanId,r[i.__sentry_xhr_span_id__]=l),i.setRequestHeader&&n(s.url)){if(l){let e=l&&l.transaction,t=eA(e&&e.getDynamicSamplingContext());nW(i,l.toTraceparent(),t);}else {let e=o.getClient(),{traceId:t,sampled:n,dsc:r}=c.getPropagationContext();nW(i,eH(t,void 0,n),eA(r||(e?ts(t,e,c):void 0)));}}return l}(e,o,c,u);a&&t&&nF(t);});}({traceFetch:c,traceXHR:u,tracePropagationTargets:m,shouldCreateSpanForRequest:l,enableHTTPTimings:p});}_createRouteTransaction(e){if(!this._getCurrentHub){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,a="pageload"===e.op,{traceparentData:o,dynamicSamplingContext:c,propagationContext:u}=function(e,t){let n=function(e){let t;if(!e)return;let n=e.match(eq);if(n)return "1"===n[3]?t=true:"0"===n[3]&&(t=false),{traceId:n[1],parentSampled:t,parentSpanId:n[2]}}(e),r=function(e){if(!D(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>{let n=eM(t);return d(d({},e),n)},{});else {if(!e)return;t=eM(e);}let n=Object.entries(t).reduce((e,[t,n])=>(t.match(eL)&&(e[t.slice(ej.length)]=n),e),{});if(Object.keys(n).length>0)return n}(t),{traceId:i,parentSpanId:s,parentSampled:a}=n||{},o={traceId:i||ev(),spanId:ev().substring(16),sampled:a};return s&&(o.parentSpanId=s),r&&(o.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:o}}(a?nX("sentry-trace"):"",a?nX("baggage"):""),l=_(d(d({},e),o),{metadata:_(d({},e.metadata),{dynamicSamplingContext:o&&!c?{}:c}),trimEnd:true}),p="function"==typeof n?n(l):l,h=void 0===p?_(d({},l),{sampled:false}):p;h.metadata=h.name!==l.name?_(d({},h.metadata),{source:"custom"}):h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,false===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Tracing] Starting ${h.op} transaction on scope`);let{location:f}=L,m=tp(t,h,r,i,true,{location:f},s),g=t.getScope();return a&&o?g.setPropagationContext(u):g.setPropagationContext({traceId:m.traceId,spanId:m.spanId,parentSpanId:m.parentSpanId,sampled:m.sampled}),m.registerBeforeFinishCallback(e=>{this._collectWebVitals(),function(e){let t=nO();if(!t||!L.performance.getEntries||!e$)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Tracing] Adding & adjusting spans using Performance API");let n=nG(e$),r=t.getEntries(),i,s;if(r.slice(nL).forEach(t=>{var r,a,o,c,u,l,d,_,p,h;let f=nG(t.startTime),m=nG(t.duration);if(!("navigation"===e.op&&n+f<e.startTimestamp))switch(t.entryType){case "navigation":r=e,a=t,o=n,["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(e=>{nM(r,a,e,o);}),nM(r,a,"secureConnection",o,"TLS/SSL","connectEnd"),nM(r,a,"fetch",o,"cache","domainLookupStart"),nM(r,a,"domainLookup",o,"DNS"),c=r,u=a,nI(c,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:(l=o)+nG(u.requestStart),endTimestamp:l+nG(u.responseEnd)}),nI(c,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:l+nG(u.responseStart),endTimestamp:l+nG(u.responseEnd)}),i=n+nG(t.responseStart),s=n+nG(t.requestStart);break;case "mark":case "paint":case "measure":{let r;d=e,_=t,p=f,h=m,r=n+p,nI(d,{description:_.name,endTimestamp:r+h,op:_.entryType,origin:"auto.resource.browser.metrics",startTimestamp:r});let i=nk(),s=t.startTime<i.firstHiddenTime;"first-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding FP"),nA.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding FCP"),nA.fcp={value:t.startTime,unit:"millisecond"});break}case "resource":{let r=t.name.replace(L.location.origin,"");(function(e,t,n,r,i,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let a={};"transferSize"in t&&(a["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(a["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(a["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus);let o=s+r;nI(e,{description:n,endTimestamp:o+i,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:a});})(e,t,r,f,m,n);}}}),nL=Math.max(r.length-1,0),function(e){let t=L.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),nY(n.rtt)&&(nA["connection.rtt"]={value:n.rtt,unit:"millisecond"})),nY(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),nY(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency));}(e),"pageload"===e.op){var a;"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding TTFB"),nA.ttfb={value:(i-e.startTimestamp)*1e3,unit:"millisecond"},"number"==typeof s&&s<=i&&(nA["ttfb.requestTime"]={value:(i-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(t=>{if(!nA[t]||n>=e.startTimestamp)return;let r=nA[t].value,i=Math.abs((n+nG(r)-e.startTimestamp)*1e3),s=i-r;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log(`[Measurements] Normalized ${t} from ${r} to ${i} (${s})`),nA[t].value=i;});let t=nA["mark.fid"];t&&nA.fid&&(nI(e,{description:"first input delay",endTimestamp:t.value+nG(nA.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete nA["mark.fid"]),"fcp"in nA||delete nA.cls,Object.keys(nA).forEach(t=>{e.setMeasurement(t,nA[t].value,nA[t].unit);}),a=e,nP&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding LCP Data"),nP.element&&a.setTag("lcp.element",M(nP.element)),nP.id&&a.setTag("lcp.id",nP.id),nP.url&&a.setTag("lcp.url",nP.url.trim().slice(0,200)),a.setTag("lcp.size",nP.size)),nj&&nj.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding CLS Data"),nj.sources.forEach((e,t)=>a.setTag(`cls.source.${t+1}`,M(e.node))));}nP=void 0,nj=void 0,nA={};}(e);}),m}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=te();if(s&&s.op&&["navigation","pageload"].includes(s.op)){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`);return}let a=this._getCurrentHub(),{location:o}=L;e=tp(a,{name:this._latestRouteName,op:i,trimEnd:true,metadata:{source:this._latestRouteSource||"url"}},t,n,true,{location:o},r);};["click"].forEach(e=>{addEventListener(e,t,{once:false,capture:true});});}constructor(e){let t;this.name="BrowserTracing",this._hasSetTracePropagationTargets=false,(t=e4()).__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=t_),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=tl),tt||(tt=true,ep("error",tn),ep("unhandledrejection",tn))),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options=d(d({},nJ),e),void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=function(){let e=nO();if(e&&e$){e.mark&&L.performance.mark("sentry-tracing-init"),nU(e=>{let t=e.entries.pop();if(!t)return;let n=nG(e$),r=nG(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding FID"),nA.fid={value:e.value,unit:"millisecond"},nA["mark.fid"]={value:n+r,unit:"second"};});let t=nx(e=>{let t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding CLS"),nA.cls={value:e.value,unit:""},nj=t);}),n=nC(e=>{let t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&z.log("[Measurements] Adding LCP"),nA.lcp={value:e.value,unit:"millisecond"},nP=t);});return ()=>{t&&t(),n&&n();}}return ()=>{}}(),this.options.enableLongTask&&nb("longtask",e=>{for(let t of e){let e=te();if(!e)return;let n=nG(e$+t.startTime),r=nG(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r});}}),this.options._experiments.enableInteractions&&nb("event",e=>{for(let t of e){let e=te();if(!e)return;if("click"===t.name){let n=nG(e$+t.startTime),r=nG(t.duration);e.startChild({description:M(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r});}}},{durationThreshold:0});}};function nX(e){var t;let n=(t=`meta[name=${e}]`,L.document&&L.document.querySelector?L.document.querySelector(t):null);return n?n.getAttribute("content"):void 0}var nK={};L.Sentry&&L.Sentry.Integrations&&(nK=L.Sentry.Integrations),d(d(d({},nK),tR),nm);var nQ=null;function nZ(e,t){return false===e?n1(e):nQ?n1(nQ,t):n1(nQ=new e2(new tH({dsn:"https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",transport:window.fetch?tF:tz,stackParser:tZ,integrations:[new nr,new t1,new nu,new nd,new nl,new nV]})),t)}function n1(e,t={key:"source",value:"@hCaptcha/loader"}){return {addBreadcrumb:t=>{e&&e.addBreadcrumb(t);},captureMessage:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureMessage(n);});},captureException:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureEvent({message:E,level:"error",extra:n});});}}}var n3=[];function n2(){return f(this,arguments,function*(e={}){return yield function e(t,n=0){return f(this,null,function*(){let r=n<2?"Retry loading hCaptcha Api":"Exceeded maximum retries",i=nZ(t.sentry);try{return yield function(e={cleanup:!0},t){try{t.addBreadcrumb({category:v,message:"hCaptcha loader params",data:e});let n=g(e.scriptLocation),r=m(n),i=n3.find(({scope:e})=>e===r.window);if(i)return t.addBreadcrumb({category:v,message:"hCaptcha already loaded"}),i.promise;let s=new Promise((n,s)=>f(this,null,function*(){try{var a;r.window[y]=()=>{t.addBreadcrumb({category:v,message:"hCaptcha script called onload function"}),n(r.window.hcaptcha);};let s=(a={custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl},Object.entries(a).filter(([,e])=>e||!1===e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`).join("&"));yield function({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r,apihost:i="https://js.hcaptcha.com",cleanup:s=!0,secureApi:a=!1,scriptSource:o=""}={}){let c=g(e),u=m(c);return new Promise((e,l)=>{let d=u.document.createElement("script");d.id="hCaptcha-script",o?d.src=`${o}?onload=${y}`:a?d.src=`${i}/1/secure-api.js?onload=${y}`:d.src=`${i}/1/api.js?onload=${y}`,d.crossOrigin=r,d.async=n;let _=(e,t)=>{try{!a&&s&&c.removeChild(d),t(e);}catch(e){l(e);}};d.onload=t=>_(t,e),d.onerror=e=>_(e,l),d.src+=""!==t?`&${t}`:"",c.appendChild(d);})}(d({query:s},e)),t.addBreadcrumb({category:v,message:"hCaptcha loaded",data:i});}catch(n){t.addBreadcrumb({category:v,message:"hCaptcha failed to load",data:n});let e=n3.findIndex(e=>e.scope===r.window);-1!==e&&n3.splice(e,1),t.captureException(n),s(Error(E));}}));return n3.push({promise:s,scope:r.window}),s}catch(e){return t.captureException(e),Promise.reject(Error(E))}}(t,i)}catch(s){return i.addBreadcrumb({SENTRY_SOURCE:v,message:r,data:{error:s}}),n>=2?(i.captureException(s),Promise.reject(s)):e(t,n+=1)}})}(e)})}
28
+
29
+ function e(e){var n=e&&e.ownerDocument||document,t=n.defaultView||n.parentWindow||window;return {document:n,window:t}}function n(e){return e||document.head}
30
+
31
+ var scopeTag={key:"source",value:"@hCaptcha/react"};var breadcrumbMessages={mounted:"hCaptcha component mounted",expired:"hCaptcha expired",unmounted:"hCaptcha component unmounted",reset:"hCaptcha reset",removed:"hCaptcha removed"};
32
+
33
+ var o=function(o){function p(t){var i;return (i=o.call(this,t)||this)._hcaptcha=void 0,i.renderCaptcha=i.renderCaptcha.bind(e$2(i)),i.resetCaptcha=i.resetCaptcha.bind(e$2(i)),i.removeCaptcha=i.removeCaptcha.bind(e$2(i)),i.isReady=i.isReady.bind(e$2(i)),i._onReady=null,i.loadCaptcha=i.loadCaptcha.bind(e$2(i)),i.handleOnLoad=i.handleOnLoad.bind(e$2(i)),i.handleSubmit=i.handleSubmit.bind(e$2(i)),i.handleExpire=i.handleExpire.bind(e$2(i)),i.handleError=i.handleError.bind(e$2(i)),i.handleOpen=i.handleOpen.bind(e$2(i)),i.handleClose=i.handleClose.bind(e$2(i)),i.handleChallengeExpired=i.handleChallengeExpired.bind(e$2(i)),i.ref=reactExports.createRef(),i.apiScriptRequested=false,i.sentryHub=null,i.captchaId="",i.state={isApiReady:false,isRemoved:false,elementId:t.id},i}o$2(p,o);var d=p.prototype;return d.componentDidMount=function(){var e$1=this,t=e(n(this.props.scriptLocation));this._hcaptcha=t.window.hcaptcha||void 0;var a=void 0!==this._hcaptcha;if(this.sentryHub=nZ(this.props.sentry,scopeTag),this.sentryHub.addBreadcrumb({category:scopeTag.value,message:breadcrumbMessages.mounted}),a){this.setState({isApiReady:true},function(){e$1.renderCaptcha();});return}this.loadCaptcha();},d.componentWillUnmount=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),e.remove(t),this.sentryHub.addBreadcrumb({category:scopeTag.value,message:breadcrumbMessages.unmounted}));},d.shouldComponentUpdate=function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved},d.componentDidUpdate=function(e){var t=this;["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(function(a){return e[a]===t.props[a]})||this.removeCaptcha(function(){t.renderCaptcha();});},d.loadCaptcha=function(){if(!this.apiScriptRequested){var e=this.props,t=e.apihost,a=e.assethost,s=e.endpoint,n=e.host,r=e.imghost,h=e.languageOverride,c=e.reCaptchaCompat,o=e.reportapi,p=e.sentry,d=e.custom,l=e.loadAsync,u=e.scriptLocation,m=e.scriptSource,y=e.secureApi,v=e.cleanup;n2({render:"explicit",apihost:t,assethost:a,endpoint:s,hl:h,host:n,imghost:r,recaptchacompat:false===c?"off":null,reportapi:o,sentry:p,custom:d,loadAsync:l,scriptLocation:u,scriptSource:m,secureApi:y,cleanup:void 0===v||v}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=true;}},d.renderCaptcha=function(e){var t=this,a=this.props.onReady,i=this.state.isApiReady,s=this.captchaId;if(i&&!s){var n=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),r=this._hcaptcha.render(this.ref.current,n);this.captchaId=r,this.setState({isRemoved:false},function(){e&&e(),a&&a(),t._onReady&&t._onReady(r);});}},d.resetCaptcha=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),this.sentryHub.addBreadcrumb({category:scopeTag.value,message:breadcrumbMessages.reset}));},d.removeCaptcha=function(e){var t=this._hcaptcha,a=this.captchaId;this.isReady()&&(this.setState({isRemoved:true},function(){t.remove(a),e&&e();}),this.sentryHub.addBreadcrumb({category:scopeTag.value,message:breadcrumbMessages.removed}));},d.handleOnLoad=function(){var e$1=this;this.setState({isApiReady:true},function(){try{var t=n(e$1.props.scriptLocation);e$1._hcaptcha=e(t).window.hcaptcha,e$1.renderCaptcha(function(){var t=e$1.props.onLoad;t&&t();});}catch(t){e$1.sentryHub.captureException(t);}});},d.handleSubmit=function(e){var t=this.props.onVerify,a=this.state.isRemoved,i=this._hcaptcha,s=this.captchaId;if(void 0!==i&&!a){var n=i.getResponse(s),r=i.getRespKey(s);t&&t(n,r);}},d.handleExpire=function(){var e=this.props.onExpire,t=this._hcaptcha,a=this.captchaId;this.isReady()&&(t.reset(a),e&&e(),this.sentryHub.addBreadcrumb({category:scopeTag.value,message:breadcrumbMessages.expired}));},d.handleError=function(e){var t=this.props.onError,a=this._hcaptcha,i=this.captchaId;this.isReady()&&a.reset(i),t&&t(e);},d.isReady=function(){var e=this.state,t=e.isApiReady,a=e.isRemoved;return t&&!a},d.handleOpen=function(){this.isReady()&&this.props.onOpen&&this.props.onOpen();},d.handleClose=function(){this.isReady()&&this.props.onClose&&this.props.onClose();},d.handleChallengeExpired=function(){this.isReady()&&this.props.onChalExpired&&this.props.onChalExpired();},d.execute=function(e){var t=this;void 0===e&&(e=null),e="object"==typeof e?e:null;try{var a=this._hcaptcha,i=this.captchaId;if(!this.isReady()){var s,n=new Promise(function(a,i){t._onReady=function(s){try{var n=t._hcaptcha;e&&e.async?n.execute(s,e).then(a).catch(i):a(n.execute(s,e));}catch(e){i(e);}};});return null!=(s=e)&&s.async?n:null}return a.execute(i,e)}catch(t){if(this.sentryHub.captureException(t),e&&e.async)return Promise.reject(t);return null}},d.close=function(){var e=this._hcaptcha,t=this.captchaId;if(this.isReady())return e.close(t)},d.setData=function(e){var t=this._hcaptcha,a=this.captchaId;this.isReady()&&(e&&"object"!=typeof e&&(e=null),t.setData(a,e));},d.getResponse=function(){return this._hcaptcha.getResponse(this.captchaId)},d.getRespKey=function(){return this._hcaptcha.getRespKey(this.captchaId)},d.render=function(){var e=this.state.elementId;return reactExports.createElement("div",{ref:this.ref,id:e})},p}(reactExports.Component);
34
+
35
+ export { o as default };
36
+ //# sourceMappingURL=index-DXlCRM6V.js.map