hypothesis 1.1582.0 → 1.1583.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?058c3e","styles/annotator.css":"styles/annotator.css?427463","styles/annotator.css.map":"styles/annotator.css.map?94a857","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?d92c5a","styles/katex.min.css.map":"styles/katex.min.css.map?e7e03f","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css":"styles/sidebar.css?0e33f1","styles/sidebar.css.map":"styles/sidebar.css.map?9a27bf","styles/ui-playground.css":"styles/ui-playground.css?c7ef72","styles/ui-playground.css.map":"styles/ui-playground.css.map?0df86b","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?b57f89","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?616c4e","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?d38ce4","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?964b5b","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?4fc569"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var o=s.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=t,e(o),s.head.appendChild(o)}function o(s,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.esModule,n=void 0===r||r,i=o.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function r(s,t,o,r){var n=s.createElement("link");n.rel=t,n.href=r,n.type="application/annotator+".concat(o),e(n),s.head.appendChild(n)}function n(s,t,o){var r=s.createElement("link");r.rel="preload",r.as=t,r.href=o,"fetch"===t&&(r.crossOrigin="anonymous"),e(r),s.head.appendChild(r)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.protocol)}if(function(){var s=[()=>Object.fromEntries([]),()=>new URL(document.location.href),()=>new Request("https://hypothes.is"),()=>Element.prototype.attachShadow,()=>CSS.supports("display: grid"),()=>(document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0)];try{return s.every((s=>s()))}catch(s){return!1}}()){var l=function(s){for(var e={},t=s.querySelectorAll("script.js-hypothesis-config"),o=0;o<t.length;o++){var r=void 0;try{r=JSON.parse(t[o].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(e,r)}return e}(document),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1582.0/");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)o(s,i(e,a[r]),{esModule:!0});for(var l=0,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)t(s,i(e,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,h=a(d.notebookAppUrl||"https://hypothes.is/notebook"),u=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",e.sidebarAppUrl),r(s,"notebook","html",e.notebookAppUrl),r(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css")),r(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)o(s,i(e,l[a]),{esModule:!1});var p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,d=p;c<d.length;c++)t(s,i(e,d[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:h,profileAppUrl:u,sidebarAppUrl:y})}}else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")}();
1
+ !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?3d83ef","styles/annotator.css":"styles/annotator.css?427463","styles/annotator.css.map":"styles/annotator.css.map?94a857","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?d92c5a","styles/katex.min.css.map":"styles/katex.min.css.map?e7e03f","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css":"styles/sidebar.css?0e33f1","styles/sidebar.css.map":"styles/sidebar.css.map?9a27bf","styles/ui-playground.css":"styles/ui-playground.css?c7ef72","styles/ui-playground.css.map":"styles/ui-playground.css.map?0df86b","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?b57f89","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?345b79","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?d38ce4","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?b511ff","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?964b5b"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var o=s.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=t,e(o),s.head.appendChild(o)}function o(s,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o.esModule,n=void 0===r||r,i=o.forceReload,a=void 0!==i&&i,l=s.createElement("script");n&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function r(s,t,o,r){var n=s.createElement("link");n.rel=t,n.href=r,n.type="application/annotator+".concat(o),e(n),s.head.appendChild(n)}function n(s,t,o){var r=s.createElement("link");r.rel="preload",r.as=t,r.href=o,"fetch"===t&&(r.crossOrigin="anonymous"),e(r),s.head.appendChild(r)}function i(s,e){return s.assetRoot+"build/"+s.manifest[e]}function a(s){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var t=function(){var s,e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return t?(s=t.src,(e=s.match(/(https?):\/\/([^:/]+)/))?{protocol:e[1],hostname:e[2]}:null):null}(e);if(!t)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",t.hostname)).replace("{current_scheme}",t.protocol)}if(function(){var s=[()=>Object.fromEntries([]),()=>new URL(document.location.href),()=>new Request("https://hypothes.is"),()=>Element.prototype.attachShadow,()=>CSS.supports("display: grid"),()=>(document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0)];try{return s.every((s=>s()))}catch(s){return!1}}()){var l=function(s){for(var e={},t=s.querySelectorAll("script.js-hypothesis-config"),o=0;o<t.length;o++){var r=void 0;try{r=JSON.parse(t[o].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(e,r)}return e}(document),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1583.0/");if(document.querySelector("hypothesis-app")){!function(s,e){n(s,"fetch",e.apiUrl),n(s,"fetch",e.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)o(s,i(e,a[r]),{esModule:!0});for(var l=0,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)t(s,i(e,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,h=a(d.notebookAppUrl||"https://hypothes.is/notebook"),u=a(d.profileAppUrl||"https://hypothes.is/user-profile"),y=a(d.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",e.sidebarAppUrl),r(s,"notebook","html",e.notebookAppUrl),r(s,"profile","html",e.profileAppUrl),n(s,"style",i(e,"styles/annotator.css")),r(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)o(s,i(e,l[a]),{esModule:!1});var p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,d=p;c<d.length;c++)t(s,i(e,d[c]))}}(document,{assetRoot:p,manifest:s,notebookAppUrl:h,profileAppUrl:u,sidebarAppUrl:y})}}else console.warn("The Hypothesis annotation tool is not supported in this browser. See https://web.hypothes.is/help/which-browsers-are-supported-by-hypothesis/.")}();
@@ -1,5 +1,5 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?058c3e",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?3d83ef",
3
3
  "styles/annotator.css": "styles/annotator.css?427463",
4
4
  "styles/annotator.css.map": "styles/annotator.css.map?94a857",
5
5
  "styles/highlights.css": "styles/highlights.css?6b4ebd",
@@ -13,8 +13,8 @@
13
13
  "styles/ui-playground.css": "styles/ui-playground.css?c7ef72",
14
14
  "styles/ui-playground.css.map": "styles/ui-playground.css.map?0df86b",
15
15
  "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?b57f89",
16
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?616c4e",
16
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?345b79",
17
17
  "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?d38ce4",
18
- "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?964b5b",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?4fc569"
18
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?b511ff",
19
+ "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?964b5b"
20
20
  }
@@ -147,7 +147,7 @@ this._sidebarRPC.on("navigateToSegment",(e=>this._integration.navigateToSegment?
147
147
  if(!t.selector||!t.selector.some((e=>"TextQuoteSelector"===e.type)))return{annotation:e,target:t};let n;try{const o=await this._integration.anchor(this.element,t.selector),i=ho.fromRange(o);n={annotation:e,target:t,range:i}}catch{n={annotation:e,target:t}}return n})));if(!this._annotations.has(e.$tag))return[];for(const e of n)t(e);return e.$orphan=n.length>0&&n.every((e=>e.target.selector&&!e.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",e),n}detach(e,t=!0){this._annotations.delete(e);const n=[];for(const t of this.anchors)t.annotation.$tag!==e?n.push(t):t.highlights&&So(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){this.anchors=e,this._clusterToolbar?.scheduleClusterUpdates(),t&&this._bucketBarClient.update(this.anchors)}async createAnnotation({highlight:e=!1}={}){const t=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),o=this.element,i=(await Promise.all(t.map((e=>this._integration.describe(o,e))))).map((e=>({
148
148
  source:n.uri,selector:e}))),r={uri:n.uri,document:n.metadata,target:i,$highlight:e,$cluster:e?"user-highlights":"user-annotations",$tag:"a:"+Zt(8)};return this._sidebarRPC.call("createAnnotation",r),this.anchor(r),Cr(),r}_hoverAnnotations(e){this._hoveredAnnotations.clear(),e.forEach((e=>this._hoveredAnnotations.add(e)));for(const t of this.anchors)if(t.highlights){const n=e.includes(t.annotation.$tag);Eo(t.highlights,n)}this._sidebarRPC.call("hoverAnnotations",e)}_onSelection(e){const t=this._integration.getAnnotatableRange(e);if(!t)return void this._onClearSelection();const n=document.getSelection(),o=_o(n),i=wo(n);i?(this.selectedRanges=[t],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=yr(),this._isAdderVisible=!0,this._adder.show(i,o)):this._onClearSelection()}_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}
