hypothesis 1.1691.0 → 1.1693.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.
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?ca9b6b","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?425998","styles/sidebar.css.map":"styles/sidebar.css.map?3f0aaf","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?b7580a","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?a8f546"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}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"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"__NOTEBOOK_APP_URL__"),h=a(d.profileAppUrl||"__PROFILE_APP_URL__"),y=a(d.sidebarAppUrl||"__SIDEBAR_APP_URL__");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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?7c9cc8","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/highlights.css":"styles/highlights.css?ef86d1","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?406150","styles/sidebar.css.map":"styles/sidebar.css.map?2f6368","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?4e4d2e","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?6ab27c"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}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"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"__ASSET_ROOT__");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"__NOTEBOOK_APP_URL__"),h=a(d.profileAppUrl||"__PROFILE_APP_URL__"),y=a(d.sidebarAppUrl||"__SIDEBAR_APP_URL__");!function(s,e){if(!s.querySelector('link[type="application/annotator+html"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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/.")}();
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?ca9b6b","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css":"styles/highlights.css?ef86d1","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?425998","styles/sidebar.css.map":"styles/sidebar.css.map?3f0aaf","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?b7580a","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?a8f546"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}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"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1691.0/");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"https://hypothes.is/notebook"),h=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"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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?7c9cc8","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?203fea","styles/annotator.css":"styles/annotator.css?151b37","styles/highlights.css":"styles/highlights.css?ef86d1","styles/annotator.css.map":"styles/annotator.css.map?aeb98c","styles/highlights.css.map":"styles/highlights.css.map?6ce8dd","styles/katex.min.css":"styles/katex.min.css?7fbc4d","styles/katex.min.css.map":"styles/katex.min.css.map?6974c9","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?1e1216","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?5a12c5","styles/sidebar.css":"styles/sidebar.css?406150","styles/sidebar.css.map":"styles/sidebar.css.map?2f6368","styles/ui-playground.css":"styles/ui-playground.css?1dc863","styles/ui-playground.css.map":"styles/ui-playground.css.map?c54101","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?661ed3","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?4e4d2e","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?1dd224","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?6ab27c"};function e(s){s.setAttribute("data-hypothesis-asset","")}function t(s,t){var r=s.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,e(r),s.head.appendChild(r)}function r(s,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.esModule,o=void 0===n||n,i=r.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(t+="#ts=".concat(Date.now())),l.src=t,l.async=!1,e(l),s.head.appendChild(l)}function n(s,t,r,n){var o=s.createElement("link");o.rel=t,o.href=n,o.type="application/annotator+".concat(r),e(o),s.head.appendChild(o)}function o(s,t,r){var n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).crossOrigin,o=s.createElement("link");o.rel="preload",o.as=t,o.href=r,n&&(o.crossOrigin="anonymous"),"fetch"===t&&(o.crossOrigin="anonymous"),e(o),s.head.appendChild(o)}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"),r=0;r<t.length;r++){var n=void 0;try{n=JSON.parse(t[r].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),n={}}Object.assign(e,n)}return e}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1693.0/");if(document.querySelector("hypothesis-app")){!function(s,e){o(s,"fetch",e.apiUrl),o(s,"fetch",e.apiUrl+"links");for(var n=0,a=["scripts/sidebar.bundle.js"];n<a.length;n++)r(s,i(e,a[n]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)t(s,i(e,c[l]))}(document,{assetRoot:c,manifest:s,apiUrl:l.apiUrl})}else{var p=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(p&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(p))throw new Error("Could not start Hypothesis extension as configuration is missing");var d=l,u=a(d.notebookAppUrl||"https://hypothes.is/notebook"),h=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"]')){n(s,"sidebar","html",e.sidebarAppUrl),n(s,"notebook","html",e.notebookAppUrl),n(s,"profile","html",e.profileAppUrl),o(s,"style",i(e,"styles/annotator.css"),{crossOrigin:!0}),n(s,"hypothesis-client","javascript",e.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)r(s,i(e,l[a]),{esModule:!1});var c=[];void 0!==window.PDFViewerApplication&&c.push("styles/pdfjs-overrides.css"),c.push("styles/highlights.css");for(var p=0,d=c;p<d.length;p++)t(s,i(e,d[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:u,profileAppUrl:h,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,20 +1,20 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?ca9b6b",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?7c9cc8",
3
3
  "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?203fea",
4
4
  "styles/annotator.css": "styles/annotator.css?151b37",
5
- "styles/annotator.css.map": "styles/annotator.css.map?aeb98c",
6
5
  "styles/highlights.css": "styles/highlights.css?ef86d1",
6
+ "styles/annotator.css.map": "styles/annotator.css.map?aeb98c",
7
7
  "styles/highlights.css.map": "styles/highlights.css.map?6ce8dd",
8
8
  "styles/katex.min.css": "styles/katex.min.css?7fbc4d",
9
9
  "styles/katex.min.css.map": "styles/katex.min.css.map?6974c9",
10
10
  "styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?1e1216",
11
11
  "styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?5a12c5",
12
- "styles/sidebar.css": "styles/sidebar.css?425998",
13
- "styles/sidebar.css.map": "styles/sidebar.css.map?3f0aaf",
12
+ "styles/sidebar.css": "styles/sidebar.css?406150",
13
+ "styles/sidebar.css.map": "styles/sidebar.css.map?2f6368",
14
14
  "styles/ui-playground.css": "styles/ui-playground.css?1dc863",
15
15
  "styles/ui-playground.css.map": "styles/ui-playground.css.map?c54101",
16
16
  "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?661ed3",
17
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?b7580a",
17
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?4e4d2e",
18
18
  "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?1dd224",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?a8f546"
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?6ab27c"
20
20
  }
@@ -149,7 +149,7 @@ this._contentReady&&(await this._contentReady,this._contentReady=void 0);const t
149
149
  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&&this._highlighter.removeHighlights(t.highlights);this._updateAnchors(n,t)}_updateAnchors(e,t){this.anchors=e,this._clusterToolbar?.scheduleClusterUpdates(),t&&this._bucketBarClient.update(this.anchors)}async createAnnotation(e){if("selection"===e)return this.createAnnotationFromSelection();if(!["rect","point"].includes(e))throw new Error("Unsupported annotation tool");{let t=!1;try{this._hostRPC.call("activeToolChanged",e);const t=await this._drawTool.draw(e),n=await this.getDocumentInfo(),o=[{source:n.uri,selector:await this._integration.describe(this.element,t)}],i={uri:n.uri,document:n.metadata,target:o,$tag:"a:"+Ct(8)};return this._sidebarRPC.call("createAnnotation",i),this.anchor(i),i}catch(e){if(e instanceof oo&&["canceled","restarted"].includes(e.kind))return t="restarted"===e.kind,
150
150
  null;throw e}finally{t||this._hostRPC.call("activeToolChanged",null)}}}async createAnnotationFromSelection({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=>({source:n.uri,selector:e}))),r={uri:n.uri,document:n.metadata,target:i,$highlight:e,$cluster:e?"user-highlights":"user-annotations",$tag:"a:"+Ct(8)};return this._sidebarRPC.call("createAnnotation",r),this.anchor(r),ir(),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);this._highlighter.setHighlightsFocused(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=Hn(n),i=Un(n);i?(this.selectedRanges=[t],
151
151
  this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=tr(),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}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){this._highlighter.setHighlightsVisible(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){dn(e,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(e){
152
- this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(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 lr(e,t){const n={};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.1691.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 cr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=ie(null);return ne((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ne((()=>{const e=r.current
152
+ this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new Ji(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 lr(e,t){const n={};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.1693.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 cr({closed:e,onClose:t,children:n,"data-testid":o,"aria-label":i}){const r=ie(null);return ne((()=>{e?r.current?.close():r.current?.showModal()}),[e]),ne((()=>{const e=r.current
153
153
  ;return e?.addEventListener("cancel",t),()=>{e?.removeEventListener("cancel",t)}}),[t]),Se("dialog",{ref:r,className:"relative m-5 w-full h-full backdrop:bg-black/50","data-testid":o,"aria-label":i,children:n})}function hr({closed:e,children:t,...n}){return Se("div",{...n,className:Ne("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:e}),children:Se("div",{className:"relative w-full h-full",children:t})})}function dr({document_:e=document,...t}){return Se(re((()=>function(e){return"function"==typeof e.createElement("dialog").showModal}(e)?cr:hr),[e]),{...t})}function ur({config:e,groupId:t}){return Se("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:ar(e.notebookAppUrl,{...lr(e.notebookAppUrl,e),group:t})})}function fr({eventBus:e,config:t}){const[n,o]=te(0),[i,r]=te(!0),[s,a]=te(null),l=ie(""),c=ie(null);ne((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),ne((()=>{
154
154
  document.body.style.overflow=i?l.current:"hidden"}),[i]),ne((()=>{const t=e.createEmitter();return t.subscribe("openNotebook",(e=>{r(!1),o((e=>e+1)),a(e)})),c.current=t,()=>{t.destroy()}}),[e]);const h=se((()=>{r(!0),c.current?.publish("closeNotebook")}),[]);return null===s?null:Se(dr,{closed:i,onClose:h,"data-testid":"notebook-outer","aria-label":"Hypothesis notebook",children:[Se("div",{className:"absolute right-0 m-3",children:Se(ot,{title:"Close notebook",onClick:h,variant:"dark",classes:Ne("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:Se(Le,{className:"w-4 h-4"})})}),Se(ur,{config:t,groupId:s},n)]})}class pr{constructor(e,t,n){this._container=new vn("notebook",(()=>Se(fr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function gr({eventBus:e,config:t}){const[n,o]=te(!0),i=ie(null);ne((()=>{const t=e.createEmitter();return t.subscribe("openProfile",(()=>{o(!1)})),i.current=t,()=>{t.destroy()}
155
155
  }),[e]);const r=()=>{o(!0),i.current?.publish("closeProfile")};return n?null:Se(dr,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[Se("div",{className:"absolute right-0 m-3",children:Se(ot,{title:"Close profile dialog",onClick:r,variant:"dark",classes:Ne("!bg-transparent enabled:hover:!bg-grey-3"),children:Se(Le,{className:"w-4 h-4"})})}),Se("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:t.profileAppUrl})]})}class _r{constructor(e,t,n){this._container=new vn("profile",(()=>Se(gr,{eventBus:t,config:n}))),e.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function mr({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 Se("ul",{className:"relative",children:[s&&Se("li",{className:"absolute right-0 pointer-events-auto mt-[-11px]",style:{top:e.position},children:Se(vt,{
@@ -138,7 +138,7 @@ return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"func
138
138
  target:"_blank",underline:"none",children:i}):Ve("span",{children:i}),'"']}),o&&Ve("span",{className:"text-color-text-light",children:["(",o,")"]})]})}function na(e){var t=e.group,n=null==t?void 0:t.links.html;return Ve(y,{children:t&&n&&Ve($n,{classes:Je("text-color-text-light hover:text-color-text-light"),href:t.links.html,target:"_blank",underline:"hover",variant:"custom",children:Ve("div",{className:"flex items-baseline gap-x-1",children:["open"===t.type?Ve(zt,{className:"w-2.5 h-2.5"}):Ve(Pt,{className:"w-2.5 h-2.5"}),Ve("span",{children:t.name})]})})})}function ra(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:setTimeout,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:clearTimeout,n=ce(null),r=de((function(){n.current&&t(n.current)}),[t]);return se((function(){return r}),[r]),de((function(t,o){r(),n.current=e((function(){t(),n.current=null}),o)}),[r,e])}var oa=function(){
139
139
  var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ontouchend"in document;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(e.platform)||e.userAgent.includes("Mac")&&t};function ia(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return aa(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,h.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=h.p,m=i[2];n>3?(o=m===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,h.v=r,h.n=i[1]):p<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,h.n=m,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,m),s=u,
140
140
  l=m;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=h.n<0)?l:n.call(r,h))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(aa(t={},r,(function(){return this})),t),d=c.prototype=s.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,aa(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,aa(d,"constructor",c),aa(c,"constructor",l),l.displayName="GeneratorFunction",aa(c,o,"GeneratorFunction"),aa(d),aa(d,o,"Generator"),aa(d,r,(function(){return this})),aa(d,"toString",(function(){return"[object Generator]"
141
- })),(ia=function(){return{w:i,m:h}})()}function aa(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}aa=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){aa(e,t,(function(e){return this._invoke(t,n,e)}))};i("next",0),i("throw",1),i("return",2)}},aa(e,t,n,r)}function sa(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function la(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){sa(i,r,o,a,s,"next",e)}function s(e){sa(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ca(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{
141
+ })),(ia=function(){return{w:i,m:h}})()}function aa(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}aa=function(e,t,n,r){function i(t,n){aa(e,t,(function(e){return this._invoke(t,n,e)}))}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},aa(e,t,n,r)}function sa(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function la(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){sa(i,r,o,a,s,"next",e)}function s(e){sa(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ca(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{
142
142
  if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ua(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function da(e){var t=e.annotation,n=e.group,r=e.onCopy,o=!t.permissions.read.some((function(e){return e.startsWith("group:")})),i=/^http(s?):/i.test(t.uri),a=function(e,t){var n,r,o,i,a,s
143
143
  ;return t?null!==(n=null!==(r=null===(o=e.links)||void 0===o?void 0:o.incontext)&&void 0!==r?r:null===(i=e.links)||void 0===i?void 0:i.html)&&void 0!==n?n:null:null!==(a=null===(s=e.links)||void 0===s?void 0:s.html)&&void 0!==a?a:null}(t,i),s=ce(null),l=ce(null),c=ca(ie(!1),2),u=c[0],d=c[1],h=ce(u),p=ca(ie(!1),2),m=p[0],f=p[1],g=ra(),v=de(la(ia().m((function e(){var t;return ia().w((function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,navigator.clipboard.writeText(a);case 1:f(!0),g((function(){return f(!1)}),1500),null==r||r({ok:!0,value:a}),e.n=3;break;case 2:e.p=2,t=e.v,null==r||r({ok:!1,error:t});case 3:return e.a(2)}}),e,null,[[0,2]])}))),[r,g,a]);if(se((function(){var e,t;h.current!==u&&(h.current=u,u&&!oa()&&(null===(e=s.current)||void 0===e||e.focus(),null===(t=s.current)||void 0===t||t.select()))}),[u]),!n||!a)return null;var b="private"===n.type?Ve("span",{children:["Only members of the group ",Ve("em",{children:n.name})," may view this annotation."]}):Ve("span",{
144
144
  children:"Anyone using this link may view this annotation."}),_=o?Ve("span",{children:"Only you may view this annotation."}):b;return Ve("div",{className:"relative",ref:l,children:[Ve(mn,{icon:sn,title:"Share",onClick:function(){return d((function(e){return!e}))},expanded:u}),Ve(Nn,{open:u,onClose:function(){return d(!1)},anchorElementRef:l,align:"right",placement:"above",arrow:!0,classes:HTMLElement.prototype.hasOwnProperty("popover")?void 0:"w-max",children:Ve("div",{className:"p-2 flex flex-col gap-y-2",children:[Ve("h2",{className:"text-brand text-[14px] font-medium",children:"Share this annotation"}),Ve("div",{className:"flex w-full text-[13px]",children:Ve(pn,{children:[Ve(An,{"aria-label":"Use this URL to share this annotation",type:"text",value:a,readOnly:!0,elementRef:s}),Ve(mn,{icon:m?gt:_t,title:"Copy share link to clipboard",onClick:v,variant:"dark"})]})}),Ve("div",{className:"text-[13px] font-normal","data-testid":"share-details",children:Ve(y,i?{children:_}:{
@@ -580,7 +580,7 @@ const e=["quote","text","tag","user"];r=t.terms.map((t=>new af("or",e.map((e=>n(
580
580
  return Yi([e]).reduce(((e,t)=>t.created>e?t.created:e),"")}function bf(e){return Yi([e]).reduce(((e,t)=>(e||(e=t.created),t.created<e?t.created:e)),"")}function yf(e,t){const n=e??Number.MIN_SAFE_INTEGER,r=t??Number.MIN_SAFE_INTEGER;return Math.sign(n-r)}function _f(e,t){return e===t?0:e<t?-1:1}function wf(e,t,n){switch(n.sortBy){case"newest":{const n=vf(e);return _f(vf(t),n)}case"oldest":return _f(bf(e),bf(t));case"location":return function(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=Gr(e.annotation),r=Gr(t.annotation);if(n.cfi||r.cfi){const e="/0",t=Zm(n.cfi??e,r.cfi??e);if(0!==t)return Math.sign(t)}const o=yf(n.pageIndex,r.pageIndex);if(0!==o)return o;const i=yf(n.top,r.top);if(0!==i)return i;const a=yf(n.charOffset,r.charOffset);if(0!==a)return a;return _f(e.annotation.created,t.annotation.created)}(e,t);default:return 0}}const xf=function(e){if(1!==e.length)throw new Error("Memoize input must be a function of one argument")
581
581
  ;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,selected:t.selected,sortCompareFn:(e,n)=>wf(e,n,{sortBy: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=mf(e,uf);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",
582
582
  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,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=>cf([e],r).length>0,Object.values(o).some((e=>e.terms.length>0))&&(n.threadFilterFn=e=>!!e.annotation&&cf([e.annotation],o).length>0)}const r=Km(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(Hr(e.annotation))return!1;const n=gf(e.annotation);return o[n]+=1,n===t.selectedTab}))),{tabCounts:o,rootThread:r}}));function kf(){
583
- const e=ji(),t=e.allAnnotations(),n=e.filterQuery(),r=e.route(),o=e.selectionState(),i=e.getFilterValues(),a="sidebar"===r,s=ue((()=>{const e={...o,filterQuery:n,filters:i};return{annotations:t,selection:e,showTabs:a}}),[t,n,o,i,a]);return xf(s)}var Sf,Af,Tf=Jn((function({loadAnnotationsService:e,onLogin:t}){const n=ji(),r=n.routeParams().id??"",{rootThread:o}=kf(),i=n.profile().userid,[a,s]=ie(!1);return se((()=>{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]),Ve(y,{children:[a&&Ve(Hi,{errorType:"annotation",onLoginRequest:t}),Ve(jm,{threads:o.children})]})}),["loadAnnotationsService"]);class Ef{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.1691.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||r,
583
+ const e=ji(),t=e.allAnnotations(),n=e.filterQuery(),r=e.route(),o=e.selectionState(),i=e.getFilterValues(),a="sidebar"===r,s=ue((()=>{const e={...o,filterQuery:n,filters:i};return{annotations:t,selection:e,showTabs:a}}),[t,n,o,i,a]);return xf(s)}var Sf,Af,Tf=Jn((function({loadAnnotationsService:e,onLogin:t}){const n=ji(),r=n.routeParams().id??"",{rootThread:o}=kf(),i=n.profile().userid,[a,s]=ie(!1);return se((()=>{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]),Ve(y,{children:[a&&Ve(Hi,{errorType:"annotation",onLoginRequest:t}),Ve(jm,{threads:o.children})]})}),["loadAnnotationsService"]);class Ef{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.1693.0",this.userAgent=n.navigator.userAgent,this.urls=t.map((e=>e.uri)).join(", ")||r,
584
584
  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])}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 Cf=function(){if(Af)return Sf;Af=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){
585
585
  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,p=c&&null!=c.leftOffset?c.leftOffset:0,m=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-=p,o-=m,r=e.align.lockX?t.pageXOffset:r,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-=p,o-=m,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),
586
586
  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){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 Sf=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||{}
@@ -668,7 +668,7 @@ const n=Qr(e),r=Kr(e),o=Yr(e);return xb`
668
668
  ${u.join("\n\n")}`}buildCSVExportContent(e,{groupName:t="",defaultAuthority:n="",displayNamesEnabled:r=!1,separator:o=","}={}){const{uri:i,extractUsername:a}=this._exportCommon(e,{displayNamesEnabled:r,defaultAuthority:n}),s=e=>[Sb(new Date(e.created)),a(e),Qr(e)??"",i,t,Ur(e),Kr(e)??Yr(e)??"",e.text,e.tags.join(",")].map((e=>function(e,t){return new RegExp(`["\n\r${t}]`).test(e)?`"${e.replace(/"/g,'""')}"`:e}(e,o))).join(o);return`${["Created at","Author","Page","URL","Group","Type","Quote/description","Comment","Tags"].join(o)}\n${e.map((e=>s(e))).join("\n")}`}buildHTMLExportContent(e,{groupName:t="",displayNamesEnabled:n=!1,defaultAuthority:r="",now:o=new Date}={}){const{uri:i,title:a,uniqueUsers:s,replies:l,extractUsername:c}=this._exportCommon(e,{displayNamesEnabled:n,defaultAuthority:r});return function(e,t,n){var r=Object.assign({},_b,n||{});return r.jsx||(r.attributeHook=null),Wv(e,t,r)}(Ve("html",{lang:"en",children:[Ve("head",{children:[Ve("title",{children:`Annotations on "${a}"`
669
669
  }),Ve("meta",{charSet:"UTF-8"})]}),Ve("body",{children:[Ve("section",{children:[Ve("h1",{children:"Summary"}),Ve("p",{children:Ve("time",{dateTime:o.toISOString(),children:Sb(o)})}),Ve("p",{children:Ve("strong",{children:a})}),Ve("p",{children:Ve("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:i})}),Ve("table",{children:Ve("tbody",{style:{verticalAlign:"top"},children:[Ve("tr",{children:[Ve("td",{children:"Group:"}),Ve("td",{children:t})]}),Ve("tr",{children:[Ve("td",{children:"Total users:"}),Ve("td",{children:s.length})]}),Ve("tr",{children:[Ve("td",{children:"Users:"}),Ve("td",{children:s.join(", ")})]}),Ve("tr",{children:[Ve("td",{children:"Total annotations:"}),Ve("td",{children:e.length})]}),Ve("tr",{children:[Ve("td",{children:"Total replies:"}),Ve("td",{children:l.length})]})]})})]}),Ve("hr",{}),Ve("section",{children:[Ve("h1",{children:"Annotations"}),e.map(((e,t)=>{const n=Qr(e),r=Kr(e),o=Yr(e),i=Jh(e.text),a=i===`<p>${e.text}</p>`?e.text:i;return Ve("article",{children:[Ve("h2",{
670
670
  children:["Annotation ",t+1,":"]}),Ve("table",{children:Ve("tbody",{style:{verticalAlign:"top"},children:[Ve("tr",{children:[Ve("td",{children:"Created at:"}),Ve("td",{children:Ve("time",{dateTime:e.created,children:Sb(new Date(e.created))})})]}),Ve("tr",{children:[Ve("td",{children:"Author:"}),Ve("td",{children:c(e)})]}),n&&Ve("tr",{children:[Ve("td",{children:"Page:"}),Ve("td",{children:n})]}),Ve("tr",{children:[Ve("td",{children:"Type:"}),Ve("td",{children:Ur(e)})]}),r&&Ve("tr",{children:[Ve("td",{children:"Quote:"}),Ve("td",{children:Ve("blockquote",{style:{margin:0},children:r})})]}),o&&Ve("tr",{children:[Ve("td",{children:"Description:"}),Ve("td",{children:o})]}),Ve("tr",{children:[Ve("td",{children:"Comment:"}),Ve("td",{dangerouslySetInnerHTML:{__html:a}})]}),e.tags.length>0&&Ve("tr",{children:[Ve("td",{children:"Tags:"}),Ve("td",{children:e.tags.join(", ")})]})]})})]},e.id)}))]})]})]}),{},{pretty:!0}).replace(/\t/g," ")}_exportCommon(e,{displayNamesEnabled:t,defaultAuthority:n}){const[r]=e
671
- ;if(!r)throw new Error("No annotations to export");const o=e=>Xi(e,n,t),{uri:i,title:a}=Zi(r);return{uri:i,title:a,uniqueUsers:[...new Set(e.map((e=>o(e))).filter(Boolean))],replies:e.filter((e=>Pr(e))),extractUsername:o}}}Ab.$inject=[];class Tb{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={"Content-Type":"application/json","Hypothesis-Client-Version":"1.1691.0"};i&&(u.Authorization="Bearer "+i);const d=r();d&&(u["X-Client-Id"]=d);const{url:h,unusedParams:p}=ci(c.url,a),m=new URL(h);for(const[e,t]of Object.entries(p)){const n=Array.isArray(t)?t:[t]
671
+ ;if(!r)throw new Error("No annotations to export");const o=e=>Xi(e,n,t),{uri:i,title:a}=Zi(r);return{uri:i,title:a,uniqueUsers:[...new Set(e.map((e=>o(e))).filter(Boolean))],replies:e.filter((e=>Pr(e))),extractUsername:o}}}Ab.$inject=[];class Tb{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={"Content-Type":"application/json","Hypothesis-Client-Version":"1.1693.0"};i&&(u.Authorization="Bearer "+i);const d=r();d&&(u["X-Client-Id"]=d);const{url:h,unusedParams:p}=ci(c.url,a),m=new URL(h);for(const[e,t]of Object.entries(p)){const n=Array.isArray(t)?t:[t]
672
672
  ;for(const t of n)null!=t&&m.searchParams.append(e,t.toString())}return await bp(m.toString(),{body:s?JSON.stringify(kb(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={read:i("annotation.read"),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"),moderate:i("annotation.moderate")},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")},read:i("profile.read"),update:i("profile.update")},this.analytics={events:{create:i("analytics.events.create")}}}setClientId(e){this._clientId=e}}Tb.$inject=["apiRoutes","auth","store"]
673
673
  ;var Eb,Cb,Mb,Nb,Ib,Ob={};function zb(){return Mb||(Mb=1,e=Ob,t=function(){if(Cb)return Eb;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 Cb=1,Eb=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){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),
674
674
  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)},e.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},e.prototype.start=function(e){
@@ -696,7 +696,7 @@ logo:"data:image/svg+xml;utf8,"+encodeURIComponent('<?xml version="1.0" encoding
696
696
  ;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:oy})}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:oy},s=this._serviceConfig?.authority;s&&(a.authority=s),t&&(a.document_uri=t)
697
697
  ;const[l,c,u,d,h]=await Promise.all([this._api.profile.groups.read({expand:oy}),this._api.groups.list(a),this._auth.getAccessToken(),r,i]);h&&!c.some((e=>e.id===h.id))&&c.push(h);let p=null;if(d){p=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 m=null!==u,f=await this._filterGroups(pv(l,c,t,this._settings),m,p,o),g=p||o||null;return this._addGroupsToStore(f,g),f}async _loadServiceSpecifiedGroups(e){const t=await this._api.profile.groups.read({expand:oy});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
698
698
  ;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=>!Pr(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)
699
- ;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)}}iy.$inject=["store","api","auth","settings","toastMessenger"];const ay="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,sy=globalThis,ly="10.10.0";function cy(){return uy(sy),sy}function uy(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ly,t[ly]=t[ly]||{}}function dy(e,t,n=sy){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[ly]=r[ly]||{};return o[e]||(o[e]=t())}const hy=["debug","info","warn","error","log","assert","trace"],py="Sentry Logger ",my={};function fy(e){if(!("console"in sy))return e()
699
+ ;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)}}iy.$inject=["store","api","auth","settings","toastMessenger"];const ay="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,sy=globalThis,ly="10.11.0";function cy(){return uy(sy),sy}function uy(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ly,t[ly]=t[ly]||{}}function dy(e,t,n=sy){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[ly]=r[ly]||{};return o[e]||(o[e]=t())}const hy=["debug","info","warn","error","log","assert","trace"],py="Sentry Logger ",my={};function fy(e){if(!("console"in sy))return e()
700
700
  ;const t=sy.console,n={},r=Object.keys(my);r.forEach((e=>{const r=my[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function gy(){return by().enabled}function vy(e,...t){ay&&gy()&&fy((()=>{sy.console[e](`${py}[${e}]:`,...t)}))}function by(){return ay?dy("loggerSettings",(()=>({enabled:!1}))):{enabled:!1}}const yy={enable:function(){by().enabled=!0},disable:function(){by().enabled=!1},isEnabled:gy,log:function(...e){vy("log",...e)},warn:function(...e){vy("warn",...e)},error:function(...e){vy("error",...e)}},_y=50,wy="?",xy=/\(error: (.*)\)/,ky=/captureMessage|captureException/;function Sy(...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++){let n=i[e];n.length>1024&&(n=n.slice(0,1024));const a=xy.test(n)?n.replace(xy,"$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>=_y+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e)
701
701
  ;/sentryWrapped/.test(Ay(t).function||"")&&t.pop();t.reverse(),ky.test(Ay(t).function||"")&&(t.pop(),ky.test(Ay(t).function||"")&&t.pop());return t.slice(0,_y).map((e=>({...e,filename:e.filename||Ay(t).filename,function:e.function||wy})))}(o.slice(r))}}function Ay(e){return e[e.length-1]||{}}const Ty="<anonymous>";function Ey(e){try{return e&&"function"==typeof e&&e.name||Ty}catch{return Ty}}function Cy(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{return}}}const My={},Ny={};function Iy(e,t){My[e]=My[e]||[],My[e].push(t)}function Oy(e,t){if(!Ny[e]){Ny[e]=!0;try{t()}catch(t){ay&&yy.error(`Error while instrumenting ${e}`,t)}}}function zy(e,t){const n=e&&My[e];if(n)for(const r of n)try{r(t)}catch(t){ay&&yy.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ey(r)}\nError:`,t)}}let Ly=null;function Py(){Ly=sy.onerror,sy.onerror=function(e,t,n,r,o){return zy("error",{column:r,error:o,line:n,msg:e,url:t
702
702
  }),!!Ly&&Ly.apply(this,arguments)},sy.onerror.__SENTRY_INSTRUMENTED__=!0}let Ry=null;function Dy(){Ry=sy.onunhandledrejection,sy.onunhandledrejection=function(e){return zy("unhandledrejection",e),!Ry||Ry.apply(this,arguments)},sy.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const jy=Object.prototype.toString;function Hy(e){switch(jy.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Yy(e,Error)}}function Fy(e,t){return jy.call(e)===`[object ${t}]`}function $y(e){return Fy(e,"ErrorEvent")}function By(e){return Fy(e,"DOMError")}function qy(e){return Fy(e,"String")}function Uy(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Gy(e){return null===e||Uy(e)||"object"!=typeof e&&"function"!=typeof e}function Vy(e){return Fy(e,"Object")}function Wy(e){return"undefined"!=typeof Event&&Yy(e,Event)}function Ky(e){
@@ -766,8 +766,8 @@ $k(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Xk=Sy(...[Vk,Yk]),Zk=(e,t)=>{cons
766
766
  ;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:tk(s)};e.emit("beforeOutgoingRequestBreadcrumb",d,u),Rx(d,u)}}(e)),t.fetch&&ik(function(e){return function(t){if(F_()!==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),Rx(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:tk(i.status_code)}
767
767
  ;e.emit("beforeOutgoingRequestBreadcrumb",s,a),Rx(s,a)}}}(e)),t.history&&Lk(function(e){return function(t){if(F_()!==e)return;let n=t.from,r=t.to;const o=zx(ck.location.href);let i=n?zx(n):void 0;const a=zx(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),Rx({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){F_()===e&&Rx({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:f_(t)},{event:t})}}(e))}}}
768
768
  ;const tS=["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"],nS=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&a_(ck,"setTimeout",rS),t.setInterval&&a_(ck,"setInterval",rS),t.requestAnimationFrame&&a_(ck,"requestAnimationFrame",oS),t.XMLHttpRequest&&"XMLHttpRequest"in ck&&a_(XMLHttpRequest.prototype,"send",iS);const e=t.eventTarget;if(e){(Array.isArray(e)?e:tS).forEach((e=>function(e,t){const n=ck,r=n[e]?.prototype
769
- ;if(!r?.hasOwnProperty?.("addEventListener"))return;a_(r,"addEventListener",(function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=hk(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ey(o),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,hk(o,{mechanism:{data:{function:"addEventListener",handler:Ey(o),target:e},handled:!1,type:"instrument"}}),i])}})),a_(r,"removeEventListener",(function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))}(e,t)))}}}};function rS(e){return function(...t){const n=t[0];return t[0]=hk(n,{mechanism:{data:{function:Ey(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function oS(e){return function(t){return e.apply(this,[hk(t,{mechanism:{data:{
770
- function:"requestAnimationFrame",handler:Ey(e)},handled:!1,type:"instrument"}})])}}function iS(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&a_(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Ey(t)},handled:!1,type:"instrument"}},r=c_(t);return r&&(n.mechanism.data.handler=Ey(r)),hk(t,n)}))})),e.apply(this,t)}}const aS=()=>({name:"BrowserSession",setupOnce(){void 0!==ck.document?(nx({ignoreDuration:!0}),ix(),Lk((({from:e,to:t})=>{void 0!==e&&e!==t&&(nx({ignoreDuration:!0}),ix())}))):Qk&&yy.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),sS=(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";Iy(t,e),Oy(t,Py)}((t=>{const{stackParser:n,attachStacktrace:r}=cS();if(F_()!==e||dk())return
769
+ ;if(!r?.hasOwnProperty?.("addEventListener"))return;a_(r,"addEventListener",(function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=hk(o.handleEvent,{mechanism:{data:{handler:Ey(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,hk(o,{mechanism:{data:{handler:Ey(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}})),a_(r,"removeEventListener",(function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))}(e,t)))}}}};function rS(e){return function(...t){const n=t[0];return t[0]=hk(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ey(e)}`}}),e.apply(this,t)}}function oS(e){return function(t){return e.apply(this,[hk(t,{mechanism:{data:{
770
+ handler:Ey(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function iS(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&a_(n,e,(function(t){const n={mechanism:{data:{handler:Ey(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=c_(t);return r&&(n.mechanism.data.handler=Ey(r)),hk(t,n)}))})),e.apply(this,t)}}const aS=()=>({name:"BrowserSession",setupOnce(){void 0!==ck.document?(nx({ignoreDuration:!0}),ix(),Lk((({from:e,to:t})=>{void 0!==e&&e!==t&&(nx({ignoreDuration:!0}),ix())}))):Qk&&yy.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),sS=(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";Iy(t,e),Oy(t,Py)}((t=>{const{stackParser:n,attachStacktrace:r}=cS();if(F_()!==e||dk())return
771
771
  ;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=function(e){if(!qy(e)||0===e.length)return;if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);return`<data:${t?t[1]:"text/javascript"}${e.includes("base64,")?",base64":""}>`}return e.slice(0,1024)}(t)??t_();0===l.length&&l.push({colno:c,filename:d,function:wy,in_app:!0,lineno:u});return e}(wk(n,l||o,void 0,r,!1),i,a,s);c.level="error",ex(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}))}(e),lS("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Iy(t,e),Oy(t,Dy)}((t=>{const{stackParser:n,attachStacktrace:r}=cS();if(F_()!==e||dk())return;const o=function(e){if(Gy(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),i=Gy(o)?{exception:{
772
772
  values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:wk(n,o,void 0,r,!0);i.level="error",ex(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}))}(e),lS("onunhandledrejection"))}}};function lS(e){Qk&&yy.log(`Global Handler attached: ${e}`)}function cS(){const e=F_();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const uS=()=>({name:"HttpContext",preprocessEvent(e){if(!ck.navigator&&!ck.location&&!ck.document)return;const t=function(){const e=t_(),{referrer:t}=ck.document||{},{userAgent:n}=ck.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),dS=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Gx(pk,o.getOptions().stackParser,n,t,e,r)}}};function hS(){return!!function(){if(void 0===ck.window)return!1;const e=ck;if(e.nw)return!1
773
773
  ;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=t_(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(ck===ck.top&&r.some((e=>n.startsWith(`${e}://`))))}()&&(Qk&&fy((()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")})),!0)}let pS=0;function mS(e,t){Jw(e,{tags:{context:t}})}function fS(e){!function(e){H_().setUser(e)}(e)}class gS{constructor(e,t,n){this._store=e,this._annotationsService=t,this._toastMessenger=n}async import(e){this._store.beginImport(e.length);const t=this._store.profile().userid;if(!t)throw new Error("Cannot import when logged out");const n=this._store.focusedGroupId();if(!n)throw new Error("Cannot import when no group is selected");const r=this._store.allAnnotations(),o=this._store.defaultContentFrame(),i=async e=>{const i=r.find((t=>function(e,t){return e.text===t.text&&!!function(e,t){
@@ -785,8 +785,8 @@ Object.keys(this._configMessages).forEach((t=>{this._configMessages[t]&&e.send(t
785
785
  value:this.clientId}),this.setConfig("auth-check",{type:"whoami",id:1})}async connect(e={}){this._updateImmediately=e.applyUpdatesImmediately??!0,this._reconnectSetUp||(this._reconnectSetUp=!0,Jb(this._store.subscribe,(()=>this._store.profile().userid),(()=>this._reconnect()))),this._socket||await this._reconnect()}}ES.$inject=["store","apiRoutes","auth","groups","session","$window"];const CS="hypothesis.user.tags.list",MS="hypothesis.user.tags.map";class NS{constructor(e){this._storage=e}filter(e,t=null){const n=this._storage.getObject(CS)||[];let r=0;return n.filter((n=>{if(null!==t&&r>=t)return!1;const o=n.split(/\W+/),i=new RegExp(`^${uv(e)}`,"i");return!(!o.some((e=>e.match(i)))&&!n.match(i))&&(++r,!0)}))}store(e){const t=this._storage.getObject(MS)||{};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(MS,t);const n=Object.keys(t).sort(((e,n)=>t[e].count!==t[n].count?t[n].count-t[e].count:e.localeCompare(n)))
786
786
  ;this._storage.setObject(CS,n)}}NS.$inject=["localStorage"];class IS{constructor(e){this._store=e}forceVisible(e){e.children.forEach((e=>{this.forceVisible(e)})),e.visible||this._store.setForcedVisible(e.id,!0)}}IS.$inject=["store"];class OS{#t=new Map;#n=30;#r;constructor(e){this.#r=e}get cacheSize(){return this.#n}set cacheSize(e){this.#n=e,this.#o()}#o(){for(const e of this.#t.keys()){const t=this.#t.get(e);if(t&&URL.revokeObjectURL(t.url),this.#t.delete(e),this.#t.size<=this.cacheSize)break}}async fetch(e,t={}){const n=this.get(e);if(n)return n;const r=await this.#r.requestThumbnail(e,t),o=await async function(e){const t=new OffscreenCanvas(e.width,e.height);t.getContext("2d").drawImage(e,0,0,e.width,e.height);const n=await t.convertToBlob();return URL.createObjectURL(n)}(r),i={url:o,width:r.width,height:r.height};return this.#t.set(e,i),this.#t.size>this.cacheSize&&this.#o(),i}get(e){const t=this.#t.get(e);return t?(this.#t.delete(e),this.#t.set(e,t),t):null}cachedThumbnailTags(){
787
787
  return[...this.#t.keys()]}}OS.$inject=["frameSync"];class zS extends Ff{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}={}){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:Jg(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)}}zS.$inject=["store","$window"]
788
- ;const LS=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),PS=function(e){const{version:t,origin:n}=tv(e.location.href);return"1.1691.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.1691.0) than the host page (${t}). It may not work.`),!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 RS(e,t){e.setClientId(t.clientId)}function DS(e){e.sync()}function jS(e,t){e.load(),t.load()}function HS(e,t,n){e.init(),t.init(),n.init()}function FS(e,t,n){"sidebar"===t.route()&&e.connect().catch((()=>{
789
- n.error("Hypothesis failed to connect to the web page. Try reloading the page.",{autoDismiss:!1})}))}LS.sentry&&PS&&function(e){const t=function(){const e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;!function(e={}){const t=!e.skipBrowserExtensionCheck&&hS(),n={...e,enabled:!t&&e.enabled,stackParser:(r=e.stackParser||Xk,Array.isArray(r)?Sy(...r):r),integrations:cx({integrations:e.integrations,defaultIntegrations:null==e.defaultIntegrations?[Bx(),Hx(),nS(),eS(),sS(),dS(),Zx(),uS(),aS()]:e.defaultIntegrations}),transport:e.transport||Fk};var r;Tx(Sk,n)}({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.1691.0",beforeSend:(e,t)=>{if(pS>=5)return sv("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++pS;try{const n=t&&t.originalException;n instanceof Event&&(e.extra||(e.extra={}),Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted}))}catch{}return e}});try{
788
+ ;const LS=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),PS=function(e){const{version:t,origin:n}=tv(e.location.href);return"1.1693.0"!==t?(console.warn(`The Hypothesis sidebar is using a different version (1.1693.0) than the host page (${t}). It may not work.`),!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 RS(e,t){e.setClientId(t.clientId)}function DS(e){e.sync()}function jS(e,t){e.load(),t.load()}function HS(e,t,n){e.init(),t.init(),n.init()}function FS(e,t,n){"sidebar"===t.route()&&e.connect().catch((()=>{
789
+ n.error("Hypothesis failed to connect to the web page. Try reloading the page.",{autoDismiss:!1})}))}LS.sentry&&PS&&function(e){const t=function(){const e=import.meta.url;return e?new URL(e).origin:null}(),n=t?[t]:void 0;!function(e={}){const t=!e.skipBrowserExtensionCheck&&hS(),n={...e,enabled:!t&&e.enabled,stackParser:(r=e.stackParser||Xk,Array.isArray(r)?Sy(...r):r),integrations:cx({integrations:e.integrations,defaultIntegrations:null==e.defaultIntegrations?[Bx(),Hx(),nS(),eS(),sS(),dS(),Zx(),uS(),aS()]:e.defaultIntegrations}),transport:e.transport||Fk};var r;Tx(Sk,n)}({dsn:e.dsn,environment:e.environment,allowUrls:n,ignoreErrors:["Network request failed","Object Not Found Matching Id"],release:"1.1693.0",beforeSend:(e,t)=>{if(pS>=5)return sv("Client-side Sentry quota reached. No further Sentry events will be sent"),null;++pS;try{const n=t&&t.originalException;n instanceof Event&&(e.extra||(e.extra={}),Object.assign(e.extra,{type:n.type,detail:n.detail,isTrusted:n.isTrusted}))}catch{}return e}});try{
790
790
  tx("host_config",tv(window.location.href))}catch{}tx("loaded_scripts",Array.from(document.querySelectorAll("script")).filter((e=>!e.type||e.type.match(/javascript|module/))).map((e=>e.src||"<inline>"))),Vb(((e,t)=>{mS(e,t)}))}(LS.sentry),document.body.addEventListener("click",(e=>{const t=e.target;"A"===t.tagName&&"_blank"===t.target&&(t.rel="noopener")})),RS.$inject=["api","streamer"],DS.$inject=["router"],jS.$inject=["groups","session"],HS.$inject=["autosaveService","persistedDefaults","serviceURL"],FS.$inject=["frameSync","store","toastMessenger"];const $S=document.querySelector("hypothesis-app");!function(e=window){e.addEventListener("message",vv)}(),async function(e,t=window){const n=function(e){const t=tv(e.location.href),n=["annotations","group","query","appType","openSidebar","showHighlights","services","branding","enableExperimentalNewNoteButton","focus","requestConfigFromFrame","theme","usernameUrl"],r={openSidebar:nv,requestConfigFromFrame:e=>{if("string"==typeof e)return e;const t=function(e){
791
791
  return"object"==typeof e&&null!==e?e:{}}(e);return{origin:ov(t.origin),ancestorLevel:rv(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:iv(n.ancestorLevel,t),origin:n.origin}}(n,t);let o;if(r){const e=await async function(e,t){return{...await ev(t.targetFrame,t.origin,"requestConfig",[],3e3),...e.group?{group:e.group}:{}}}(n,r);o=function(e,t){const n=e.services;return Array.isArray(n)?(n.forEach(((e,n)=>{"$rpc:requestGroups"===e.groups&&(e.groups=ev(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=Kn(e)
792
792
  ;if(!t)return e.apiUrl;if(t.apiUrl)return t.apiUrl;throw new Error("Service should contain an apiUrl value.")}(i),i}(LS).then((e=>{!function(e,t){const n=new U;n.register("analytics",bv).register("annotationsExporter",Ab).register("annotationsService",_v).register("annotationActivity",yv).register("api",Tb).register("apiRoutes",Db).register("auth",Fb).register("autosaveService",$b).register("dashboard",Bb).register("frameSync",ny).register("groups",iy).register("importAnnotationsService",gS).register("loadAnnotationsService",vS).register("localStorage",yS).register("persistedDefaults",wS).register("router",xS).register("serviceURL",kS).register("session",SS).register("streamer",ES).register("streamFilter",AS).register("tags",NS).register("threadsService",IS).register("thumbnailService",OS).register("toastMessenger",zS).register("store",{factory:Di}),n.register("$window",{value:window}).register("settings",{value:e}),n.run(DS),n.run(HS),n.run(RS),n.run(jS),n.run(gv),n.run(FS),H(Ve(Qn.Provider,{value:n,