hypothesis 1.1390.0 → 1.1392.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 +1 -1
- package/build/manifest.json +7 -7
- package/build/scripts/annotator.bundle.js +3 -3
- package/build/scripts/annotator.bundle.js.map +1 -1
- package/build/scripts/sidebar.bundle.js +459 -458
- package/build/scripts/sidebar.bundle.js.map +1 -1
- package/build/scripts/ui-playground.bundle.js +2 -2
- package/build/scripts/ui-playground.bundle.js.map +1 -1
- package/package.json +2 -2
package/build/boot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?
|
|
1
|
+
!function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?886981","styles/annotator.css":"styles/annotator.css?1ad63a","styles/annotator.css.map":"styles/annotator.css.map?99da3f","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?e179ab","styles/katex.min.css.map":"styles/katex.min.css.map?cd8c0e","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css.map":"styles/sidebar.css.map?ca189d","styles/sidebar.css":"styles/sidebar.css?39df4c","styles/ui-playground.css":"styles/ui-playground.css?ae05e7","styles/ui-playground.css.map":"styles/ui-playground.css.map?a634bc","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?3aca6a","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?b9ba37","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?2eb212","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?a02e5a","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?76c98a"};function t(s){s.setAttribute("data-hypothesis-asset","")}function e(s,e){var n=s.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=e,t(n),s.head.appendChild(n)}function n(s,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.esModule,o=void 0===r||r,i=n.forceReload,a=void 0!==i&&i,l=s.createElement("script");o&&(l.type="module"),a&&(e+="#ts=".concat(Date.now())),l.src=e,l.async=!1,t(l),s.head.appendChild(l)}function r(s,e,n,r){var o=s.createElement("link");o.rel=e,o.href=r,o.type="application/annotator+".concat(n),t(o),s.head.appendChild(o)}function o(s,e,n){var r=s.createElement("link");r.rel="preload",r.as=e,r.href=n,"fetch"===e&&(r.crossOrigin="anonymous"),t(r),s.head.appendChild(r)}function i(s,t){return s.assetRoot+"build/"+s.manifest[t]}function a(s){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(-1===s.indexOf("{"))return s;var e=function(){var s,t,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).currentScript;return e?(s=e.src,(t=s.match(/(https?):\/\/([^:/]+)/))?{protocol:t[1],hostname:t[2]}:null):null}(t);if(!e)throw new Error("Could not process URL template because script origin is unknown");return s=(s=s.replace("{current_host}",e.hostname)).replace("{current_scheme}",e.protocol)}if(function(){var s=[function(){return Object.fromEntries([])},function(){return new URL(document.location.href)},function(){return new Request("https://hypothes.is")},function(){return Element.prototype.attachShadow},function(){return CSS.supports("display: grid")},function(){return document.evaluate("/html/body",document,null,XPathResult.ANY_TYPE,null),!0}];try{return s.every((function(s){return s()}))}catch(s){return!1}}()){var l=function(s){for(var t={},e=s.querySelectorAll("script.js-hypothesis-config"),n=0;n<e.length;n++){var r=void 0;try{r=JSON.parse(e[n].textContent||"")}catch(s){console.warn("Could not parse settings from js-hypothesis-config tags",s),r={}}Object.assign(t,r)}return t}(document),c=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1392.0/");if(document.querySelector("hypothesis-app")){!function(s,t){o(s,"fetch",t.apiUrl),o(s,"fetch",t.apiUrl+"links");for(var r=0,a=["scripts/sidebar.bundle.js"];r<a.length;r++)n(s,i(t,a[r]),{esModule:!0});for(var l=0,c=["styles/katex.min.css","styles/sidebar.css"];l<c.length;l++)e(s,i(t,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 u=l,d=a(u.notebookAppUrl||"https://hypothes.is/notebook"),h=a(u.profileAppUrl||"https://hypothes.is/user-profile"),y=a(u.sidebarAppUrl||"https://hypothes.is/app.html");!function(s,t){if(!s.querySelector('link[type="application/annotator+html"]')){r(s,"sidebar","html",t.sidebarAppUrl),r(s,"notebook","html",t.notebookAppUrl),r(s,"profile","html",t.profileAppUrl),o(s,"style",i(t,"styles/annotator.css")),r(s,"hypothesis-client","javascript",t.assetRoot+"build/boot.js");for(var a=0,l=["scripts/annotator.bundle.js"];a<l.length;a++)n(s,i(t,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,u=c;p<u.length;p++)e(s,i(t,u[p]))}}(document,{assetRoot:c,manifest:s,notebookAppUrl:d,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/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?
|
|
2
|
+
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?886981",
|
|
3
3
|
"styles/annotator.css": "styles/annotator.css?1ad63a",
|
|
4
4
|
"styles/annotator.css.map": "styles/annotator.css.map?99da3f",
|
|
5
5
|
"styles/highlights.css": "styles/highlights.css?6b4ebd",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"styles/katex.min.css.map": "styles/katex.min.css.map?cd8c0e",
|
|
9
9
|
"styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?c95edf",
|
|
10
10
|
"styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?1d8ac6",
|
|
11
|
-
"styles/sidebar.css": "styles/sidebar.css?39df4c",
|
|
12
11
|
"styles/sidebar.css.map": "styles/sidebar.css.map?ca189d",
|
|
12
|
+
"styles/sidebar.css": "styles/sidebar.css?39df4c",
|
|
13
13
|
"styles/ui-playground.css": "styles/ui-playground.css?ae05e7",
|
|
14
14
|
"styles/ui-playground.css.map": "styles/ui-playground.css.map?a634bc",
|
|
15
|
-
"scripts/
|
|
16
|
-
"scripts/
|
|
17
|
-
"scripts/
|
|
18
|
-
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?
|
|
19
|
-
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?
|
|
15
|
+
"scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?3aca6a",
|
|
16
|
+
"scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?b9ba37",
|
|
17
|
+
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?2eb212",
|
|
18
|
+
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?a02e5a",
|
|
19
|
+
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?76c98a"
|
|
20
20
|
}
|
|
@@ -17,8 +17,8 @@ return q(n.query)||function(){const e=t.location.href.match(/#annotations:(query
|
|
|
17
17
|
allowInBrowserExt:!0,defaultValue:null,getValue:z},enableExperimentalNewNoteButton:{allowInBrowserExt:!1,defaultValue:null,getValue:z},group:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.group},focus:{allowInBrowserExt:!1,defaultValue:null,getValue:z},theme:{allowInBrowserExt:!1,defaultValue:null,getValue:z},usernameUrl:{allowInBrowserExt:!1,defaultValue:null,getValue:z},onLayoutChange:{allowInBrowserExt:!1,defaultValue:null,getValue:z},openSidebar:{allowInBrowserExt:!0,defaultValue:!1,coerce:x,getValue:z},query:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.query},requestConfigFromFrame:{allowInBrowserExt:!1,defaultValue:null,getValue:z},services:{allowInBrowserExt:!1,defaultValue:null,getValue:z},showHighlights:{allowInBrowserExt:!1,defaultValue:"always",getValue:t=>t.showHighlights},notebookAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.notebookAppUrl},profileAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.profileAppUrl},sidebarAppUrl:{allowInBrowserExt:!0,
|
|
18
18
|
defaultValue:null,getValue:t=>t.sidebarAppUrl},subFrameIdentifier:{allowInBrowserExt:!0,defaultValue:null,getValue:z},externalContainerSelector:{allowInBrowserExt:!1,defaultValue:null,getValue:z},sideBySide:{allowInBrowserExt:!0,getValue:t=>t.sideBySide}};function j(t,e=window){const n=W(e),i={};for(const r of function(t){const e={annotator:["clientUrl","contentInfoBanner","contentReady","subFrameIdentifier","sideBySide"],sidebar:["appType","annotations","branding","bucketContainerSelector","enableExperimentalNewNoteButton","externalContainerSelector","focus","group","onLayoutChange","openSidebar","query","requestConfigFromFrame","services","showHighlights","sidebarAppUrl","theme","usernameUrl"],notebook:["branding","group","notebookAppUrl","requestConfigFromFrame","services","theme","usernameUrl"],profile:["profileAppUrl"]};return"all"===t?Object.values(e).flat():e[t]}(t)){const t=$[r],s=void 0!==t.defaultValue,a=!((o=U(e,"sidebar","html")).startsWith("http://")||o.startsWith("https://"))
|
|
19
19
|
;if(!t.allowInBrowserExt&&a){s&&(i[r]=t.defaultValue);continue}const l=t.getValue(n,r);void 0!==l?i[r]=t.coerce?t.coerce(l):l:s&&(i[r]=t.defaultValue)}var o;return i}var X,Y,G,K,Z,Q,J,tt,et={},nt=[],it=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ot=Array.isArray;function rt(t,e){for(var n in e)t[n]=e[n];return t}function st(t){var e=t.parentNode;e&&e.removeChild(t)}function at(t,e,n,i,o){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++G:o,__i:-1,__u:0};return null==o&&null!=Y.vnode&&Y.vnode(r),r}function lt(t){return t.children}function ct(t,e){this.props=t,this.context=e}function ht(t,e){if(null==e)return t.__?ht(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?ht(t):null}function ut(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break
|
|
20
|
-
}return ut(t)}}function dt(t){(!t.__d&&(t.__d=!0)&&K.push(t)&&!ft.__r++||Z!==Y.debounceRendering)&&((Z=Y.debounceRendering)||Q)(ft)}function ft(){var t,e,n,i,o,r,s,a,l;for(K.sort(J);t=K.shift();)t.__d&&(e=K.length,i=void 0,r=(o=(n=t).__v).__e,a=[],l=[],(s=n.__P)&&((i=rt({},o)).__v=o.__v+1,Y.vnode&&Y.vnode(i),wt(s,i,o,n.__n,void 0!==s.ownerSVGElement,32&o.__u?[r]:null,a,null==r?ht(o):r,!!(32&o.__u),l),i.__.__k[i.__i]=i,xt(a,i,l),i.__e!=r&&ut(i)),K.length>e&&K.sort(J));ft.__r=0}function pt(t,e,n,i,o,r,s,a,l,c,h){var u,d,f,p,m,g=i&&i.__k||nt,_=e.length;for(n.__d=l,function(t,e,n){var i,o,r,s,a,l=e.length,c=n.length,h=c,u=0;for(t.__k=[],i=0;i<l;i++)null!=(o=t.__k[i]=null==(o=e[i])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?at(null,o,null,null,o):ot(o)?at(lt,{children:o},null,null,null):o.__b>0?at(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,a=gt(o,n,s=i+u,h),o.__i=a,r=null
|
|
21
|
-
(r=n[a])&&(r.__u|=131072)),null==r||null===r.__v?(-1==a&&u--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?u++:a>s?h>l-s?u+=a-s:u--:u=a<s&&a==s-1?a-s:0,a!==i+u&&(o.__u|=65536))):(r=n[i])&&null==r.key&&r.__e&&(r.__e==t.__d&&(t.__d=ht(r)),Nt(r,r,!1),n[i]=null,h--);if(h)for(i=0;i<c;i++)null!=(r=n[i])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=ht(r)),Nt(r,r))}(n,e,g),l=n.__d,u=0;u<_;u++)null!=(f=n.__k[u])&&"boolean"!=typeof f&&"function"!=typeof f&&(d=-1===f.__i?et:g[f.__i]||et,f.__i=u,wt(t,f,d,o,r,s,a,l,c,h),p=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&St(d.ref,null,f),h.push(f.ref,f.__c||p,f)),null==m&&null!=p&&(m=p),65536&f.__u||d.__k===f.__k?l=mt(f,l,t):"function"==typeof f.type&&void 0!==f.__d?l=f.__d:p&&(l=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=m}function mt(t,e,n){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=mt(i[o],e,n));return e}return t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e),e&&e.nextSibling}function gt(t,e,n,i){
|
|
20
|
+
}return ut(t)}}function dt(t){(!t.__d&&(t.__d=!0)&&K.push(t)&&!ft.__r++||Z!==Y.debounceRendering)&&((Z=Y.debounceRendering)||Q)(ft)}function ft(){var t,e,n,i,o,r,s,a,l;for(K.sort(J);t=K.shift();)t.__d&&(e=K.length,i=void 0,r=(o=(n=t).__v).__e,a=[],l=[],(s=n.__P)&&((i=rt({},o)).__v=o.__v+1,Y.vnode&&Y.vnode(i),wt(s,i,o,n.__n,void 0!==s.ownerSVGElement,32&o.__u?[r]:null,a,null==r?ht(o):r,!!(32&o.__u),l),i.__.__k[i.__i]=i,xt(a,i,l),i.__e!=r&&ut(i)),K.length>e&&K.sort(J));ft.__r=0}function pt(t,e,n,i,o,r,s,a,l,c,h){var u,d,f,p,m,g=i&&i.__k||nt,_=e.length;for(n.__d=l,function(t,e,n){var i,o,r,s,a,l=e.length,c=n.length,h=c,u=0;for(t.__k=[],i=0;i<l;i++)null!=(o=t.__k[i]=null==(o=e[i])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?at(null,o,null,null,o):ot(o)?at(lt,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?at(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,a=gt(o,n,s=i+u,h),o.__i=a,r=null,
|
|
21
|
+
-1!==a&&(h--,(r=n[a])&&(r.__u|=131072)),null==r||null===r.__v?(-1==a&&u--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?u++:a>s?h>l-s?u+=a-s:u--:u=a<s&&a==s-1?a-s:0,a!==i+u&&(o.__u|=65536))):(r=n[i])&&null==r.key&&r.__e&&(r.__e==t.__d&&(t.__d=ht(r)),Nt(r,r,!1),n[i]=null,h--);if(h)for(i=0;i<c;i++)null!=(r=n[i])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=ht(r)),Nt(r,r))}(n,e,g),l=n.__d,u=0;u<_;u++)null!=(f=n.__k[u])&&"boolean"!=typeof f&&"function"!=typeof f&&(d=-1===f.__i?et:g[f.__i]||et,f.__i=u,wt(t,f,d,o,r,s,a,l,c,h),p=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&St(d.ref,null,f),h.push(f.ref,f.__c||p,f)),null==m&&null!=p&&(m=p),65536&f.__u||d.__k===f.__k?l=mt(f,l,t):"function"==typeof f.type&&void 0!==f.__d?l=f.__d:p&&(l=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=m}function mt(t,e,n){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=mt(i[o],e,n));return e}return t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e),e&&e.nextSibling}function gt(t,e,n,i){
|
|
22
22
|
var o=t.key,r=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&o==l.key&&r===l.type)return n;if(i>(null!=l&&0==(131072&l.__u)?1:0))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&0==(131072&l.__u)&&o==l.key&&r===l.type)return s;s--}if(a<e.length){if((l=e[a])&&0==(131072&l.__u)&&o==l.key&&r===l.type)return a;a++}}return-1}function _t(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||it.test(e)?n:n+"px"}function vt(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||_t(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||_t(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=Date.now(),t.addEventListener(e,r?yt:bt,r)):t.removeEventListener(e,r?yt:bt,r);else{
|
|
23
23
|
if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function bt(t){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(Y.event?Y.event(t):t)}function yt(t){return this.l[t.type+!0](Y.event?Y.event(t):t)}function wt(t,e,n,i,o,r,s,a,l,c){var h,u,d,f,p,m,g,_,v,b,y,w,x,C,S,N=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),r=[a=e.__e=n.__e]),(h=Y.__b)&&h(e);t:if("function"==typeof N)try{if(_=e.props,v=(h=N.contextType)&&i[h.__c],b=h?v?v.props.value:h.__:i,n.__c?g=(u=e.__c=n.__c).__=u.__E:("prototype"in N&&N.prototype.render?e.__c=u=new N(_,b):(e.__c=u=new ct(_,b),u.constructor=N,u.render=Et),v&&v.sub(u),u.props=_,u.state||(u.state={}),u.context=b,u.__n=i,d=u.__d=!0,u.__h=[],
|
|
24
24
|
u._sb=[]),null==u.__s&&(u.__s=u.state),null!=N.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=rt({},u.__s)),rt(u.__s,N.getDerivedStateFromProps(_,u.__s))),f=u.props,p=u.state,u.__v=e,d)null==N.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==N.getDerivedStateFromProps&&_!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(_,b),!u.__e&&(null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(_,u.__s,b)||e.__v===n.__v)){for(e.__v!==n.__v&&(u.props=_,u.state=u.__s,u.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&s.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(_,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,p,m)}))}if(u.context=b,u.props=_,u.__P=t,u.__e=!1,w=Y.__r,x=0,"prototype"in N&&N.prototype.render){for(u.state=u.__s,u.__d=!1,w&&w(e),
|
|
@@ -139,7 +139,7 @@ var e,n;return null===(e=(n=this._integration).showContentInfo)||void 0===e?void
|
|
|
139
139
|
this._hoveredAnnotations.has(t.annotation.$tag)&&Gn(i,!0)};this.detach(t.$tag,!1),this._annotations.add(t.$tag),t.target||(t.target=[]);const n=await Promise.all(t.target.map((async e=>{if(!e.selector||!e.selector.some((t=>"TextQuoteSelector"===t.type)))return{annotation:t,target:e};let n;try{const i=await this._integration.anchor(this.element,e.selector),o=In.fromRange(i);n={annotation:t,target:e,range:o}}catch(i){n={annotation:t,target:e}}return n})));if(!this._annotations.has(t.$tag))return[];for(const t of n)e(t);return t.$orphan=n.length>0&&n.every((t=>t.target.selector&&!t.range)),this._updateAnchors(this.anchors.concat(n),!0),this._sidebarRPC.call("syncAnchoringStatus",t),n}detach(t,e=!0){this._annotations.delete(t);const n=[];for(const e of this.anchors)e.annotation.$tag!==t?n.push(e):e.highlights&&Yn(e.highlights);this._updateAnchors(n,e)}_updateAnchors(t,e){var n;this.anchors=t,null===(n=this._clusterToolbar)||void 0===n||n.scheduleClusterUpdates(),e&&this._bucketBarClient.update(this.anchors)}
|
|
140
140
|
async createAnnotation({highlight:t=!1}={}){const e=this.selectedRanges;this.selectedRanges=[];const n=await this.getDocumentInfo(),i=this.element,o=(await Promise.all(e.map((t=>this._integration.describe(i,t))))).map((t=>({source:n.uri,selector:t}))),s={uri:n.uri,document:n.metadata,target:o,$highlight:t,$cluster:t?"user-highlights":"user-annotations",$tag:"a:"+r(8)};return this._sidebarRPC.call("createAnnotation",s),this.anchor(s),cr(),s}_hoverAnnotations(t){this._hoveredAnnotations.clear(),t.forEach((t=>this._hoveredAnnotations.add(t)));for(const e of this.anchors)if(e.highlights){const n=t.includes(e.annotation.$tag);Gn(e.highlights,n)}this._sidebarRPC.call("hoverAnnotations",t)}_onSelection(t){const e=this._integration.getAnnotatableRange(t);if(!e)return void this._onClearSelection();const n=document.getSelection(),i=Vn(n),o=Wn(n);o?(this.selectedRanges=[e],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=sr(),this._isAdderVisible=!0,this._adder.show(o,i)):this._onClearSelection()}
|
|
141
141
|
_onClearSelection(){this._isAdderVisible=!1,this._adder.hide(),this.selectedRanges=[],this._informHostOnNextSelectionClear&&this._hostRPC.call("textUnselected"),this._informHostOnNextSelectionClear=!0}selectAnnotations(t,{toggle:e=!1,focusInSidebar:n=!1}={}){e?this._sidebarRPC.call("toggleAnnotationSelection",t):this._sidebarRPC.call("showAnnotations",t,n),this._sidebarRPC.call("openSidebar")}setHighlightsVisible(t,e=!0){!function(t,e){t.classList.toggle("hypothesis-highlights-always-on",e)}(this.element,t),this._highlightsVisible=t,e&&this._hostRPC.call("highlightsVisibleChanged",t)}get highlightsVisible(){return this._highlightsVisible}fitSideBySide(t){this._sidebarLayout=t,this._integration.fitSideBySide(t)}get hoveredAnnotationTags(){return this._hoveredAnnotations}_handleShortcut(t){ie(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}}function dr(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}
|
|
142
|
-
function fr(t,e){var n;const i={};for(const[t,n]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=n&&(i[t]=n);i.origin=new URL(t).origin,i.version="1.
|
|
142
|
+
function fr(t,e){var n;const i={};for(const[t,n]of Object.entries(e))"notebookAppUrl"!==t&&"sidebarAppUrl"!==t&&null!=n&&(i[t]=n);i.origin=new URL(t).origin,i.version="1.1392.0";const o=new URL(window.location.href);if(o.hash="",i.hostURL=o.toString(),Array.isArray(i.services)&&(null===(n=i.services)||void 0===n?void 0:n.length)>0){const t=i.services[0];t.onLoginRequest&&(t.onLoginRequestProvided=!0),t.onLogoutRequest&&(t.onLogoutRequestProvided=!0),t.onSignupRequest&&(t.onSignupRequestProvided=!0),t.onProfileRequest&&(t.onProfileRequestProvided=!0),t.onHelpRequest&&(t.onHelpRequestProvided=!0)}return i}function pr({config:t,groupId:e}){return ge("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allowFullScreen:!0,src:dr(t.notebookAppUrl,{...fr(t.notebookAppUrl,t),group:e})})}function mr({eventBus:t,config:e}){const[n,i]=qt(0),[o,r]=qt(!0),[s,a]=qt(null),l=$t(""),c=$t(null);Wt((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),
|
|
143
143
|
Wt((()=>{document.body.style.overflow=o?l.current:"hidden"}),[o]),Wt((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),i((t=>t+1)),a(t)})),c.current=e,()=>{e.destroy()}}),[t]);return null===s?null:ge("div",{className:pe("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:o}),"data-testid":"notebook-outer",children:ge("div",{className:"relative w-full h-full","data-testid":"notebook-inner",children:[ge("div",{className:"absolute right-0 m-3",children:ge(en,{title:"Close the Notebook",onClick:()=>{var t;r(!0),null===(t=c.current)||void 0===t||t.publish("closeNotebook")},variant:"dark",classes:pe("!bg-transparent enabled:hover:!bg-grey-3"),children:ge(Se,{className:"w-4 h-4"})})}),ge(pr,{config:e,groupId:s},n)]})})}class gr{constructor(t,e,i){n(this,"_outerContainer",void 0),n(this,"_shadowRoot",void 0),this._outerContainer=document.createElement("hypothesis-notebook"),t.appendChild(this._outerContainer),this._shadowRoot=Cn(this._outerContainer),At(ge(mr,{eventBus:e,
|
|
144
144
|
config:i}),this._shadowRoot)}destroy(){At(null,this._shadowRoot),this._outerContainer.remove()}}function _r({eventBus:t,config:e}){const[n,i]=qt(!0),o=$t(null);Wt((()=>{const e=t.createEmitter();return e.subscribe("openProfile",(()=>{i(!1)})),o.current=e,()=>{e.destroy()}}),[t]);return n?null:ge("div",{className:"fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50","data-testid":"profile-outer",children:ge("div",{className:"relative w-full h-full","data-testid":"profile-inner",children:[ge("div",{className:"absolute right-0 m-3",children:ge(en,{title:"Close the Profile",onClick:()=>{var t;i(!0),null===(t=o.current)||void 0===t||t.publish("closeProfile")},variant:"dark",classes:pe("!bg-transparent enabled:hover:!bg-grey-3"),children:ge(Se,{className:"w-4 h-4"})})}),ge("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:e.profileAppUrl})]})})}class vr{constructor(t,e,i){n(this,"_outerContainer",void 0),n(this,"shadowRoot",void 0),
|
|
145
145
|
this._outerContainer=document.createElement("hypothesis-profile"),t.appendChild(this._outerContainer),this.shadowRoot=Cn(this._outerContainer),At(ge(_r,{eventBus:e,config:i}),this.shadowRoot)}destroy(){At(null,this.shadowRoot),this._outerContainer.remove()}}var br={exports:{}};!function(t){!function(e,n,i,o){var r,s=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),l="function",c=Math.round,h=Math.abs,u=Date.now;function d(t,e,n){return setTimeout(b(t,n),e)}function f(t,e,n){return!!Array.isArray(t)&&(p(t,n[e],n),!0)}function p(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==o)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function m(t,n,i){var o="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log)
|