149
149
  selectAnnotations(e,{toggle:t=!1,focusInSidebar:n=!1}={}){t?this._sidebarRPC.call("toggleAnnotationSelection",e):this._sidebarRPC.call("showAnnotations",e,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(e,t=!0){!function(e,t){e.classList.toggle("hypothesis-highlights-always-on",t)}(this.element,e),this._highlightsVisible=e,t&&this._hostRPC.call("highlightsVisibleChanged",e)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(e){this._sidebarLayout=e,this._integration.fitSideBySide(e)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(e){zn(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new br(this.element)),this._outsideAssignmentNotice.setVisible(e)}}function Ar(e,t){const n=new URL(e),o=new URLSearchParams;return o.append("config",JSON.stringify(t)),n.hash=o.toString(),n.toString()}function Rr(e,t){const n={}
150
- ;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.1582.0";const o=new URL(window.location.href);if(o.hash="",n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const e=n.services[0];e.onLoginRequest&&(e.onLoginRequestProvided=!0),e.onLogoutRequest&&(e.onLogoutRequestProvided=!0),e.onSignupRequest&&(e.onSignupRequestProvided=!0),e.onProfileRequest&&(e.onProfileRequestProvided=!0),e.onHelpRequest&&(e.onHelpRequestProvided=!0)}return n}function kr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=se(null);return ie((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ie((()=>{const e=r.current;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Te("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function Pr({closed:e,children:t,...n}){return Te("div",{...n,
150
+ ;for(const[e,o]of Object.entries(t))"notebookAppUrl"!==e&&"sidebarAppUrl"!==e&&null!=o&&(n[e]=o);n.origin=new URL(e).origin,n.version="1.1583.0";const o=new URL(window.location.href);if(o.hash="",n.hostURL=o.toString(),Array.isArray(n.services)&&n.services?.length>0){const e=n.services[0];e.onLoginRequest&&(e.onLoginRequestProvided=!0),e.onLogoutRequest&&(e.onLogoutRequestProvided=!0),e.onSignupRequest&&(e.onSignupRequestProvided=!0),e.onProfileRequest&&(e.onProfileRequestProvided=!0),e.onHelpRequest&&(e.onHelpRequestProvided=!0)}return n}function kr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=se(null);return ie((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ie((()=>{const e=r.current;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Te("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function Pr({closed:e,children:t,...n}){return Te("div",{...n,
151
151
  className:ke("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Te("div",{className:"relative w-full h-full",children:t})})}function Tr({document_:e=document,...t}){return Te(ae((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?kr:Pr),[e]),{...t})}function Mr({config:e,groupId:t}){return Te("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:Ar(e.notebookAppUrl,{...Rr(e.notebookAppUrl,e),group:t})})}function Lr({eventBus:e,config:t}){const[n,o]=oe(0),[i,r]=oe(!0),[s,a]=oe(null),l=se(""),c=se(null);ie((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),ie((()=>{document.body.style.overflow=i?l.current:"hidden"}),[i]),ie((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),o((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const u=le((()=>{r(!0),c.current?.publish("closeNotebook")}),[])
152
152
  ;return null===s?null:Te(Tr,{closed:i,onClose:u,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[Te("div",{className:"absolute right-0 m-3",children:Te(Ct,{title:"Close notebook",onClick:u,variant:"dark",classes:ke("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:Te(Fe,{className:"w-4 h-4"})})}),Te(Mr,{config:t,groupId:s},n)]})}class Or{constructor(e,t,n){this._container=new Zn("notebook",(()=>Te(Lr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Ir({eventBus:e,config:t}){const[n,o]=oe(!0),i=se(null);ie((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{o(!1)})),i.current=t,()=>{t.destroy()}}),[e]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:Te(Tr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[Te("div",{className:"absolute right-0 m-3",children:Te(Ct,{
153
153
  title:"Close profile dialog",onClick:r,variant:"dark",classes:ke("!bg-transparent enabled:hover:!bg-grey-3"),children:Te(Fe,{className:"w-4 h-4"})})}),Te("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class Br{constructor(e,t,n){this._container=new Zn("profile",(()=>Te(Ir,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Hr({above:e,below:t,buckets:n,onFocusAnnotations:o,onScrollToAnnotation:i,onSelectAnnotations:r}){const s=e.anchors.length>0,a=t.anchors.length>0,l=e=>e.anchors.map((e=>e.tag));return Te("ul",{className:"relative",children:[s&&Te("li",{className:"absolute right-0 pointer-events-auto mt-[-11px]",style:{top:e.position},children:Te(Qt,{"data-testid":"up-navigation-button",direction:"up",onClick:()=>{const t=[...e.anchors].sort(((e,t)=>e.bottom-t.bottom)),n=t[t.length-1];i(n.tag)},onBlur:()=>o([]),onFocus:()=>o(l(e)),onMouseEnter:()=>o(l(e)),onMouseOut:()=>o([]),
@@ -532,7 +532,7 @@ r||(o=n.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":r||(o=n.sub
532
532
  ;for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="~~"}return r})),n.subParser("makeMarkdown.strong",(function(e,t){var r="";if(e.hasChildNodes()){r+="**";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t);r+="**"}return r})),n.subParser("makeMarkdown.table",(function(e,t){var r,o,i="",a=[[],[]],s=e.querySelectorAll("thead>tr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;r<s.length;++r){var c=n.subParser("makeMarkdown.tableCell")(s[r],t),u="---";if(s[r].hasAttribute("style"))switch(s[r].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":u=":---";break;case"text-align:right;":u="---:";break;case"text-align:center;":u=":---:"}a[0][r]=c.trim(),a[1][r]=u}for(r=0;r<l.length;++r){var d=a.push([])-1,h=l[r].getElementsByTagName("td");for(o=0;o<s.length;++o){var m=" ";void 0!==h[o]&&(m=n.subParser("makeMarkdown.tableCell")(h[o],t)),a[d].push(m)}}var p=3;for(r=0;r<a.length;++r)for(o=0;o<a[r].length;++o){
533
533
  var f=a[r][o].length;f>p&&(p=f)}for(r=0;r<a.length;++r){for(o=0;o<a[r].length;++o)1===r?":"===a[r][o].slice(-1)?a[r][o]=n.helper.padEnd(a[r][o].slice(-1),p-1,"-")+":":a[r][o]=n.helper.padEnd(a[r][o],p,"-"):a[r][o]=n.helper.padEnd(a[r][o],p);i+="| "+a[r].join(" | ")+" |\n"}return i.trim()})),n.subParser("makeMarkdown.tableCell",(function(e,t){var r="";if(!e.hasChildNodes())return"";for(var o=e.childNodes,i=o.length,a=0;a<i;++a)r+=n.subParser("makeMarkdown.node")(o[a],t,!0);return r.trim()})),n.subParser("makeMarkdown.txt",(function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/¨NBSP;/g," "),t=(t=(t=(t=(t=(t=(t=(t=(t=n.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")})),e.exports?e.exports=n:this.showdown=n}).call(up)}(cp)),
534
534
  cp.exports),hp=t(dp);const mp=sc(window);function pp(){return[{type:"output",filter:function(e){return e.replace(/<a href=/g,'<a target="_blank" href=')}}]}let fp;function gp(e){return"{math:"+e.toString()+"}"}function vp(e){const t=function(e){const t=[];let n=0,r=e;for(;;){const e=r.indexOf("$$",n),o=r.indexOf("\\(",n);if(-1===e&&-1===o)break;let i,a;if(-1!==e&&(-1===o||e<o)?(i=e,a=r.indexOf("$$",i+2)):(i=o,a=r.indexOf("\\)",i+2)),-1===a)break;a+=2;const s=t.length+1,l=gp(s);let c;t.push({id:s,expression:r.slice(i+2,a-2),inline:-1!==o}),c=-1!==o?l:"\n\n"+l+"\n\n",r=r.slice(0,i)+c+r.slice(a),n=i+c.length}return{mathBlocks:t,content:r}}(e),n=mp.sanitize(function(e){return fp||(fp=new hp.Converter({extensions:[pp],simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0})),fp.makeHtml(e)}(t.content)),r=function(e,t){return t.reduce(((e,t)=>{let n;try{n=t.inline?lp.renderToString(t.expression):lp.renderToString(t.expression,{displayMode:!0})}catch{
535
- n=cc(t.expression)}return e.replace(gp(t.id),n)}),e)}(n,t.mathBlocks);return r}function bp({children:e,classes:t,...n}){return et("div",{dir:"auto",lang:"",className:Ze("StyledText",t),...n,children:e})}function yp({content:e}){return"string"==typeof e?et(x,{children:["No user with username ",et("span",{className:"font-bold",children:e})," ","exists"]}):et("div",{className:"flex flex-col gap-y-4",children:[et("div",{className:"flex flex-col gap-y-1.5",children:[et("div",{"data-testid":"username",className:"text-md font-bold",children:["@",e.username]}),e.display_name&&et("div",{"data-testid":"display-name",className:"text-color-text-light",children:e.display_name})]}),e.description&&et("div",{"data-testid":"description",className:"line-clamp-2",children:e.description}),et("div",{"data-testid":"created",className:"text-color-text-light",children:["Joined ",et("b",{children:Ve(e.joined,{includeTime:!1})})]})]})}function _p(e){
535
+ n=cc(t.expression)}return e.replace(gp(t.id),n)}),e)}(n,t.mathBlocks);return r}function bp({children:e,classes:t,...n}){return et("div",{dir:"auto",lang:"",className:Ze("StyledText",t),...n,children:e})}function yp({content:e}){return"string"==typeof e?et(x,{children:["No user with username ",et("span",{className:"font-bold",children:e})," ","exists"]}):et("div",{className:"flex flex-col gap-y-4",children:[et("div",{className:"flex flex-col gap-y-1.5",children:[et("div",{"data-testid":"username",className:"text-md font-bold",children:["@",e.username]}),e.display_name&&et("div",{"data-testid":"display-name",className:"text-color-text-light",children:e.display_name})]}),e.description&&et("div",{"data-testid":"description",className:"line-clamp-2",children:e.description}),e.joined&&et("div",{"data-testid":"joined",className:"text-color-text-light",children:["Joined ",et("b",{children:Ve(e.joined,{includeTime:!1})})]})]})}function _p(e){
536
536
  const{markdown:t,classes:n,style:r,mentions:o=[],mentionsEnabled:i=!1,setTimeout_:a=setTimeout,clearTimeout_:s=clearTimeout}=e,l=he((()=>t?vp(t):""),[t]),c=de(null),u=de(null),d=de(new Map),[h,m]=se(null),p=de(),f=me((e=>{p.current&&s(p.current);const t=()=>{m(e),p.current=null};null===e?t():p.current=a(t,400)}),[s,a]);return ce((()=>()=>{p.current&&s(p.current)}),[s]),ce((()=>{!function(e,{className:t}={}){const n=Array.from(e.getElementsByTagName("a"));for(const e of n){const n=el(e);n&&(t?n.className=t:n.style.width="350px")}}(c.current,{className:"w-full md:w-[380px]"})}),[t]),ce((()=>{d.current=function(e,t){const n=e.querySelectorAll("[data-hyp-mention]"),r=new Map;for(const e of n){const n=e,o=n.dataset.userid,i=o?t.find((e=>e.userid===o)):void 0;r.set(...Ws(n,i))}return r}(c.current,o)}),[o]),et("div",{className:"w-full break-anywhere cursor-text",children:et(bp,{classes:Ze({relative:i}),children:[et("div",{className:n,"data-testid":"markdown-text",ref:c,dangerouslySetInnerHTML:{__html:l},style:r,
537
537
  onMouseEnterCapture:i?({target:e})=>{const t=e,n=d.current.get(t);n&&(f(n),u.current=t)}:void 0,onMouseLeaveCapture:i?()=>{f(null),u.current=null}:void 0}),i&&et(Jr,{open:!!h,onClose:()=>f(null),anchorElementRef:u,classes:"px-3 py-2 !max-w-[75%]",children:null!==h&&et(yp,{content:h})})]})})}function wp({children:e}){return et("ul",{className:"flex flex-wrap gap-2 leading-none","aria-label":"Annotation tags",children:e})}function xp({href:e,onRemoveTag:t,tag:n}){return et("li",{className:"flex items-center border rounded bg-grey-0",children:[et("div",{className:"grow px-1.5 py-1 touch:p-2",children:e?et(fo,{variant:"text-light",href:e,lang:"",target:"_blank","aria-label":`Tag: ${n}`,title:`View annotations with tag: ${n}`,underline:"none",children:n}):et("span",{className:"text-color-text-light cursor-default","aria-label":`Tag: ${n}`,lang:"",children:n})}),t&&et("button",{
538
538
  className:Ze("px-1.5 py-1 touch:p-2","border-l rounded rounded-l-none","text-grey-6 hover:text-color-text hover:bg-grey-2","transition-colors duration-200","focus-visible-ring ring-inset"),onClick:()=>{t(n)},title:`Remove tag: ${n}`,children:et(_t,{className:"font-base w-em h-em",title:`Remove ${n}`})})]})}function kp({classes:e,setCollapsed:t,collapsed:n}){const r=n?"More":"Less";return et(yr,{classes:Ze("text-grey-7 font-normal",e),expanded:!n,onClick:()=>t(!n),title:`Toggle visibility of full annotation text: Show ${r}`,children:et("div",{className:"flex items-center gap-x-2",children:[et(n?en:Pt,{className:"w-3 h-3"}),et("div",{children:r})]})})}mp.addHook("afterSanitizeAttributes",(e=>{"target"in e&&e.setAttribute("target","_blank")}));var Np=Io((function({annotation:e,settings:t}){
@@ -580,7 +580,7 @@ const Bf=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5
580
580
  return t}function Jf(e){return Ni(e)?"orphan":Si(e)?"note":"annotation"}function Qf(e){return Ss([e]).reduce(((e,t)=>t.created>e?t.created:e),"")}function eg(e){return Ss([e]).reduce(((e,t)=>(e||(e=t.created),t.created<e?t.created:e)),"")}const tg={Newest:(e,t)=>{const n=Qf(e),r=Qf(t);return n>r?-1:n<r?1:0},Oldest:(e,t)=>{const n=eg(e),r=eg(t);return n<r?-1:n>r?1:0},Location:(e,t)=>{if(!e.annotation||!t.annotation)return function(e,t){return e.annotation||t.annotation?e.annotation?1:-1:0}(e,t);const n=Ti(e.annotation),r=Ti(t.annotation);if(n.cfi&&r.cfi){const e=Lf(n.cfi,r.cfi);if(0!==e)return Math.sign(e)}else{if(n.cfi)return-1;if(r.cfi)return 1}const o=n.position??Number.MAX_SAFE_INTEGER,i=r.position??Number.MAX_SAFE_INTEGER;return Math.sign(o-i)}};const ng=function(e){if(1!==e.length)throw new Error("Memoize input must be a function of one argument");let t,n;return function(r){return r===t||(t=r,n=e(r)),n}}((function(e){const t=e.selection,n={expanded:t.expanded,forcedVisible:t.forcedVisible,
581
581
  selected:t.selected,sortCompareFn:tg[t.sortKey]};if(!!t.filterQuery||Object.keys(t.filters).length>0){const e=function(e,t={}){const n=e=>{const n=t[e];return"string"==typeof n?[n]:[]},r=n("cfi"),o=n("page"),i=n("quote"),a=n("tag"),s=n("text"),l=n("uri"),c=n("user"),u=[],d=[],h=Xf(e,Vf);for(const e of h){const t=e.slice(0,e.indexOf(":")),n=e.slice(t.length+1);switch(t){case"cfi":r.push(n);break;case"quote":i.push(n);break;case"page":o.push(n);break;case"since":{const t=86400,n={sec:1,min:60,hour:3600,day:t,week:7*t,month:30*t,year:365*t},r=e.slice(6).toLowerCase().match(/^(\d+)(sec|min|hour|day|week|month|year)?$/);if(r){const e=parseFloat(r[1]),t=r[2]||"sec";d.push(e*n[t])}}break;case"tag":a.push(n);break;case"text":s.push(n);break;case"uri":l.push(n);break;case"user":c.push(n);break;default:u.push(e)}}return{any:{terms:u,operator:"and",filterReplies:!0},cfi:{terms:r,operator:"or",filterReplies:!1},quote:{terms:i,operator:"and",filterReplies:!1},page:{terms:o,operator:"or",filterReplies:!1},since:{terms:d,
582
582
  operator:"and",filterReplies:!0},tag:{terms:a,operator:"and",filterReplies:!0},text:{terms:s,operator:"and",filterReplies:!0},uri:{terms:l,operator:"or",filterReplies:!1},user:{terms:c,operator:"or",filterReplies:!0}}}(t.filterQuery||"",t.filters),r={},o={};for(const[t,n]of Object.entries(e))n.filterReplies?r[t]=n:o[t]=n;n.filterFn=e=>Gf([e],r).length>0,Object.values(o).some((e=>e.terms.length>0))&&(n.threadFilterFn=e=>!!e.annotation&&Gf([e.annotation],o).length>0)}const r=Mf(e.annotations,n),o={annotation:0,note:0,orphan:0};return e.showTabs&&(r.children=r.children.filter((e=>{if(!e.annotation)return!1;if(wi(e.annotation))return!1;const n=Jf(e.annotation);return o[n]+=1,n===t.selectedTab}))),{tabCounts:o,rootThread:r}}));function rg(){const e=ps(),t=e.allAnnotations(),n=e.filterQuery(),r=e.route(),o=e.selectionState(),i=e.getFilterValues(),a="sidebar"===r,s=he((()=>{const e={...o,filterQuery:n,filters:i};return{annotations:t,selection:e,showTabs:a}}),[t,n,o,i,a]);return ng(s)}
583
- var og,ig,ag=Io((function({loadAnnotationsService:e,onLogin:t}){const n=ps(),r=n.routeParams().id??"",{rootThread:o}=rg(),i=n.profile().userid,[a,s]=se(!1);return ce((()=>{s(!1),n.clearAnnotations(),e.loadThread(r).then((e=>{const t=e.filter((e=>0===(e.references||[]).length))[0];t&&(e.forEach((e=>e.id&&n.setExpanded(e.id,!0))),t.id!==r&&n.highlightAnnotations([r]))})).catch((()=>{s(!0)}))}),[r,i,e,n]),et(x,{children:[a&&et(fs,{errorType:"annotation",onLoginRequest:t}),et(_f,{threads:o.children})]})}),["loadAnnotationsService"]);class sg{constructor(e,t,n=window){const r="N/A";let o=r;e.userid&&(o=e.userid,e.displayName&&(o=`${e.displayName} (${o})`)),this.version="1.1582.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||r,this.fingerprint=t[0]?.metadata?.documentFingerprint??r,this.account=o,this.timestamp=(new Date).toString();const i=t[0]?.segment;if(i){const e=[];if(i.cfi&&e.push(["CFI",i.cfi]),i.pages){const t=`${i.pages.start}-${i.pages.end}`;e.push(["Pages",t])}
583
+ var og,ig,ag=Io((function({loadAnnotationsService:e,onLogin:t}){const n=ps(),r=n.routeParams().id??"",{rootThread:o}=rg(),i=n.profile().userid,[a,s]=se(!1);return ce((()=>{s(!1),n.clearAnnotations(),e.loadThread(r).then((e=>{const t=e.filter((e=>0===(e.references||[]).length))[0];t&&(e.forEach((e=>e.id&&n.setExpanded(e.id,!0))),t.id!==r&&n.highlightAnnotations([r]))})).catch((()=>{s(!0)}))}),[r,i,e,n]),et(x,{children:[a&&et(fs,{errorType:"annotation",onLoginRequest:t}),et(_f,{threads:o.children})]})}),["loadAnnotationsService"]);class sg{constructor(e,t,n=window){const r="N/A";let o=r;e.userid&&(o=e.userid,e.displayName&&(o=`${e.displayName} (${o})`)),this.version="1.1583.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||r,this.fingerprint=t[0]?.metadata?.documentFingerprint??r,this.account=o,this.timestamp=(new Date).toString();const i=t[0]?.segment;if(i){const e=[];if(i.cfi&&e.push(["CFI",i.cfi]),i.pages){const t=`${i.pages.start}-${i.pages.end}`;e.push(["Pages",t])}
584
584
  i.url&&e.push(["URL",i.url]),this.segment=e.map((([e,t])=>`${e}: ${t}`)).join(", ")}}asFormattedString(){return`Version: ${this.version}\nUser Agent: ${this.userAgent}\nURL: ${this.urls}\nFingerprint: ${this.fingerprint}\nAccount: ${this.account}\nDate: ${this.timestamp}\n`}asEncodedURLString(){return encodeURIComponent(this.asFormattedString())}}var lg=function(){if(ig)return og;ig=1;var e="complete",t="canceled";function n(e,t,n){e.self===e?e.scrollTo(t,n):(e.scrollLeft=t,e.scrollTop=n)}function r(t){var o=t._scrollSettings;if(o){var i=o.maxSynchronousAlignments,a=function(e,t){var n,r,o,i,a,s,l,c=e.align,u=e.target.getBoundingClientRect(),d=c&&null!=c.left?c.left:.5,h=c&&null!=c.top?c.top:.5,m=c&&null!=c.leftOffset?c.leftOffset:0,p=c&&null!=c.topOffset?c.topOffset:0,f=d,g=h;if(e.isWindow(t))s=Math.min(u.width,t.innerWidth),l=Math.min(u.height,t.innerHeight),r=u.left+t.pageXOffset-t.innerWidth*f+s*f,o=u.top+t.pageYOffset-t.innerHeight*g+l*g,r-=m,o-=p,r=e.align.lockX?t.pageXOffset:r,
585
585
  o=e.align.lockY?t.pageYOffset:o,i=r-t.pageXOffset,a=o-t.pageYOffset;else{s=u.width,l=u.height,n=t.getBoundingClientRect();var v=u.left-(n.left-t.scrollLeft),b=u.top-(n.top-t.scrollTop);r=v+s*f-t.clientWidth*f,o=b+l*g-t.clientHeight*g,r-=m,o-=p,r=Math.max(Math.min(r,t.scrollWidth-t.clientWidth),0),o=Math.max(Math.min(o,t.scrollHeight-t.clientHeight),0),r=e.align.lockX?t.scrollLeft:r,o=e.align.lockY?t.scrollTop:o,i=r-t.scrollLeft,a=o-t.scrollTop}return{x:r,y:o,differenceX:i,differenceY:a}}(o,t),s=Date.now()-o.startTime,l=Math.min(1/o.time*s,1);if(o.endIterations>=i)return n(t,a.x,a.y),t._scrollSettings=null,o.end(e);var c=1-o.ease(l);if(n(t,a.x-a.differenceX*c,a.y-a.differenceY*c),s>=o.time)return o.endIterations++,o.scrollAncestor&&r(o.scrollAncestor),void r(t);!function(e){if("requestAnimationFrame"in window)return window.requestAnimationFrame(e);setTimeout(e,16)}(r.bind(null,t))}}function o(e){return e.self===e}function i(e){
586
586
  return"pageXOffset"in e||(e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth)&&"hidden"!==getComputedStyle(e).overflow}function a(){return!0}function s(e){if(e.assignedSlot)return s(e.assignedSlot);if(e.parentElement)return"body"===e.parentElement.tagName.toLowerCase()?e.parentElement.ownerDocument.defaultView||e.parentElement.ownerDocument.ownerWindow:e.parentElement;if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t.host}}return og=function(n,l,c){if(n){"function"==typeof l&&(c=l,l=null),l||(l={}),l.time=isNaN(l.time)?1e3:l.time,l.ease=l.ease||function(e){return 1-Math.pow(1-e,e/2)},l.align=l.align||{};var u=s(n),d=1,h=l.validTarget||a,m=l.isScrollable;l.debug&&(console.log("About to scroll to",n),u||console.error("Target did not have a parent, is it mounted in the DOM?"));for(var p=[];u;)if(l.debug&&console.log("Scrolling parent node",u),h(u,d)&&(m?m(u,i):i(u))&&(d++,p.push(u)),!(u=s(u))){f(e);break}return p.reduce(((e,i,a)=>function(e,n,i,a,s){
@@ -667,7 +667,7 @@ buildTextExportContent(e,{groupName:t="",displayNamesEnabled:n=!1,defaultAuthori
667
667
  }),et("body",{children:[et("section",{children:[et("h1",{children:"Summary"}),et("p",{children:et("time",{dateTime:o.toISOString(),children:Zb(o)})}),et("p",{children:et("strong",{children:a})}),et("p",{children:et("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:i})}),et("table",{children:et("tbody",{style:{verticalAlign:"top"},children:[et("tr",{children:[et("td",{children:"Group:"}),et("td",{children:t})]}),et("tr",{children:[et("td",{children:"Total users:"}),et("td",{children:s.length})]}),et("tr",{children:[et("td",{children:"Users:"}),et("td",{children:s.join(", ")})]}),et("tr",{children:[et("td",{children:"Total annotations:"}),et("td",{children:e.length})]}),et("tr",{children:[et("td",{children:"Total replies:"}),et("td",{children:l.length})]})]})})]}),et("hr",{}),et("section",{children:[et("h1",{children:"Annotations"}),e.map(((e,t)=>{const n=Ii(e),r=Ci(e),o=vp(e.text),i=o===`<p>${e.text}</p>`?e.text:o;return et("article",{children:[et("h2",{children:["Annotation ",t+1,":"]
668
668
  }),et("table",{children:et("tbody",{style:{verticalAlign:"top"},children:[et("tr",{children:[et("td",{children:"Created at:"}),et("td",{children:et("time",{dateTime:e.created,children:Zb(new Date(e.created))})})]}),et("tr",{children:[et("td",{children:"Author:"}),et("td",{children:c(e)})]}),n&&et("tr",{children:[et("td",{children:"Page:"}),et("td",{children:n})]}),et("tr",{children:[et("td",{children:"Type:"}),et("td",{children:Ei(e)})]}),r&&et("tr",{children:[et("td",{children:"Quote:"}),et("td",{children:et("blockquote",{style:{margin:0},children:r})})]}),et("tr",{children:[et("td",{children:"Comment:"}),et("td",{dangerouslySetInnerHTML:{__html:i}})]}),e.tags.length>0&&et("tr",{children:[et("td",{children:"Tags:"}),et("td",{children:e.tags.join(", ")})]})]})})]},e.id)}))]})]})]}),{},{pretty:!0}).replace(/\t/g," ")}_exportCommon(e,{displayNamesEnabled:t,defaultAuthority:n}){const[r]=e;if(!r)throw new Error("No annotations to export");const o=e=>As(e,n,t),{uri:i,title:a}=hi(r);return{uri:i,title:a,
669
669
  uniqueUsers:[...new Set(e.map((e=>o(e))).filter(Boolean))],replies:e.filter((e=>gi(e))),extractUsername:o}}}Jb.$inject=[];class Qb extends Error{constructor(e,t,n=""){let r="Network request failed";t&&(r+=` (${t.status})`),n&&(r+=`: ${n}`),super(r),this.url=e,this.response=t,this.reason=n}}async function ey(e,t){let n,r;try{n=await fetch(e,t)}catch(t){throw new Qb(e,null,t.message)}if(204===n.status)return null;try{r=await n.json()}catch{throw new Qb(e,n,"Failed to parse response")}if(!n.ok)throw new Qb(e,n,r?.reason);return r}class ty{constructor(e,t,n){this._clientId=null;const r=e.routes(),o=()=>this._clientId,i=e=>function(e,t,{getAccessToken:n,getClientId:r,onRequestStarted:o,onRequestFinished:i}){return async(a,s,l)=>{o();try{const[o,i]=await Promise.all([e,n()]),c=function(e,t){let n=e;const r=t.split(".");for(const[e,t]of r.entries()){const o=n[t];if(!o||"url"in o){if(o&&e===r.length-1)return o;break}n=o}return null}(o,t);if(!c)throw new Error(`Missing API route: ${t}`);const u={
670
- "Content-Type":"application/json","Hypothesis-Client-Version":"1.1582.0"};i&&(u.Authorization="Bearer "+i);const d=r();d&&(u["X-Client-Id"]=d);const{url:h,unusedParams:m}=Ha(c.url,a),p=new URL(h);for(const[e,t]of Object.entries(m)){const n=Array.isArray(t)?t:[t];for(const t of n)null!=t&&p.searchParams.append(e,t.toString())}return await ey(p.toString(),{body:s?JSON.stringify(Xb(s)):null,headers:u,method:c.method,signal:l})}finally{i()}}}(r,e,{getAccessToken:()=>t.getAccessToken(),getClientId:o,onRequestStarted:n.apiRequestStarted,onRequestFinished:n.apiRequestFinished});this.search=i("search"),this.annotation={create:i("annotation.create"),delete:i("annotation.delete"),get:i("annotation.read"),update:i("annotation.update"),flag:i("annotation.flag"),hide:i("annotation.hide"),unhide:i("annotation.unhide")},this.group={member:{delete:i("group.member.delete")},members:{read:i("group.members.read")},read:i("group.read")},this.groups={list:i("groups.read")},this.profile={groups:{read:i("profile.groups.read")},
670
+ "Content-Type":"application/json","Hypothesis-Client-Version":"1.1583.0"};i&&(u.Authorization="Bearer "+i);const d=r();d&&(u["X-Client-Id"]=d);const{url:h,unusedParams:m}=Ha(c.url,a),p=new URL(h);for(const[e,t]of Object.entries(m)){const n=Array.isArray(t)?t:[t];for(const t of n)null!=t&&p.searchParams.append(e,t.toString())}return await ey(p.toString(),{body:s?JSON.stringify(Xb(s)):null,headers:u,method:c.method,signal:l})}finally{i()}}}(r,e,{getAccessToken:()=>t.getAccessToken(),getClientId:o,onRequestStarted:n.apiRequestStarted,onRequestFinished:n.apiRequestFinished});this.search=i("search"),this.annotation={create:i("annotation.create"),delete:i("annotation.delete"),get:i("annotation.read"),update:i("annotation.update"),flag:i("annotation.flag"),hide:i("annotation.hide"),unhide:i("annotation.unhide")},this.group={member:{delete:i("group.member.delete")},members:{read:i("group.members.read")},read:i("group.read")},this.groups={list:i("groups.read")},this.profile={groups:{read:i("profile.groups.read")},
671
671
  read:i("profile.read"),update:i("profile.update")},this.analytics={events:{create:i("analytics.events.create")}}}setClientId(e){this._clientId=e}}ty.$inject=["apiRoutes","auth","store"];var ny,ry,oy,iy,ay,sy={};function ly(){return oy||(oy=1,e=sy,t=function(){if(ry)return ny;function e(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return ry=1,ny=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(e){
672
672
  if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),n),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},
673
673
  e.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},e.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t},ny}(),e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t))
@@ -694,7 +694,7 @@ logo:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding
694
694
  ;const n=0===this._store.allGroups().length,r=this._store.getDefault("focusedGroup");this._store.loadGroups(e),n&&(t&&e.some((e=>e.id===t))?this.focus(t):r&&e.some((e=>e.id===r))&&this.focus(r))}_fetchGroup(e){return this._api.group.read({id:e,expand:Ly})}async _loadGroupsForUserAndDocument(){const e=()=>function(e,t){const n=t(e);return null!==n?Promise.resolve(n):new Promise((n=>{const r=e.subscribe((()=>{const o=t(e);null!==o&&(r(),n(o))}))}))}(this._store,(()=>this._mainURI()));let t=null;"sidebar"===this._store.route()&&(t=await e()),this._setupAutoReload();const n=this._store.directLinkedAnnotationId();let r=null;n&&(r=this._api.annotation.get({id:n}).catch((()=>null)));const o=this._store.directLinkedGroupId();let i=null;o&&(i=this._fetchGroup(o).then((e=>(this._store.clearDirectLinkedGroupFetchFailed(),e))).catch((()=>(this._store.setDirectLinkedGroupFetchFailed(),null))));const a={expand:Ly},s=this._serviceConfig?.authority;s&&(a.authority=s),t&&(a.document_uri=t)
695
695
  ;const[l,c,u,d,h]=await Promise.all([this._api.profile.groups.read({expand:Ly}),this._api.groups.list(a),this._auth.getAccessToken(),r,i]);h&&!c.some((e=>e.id===h.id))&&c.push(h);let m=null;if(d){m=d.group;const e=l.concat(c).find((e=>e.id===d.group));if(!e)try{const e=await this._fetchGroup(d.group);c.push(e)}catch{this._toastMessenger.error("Unable to fetch group for linked annotation")}}const p=null!==u,f=await this._filterGroups(Vv(l,c,t,this._settings),p,m,o),g=m||o||null;return this._addGroupsToStore(f,g),f}async _loadServiceSpecifiedGroups(e){const t=await this._api.profile.groups.read({expand:Ly});let n=null;const r=async e=>{try{return await this._fetchGroup(e)}catch(e){return n=e,null}},o=await Promise.all(e.map((e=>t.find((t=>t.id===e||t.groupid===e))||r(e)))),i=o.filter((e=>null!==e)),a=this._store.directLinkedGroupId();return this._addGroupsToStore(i,a),n&&this._toastMessenger.error(`Unable to fetch groups: ${n.message}`,{autoDismiss:!1}),i}async load(){const e=this._serviceConfig?.groups
696
696
  ;if(Array.isArray(e)||(t=e,"function"==typeof t?.then)){let t=[];try{t=await e}catch(e){this._toastMessenger.error(`Unable to fetch group configuration: ${e.message}`)}return this._loadServiceSpecifiedGroups(t)}return this._loadGroupsForUserAndDocument();var t}focus(e){const t=this._store.focusedGroupId();this._store.focusGroup(e);const n=this._store.focusedGroupId();if(t!==n&&null!==t&&n){this._focusedMembersController?.abort();const e=this._store.newAnnotations().filter((e=>!gi(e))).map((e=>({...e,group:n})));e.length&&this._store.addAnnotations(e),this._store.setDefault("focusedGroup",n)}}leave(e){return this._api.group.member.delete({pubid:e,userid:"me"})}async loadFocusedGroupMembers(){const e=this._store.focusedGroupId();if(!e)return;this._focusedMembersController?.abort(),this._focusedMembersController=new AbortController;const{signal:t}=this._focusedMembersController;this._store.startLoadingFocusedGroupMembers();const n=await this._fetchAllMembers(e,t)
697
- ;this._store.loadFocusedGroupMembers(t?.aborted?null:n)}async _fetchAllMembers(e,t){const n=await this._fetchMembers({groupId:e,signal:t}),r=Math.min(Math.ceil(n.meta.page.total/100),10);let o=n.data;for(let n=2;n<=r&&!t?.aborted;n++){const r=await this._fetchMembers({groupId:e,page:n,signal:t});o=o.concat(r.data)}return o}_fetchMembers({groupId:e,page:t=1,signal:n}){return this._api.group.members.read({pubid:e,"page[number]":t,"page[size]":100},void 0,n)}}Oy.$inject=["store","api","auth","settings","toastMessenger"];const Ry="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Py=globalThis,Dy="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Fy="9.3.0";function By(){return Hy(Py),Py}function Hy(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Fy,t[Fy]=t[Fy]||{}}function jy(e,t,n=Py){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Fy]=r[Fy]||{};return o[e]||(o[e]=t())}const $y=["debug","info","warn","error","log","assert","trace"],qy={};function Uy(e){if(!("console"in Py))return e()
697
+ ;this._store.loadFocusedGroupMembers(t?.aborted?null:n)}async _fetchAllMembers(e,t){const n=await this._fetchMembers({groupId:e,signal:t}),r=Math.min(Math.ceil(n.meta.page.total/100),10);let o=n.data;for(let n=2;n<=r&&!t?.aborted;n++){const r=await this._fetchMembers({groupId:e,page:n,signal:t});o=o.concat(r.data)}return o}_fetchMembers({groupId:e,page:t=1,signal:n}){return this._api.group.members.read({pubid:e,"page[number]":t,"page[size]":100},void 0,n)}}Oy.$inject=["store","api","auth","settings","toastMessenger"];const Ry="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Py=globalThis,Dy="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Fy="9.5.0";function By(){return Hy(Py),Py}function Hy(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Fy,t[Fy]=t[Fy]||{}}function jy(e,t,n=Py){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Fy]=r[Fy]||{};return o[e]||(o[e]=t())}const $y=["debug","info","warn","error","log","assert","trace"],qy={};function Uy(e){if(!("console"in Py))return e()
698
698
  ;const t=Py.console,n={},r=Object.keys(qy);r.forEach((e=>{const r=qy[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const Gy=jy("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Dy?$y.forEach((n=>{t[n]=(...t)=>{e&&Uy((()=>{Py.console[n](`Sentry Logger [${n}]:`,...t)}))}})):$y.forEach((e=>{t[e]=()=>{}})),t})),Vy=50,Wy="?",Ky=/\(error: (.*)\)/,Yy=/captureMessage|captureException/;function Xy(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const o=[],i=e.split("\n");for(let e=n;e<i.length;e++){const n=i[e];if(n.length>1024)continue;const a=Ky.test(n)?n.replace(Ky,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){o.push(t);break}}if(o.length>=Vy+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(Zy(t).function||"")&&t.pop();t.reverse(),Yy.test(Zy(t).function||"")&&(t.pop(),Yy.test(Zy(t).function||"")&&t.pop());return t.slice(0,Vy).map((e=>({...e,
699
699
  filename:e.filename||Zy(t).filename,function:e.function||Wy})))}(o.slice(r))}}function Zy(e){return e[e.length-1]||{}}const Jy="<anonymous>";function Qy(e){try{return e&&"function"==typeof e&&e.name||Jy}catch(e){return Jy}}function e_(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const t_={},n_={};function r_(e,t){t_[e]=t_[e]||[],t_[e].push(t)}function o_(e,t){if(!n_[e]){n_[e]=!0;try{t()}catch(t){Dy&&Gy.error(`Error while instrumenting ${e}`,t)}}}function i_(e,t){const n=e&&t_[e];if(n)for(const r of n)try{r(t)}catch(t){Dy&&Gy.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Qy(r)}\nError:`,t)}}let a_=null;function s_(){a_=Py.onerror,Py.onerror=function(e,t,n,r,o){return i_("error",{column:r,error:o,line:n,msg:e,url:t}),!!a_&&a_.apply(this,arguments)},Py.onerror.__SENTRY_INSTRUMENTED__=!0}let l_=null;function c_(){l_=Py.onunhandledrejection,Py.onunhandledrejection=function(e){
700
700
  return i_("unhandledrejection",e),!l_||l_.apply(this,arguments)},Py.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const u_=Object.prototype.toString;function d_(e){switch(u_.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return w_(e,Error)}}function h_(e,t){return u_.call(e)===`[object ${t}]`}function m_(e){return h_(e,"ErrorEvent")}function p_(e){return h_(e,"DOMError")}function f_(e){return h_(e,"String")}function g_(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function v_(e){return null===e||g_(e)||"object"!=typeof e&&"function"!=typeof e}function b_(e){return h_(e,"Object")}function y_(e){return"undefined"!=typeof Event&&w_(e,Event)}function __(e){return Boolean(e?.then&&"function"==typeof e.then)}function w_(e,t){try{return e instanceof t}catch(e){return!1}}function x_(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const k_=Py,N_=80
@@ -717,31 +717,32 @@ return"number"==typeof e?Bw(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?
717
717
  const Gw="production",Vw="_frozenDsc";function Ww(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=B_({environment:n.environment||Gw,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Kw(e){const t=vw();if(!t)return{};const n=qw(e),r=Hw(n),o=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??o[_w];function s(e){return"number"!=typeof a&&"string"!=typeof a||(e.sample_rate=`${a}`),e}const l=n[Vw];if(l)return s(l);const c=i?.get("sentry.dsc"),u=c&&zw(c);if(u)return s(u);const d=Ww(e.spanContext().traceId,t),h=o[yw],m=r.description;return"url"!==h&&m&&(d.transaction=m),function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||vw()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}()&&(d.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return t===Ow}(n)),d.sample_rand=i?.get("sentry.sample_rand")??Cw(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit("createDsc",d,n),d}
718
718
  const Yw=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xw(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function Zw(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Jw(e){const t="string"==typeof e?function(e){const t=Yw.exec(e);if(!t)return void Uy((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,o="",i="",a="",s=""]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return Zw({host:i,pass:o,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):Zw(e);if(t&&function(e){if(!Dy)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(Gy.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){
719
719
  return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Gy.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Gy.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Gy.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Qw(e,t=100,n=1/0){try{return tx("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ex(e,t=3,n=102400){const r=Qw(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?ex(e,t-1,n):r;var o}function tx(e,t,n=1/0,r=1/0,o=function(){const e=new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[i,a]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const s=function(e,t){try{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]"
720
- ;if("undefined"!=typeof document&&t===document)return"[Document]";if(x_(t))return"[VueViewModel]";if(b_(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Qy(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return s.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return tx("",c.toJSON(),l-1,r,o)}catch(e){}const u=Array.isArray(t)?[]:{}
721
- ;let d=0;const h=P_(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=tx(e,t,l-1,r,o),d++}return a(t),u}function nx(e,t=[]){return[e,t]}function rx(e,t){const[n,r]=e;return[n,[...r,t]]}function ox(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function ix(e){const t=Hy(Py);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function ax(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[ix(r),e]:r.push("string"==typeof e?ix(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Qw(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function sx(e){const t="string"==typeof e.data?ix(e.data):e.data
722
- ;return[B_({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const lx={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security"};function cx(e){return lx[e]}function ux(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function dx(e,t,n,r){const o=ux(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n?.sdk);const a=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,
723
- sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xw(r)},...o&&{trace:B_({...o})}}}(e,o,r,t);delete e.sdkProcessingMetadata;return nx(a,[[{type:i},e]])}function hx(e,t,n,r=0){return new Q_(((o,i)=>{const a=e[r];if(null===t||"function"!=typeof a)o(t);else{const s=a({...t},n);Ry&&a.id&&null===s&&Gy.log(`Event processor "${a.id}" dropped event`),__(s)?s.then((t=>hx(e,t,n,r+1).then(o))).then(null,i):hx(e,s,n,r+1).then(o).then(null,i)}}))}let mx,px,fx;function gx(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t,l=B_(n);Object.keys(l).length&&(e.extra={...l,...e.extra});const c=B_(r);Object.keys(c).length&&(e.tags={...c,...e.tags});const u=B_(o);Object.keys(u).length&&(e.user={...u,...e.user});const d=B_(i);Object.keys(d).length&&(e.contexts={...d,...e.contexts});a&&(e.level=a);s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Pw(t),...e.contexts},
724
- e.sdkProcessingMetadata={dynamicSamplingContext:Kw(t),...e.sdkProcessingMetadata};const n=qw(t),r=Hw(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}function vx(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:m,span:p}=t;bx(e,"extra",n),bx(e,"tags",r),bx(e,"user",o),bx(e,"contexts",i),e.sdkProcessingMetadata=ow(e.sdkProcessingMetadata,s,2),a&&(e.level=a),m&&(e.transactionName=m),p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),
725
- u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function bx(e,t,n){e[t]=ow(e[t],n,1)}function yx(e,t,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||U_(),timestamp:t.timestamp||$_()},c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||n||Gw,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);e.message&&(e.message=T_(e.message,i));const a=e.exception?.values?.[0];a?.value&&(a.value=T_(a.value,i));const s=e.request;s?.url&&(s.url=T_(s.url,i))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=Py._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return fx&&n.length===px||(px=n.length,
726
- fx=n.reduce(((n,r)=>{mx||(mx={});const o=mx[r];if(o)n[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const i=o[e],a=i?.filename,s=t[r];if(a&&s){n[a]=s,mx[r]=[a,s];break}}}return n}),{})),fx}(t);e.exception?.values?.forEach((e=>{e.stacktrace?.frames?.forEach((e=>{e.filename&&(e.debug_id=n[e.filename])}))}))}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new lw;return n.update(t),n}(r,n.captureContext);n.mechanism&&K_(l,n.mechanism);const d=o?o.getEventProcessors():[],h=jy("globalScope",(()=>new lw)).getScopeData();if(i){vx(h,i.getScopeData())}if(u){vx(h,u.getScopeData())}const m=[...n.attachments||[],...h.attachments];m.length&&(n.attachments=m),gx(l,h);return hx([...d,...h.eventProcessors],l,n).then((e=>(e&&function(e){const t={};if(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)}))})),0===Object.keys(t).length)return
727
- ;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Qw(e.data,t,n)}})))},...e.user&&{user:Qw(e.user,t,n)},...e.contexts&&{contexts:Qw(e.contexts,t,n)},...e.extra&&{extra:Qw(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Qw(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Qw(e.data,t,n)}}))));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Qw(e.contexts.flags,3,n));return r}(e,a,s):e)))}function _x(e){if(e)return function(e){return e instanceof lw||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>wx.includes(e)))}(e)?{captureContext:e}:e}
728
- const wx=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function xx(e,t){return fw().captureException(e,_x(t))}function kx(e,t){return fw().captureEvent(e,t)}function Nx(e,t){gw().setExtra(e,t)}function Sx(e){const t=gw(),n=fw(),{userAgent:r}=Py.navigator||{},o=ew({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&tw(i,{status:"exited"}),Ax(),t.setSession(o),o}function Ax(){const e=gw(),t=fw().getSession()||e.getSession();t&&function(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),tw(e,n)}(t),Ex(),e.setSession()}function Ex(){const e=gw(),t=vw(),n=e.getSession();n&&t&&t.captureSession(n)}function Tx(e=!1){e?Ax():Ex()}const Cx="7";function Mx(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:Cx}
729
- ;return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Ix=[];function zx(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r)}function Lx(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Ox(e,t,n){if(n[t.name])Ry&&Gy.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Ix.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Ix.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){
730
- const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}Ry&&Gy.log(`Integration installed: ${t.name}`)}}class Rx extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}function Px(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(e){}return t}const Dx="Not capturing exception because it's already been captured.",Fx="Discarded session because of missing or non-string release";class Bx{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Jw(e.dsn):Ry&&Gy.warn("No DSN provided, client will not send events."),this._dsn){const t=Mx(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}
731
- }captureException(e,t,n){const r=U_();if(Y_(e))return Ry&&Gy.log(Dx),r;const o={event_id:r,...t};return this._process(this.eventFromException(e,o).then((e=>this._captureEvent(e,o,n)))),o.event_id}captureMessage(e,t,n,r){const o={event_id:U_(),...n},i=g_(e)?e:String(e),a=v_(e)?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(a.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,n){const r=U_();if(t?.originalException&&Y_(t.originalException))return Ry&&Gy.log(Dx),r;const o={event_id:r,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,s=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||n,s)),o.event_id}captureSession(e){this.sendSession(e),tw(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),
732
- this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Z_(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Ox(this,e,this._integrations),t||Lx(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=dx(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=rx(n,sx(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const{release:t,environment:n=Gw}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(Ry&&Gy.warn(Fx));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{
733
- if(!e.release&&!t)return void(Ry&&Gy.warn(Fx));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=ux(n);return nx({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Xw(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;Ry&&Gy.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(Ry&&Gy.error("Error while sending envelope:",e),e))):(Ry&&Gy.error("Transport disabled"),Z_({}))}_setupIntegrations(){
734
- const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Ox(e,t,n)})),n}(this,e),Lx(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&(tw(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Q_((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i?.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),yx(o,e,t,n,this,r).then((e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:bw(n),
735
- ...e.contexts};const r=function(e,t){const n=t.getPropagationContext();return n.dsc||Ww(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n=fw(),r=gw()){return Ry&&Hx(e)&&Gy.log(`Captured error event \`${Px(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then((e=>e.event_id),(e=>{Ry&&(e instanceof Rx&&"log"===e.logLevel?Gy.log(e.message):Gy.warn(e))}))}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:i}=o,a=jx(e),s=Hx(e),l=e.type||"error",c=`before send for type \`${l}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i);if(s&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),J_(new Rx(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d="replay_event"===l?"replay":l
736
- ;return this._prepareEvent(e,t,n,r).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),new Rx("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a}=t;let s=n;if(Hx(s)&&o)return o(s,r);if(jx(s)){if(a){const e=a(function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:a,op:s}=e.contexts?.trace??{};return B_({data:a??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[kw],exclusive_time:a?.[Nw],measurements:e.measurements,is_segment:!0})}(s));if(e?s=ow(n,B_({type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,
737
- ...l.profile_id&&{[kw]:l.profile_id},...l.exclusive_time&&{[Nw]:l.exclusive_time}}}},measurements:l.measurements})):Uw(),s.spans){const e=[];for(const t of s.spans){const n=a(t);n?e.push(n):(Uw(),e.push(t))}s.spans=e}}if(i){if(s.spans){const e=s.spans.length;s.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(s,r)}}var l;return s}(0,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(__(e))return e.then((e=>{if(!b_(e)&&null!==e)throw new Rx(n);return e}),(e=>{throw new Rx(`${t} rejected with ${e}`)}));if(!b_(e)&&null!==e)throw new Rx(n);return e}(n,c)})).then((o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),a){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new Rx(`${c} returned \`null\`, will not send event.`,"log")}const i=n.getSession()||r.getSession();if(s&&i&&this._updateSessionFromEvent(i,o),a){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0)
738
- ;e>0&&this.recordDroppedEvent("before_send","span",e)}const l=o.transaction_info;if(a&&l&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...l,source:e}}return this.sendEvent(o,t),o})).then(null,(e=>{if(e instanceof Rx)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Rx(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){Ry&&Gy.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Ry&&Gy.log("No outcomes to send"));if(!this._dsn)return void(Ry&&Gy.log("No dsn provided, will not send outcomes"));Ry&&Gy.log("Sending outcomes:",e);const t=(n=e,
739
- nx((r=this._options.tunnel&&Xw(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:$_(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Hx(e){return void 0===e.type}function jx(e){return"transaction"===e.type}function $x(e,t){!0===t.debug&&(Ry?Gy.enable():Uy((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));fw().update(t.initialScope);const n=new e(t);return function(e){fw().setClient(e)}(n),n.init(),n}function qx(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return J_(new Rx("Not adding Promise because buffer limit was reached."));const o=r();return-1===t.indexOf(o)&&t.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new Q_(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Z_(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}
740
- const Ux=6e4;function Gx(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Ux:r-t}(a,r):429===t&&(o.all=r+6e4);return o}const Vx=64;function Wx(e,t,n=qx(e.bufferSize||Vx)){let r={};return{send:function(o){const i=[];if(ox(o,((t,n)=>{const o=cx(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)})),0===i.length)return Z_({});const a=nx(o[0],i),s=t=>{ox(a,((n,r)=>{e.recordDroppedEvent(t,cx(r))}))};return n.add((()=>t({body:ax(a)
741
- }).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Ry&&Gy.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Gx(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof Rx)return Ry&&Gy.error("Skipped sending event because buffer is full."),s("queue_overflow"),Z_({});throw e}))},flush:e=>n.drain(e)}}function Kx(e){void 0===e.user?.ip_address&&(e.user={...e.user,ip_address:"{{auto}}"})}function Yx(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Xx=100;function Zx(e,t){const n=vw(),r=gw();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Xx}=n.getOptions();if(i<=0)return;const a={timestamp:$_(),...e},s=o?Uy((()=>o(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}let Jx;const Qx=new WeakMap,ek=()=>({name:"FunctionToString",setupOnce(){Jx=Function.prototype.toString;try{
742
- Function.prototype.toString=function(...e){const t=R_(this),n=Qx.has(vw())&&void 0!==t?t:this;return Jx.apply(n,e)}}catch{}},setup(e){Qx.set(e,!0)}}),tk=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],nk=(e={})=>({name:"EventFilters",processEvent(t,n,r){const o=r.getOptions(),i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],
743
- ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:tk],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return Ry&&Gy.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${V_(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return Px(e).some((e=>I_(e,t)))}(e,t.ignoreErrors))return Ry&&Gy.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${V_(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return Ry&&Gy.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${V_(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1
744
- ;const n=e.transaction;return!!n&&I_(n,t)}(e,t.ignoreTransactions))return Ry&&Gy.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${V_(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=ok(e);return!!n&&I_(n,t)}(e,t.denyUrls))return Ry&&Gy.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${V_(e)}.\nUrl: ${ok(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=ok(e);return!n||I_(n,t)}(e,t.allowUrls))return Ry&&Gy.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${V_(e)}.\nUrl: ${ok(e)}`),!0;return!1}(t,i)?null:t}}),rk=(e={})=>({...nk(e),name:"InboundFilters"});function ok(e){try{const t=[...(e.exception?.values??[]).reverse()]?.find((e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length)),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(t){
720
+ ;if("undefined"!=typeof document&&t===document)return"[Document]";if(x_(t))return"[VueViewModel]";if(b_(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${Qy(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return s.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return tx("",c.toJSON(),l-1,r,o)}catch(e){}
721
+ const u=Array.isArray(t)?[]:{};let d=0;const h=P_(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=tx(e,t,l-1,r,o),d++}return a(t),u}function nx(e,t=[]){return[e,t]}function rx(e,t){const[n,r]=e;return[n,[...r,t]]}function ox(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function ix(e){const t=Hy(Py);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function ax(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[ix(r),e]:r.push("string"==typeof e?ix(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Qw(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function sx(e){
722
+ const t="string"==typeof e.data?ix(e.data):e.data;return[B_({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const lx={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",otel_log:"log_item"};function cx(e){return lx[e]}function ux(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function dx(e,t,n,r){const o=ux(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n?.sdk);const a=function(e,t,n,r){
723
+ const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xw(r)},...o&&{trace:B_({...o})}}}(e,o,r,t);delete e.sdkProcessingMetadata;return nx(a,[[{type:i},e]])}function hx(e,t,n,r=0){return new Q_(((o,i)=>{const a=e[r];if(null===t||"function"!=typeof a)o(t);else{const s=a({...t},n);Ry&&a.id&&null===s&&Gy.log(`Event processor "${a.id}" dropped event`),__(s)?s.then((t=>hx(e,t,n,r+1).then(o))).then(null,i):hx(e,s,n,r+1).then(o).then(null,i)}}))}let mx,px,fx;function gx(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t,l=B_(n);Object.keys(l).length&&(e.extra={...l,...e.extra});const c=B_(r);Object.keys(c).length&&(e.tags={...c,...e.tags});const u=B_(o);Object.keys(u).length&&(e.user={...u,...e.user});const d=B_(i);Object.keys(d).length&&(e.contexts={...d,...e.contexts});a&&(e.level=a)
724
+ ;s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Pw(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Kw(t),...e.sdkProcessingMetadata};const n=qw(t),r=Hw(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}function vx(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:m,span:p}=t;bx(e,"extra",n),bx(e,"tags",r),bx(e,"user",o),bx(e,"contexts",i),e.sdkProcessingMetadata=ow(e.sdkProcessingMetadata,s,2),a&&(e.level=a),m&&(e.transactionName=m),
725
+ p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function bx(e,t,n){e[t]=ow(e[t],n,1)}function yx(e,t,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||U_(),timestamp:t.timestamp||$_()},c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||n||Gw,!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);e.message&&(e.message=T_(e.message,i));const a=e.exception?.values?.[0];a?.value&&(a.value=T_(a.value,i));const s=e.request;s?.url&&(s.url=T_(s.url,i))}(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){
726
+ const t=Py._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return fx&&n.length===px||(px=n.length,fx=n.reduce(((n,r)=>{mx||(mx={});const o=mx[r];if(o)n[o[0]]=o[1];else{const o=e(r);for(let e=o.length-1;e>=0;e--){const i=o[e],a=i?.filename,s=t[r];if(a&&s){n[a]=s,mx[r]=[a,s];break}}}return n}),{})),fx}(t);e.exception?.values?.forEach((e=>{e.stacktrace?.frames?.forEach((e=>{e.filename&&(e.debug_id=n[e.filename])}))}))}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new lw;return n.update(t),n}(r,n.captureContext);n.mechanism&&K_(l,n.mechanism);const d=o?o.getEventProcessors():[],h=jy("globalScope",(()=>new lw)).getScopeData();if(i){vx(h,i.getScopeData())}if(u){vx(h,u.getScopeData())}const m=[...n.attachments||[],...h.attachments];m.length&&(n.attachments=m),gx(l,h);return hx([...d,...h.eventProcessors],l,n).then((e=>(e&&function(e){const t={};if(e.exception?.values?.forEach((e=>{e.stacktrace?.frames?.forEach((e=>{
727
+ 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)}))})),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Qw(e.data,t,n)}})))},...e.user&&{user:Qw(e.user,t,n)},...e.contexts&&{contexts:Qw(e.contexts,t,n)},...e.extra&&{extra:Qw(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Qw(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Qw(e.data,t,n)}}))));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Qw(e.contexts.flags,3,n));return r}(e,a,s):e)))}function _x(e){if(e)return function(e){
728
+ return e instanceof lw||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>wx.includes(e)))}(e)?{captureContext:e}:e}const wx=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function xx(e,t){return fw().captureException(e,_x(t))}function kx(e,t){return fw().captureEvent(e,t)}function Nx(e,t){gw().setExtra(e,t)}function Sx(e){const t=gw(),n=fw(),{userAgent:r}=Py.navigator||{},o=ew({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&tw(i,{status:"exited"}),Ax(),t.setSession(o),o}function Ax(){const e=gw(),t=fw().getSession()||e.getSession();t&&function(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),tw(e,n)}(t),Ex(),e.setSession()}function Ex(){const e=gw(),t=vw(),n=e.getSession();n&&t&&t.captureSession(n)}function Tx(e=!1){e?Ax():Ex()}const Cx="7";function Mx(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:""
729
+ ;return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:Cx};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Ix=[];function zx(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r)}function Lx(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Ox(e,t,n){if(n[t.name])Ry&&Gy.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Ix.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Ix.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),
730
+ "function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}Ry&&Gy.log(`Integration installed: ${t.name}`)}}class Rx extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}function Px(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch(e){}return t}const Dx="Not capturing exception because it's already been captured.",Fx="Discarded session because of missing or non-string release";class Bx{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Jw(e.dsn):Ry&&Gy.warn("No DSN provided, client will not send events."),this._dsn){
731
+ const t=Mx(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){const r=U_();if(Y_(e))return Ry&&Gy.log(Dx),r;const o={event_id:r,...t};return this._process(this.eventFromException(e,o).then((e=>this._captureEvent(e,o,n)))),o.event_id}captureMessage(e,t,n,r){const o={event_id:U_(),...n},i=g_(e)?e:String(e),a=v_(e)?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(a.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,n){const r=U_();if(t?.originalException&&Y_(t.originalException))return Ry&&Gy.log(Dx),r;const o={event_id:r,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,s=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||n,s)),o.event_id}captureSession(e){this.sendSession(e),tw(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){
732
+ return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Z_(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Ox(this,e,this._integrations),t||Lx(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=dx(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=rx(n,sx(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const{release:t,environment:n=Gw}=this._options;if("aggregates"in e){
733
+ const r=e.attrs||{};if(!r.release&&!t)return void(Ry&&Gy.warn(Fx));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(Ry&&Gy.warn(Fx));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=ux(n);return nx({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Xw(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;Ry&&Gy.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),
734
+ this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(Ry&&Gy.error("Error while sending envelope:",e),e))):(Ry&&Gy.error("Transport disabled"),Z_({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Ox(e,t,n)})),n}(this,e),Lx(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(!1===t?.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&(tw(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Q_((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),i=Object.keys(this._integrations)
735
+ ;return!t.integrations&&i?.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),yx(o,e,t,n,this,r).then((e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:bw(n),...e.contexts};const r=function(e,t){const n=t.getPropagationContext();return n.dsc||Ww(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n=fw(),r=gw()){return Ry&&Hx(e)&&Gy.log(`Captured error event \`${Px(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then((e=>e.event_id),(e=>{Ry&&(e instanceof Rx&&"log"===e.logLevel?Gy.log(e.message):Gy.warn(e))}))}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:i}=o,a=jx(e),s=Hx(e),l=e.type||"error",c=`before send for type \`${l}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i)
736
+ ;if(s&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),J_(new Rx(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d="replay_event"===l?"replay":l;return this._prepareEvent(e,t,n,r).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",d),new Rx("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a}=t;let s=n;if(Hx(s)&&o)return o(s,r);if(jx(s)){if(a){const e=a(function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:a,op:s}=e.contexts?.trace??{};return B_({data:a??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[kw],exclusive_time:a?.[Nw],measurements:e.measurements,is_segment:!0})}(s));if(e?s=ow(n,B_({
737
+ type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[kw]:l.profile_id},...l.exclusive_time&&{[Nw]:l.exclusive_time}}}},measurements:l.measurements})):Uw(),s.spans){const e=[];for(const t of s.spans){const n=a(t);n?e.push(n):(Uw(),e.push(t))}s.spans=e}}if(i){if(s.spans){const e=s.spans.length;s.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(s,r)}}var l;return s}(0,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(__(e))return e.then((e=>{if(!b_(e)&&null!==e)throw new Rx(n);return e}),(e=>{throw new Rx(`${t} rejected with ${e}`)}));if(!b_(e)&&null!==e)throw new Rx(n);return e}(n,c)})).then((o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),a){const t=1+(e.spans||[]).length
738
+ ;this.recordDroppedEvent("before_send","span",t)}throw new Rx(`${c} returned \`null\`, will not send event.`,"log")}const i=n.getSession()||r.getSession();if(s&&i&&this._updateSessionFromEvent(i,o),a){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const l=o.transaction_info;if(a&&l&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...l,source:e}}return this.sendEvent(o,t),o})).then(null,(e=>{if(e instanceof Rx)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Rx(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}
739
+ _flushOutcomes(){Ry&&Gy.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Ry&&Gy.log("No outcomes to send"));if(!this._dsn)return void(Ry&&Gy.log("No dsn provided, will not send outcomes"));Ry&&Gy.log("Sending outcomes:",e);const t=(n=e,nx((r=this._options.tunnel&&Xw(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:$_(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Hx(e){return void 0===e.type}function jx(e){return"transaction"===e.type}function $x(e,t){!0===t.debug&&(Ry?Gy.enable():Uy((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));fw().update(t.initialScope);const n=new e(t);return function(e){fw().setClient(e)}(n),n.init(),n}function qx(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return J_(new Rx("Not adding Promise because buffer limit was reached."));const o=r()
740
+ ;return-1===t.indexOf(o)&&t.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new Q_(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Z_(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}const Ux=6e4;function Gx(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Ux:r-t}(a,r):429===t&&(o.all=r+6e4);return o}const Vx=64;function Wx(e,t,n=qx(e.bufferSize||Vx)){let r={};return{send:function(o){const i=[];if(ox(o,((t,n)=>{const o=cx(n);!function(e,t,n=Date.now()){return function(e,t){
741
+ return e[t]||e.all||0}(e,t)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)})),0===i.length)return Z_({});const a=nx(o[0],i),s=t=>{ox(a,((n,r)=>{e.recordDroppedEvent(t,cx(r))}))};return n.add((()=>t({body:ax(a)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Ry&&Gy.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Gx(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof Rx)return Ry&&Gy.error("Skipped sending event because buffer is full."),s("queue_overflow"),Z_({});throw e}))},flush:e=>n.drain(e)}}function Kx(e){void 0===e.user?.ip_address&&(e.user={...e.user,ip_address:"{{auto}}"})}function Yx(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}const Xx=100;function Zx(e,t){const n=vw(),r=gw();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Xx}=n.getOptions();if(i<=0)return;const a={timestamp:$_(),...e
742
+ },s=o?Uy((()=>o(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}let Jx;const Qx=new WeakMap,ek=()=>({name:"FunctionToString",setupOnce(){Jx=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=R_(this),n=Qx.has(vw())&&void 0!==t?t:this;return Jx.apply(n,e)}}catch{}},setup(e){Qx.set(e,!0)}
743
+ }),tk=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],nk=(e={})=>({name:"EventFilters",processEvent(t,n,r){const o=r.getOptions(),i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:tk],
744
+ ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return Ry&&Gy.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${V_(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return Px(e).some((e=>I_(e,t)))}(e,t.ignoreErrors))return Ry&&Gy.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${V_(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return Ry&&Gy.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${V_(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&I_(n,t)
745
+ }(e,t.ignoreTransactions))return Ry&&Gy.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${V_(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=ok(e);return!!n&&I_(n,t)}(e,t.denyUrls))return Ry&&Gy.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${V_(e)}.\nUrl: ${ok(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=ok(e);return!n||I_(n,t)}(e,t.allowUrls))return Ry&&Gy.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${V_(e)}.\nUrl: ${ok(e)}`),!0;return!1}(t,i)?null:t}}),rk=(e={})=>({...nk(e),name:"InboundFilters"});function ok(e){try{const t=[...e.exception?.values??[]].reverse().find((e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length)),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(t){
745
746
  return Ry&&Gy.error(`Cannot extract url for event ${V_(e)}`),null}}function ik(e,t,n=250,r,o,i,a){if(!i.exception?.values||!a||!w_(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var l,c;s&&(i.exception.values=(l=ak(e,t,o,a.originalException,r,i.exception.values,s,0),c=n,l.map((e=>(e.value&&(e.value=T_(e.value,c)),e)))))}function ak(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let l=[...i];if(w_(r[o],Error)){sk(a,s);const i=e(t,r[o]),c=l.length;lk(i,o,c,s),l=ak(e,t,n,r[o],o,[i,...l],i,c)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(w_(r,Error)){sk(a,s);const c=e(t,r),u=l.length;lk(c,`errors[${i}]`,u,s),l=ak(e,t,n,r,o,[c,...l],c,u)}})),l}function sk(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function lk(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",
746
747
  source:t,exception_id:n,parent_id:r}}function ck(){"console"in Py&&$y.forEach((function(e){e in Py.console&&z_(Py.console,e,(function(t){return qy[e]=t,function(...t){i_("console",{args:t,level:e});const n=qy[e];n?.apply(Py.console,t)}}))}))}function uk(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const dk=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!mk(e,t))return!1;if(!hk(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=pk(t),r=pk(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!mk(e,t))return!1;if(!hk(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return Ry&&Gy.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function hk(e,t){let n=e_(e),r=e_(t);if(!n&&!r)return!0
747
748
  ;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function mk(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function pk(e){return e.exception?.values&&e.exception.values[0]}function fk(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gk(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const vk=Py;function bk(){if(!("fetch"in vk))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function yk(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function _k(e,t){
@@ -752,14 +753,14 @@ if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e
752
753
  synthetic:!0}),i}return i=Pk(e,t,n,r),W_(i,`${t}`),K_(i,{synthetic:!0}),i}function Pk(e,t,n,r){const o={};if(r&&n){const r=Mk(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),K_(o,{synthetic:!0})}if(g_(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Dk(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(P_(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return T_(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:T_(r,t)}return""}(e),r=t?"promise rejection":"exception";if(m_(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(y_(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Fk extends Bx{
753
754
  constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:Fy}))),version:Fy}),e._metadata=o}(t,"browser",["browser"],kk.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&kk.document&&kk.document.addEventListener("visibilitychange",(()=>{"hidden"===kk.document.visibilityState&&this._flushOutcomes()})),this._options.sendDefaultPii&&(this.on("postprocessEvent",Kx),this.on("beforeSendSession",Yx))}eventFromException(e,t){return function(e,t,n,r){const o=Rk(e,t,n?.syntheticException||void 0,r);return K_(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Z_(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=Pk(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Z_(i)
754
755
  }(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const Bk="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Hk=Py,jk=1e3;let $k,qk,Uk,Gk;function Vk(){if(!Hk.document)return;const e=i_.bind(null,"dom"),t=Wk(e,!0);Hk.document.addEventListener("click",t,!1),Hk.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Hk,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(z_(r,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=Wk(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch(e){}return t.call(this,n,r,o)}})),z_(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t]
755
- ;o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.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)}})))}))}function Wk(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;L_(n,"_sentryCaptured",!0),r&&!r._sentryId&&L_(r,"_sentryId",U_());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==qk)return!1;try{if(!e.target||e.target._sentryId!==Uk)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),qk=n.type,Uk=r?r._sentryId:void 0}clearTimeout($k),$k=Hk.setTimeout((()=>{Uk=void 0,qk=void 0}),jk)}}function Kk(e){const t="history";r_(t,e),o_(t,Yk)}function Yk(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Gk,t=String(n);if(Gk=t,e===t)return
756
- ;i_("history",{from:e,to:t})}return e.apply(this,t)}}Hk.addEventListener("popstate",(()=>{const e=Hk.location.href,t=Gk;if(Gk=e,t===e)return;i_("history",{from:t,to:e})})),"history"in vk&&(z_(Hk.history,"pushState",e),z_(Hk.history,"replaceState",e))}const Xk={};function Zk(e){Xk[e]=void 0}const Jk="__sentry_xhr_v3__";function Qk(){if(!Hk.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*q_(),i=f_(n[0])?n[0].toUpperCase():void 0,a=function(e){if(f_(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!i||!a)return e.apply(t,n);t[Jk]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[Jk];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}i_("xhr",{endTimestamp:1e3*q_(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),
757
- e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,i=t[Jk];return i&&f_(r)&&f_(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Jk];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return i_("xhr",{startTimestamp:1e3*q_(),xhr:t}),e.apply(t,n)}})}function eN(e,t=function(e){const t=Xk[e];if(t)return t;let n=Hk[e];if(yk(n))return Xk[e]=n.bind(Hk);const r=Hk.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){Bk&&Gy.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Xk[e]=n.bind(Hk):n}("fetch")){let n=0,r=0;return Wx(e,(function(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,
758
- ...e.fetchOptions};if(!t)return Zk("fetch"),J_("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=i,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 Zk("fetch"),n-=i,r--,J_(e)}}))}function tN(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?Wy:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const nN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,rN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oN=/\((\S*)(?::(\d+))(?::(\d+))\)/,iN=[30,e=>{const t=nN.exec(e);if(t){const[,e,n,r]=t;return tN(e,Wy,+n,+r)}const n=rN.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=oN.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=uN(n[1]||Wy,n[2]);return tN(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}
759
- }],aN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lN=[50,e=>{const t=aN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=sN.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]||Wy;return[n,e]=uN(n,e),tN(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],cN=Xy(...[iN,lN]),uN=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Wy,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},dN="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,hN=1024,mN=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";r_(t,e),o_(t,ck)}(function(e){return function(t){if(vw()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},
760
- level:uk(t.level),message:C_(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${C_(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Zx(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(vw()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>hN&&(dN&&Gy.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=hN),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=S_(t,{keyAttrs:i,maxStringLength:a}),o=function(e){if(!k_.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(e){r="<unknown>"}
761
- if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};o&&(s.data={"ui.component_name":o}),Zx(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),r_("dom",n),o_("dom",Vk)),t.xhr&&function(e){r_("xhr",e),o_("xhr",Qk)}(function(e){return function(t){if(vw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[Jk];if(!n||!r||!o)return;const{method:i,url:a,status_code:s,body:l}=o,c={method:i,url:a,status_code:s},u={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:c,type:"http",level:gk(s)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),Zx(d,u)}}(e)),t.fetch&&_k(function(e){return function(t){if(vw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Zx(a,i)}else{
762
- const o=t.response,i={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size,o?.status;const a={input:t.args,response:o,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,type:"http",level:gk(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",s,a),Zx(s,a)}}}(e)),t.history&&Kk(function(e){return function(t){if(vw()!==e)return;let n=t.from,r=t.to;const o=fk(kk.location.href);let i=n?fk(n):void 0;const a=fk(r);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Zx({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){vw()===e&&Zx({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:V_(t)},{event:t})}}(e))}}}
756
+ ;o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.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)}})))}))}function Wk(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;L_(n,"_sentryCaptured",!0),r&&!r._sentryId&&L_(r,"_sentryId",U_());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==qk)return!1;try{if(!e.target||e.target._sentryId!==Uk)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),qk=n.type,Uk=r?r._sentryId:void 0}clearTimeout($k),$k=Hk.setTimeout((()=>{Uk=void 0,qk=void 0}),jk)}}function Kk(e){const t="history";r_(t,e),o_(t,Yk)}function Yk(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Gk,o=String(n);if(Gk=o,
757
+ r===o)return e.apply(this,t);i_("history",{from:r,to:o})}return e.apply(this,t)}}Hk.addEventListener("popstate",(()=>{const e=Hk.location.href,t=Gk;if(Gk=e,t===e)return;i_("history",{from:t,to:e})})),"history"in vk&&(z_(Hk.history,"pushState",e),z_(Hk.history,"replaceState",e))}const Xk={};function Zk(e){Xk[e]=void 0}const Jk="__sentry_xhr_v3__";function Qk(){if(!Hk.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*q_(),i=f_(n[0])?n[0].toUpperCase():void 0,a=function(e){if(f_(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!i||!a)return e.apply(t,n);t[Jk]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[Jk];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}i_("xhr",{endTimestamp:1e3*q_(),startTimestamp:o,xhr:t,virtualError:r})}}
758
+ ;return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,i=t[Jk];return i&&f_(r)&&f_(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Jk];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return i_("xhr",{startTimestamp:1e3*q_(),xhr:t}),e.apply(t,n)}})}function eN(e,t=function(e){const t=Xk[e];if(t)return t;let n=Hk[e];if(yk(n))return Xk[e]=n.bind(Hk);const r=Hk.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){Bk&&Gy.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Xk[e]=n.bind(Hk):n}("fetch")){let n=0,r=0
759
+ ;return Wx(e,(function(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Zk("fetch"),J_("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=i,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 Zk("fetch"),n-=i,r--,J_(e)}}))}function tN(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?Wy:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const nN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,rN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oN=/\((\S*)(?::(\d+))(?::(\d+))\)/,iN=[30,e=>{const t=nN.exec(e);if(t){const[,e,n,r]=t;return tN(e,Wy,+n,+r)}const n=rN.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=oN.exec(n[2]);e&&(n[2]=e[1],
760
+ n[3]=e[2],n[4]=e[3])}const[e,t]=uN(n[1]||Wy,n[2]);return tN(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],aN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lN=[50,e=>{const t=aN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=sN.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]||Wy;return[n,e]=uN(n,e),tN(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],cN=Xy(...[iN,lN]),uN=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Wy,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},dN="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,hN=1024,mN=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";r_(t,e),o_(t,ck)}(function(e){
761
+ return function(t){if(vw()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:uk(t.level),message:C_(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${C_(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Zx(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(vw()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>hN&&(dN&&Gy.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=hN),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=S_(t,{keyAttrs:i,maxStringLength:a}),o=function(e){if(!k_.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent
762
+ ;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(e){r="<unknown>"}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};o&&(s.data={"ui.component_name":o}),Zx(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),r_("dom",n),o_("dom",Vk)),t.xhr&&function(e){r_("xhr",e),o_("xhr",Qk)}(function(e){return function(t){if(vw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[Jk];if(!n||!r||!o)return;const{method:i,url:a,status_code:s,body:l}=o,c={method:i,url:a,status_code:s},u={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:c,type:"http",level:gk(s)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),Zx(d,u)}}(e)),t.fetch&&_k(function(e){return function(t){if(vw()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={
763
+ category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Zx(a,i)}else{const o=t.response,i={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size,o?.status;const a={input:t.args,response:o,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,type:"http",level:gk(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",s,a),Zx(s,a)}}}(e)),t.history&&Kk(function(e){return function(t){if(vw()!==e)return;let n=t.from,r=t.to;const o=fk(kk.location.href);let i=n?fk(n):void 0;const a=fk(r);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Zx({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){vw()===e&&Zx({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:V_(t)},{event:t})}}(e))}}}
763
764
  ;const pN=["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"],fN=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&z_(kk,"setTimeout",gN),t.setInterval&&z_(kk,"setInterval",gN),t.requestAnimationFrame&&z_(kk,"requestAnimationFrame",vN),t.XMLHttpRequest&&"XMLHttpRequest"in kk&&z_(XMLHttpRequest.prototype,"send",bN);const e=t.eventTarget;if(e){(Array.isArray(e)?e:pN).forEach(yN)}}}};function gN(e){return function(...t){const n=t[0];return t[0]=Ak(n,{mechanism:{data:{
764
765
  function:Qy(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function vN(e){return function(t){return e.apply(this,[Ak(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Qy(e)},handled:!1,type:"instrument"}})])}}function bN(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&z_(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Qy(t)},handled:!1,type:"instrument"}},r=R_(t);return r&&(n.mechanism.data.handler=Qy(r)),Ak(t,n)}))})),e.apply(this,t)}}function yN(e){const t=kk,n=t[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(z_(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ak(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Qy(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,Ak(r,{mechanism:{data:{function:"addEventListener",handler:Qy(r),target:e},handled:!1,type:"instrument"}}),o])}
765
766
  })),z_(n,"removeEventListener",(function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch(e){}return e.call(this,t,n,r)}})))}const _N=()=>({name:"BrowserSession",setupOnce(){void 0!==kk.document?(Sx({ignoreDuration:!0}),Tx(),Kk((({from:e,to:t})=>{void 0!==e&&e!==t&&(Sx({ignoreDuration:!0}),Tx())}))):dN&&Gy.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),wN=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";r_(t,e),o_(t,s_)}((t=>{const{stackParser:n,attachStacktrace:r}=kN();if(vw()!==e||Sk())return;const{msg:o,url:i,line:a,column:s,error:l}=t,c=function(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=r,u=n,d=f_(t)&&t.length>0?t:E_();0===l.length&&l.push({colno:c,filename:d,function:Wy,in_app:!0,
@@ -779,8 +780,8 @@ this._store.highlightAnnotations(e.map((({id:e})=>e)).filter(Boolean)),this._win
779
780
  this._groups.load();else if("whoyouare"===t.type){const e=this._store.profile().userid;t.userid!==e&&console.warn('WebSocket user ID "%s" does not match logged-in ID "%s"',t.userid,e)}else Hv("Received unsupported notification",t.type)}_sendClientConfig(e){Object.keys(this._configMessages).forEach((t=>{this._configMessages[t]&&e.send(this._configMessages[t])}))}setConfig(e,t){this._configMessages[e]=t,this._socket?.isConnected()&&this._socket.send(t)}async _reconnect(){const e=await this._websocketURL;if(!e)return;let t,n;this._socket?.close();try{t=await this._auth.getAccessToken()}catch(e){throw console.error("Failed to fetch token for WebSocket authentication",e),e}if(t){const r=new URL(e);r.searchParams.set("access_token",t),n=r.toString()}else n=e;const r=new jN(n);r.on("open",(()=>{this._reconnectionAttempts=0,this._sendClientConfig(r)})),r.on("disconnect",(()=>{if(++this._reconnectionAttempts,this._reconnectionAttempts<10){const e=1e3*2**this._reconnectionAttempts;setTimeout((()=>this._reconnect()),e)
780
781
  }else console.error("Gave up trying to reconnect to Hypothesis real time update service")})),r.on("error",(t=>this._handleSocketError(e,t))),r.on("message",(e=>this._handleSocketMessage(e))),this._socket=r,this.setConfig("client-id",{messageType:"client_id",value:this.clientId}),this.setConfig("auth-check",{type:"whoami",id:1})}async connect(e={}){this._updateImmediately=e.applyUpdatesImmediately??!0,this._reconnectSetUp||(this._reconnectSetUp=!0,Ty(this._store.subscribe,(()=>this._store.profile().userid),(()=>this._reconnect()))),this._socket||await this._reconnect()}}$N.$inject=["store","apiRoutes","auth","groups","session","$window"];const qN="hypothesis.user.tags.list",UN="hypothesis.user.tags.map";class GN{constructor(e){this._storage=e}filter(e,t=null){const n=this._storage.getObject(qN)||[];let r=0;return n.filter((n=>{if(null!==t&&r>=t)return!1;const o=n.split(/\W+/),i=new RegExp(`^${qv(e)}`,"i");return!(!o.some((e=>e.match(i)))&&!n.match(i))&&(++r,!0)}))}store(e){
781
782
  const t=this._storage.getObject(UN)||{};e.forEach((e=>{t[e]?(t[e].count+=1,t[e].updated=Date.now()):t[e]={text:e,count:1,updated:Date.now()}})),this._storage.setObject(UN,t);const n=Object.keys(t).sort(((e,n)=>t[e].count!==t[n].count?t[n].count-t[e].count:e.localeCompare(n)));this._storage.setObject(qN,n)}}GN.$inject=["localStorage"];class VN{constructor(e){this._store=e}forceVisible(e){e.children.forEach((e=>{this.forceVisible(e)})),e.visible||this._store.setForcedVisible(e.id,!0)}}VN.$inject=["store"];class WN extends wg.TinyEmitter{constructor(e,t){super(),this._store=e,this._window=t,this._delayedMessageQueue=[],this._window.addEventListener("focus",(()=>{this._delayedMessageQueue.forEach((({type:e,messageText:t,options:n})=>this._addMessage(e,t,n))),this._delayedMessageQueue=[]}))}dismiss(e){this._store.getToastMessage(e)&&(this._store.removeToastMessage(e),this.emit("toastMessageDismissed",e))}_addMessage(e,t,{autoDismiss:n=!0,visuallyHidden:r=!1,delayed:o=!1}={}){
782
- if(this._store.hasToastMessage(e,t))return;if(o&&!this._window.document.hasFocus()){const o={autoDismiss:n,visuallyHidden:r};return void this._delayedMessageQueue.push({type:e,messageText:t,options:o})}const i={type:e,id:zv(10),message:t,visuallyHidden:r,autoDismiss:n};this._store.addToastMessage(i),this.emit("toastMessageAdded",i)}error(e,t){this._addMessage("error",e,t)}success(e,t){this._addMessage("success",e,t)}notice(e,t){this._addMessage("notice",e,t)}}WN.$inject=["store","$window"];const KN=function(e){for(var t={},n=e.querySelectorAll("script.js-hypothesis-config"),r=0;r<n.length;r++){var o=void 0;try{o=JSON.parse(n[r].textContent||"")}catch(e){console.warn("Could not parse settings from js-hypothesis-config tags",e),o={}}Object.assign(t,o)}return t}(document),YN=function(e){const{version:t,origin:n}=Ov(e.location.href);return"1.1582.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.1582.0) than the host page (${t}). It may not work.`),
783
- !1):"null"===e.origin?(console.warn("Hypothesis has been loaded in a sandboxed frame. This is not supported."),!1):e.origin===n||(console.warn(`The Hypothesis sidebar is running in a different origin (${e.origin}) than expected (${n}). It may not work.`),!1)}(window);function XN(e,t){e.setClientId(t.clientId)}function ZN(e){e.sync()}function JN(e,t){e.load(),t.load()}function QN(e,t,n){e.init(),t.init(),n.init()}function eS(e,t,n){"sidebar"===t.route()&&e.connect().catch((()=>{n.error("Hypothesis failed to connect to the web page. Try reloading the page.",{autoDismiss:!1})}))}KN.sentry&&YN&&function(e){const t=function(){const e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;EN({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.1582.0",beforeSend:(e,t)=>{if(TN>=5)return Hv("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++TN;try{const n=t&&t.originalException
783
+ if(this._store.hasToastMessage(e,t))return;if(o&&!this._window.document.hasFocus()){const o={autoDismiss:n,visuallyHidden:r};return void this._delayedMessageQueue.push({type:e,messageText:t,options:o})}const i={type:e,id:zv(10),message:t,visuallyHidden:r,autoDismiss:n};this._store.addToastMessage(i),this.emit("toastMessageAdded",i)}error(e,t){this._addMessage("error",e,t)}success(e,t){this._addMessage("success",e,t)}notice(e,t){this._addMessage("notice",e,t)}}WN.$inject=["store","$window"];const KN=function(e){for(var t={},n=e.querySelectorAll("script.js-hypothesis-config"),r=0;r<n.length;r++){var o=void 0;try{o=JSON.parse(n[r].textContent||"")}catch(e){console.warn("Could not parse settings from js-hypothesis-config tags",e),o={}}Object.assign(t,o)}return t}(document),YN=function(e){const{version:t,origin:n}=Ov(e.location.href);return"1.1583.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.1583.0) than the host page (${t}). It may not work.`),
784
+ !1):"null"===e.origin?(console.warn("Hypothesis has been loaded in a sandboxed frame. This is not supported."),!1):e.origin===n||(console.warn(`The Hypothesis sidebar is running in a different origin (${e.origin}) than expected (${n}). It may not work.`),!1)}(window);function XN(e,t){e.setClientId(t.clientId)}function ZN(e){e.sync()}function JN(e,t){e.load(),t.load()}function QN(e,t,n){e.init(),t.init(),n.init()}function eS(e,t,n){"sidebar"===t.route()&&e.connect().catch((()=>{n.error("Hypothesis failed to connect to the web page. Try reloading the page.",{autoDismiss:!1})}))}KN.sentry&&YN&&function(e){const t=function(){const e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;EN({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.1583.0",beforeSend:(e,t)=>{if(TN>=5)return Hv("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++TN;try{const n=t&&t.originalException
784
785
  ;n instanceof Event&&(e.extra||(e.extra={}),Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted}))}catch{}return e}});try{Nx("host_config",Ov(window.location.href))}catch{}Nx("loaded_scripts",Array.from(document.querySelectorAll("script")).filter((e=>!e.type||e.type.match(/javascript|module/))).map((e=>e.src||"<inline>"))),wy(((e,t)=>{CN(e,t)}))}(KN.sentry),document.body.addEventListener("click",(e=>{const t=e.target;"A"===t.tagName&&"_blank"===t.target&&(t.rel="noopener")})),XN.$inject=["api","streamer"],ZN.$inject=["router"],JN.$inject=["groups","session"],QN.$inject=["autosaveService","persistedDefaults","serviceURL"],eS.$inject=["frameSync","store","toastMessenger"];const tS=document.querySelector("hypothesis-app");!function(e=window){e.addEventListener("message",Xv)}(),async function(e,t=window){const n=function(e){
785
786
  const t=Ov(e.location.href),n=["annotations","group","query","appType","openSidebar","showHighlights","services","branding","enableExperimentalNewNoteButton","focus","requestConfigFromFrame","theme","usernameUrl"],r={openSidebar:Rv,requestConfigFromFrame:e=>{if("string"==typeof e)return e;const t=function(e){return"object"==typeof e&&null!==e?e:{}}(e);return{origin:Dv(t.origin),ancestorLevel:Pv(t.ancestorLevel)}}},o={};for(const[e,i]of Object.entries(t))n.includes(e)&&null!==i&&(r[e]?o[e]=r[e](i):o[e]=i);return o}(window),r=function(e,t){const n=e.requestConfigFromFrame;if(!n)return null;if("number"!=typeof n.ancestorLevel||"string"!=typeof n.origin)throw new Error("Improper `requestConfigFromFrame` object. Both `ancestorLevel` and `origin` need to be specified");return{targetFrame:Fv(n.ancestorLevel,t),origin:n.origin}}(n,t);let o;if(r){const e=await async function(e,t){return{...await Lv(t.targetFrame,t.origin,"requestConfig",[],3e3),...e.group?{group:e.group}:{}}}(n,r);o=function(e,t){const n=e.services
786
787
  ;return Array.isArray(n)?(n.forEach(((e,n)=>{"$rpc:requestGroups"===e.groups&&(e.groups=Lv(t.targetFrame,t.origin,"requestGroups",[n],0).catch((()=>{throw new Error("Unable to fetch groups")})))})),e):e}(e,r)}else o=n;const i={...e,...o};return r&&(i.rpc=r),i.apiUrl=function(e){const t=Ao(e);if(!t)return e.apiUrl;if(t.apiUrl)return t.apiUrl;throw new Error("Service should contain an apiUrl value.")}(i),i}(KN).then((e=>{!function(e,t){const n=new V