hypothesis 1.1463.0 → 1.1465.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 +10 -10
- package/build/scripts/annotator.bundle.js +21 -21
- package/build/scripts/annotator.bundle.js.map +1 -1
- package/build/scripts/sidebar.bundle.js +439 -439
- package/build/scripts/sidebar.bundle.js.map +1 -1
- package/build/scripts/ui-playground.bundle.js +3 -3
- package/build/scripts/ui-playground.bundle.js.map +1 -1
- package/package.json +3 -1
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?0da142","styles/annotator.css":"styles/annotator.css?ec72d0","styles/annotator.css.map":"styles/annotator.css.map?de3818","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css.map":"styles/katex.min.css.map?cd8c0e","styles/katex.min.css":"styles/katex.min.css?e179ab","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/sidebar.css.map":"styles/sidebar.css.map?1984a9","styles/sidebar.css":"styles/sidebar.css?13d728","styles/ui-playground.css.map":"styles/ui-playground.css.map?ec0173","styles/ui-playground.css":"styles/ui-playground.css?db6174","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?0663e4","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?d17710","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?ed487e","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?0ad0cd","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?de58f5"};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.1465.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 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,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,d=c;p<d.length;p++)e(s,i(t,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/manifest.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?
|
|
2
|
+
"scripts/annotator.bundle.js": "scripts/annotator.bundle.js?0da142",
|
|
3
3
|
"styles/annotator.css": "styles/annotator.css?ec72d0",
|
|
4
4
|
"styles/annotator.css.map": "styles/annotator.css.map?de3818",
|
|
5
5
|
"styles/highlights.css": "styles/highlights.css?6b4ebd",
|
|
6
6
|
"styles/highlights.css.map": "styles/highlights.css.map?241350",
|
|
7
|
-
"styles/katex.min.css": "styles/katex.min.css?e179ab",
|
|
8
7
|
"styles/katex.min.css.map": "styles/katex.min.css.map?cd8c0e",
|
|
9
|
-
"styles/
|
|
8
|
+
"styles/katex.min.css": "styles/katex.min.css?e179ab",
|
|
10
9
|
"styles/pdfjs-overrides.css.map": "styles/pdfjs-overrides.css.map?1d8ac6",
|
|
11
|
-
"styles/
|
|
10
|
+
"styles/pdfjs-overrides.css": "styles/pdfjs-overrides.css?c95edf",
|
|
12
11
|
"styles/sidebar.css.map": "styles/sidebar.css.map?1984a9",
|
|
13
|
-
"styles/
|
|
12
|
+
"styles/sidebar.css": "styles/sidebar.css?13d728",
|
|
14
13
|
"styles/ui-playground.css.map": "styles/ui-playground.css.map?ec0173",
|
|
15
|
-
"
|
|
16
|
-
"scripts/
|
|
17
|
-
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?
|
|
18
|
-
"scripts/
|
|
19
|
-
"scripts/
|
|
14
|
+
"styles/ui-playground.css": "styles/ui-playground.css?db6174",
|
|
15
|
+
"scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?0663e4",
|
|
16
|
+
"scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?d17710",
|
|
17
|
+
"scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?ed487e",
|
|
18
|
+
"scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?0ad0cd",
|
|
19
|
+
"scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?de58f5"
|
|
20
20
|
}
|
|
@@ -17,26 +17,26 @@ return"always"}}()},get sidebarAppUrl(){return W(t,"sidebar","html")},get query(
|
|
|
17
17
|
contentInfoBanner:{allowInBrowserExt:!1,defaultValue:null,getValue:j},contentReady:{allowInBrowserExt:!0,defaultValue:null,getValue:j},enableExperimentalNewNoteButton:{allowInBrowserExt:!1,defaultValue:null,getValue:j},group:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.group},focus:{allowInBrowserExt:!1,defaultValue:null,getValue:j},theme:{allowInBrowserExt:!1,defaultValue:null,getValue:j},usernameUrl:{allowInBrowserExt:!1,defaultValue:null,getValue:j},onLayoutChange:{allowInBrowserExt:!1,defaultValue:null,getValue:j},openSidebar:{allowInBrowserExt:!0,defaultValue:!1,coerce:S,getValue:j},query:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.query},requestConfigFromFrame:{allowInBrowserExt:!1,defaultValue:null,getValue:j},services:{allowInBrowserExt:!1,defaultValue:null,getValue:j},showHighlights:{allowInBrowserExt:!1,defaultValue:"always",getValue:t=>t.showHighlights},notebookAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.notebookAppUrl},profileAppUrl:{allowInBrowserExt:!0,
|
|
18
18
|
defaultValue:null,getValue:t=>t.profileAppUrl},sidebarAppUrl:{allowInBrowserExt:!0,defaultValue:null,getValue:t=>t.sidebarAppUrl},subFrameIdentifier:{allowInBrowserExt:!0,defaultValue:null,getValue:j},externalContainerSelector:{allowInBrowserExt:!1,defaultValue:null,getValue:j},sideBySide:{allowInBrowserExt:!0,getValue:t=>t.sideBySide}};function Y(t,e=window){const n=$(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)){
|
|
19
19
|
const t=X[r],s=void 0!==t.defaultValue,a=!((o=W(e,"sidebar","html")).startsWith("http://")||o.startsWith("https://"));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 G,K,Z,Q,J,tt,et,nt,it={},ot=[],rt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,st=Array.isArray;function at(t,e){for(var n in e)t[n]=e[n];return t}function lt(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(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?++Z:o,__i:-1,__u:0};return null==o&&null!=K.vnode&&K.vnode(r),r}function ht(t){return t.children}function ut(t,e){this.props=t,this.context=e}function dt(t,e){if(null==e)return t.__?dt(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?dt(t):null}function ft(t,e,n){var i,o=t.__v,r=o.__e,s=t.__P
|
|
20
|
-
;if(s)return(i=at({},o)).__v=o.__v+1,K.vnode&&K.vnode(i),St(s,i,o,t.__n,void 0!==s.ownerSVGElement,32&o.__u?[r]:null,e,null==r?dt(o):r,!!(32&o.__u),n),i.__v=o.__v,i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=r&&pt(i),i}function pt(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}return pt(t)}}function mt(t){(!t.__d&&(t.__d=!0)&&Q.push(t)&&!gt.__r++||J!==K.debounceRendering)&&((J=K.debounceRendering)||tt)(gt)}function gt(){var t,e,n,i=[],o=[];for(Q.sort(et);t=Q.shift();)t.__d&&(n=Q.length,e=ft(t,i,o)||e,0===n||Q.length>n?(Nt(i,e,o),o.length=i.length=0,e=void 0,Q.sort(et)):e&&K.__c&&K.__c(e,ot));e&&Nt(i,e,o),gt.__r=0}function _t(t,e,n,i,o,r,s,a,l,c,h){var u,d,f,p,m,g=i&&i.__k||ot,_=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=[],
|
|
21
|
-
|
|
22
|
-
null==m&&null!=p&&(m=p),65536&f.__u||d.__k===f.__k?l=vt(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 vt(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=vt(i[o],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function bt(t,e,n,i){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 yt(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||rt.test(e)?n:n+"px"}function wt(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{
|
|
23
|
-
i)for(e in i)n&&e in n||yt(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||yt(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$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?Ct:xt,r)):t.removeEventListener(e,r?Ct:xt,r);else{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 xt(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(K.event?K.event(t):t)}}function Ct(t){if(this.l)return this.l[t.type+!0](K.event?K.event(t):t)}function St(t,e,n,i,o,r,s,a,l,c){
|
|
24
|
-
;128&n.__u&&(l=!!(32&n.__u),r=[a=e.__e=n.__e]),(h=K.__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 ut(_,b),u.constructor=N,u.render=kt),v&&v.sub(u),u.props=_,u.state||(u.state={}),u.context=b,u.__n=i,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=N.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=at({},u.__s)),at(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)){
|
|
25
|
-
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=K.__r,x=0,"prototype"in N&&N.prototype.render){for(u.state=u.__s,u.__d=!1,w&&w(e),h=u.render(u.props,u.state,u.context),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[]}else do{u.__d=!1,w&&w(e),h=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++x<25);u.state=u.__s,null!=u.getChildContext&&(i=at(at({},i),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(m=u.getSnapshotBeforeUpdate(f,p)),_t(t,st(S=null!=h&&h.type===ht&&null==h.key?h.props.children:h)?S:[S],e,n,i,o,r,s,a,l,c),u.base=e.__e,e.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(t){e.__v=null,l||null!=r?(e.__e=a,
|
|
26
|
-
}else null==r&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Et(n.__e,e,n,i,o,r,s,l,c);(h=K.diffed)&&h(e)}function Nt(t,e,n){for(var i=0;i<n.length;i++)At(n[i],n[++i],n[++i]);K.__c&&K.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){K.__e(t,e.__v)}}))}function Et(t,e,n,i,o,r,s,a,l){var c,h,u,d,f,p,m,g=n.props,_=e.props,v=e.type;if("svg"===v&&(o=!0),null!=r)for(c=0;c<r.length;c++)if((f=r[c])&&"setAttribute"in f==!!v&&(v?f.localName===v:3===f.nodeType)){t=f,r[c]=null;break}if(null==t){if(null===v)return document.createTextNode(_);t=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,_.is&&_),r=null,a=!1}if(null===v)g===_||a&&t.data===_||(t.data=_);else{if(r=r&&G.call(t.childNodes),g=n.props||it,!a&&null!=r)for(g={},c=0;c<t.attributes.length;c++)g[(f=t.attributes[c]).name]=f.value;for(c in g)f=g[c],
|
|
27
|
-
"children"==c?d=f:"dangerouslySetInnerHTML"==c?h=f:"value"==c?p=f:"checked"==c?m=f:"key"===c||a&&"function"!=typeof f||g[c]===f||wt(t,c,f,g[c],o);if(h)a||u&&(h.__html===u.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(u&&(t.innerHTML=""),_t(t,st(d)?d:[d],e,n,i,o&&"foreignObject"!==v,r,s,r?r[0]:n.__k&&dt(n,0),a,l),null!=r)for(c=r.length;c--;)null!=r[c]&<(r[c]);a||(c="value",void 0!==p&&(p!==t[c]||"progress"===v&&!p||"option"===v&&p!==g[c])&&wt(t,c,p,g[c],!1),c="checked",void 0!==m&&m!==t[c]&&wt(t,c,m,g[c],!1))}return t}function At(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){K.__e(t,n)}}function Tt(t,e,n){var i,o;if(K.unmount&&K.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||At(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){K.__e(t,e)}i.base=i.__P=null,t.__c=void 0}
|
|
28
|
-
return this.constructor(t,n)}function Rt(t,e,n){var i,o,r,s;K.__&&K.__(t,e),o=(i="function"==typeof n)?null:n&&n.__k||e.__k,r=[],s=[],St(e,t=(!i&&n||e).__k=function(t,e,n){var i,o,r,s={};for(r in e)"key"==r?i=e[r]:"ref"==r?o=e[r]:s[r]=e[r];if(arguments.length>2&&(s.children=arguments.length>3?G.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===s[r]&&(s[r]=t.defaultProps[r]);return ct(t,s,i,o,null)}(ht,null,[t]),o||it,it,void 0!==e.ownerSVGElement,!i&&n?[n]:o?null:e.firstChild?G.call(e.childNodes):null,r,!i&&n?n:o?o.__e:e.firstChild,i,s),t.__d=void 0,Nt(r,t,s)}function Pt(t,e){var n={__c:e="__cC"+nt++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){
|
|
29
|
-
;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}G=ot.slice,K={__e:function(t,e,n,i){for(var o,r,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},Z=0,ut.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=at({},this.state),"function"==typeof t&&(t=t(at({},n),this.props)),t&&at(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),mt(this))},ut.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mt(this))},ut.prototype.render=ht,Q=[],tt="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,et=function(t,e){
|
|
30
|
-
;var Ot,Mt,It,Lt,Bt=0,Dt=[],Ft=[],Ht=K,Vt=Ht.__b,Ut=Ht.__r,qt=Ht.diffed,Wt=Ht.__c,zt=Ht.unmount,$t=Ht.__;function jt(t,e){Ht.__h&&Ht.__h(Mt,t,Bt||e),Bt=0;var n=Mt.__H||(Mt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Ft}),n.__[t]}function Xt(t){return Bt=1,function(t,e,n){var i=jt(Ot++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):se(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Mt,!Mt.u)){var o=function(t,e,n){if(!i.__c.__H)return!0;var o=i.__c.__H.__.filter((function(t){return!!t.__c}));if(o.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var s=!1;return o.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!r||r.call(this,t,e,n))};Mt.u=!0;var r=Mt.shouldComponentUpdate,s=Mt.componentWillUpdate;Mt.componentWillUpdate=function(t,e,n){if(this.__e){var i=r;r=void 0,o(t,e,n),r=i}s&&s.call(this,t,e,n)},
|
|
31
|
-
function Yt(t,e){var n=jt(Ot++,3);!Ht.__s&&re(n.__H,e)&&(n.__=t,n.i=e,Mt.__H.__h.push(n))}function Gt(t,e){var n=jt(Ot++,4);!Ht.__s&&re(n.__H,e)&&(n.__=t,n.i=e,Mt.__h.push(n))}function Kt(t){return Bt=5,Zt((function(){return{current:t}}),[])}function Zt(t,e){var n=jt(Ot++,7);return re(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Qt(t,e){return Bt=8,Zt((function(){return t}),e)}function Jt(){var t=jt(Ot++,11);if(!t.__){for(var e=Mt.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function te(){for(var t;t=Dt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ie),t.__H.__h.forEach(oe),t.__H.__h=[]}catch(e){t.__H.__h=[],Ht.__e(e,t.__v)}}Ht.__b=function(t){Mt=null,Vt&&Vt(t)},Ht.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),$t&&$t(t,e)},Ht.__r=function(t){Ut&&Ut(t),Ot=0;var e=(Mt=t.__c).__H;e&&(It===Mt?(e.__h=[],Mt.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Ft,
|
|
32
|
-
Ot=0)),It=Mt},Ht.diffed=function(t){qt&&qt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Dt.push(e)&&Lt===Ht.requestAnimationFrame||((Lt=Ht.requestAnimationFrame)||ne)(te)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Ft&&(t.__=t.__V),t.i=void 0,t.__V=Ft}))),It=Mt=null},Ht.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ie),t.__h=t.__h.filter((function(t){return!t.__||oe(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Ht.__e(n,t.__v)}})),Wt&&Wt(t,e)},Ht.unmount=function(t){zt&&zt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ie(t)}catch(t){e=t}})),n.__H=void 0,e&&Ht.__e(e,n.__v))};var ee="function"==typeof requestAnimationFrame;function ne(t){var e,n=function(){clearTimeout(i),ee&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);ee&&(e=requestAnimationFrame(n))}function ie(t){var e=Mt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Mt=e}function oe(t){var e=Mt;t.__c=t.__(),Mt=e}
|
|
33
|
-
return e!==t[n]}))}function se(t,e){return"function"==typeof e?e(t):e}const ae={alt:1,ctrl:2,meta:4,shift:8};function le(t,e){if(!(t instanceof KeyboardEvent))return!1;const n=e.split("+").map((t=>t.toLowerCase()));let i=0,o=null;for(const t of n){const e=ae[t];if(e)i|=e;else{if(null!==o)throw new Error("Multiple non-modifier keys specified");o=t}}if(!o)throw new Error(`Invalid shortcut: ${e}`);return((t.ctrlKey?ae.ctrl:0)|(t.metaKey?ae.meta:0)|(t.altKey?ae.alt:0)|(t.shiftKey?ae.shift:0))===i&&t.key.toLowerCase()===o}function ce(t,e,{rootElement:n}={}){Yt((()=>{if(t)return function(t,e,{rootElement:n=(t=>null!==(t=document.documentElement)&&void 0!==t?t:void 0)()}={}){const i=n=>{le(n,t)&&e(n)};return n?(n.addEventListener("keydown",i),()=>n.removeEventListener("keydown",i)):()=>{}}(t,e,{rootElement:n})}),[t,e,n])}const he=(t=window)=>t.matchMedia("(pointer: coarse)").matches;function ue(t,e,n){return e=function(t){var e=function(t,e){
|
|
34
|
-
;if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class de{constructor(){ue(this,"_listeners",void 0),this._listeners=new Map}add(t,e,n,i){t.addEventListener(e,n,i);const o=Symbol();return this._listeners.set(o,{eventTarget:t,eventType:e,listener:n,options:i}),o}remove(t){const e=this._listeners.get(t);if(e){const{eventTarget:n,eventType:i,listener:o,options:r}=e;n.removeEventListener(i,o,r),this._listeners.delete(t)}}removeAll(){this._listeners.forEach((({eventTarget:t,eventType:e,listener:n,options:i})=>{t.removeEventListener(e,n,i)})),this._listeners.clear()}}function fe(t){t.focus()}
|
|
35
|
-
const l=Kt(null),c=function(t){const e=Kt({callback:t,call:(...t)=>e.current.callback(...t)});return e.current.callback=t,e.current.call}(a);Yt((()=>{if(!s)return()=>{};if(!t.current)throw new Error("Container ref not set");const a=t.current,h=()=>{const t=Array.from(a.querySelectorAll(r)).filter((t=>null!==t.offsetParent&&!function(t){return"boolean"==typeof t.disabled&&t.disabled}(t)));return document.activeElement===a&&t.unshift(a),t},u=(t=h(),e=-1,n=!1,i)=>{e<0&&(e=t.findIndex((t=>0===t.tabIndex)))<0&&(e=0);for(const[o,r]of t.entries())r.tabIndex=o===e?0:-1,o===e&&n&&(l.current=r,c(r,i))},d=h(),f=l.current?d.indexOf(l.current):0;u(d,f,e);const p=new de;p.add(a,"focusin",(t=>{if(t.target===a&&l.current)return void c(l.current);const n=h(),i=n.indexOf(t.target);i>=0&&u(n,i,e)})),p.add(a,"keydown",(t=>{const e=h();let r=e.findIndex((t=>0===t.tabIndex)),s=!1
|
|
36
|
-
s=!0):i&&"ArrowRight"===t.key||o&&"ArrowDown"===t.key?(r===e.length-1?r=n?0:r:++r,s=!0):"Home"===t.key?(r=0,s=!0):"End"===t.key&&(r=e.length-1,s=!0),s&&(u(e,r,!0,t),t.preventDefault(),t.stopPropagation())}));const m=new MutationObserver((()=>{u()}));return m.observe(a,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{p.removeAll(),m.disconnect()}}),[e,t,c,i,n,r,o,s])}function me(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ge{constructor(t){me(this,"_target",void 0),me(this,"_value",void 0),this._target=t,
|
|
37
|
-
this._updateTarget()}get target(){return this._target}set target(t){t!==this._target&&(this._target=t,this._updateTarget())}_updateTarget(){const t=this._value;"function"==typeof this._target?this._target(t):this._target&&(this._target.current=t)}}var _e,ve={exports:{}};_e=ve,function(){var t={}.hasOwnProperty;function e(){for(var t="",e=0;e<arguments.length;e++){var o=arguments[e];o&&(t=i(t,n(o)))}return t}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var r in n)t.call(n,r)&&n[r]&&(o=i(o,r));return o}function i(t,e){return e?t?t+" "+e:t+e:t}_e.exports?(e.default=e,_e.exports=e):window.classNames=e}();var be=e(ve.exports);var ye=0;function we(t,e,n,i,o,r){var s,a,l={};for(a in e)"ref"==a?s=e[a]:l[a]=e[a];var c={
|
|
38
|
-
constructor:void 0,__v:--ye,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return K.vnode&&K.vnode(c),c}Pt({}),Pt({});var xe="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function Ce({children:t,classes:e,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return we("div",{"data-component":"Card",...s,ref:n,className:be("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":i&&"raised"===o},{"w-full":"full"===r,"w-auto":"auto"===r},e),children:t},void 0,0,{fileName:xe,lineNumber:40,columnNumber:5},this)}var Se="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function Ne({children:t,classes:e,elementRef:n,size:i="md",...o}){return we("div",{"data-component":"CardContent",...o,ref:n,className:be({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,
|
|
39
|
-
columnNumber:5},this)}var Ee="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function Ae(t){return we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...t,children:we("path",{fill:"currentColor",
|
|
20
|
+
;if(s)return(i=at({},o)).__v=o.__v+1,K.vnode&&K.vnode(i),St(s,i,o,t.__n,void 0!==s.ownerSVGElement,32&o.__u?[r]:null,e,null==r?dt(o):r,!!(32&o.__u),n),i.__v=o.__v,i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=r&&pt(i),i}function pt(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}return pt(t)}}function mt(t){(!t.__d&&(t.__d=!0)&&Q.push(t)&&!gt.__r++||J!==K.debounceRendering)&&((J=K.debounceRendering)||tt)(gt)}function gt(){var t,e,n,i=[],o=[];for(Q.sort(et);t=Q.shift();)t.__d&&(n=Q.length,e=ft(t,i,o)||e,0===n||Q.length>n?(Nt(i,e,o),o.length=i.length=0,e=void 0,Q.sort(et)):e&&K.__c&&K.__c(e,ot));e&&Nt(i,e,o),gt.__r=0}function _t(t,e,n,i,o,r,s,a,l,c,h){var u,d,f,p,m,g=i&&i.__k||ot,_=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++)s=i+u,
|
|
21
|
+
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?ct(null,o,null,null,null):st(o)?ct(ht,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?ct(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,a=bt(o,n,s,h),o.__i=a,r=null,-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--:a<s?a==s-1&&(u=a-s):u=0,a!==i+u&&(o.__u|=65536))):(r=n[s])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=dt(r)),Tt(r,r,!1),n[s]=null,h--);if(h)for(i=0;i<c;i++)null!=(r=n[i])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=dt(r)),Tt(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?it:g[f.__i]||it,f.__i=u,St(t,f,d,o,r,s,a,l,c,h),p=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&At(d.ref,null,f),h.push(f.ref,f.__c||p,f)),
|
|
22
|
+
null==m&&null!=p&&(m=p),65536&f.__u||d.__k===f.__k?l=vt(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 vt(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=vt(i[o],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function bt(t,e,n,i){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&&0==(131072&l.__u))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 yt(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||rt.test(e)?n:n+"px"}function wt(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{
|
|
23
|
+
if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||yt(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||yt(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$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?Ct:xt,r)):t.removeEventListener(e,r?Ct:xt,r);else{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 xt(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(K.event?K.event(t):t)}}function Ct(t){if(this.l)return this.l[t.type+!0](K.event?K.event(t):t)}function St(t,e,n,i,o,r,s,a,l,c){
|
|
24
|
+
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=K.__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 ut(_,b),u.constructor=N,u.render=kt),v&&v.sub(u),u.props=_,u.state||(u.state={}),u.context=b,u.__n=i,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=N.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=at({},u.__s)),at(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)){
|
|
25
|
+
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=K.__r,x=0,"prototype"in N&&N.prototype.render){for(u.state=u.__s,u.__d=!1,w&&w(e),h=u.render(u.props,u.state,u.context),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[]}else do{u.__d=!1,w&&w(e),h=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++x<25);u.state=u.__s,null!=u.getChildContext&&(i=at(at({},i),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(m=u.getSnapshotBeforeUpdate(f,p)),_t(t,st(S=null!=h&&h.type===ht&&null==h.key?h.props.children:h)?S:[S],e,n,i,o,r,s,a,l,c),u.base=e.__e,e.__u&=-161,u.__h.length&&s.push(u),g&&(u.__E=u.__=null)}catch(t){e.__v=null,l||null!=r?(e.__e=a,
|
|
26
|
+
e.__u|=l?160:32,r[r.indexOf(a)]=null):(e.__e=n.__e,e.__k=n.__k),K.__e(t,e,n)}else null==r&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Et(n.__e,e,n,i,o,r,s,l,c);(h=K.diffed)&&h(e)}function Nt(t,e,n){for(var i=0;i<n.length;i++)At(n[i],n[++i],n[++i]);K.__c&&K.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){K.__e(t,e.__v)}}))}function Et(t,e,n,i,o,r,s,a,l){var c,h,u,d,f,p,m,g=n.props,_=e.props,v=e.type;if("svg"===v&&(o=!0),null!=r)for(c=0;c<r.length;c++)if((f=r[c])&&"setAttribute"in f==!!v&&(v?f.localName===v:3===f.nodeType)){t=f,r[c]=null;break}if(null==t){if(null===v)return document.createTextNode(_);t=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,_.is&&_),r=null,a=!1}if(null===v)g===_||a&&t.data===_||(t.data=_);else{if(r=r&&G.call(t.childNodes),g=n.props||it,!a&&null!=r)for(g={},c=0;c<t.attributes.length;c++)g[(f=t.attributes[c]).name]=f.value;for(c in g)f=g[c],
|
|
27
|
+
"children"==c||("dangerouslySetInnerHTML"==c?u=f:"key"===c||c in _||wt(t,c,null,f,o));for(c in _)f=_[c],"children"==c?d=f:"dangerouslySetInnerHTML"==c?h=f:"value"==c?p=f:"checked"==c?m=f:"key"===c||a&&"function"!=typeof f||g[c]===f||wt(t,c,f,g[c],o);if(h)a||u&&(h.__html===u.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(u&&(t.innerHTML=""),_t(t,st(d)?d:[d],e,n,i,o&&"foreignObject"!==v,r,s,r?r[0]:n.__k&&dt(n,0),a,l),null!=r)for(c=r.length;c--;)null!=r[c]&<(r[c]);a||(c="value",void 0!==p&&(p!==t[c]||"progress"===v&&!p||"option"===v&&p!==g[c])&&wt(t,c,p,g[c],!1),c="checked",void 0!==m&&m!==t[c]&&wt(t,c,m,g[c],!1))}return t}function At(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){K.__e(t,n)}}function Tt(t,e,n){var i,o;if(K.unmount&&K.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||At(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){K.__e(t,e)}i.base=i.__P=null,t.__c=void 0}
|
|
28
|
+
if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&Tt(i[o],e,n||"function"!=typeof t.type);n||null==t.__e||lt(t.__e),t.__=t.__e=t.__d=void 0}function kt(t,e,n){return this.constructor(t,n)}function Rt(t,e,n){var i,o,r,s;K.__&&K.__(t,e),o=(i="function"==typeof n)?null:n&&n.__k||e.__k,r=[],s=[],St(e,t=(!i&&n||e).__k=function(t,e,n){var i,o,r,s={};for(r in e)"key"==r?i=e[r]:"ref"==r?o=e[r]:s[r]=e[r];if(arguments.length>2&&(s.children=arguments.length>3?G.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===s[r]&&(s[r]=t.defaultProps[r]);return ct(t,s,i,o,null)}(ht,null,[t]),o||it,it,void 0!==e.ownerSVGElement,!i&&n?[n]:o?null:e.firstChild?G.call(e.childNodes):null,r,!i&&n?n:o?o.__e:e.firstChild,i,s),t.__d=void 0,Nt(r,t,s)}function Pt(t,e){var n={__c:e="__cC"+nt++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){
|
|
29
|
+
this.props.value!==t.value&&n.some((function(t){t.__e=!0,mt(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}G=ot.slice,K={__e:function(t,e,n,i){for(var o,r,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},Z=0,ut.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=at({},this.state),"function"==typeof t&&(t=t(at({},n),this.props)),t&&at(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),mt(this))},ut.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mt(this))},ut.prototype.render=ht,Q=[],tt="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,et=function(t,e){
|
|
30
|
+
return t.__v.__b-e.__v.__b},gt.__r=0,nt=0;var Ot,Mt,It,Lt,Bt=0,Dt=[],Ft=[],Ht=K,Vt=Ht.__b,Ut=Ht.__r,qt=Ht.diffed,Wt=Ht.__c,zt=Ht.unmount,$t=Ht.__;function jt(t,e){Ht.__h&&Ht.__h(Mt,t,Bt||e),Bt=0;var n=Mt.__H||(Mt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Ft}),n.__[t]}function Xt(t){return Bt=1,function(t,e,n){var i=jt(Ot++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):se(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Mt,!Mt.u)){var o=function(t,e,n){if(!i.__c.__H)return!0;var o=i.__c.__H.__.filter((function(t){return!!t.__c}));if(o.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var s=!1;return o.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!r||r.call(this,t,e,n))};Mt.u=!0;var r=Mt.shouldComponentUpdate,s=Mt.componentWillUpdate;Mt.componentWillUpdate=function(t,e,n){if(this.__e){var i=r;r=void 0,o(t,e,n),r=i}s&&s.call(this,t,e,n)},
|
|
31
|
+
Mt.shouldComponentUpdate=o}return i.__N||i.__}(se,t)}function Yt(t,e){var n=jt(Ot++,3);!Ht.__s&&re(n.__H,e)&&(n.__=t,n.i=e,Mt.__H.__h.push(n))}function Gt(t,e){var n=jt(Ot++,4);!Ht.__s&&re(n.__H,e)&&(n.__=t,n.i=e,Mt.__h.push(n))}function Kt(t){return Bt=5,Zt((function(){return{current:t}}),[])}function Zt(t,e){var n=jt(Ot++,7);return re(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Qt(t,e){return Bt=8,Zt((function(){return t}),e)}function Jt(){var t=jt(Ot++,11);if(!t.__){for(var e=Mt.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function te(){for(var t;t=Dt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ie),t.__H.__h.forEach(oe),t.__H.__h=[]}catch(e){t.__H.__h=[],Ht.__e(e,t.__v)}}Ht.__b=function(t){Mt=null,Vt&&Vt(t)},Ht.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),$t&&$t(t,e)},Ht.__r=function(t){Ut&&Ut(t),Ot=0;var e=(Mt=t.__c).__H;e&&(It===Mt?(e.__h=[],Mt.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Ft,
|
|
32
|
+
t.__N=t.i=void 0}))):(e.__h.forEach(ie),e.__h.forEach(oe),e.__h=[],Ot=0)),It=Mt},Ht.diffed=function(t){qt&&qt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Dt.push(e)&&Lt===Ht.requestAnimationFrame||((Lt=Ht.requestAnimationFrame)||ne)(te)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Ft&&(t.__=t.__V),t.i=void 0,t.__V=Ft}))),It=Mt=null},Ht.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ie),t.__h=t.__h.filter((function(t){return!t.__||oe(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Ht.__e(n,t.__v)}})),Wt&&Wt(t,e)},Ht.unmount=function(t){zt&&zt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ie(t)}catch(t){e=t}})),n.__H=void 0,e&&Ht.__e(e,n.__v))};var ee="function"==typeof requestAnimationFrame;function ne(t){var e,n=function(){clearTimeout(i),ee&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);ee&&(e=requestAnimationFrame(n))}function ie(t){var e=Mt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Mt=e}function oe(t){var e=Mt;t.__c=t.__(),Mt=e}
|
|
33
|
+
function re(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function se(t,e){return"function"==typeof e?e(t):e}const ae={alt:1,ctrl:2,meta:4,shift:8};function le(t,e){if(!(t instanceof KeyboardEvent))return!1;const n=e.split("+").map((t=>t.toLowerCase()));let i=0,o=null;for(const t of n){const e=ae[t];if(e)i|=e;else{if(null!==o)throw new Error("Multiple non-modifier keys specified");o=t}}if(!o)throw new Error(`Invalid shortcut: ${e}`);return((t.ctrlKey?ae.ctrl:0)|(t.metaKey?ae.meta:0)|(t.altKey?ae.alt:0)|(t.shiftKey?ae.shift:0))===i&&t.key.toLowerCase()===o}function ce(t,e,{rootElement:n}={}){Yt((()=>{if(t)return function(t,e,{rootElement:n=(t=>null!==(t=document.documentElement)&&void 0!==t?t:void 0)()}={}){const i=n=>{le(n,t)&&e(n)};return n?(n.addEventListener("keydown",i),()=>n.removeEventListener("keydown",i)):()=>{}}(t,e,{rootElement:n})}),[t,e,n])}const he=(t=window)=>t.matchMedia("(pointer: coarse)").matches;function ue(t,e,n){return e=function(t){var e=function(t,e){
|
|
34
|
+
if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class de{constructor(){ue(this,"_listeners",void 0),this._listeners=new Map}add(t,e,n,i){t.addEventListener(e,n,i);const o=Symbol();return this._listeners.set(o,{eventTarget:t,eventType:e,listener:n,options:i}),o}remove(t){const e=this._listeners.get(t);if(e){const{eventTarget:n,eventType:i,listener:o,options:r}=e;n.removeEventListener(i,o,r),this._listeners.delete(t)}}removeAll(){this._listeners.forEach((({eventTarget:t,eventType:e,listener:n,options:i})=>{t.removeEventListener(e,n,i)})),this._listeners.clear()}}function fe(t){t.focus()}
|
|
35
|
+
function pe(t,{autofocus:e=!1,loop:n=!0,horizontal:i=!0,vertical:o=!0,selector:r="a,button",containerVisible:s=!0,focusElement:a=fe}={}){const l=Kt(null),c=function(t){const e=Kt({callback:t,call:(...t)=>e.current.callback(...t)});return e.current.callback=t,e.current.call}(a);Yt((()=>{if(!s)return()=>{};if(!t.current)throw new Error("Container ref not set");const a=t.current,h=()=>{const t=Array.from(a.querySelectorAll(r)).filter((t=>null!==t.offsetParent&&!function(t){return"boolean"==typeof t.disabled&&t.disabled}(t)));return document.activeElement===a&&t.unshift(a),t},u=(t=h(),e=-1,n=!1,i)=>{e<0&&(e=t.findIndex((t=>0===t.tabIndex)))<0&&(e=0);for(const[o,r]of t.entries())r.tabIndex=o===e?0:-1,o===e&&n&&(l.current=r,c(r,i))},d=h(),f=l.current?d.indexOf(l.current):0;u(d,f,e);const p=new de;p.add(a,"focusin",(t=>{if(t.target===a&&l.current)return void c(l.current);const n=h(),i=n.indexOf(t.target);i>=0&&u(n,i,e)})),p.add(a,"keydown",(t=>{const e=h();let r=e.findIndex((t=>0===t.tabIndex)),s=!1
|
|
36
|
+
;i&&"ArrowLeft"===t.key||o&&"ArrowUp"===t.key?(0===r?r=n?e.length-1:r:--r,s=!0):i&&"ArrowRight"===t.key||o&&"ArrowDown"===t.key?(r===e.length-1?r=n?0:r:++r,s=!0):"Home"===t.key?(r=0,s=!0):"End"===t.key&&(r=e.length-1,s=!0),s&&(u(e,r,!0,t),t.preventDefault(),t.stopPropagation())}));const m=new MutationObserver((()=>{u()}));return m.observe(a,{subtree:!0,attributes:!0,attributeFilter:["disabled"],childList:!0}),()=>{p.removeAll(),m.disconnect()}}),[e,t,c,i,n,r,o,s])}function me(t,e,n){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ge{constructor(t){me(this,"_target",void 0),me(this,"_value",void 0),this._target=t,
|
|
37
|
+
this._value=null}get current(){return this._value}set current(t){this._value=t,this._updateTarget()}get target(){return this._target}set target(t){t!==this._target&&(this._target=t,this._updateTarget())}_updateTarget(){const t=this._value;"function"==typeof this._target?this._target(t):this._target&&(this._target.current=t)}}var _e,ve={exports:{}};_e=ve,function(){var t={}.hasOwnProperty;function e(){for(var t="",e=0;e<arguments.length;e++){var o=arguments[e];o&&(t=i(t,n(o)))}return t}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var r in n)t.call(n,r)&&n[r]&&(o=i(o,r));return o}function i(t,e){return e?t?t+" "+e:t+e:t}_e.exports?(e.default=e,_e.exports=e):window.classNames=e}();var be=e(ve.exports);var ye=0;function we(t,e,n,i,o,r){var s,a,l={};for(a in e)"ref"==a?s=e[a]:l[a]=e[a];var c={
|
|
38
|
+
type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ye,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return K.vnode&&K.vnode(c),c}Pt({}),Pt({});var xe="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx";function Ce({children:t,classes:e,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return we("div",{"data-component":"Card",...s,ref:n,className:be("rounded-lg border bg-white",{"shadow hover:shadow-md":"raised"===o,"shadow-md":i&&"raised"===o},{"w-full":"full"===r,"w-auto":"auto"===r},e),children:t},void 0,0,{fileName:xe,lineNumber:40,columnNumber:5},this)}var Se="/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx";function Ne({children:t,classes:e,elementRef:n,size:i="md",...o}){return we("div",{"data-component":"CardContent",...o,ref:n,className:be({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,
|
|
39
|
+
"p-4 space-y-6":"lg"===i},e),children:t},void 0,0,{fileName:Se,lineNumber:29,columnNumber:5},this)}var Ee="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function Ae(t){return we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...t,children:we("path",{fill:"currentColor",
|
|
40
40
|
d:"M15 0c.27 0 .505.099.703.297A.961.961 0 0 1 16 1v15l-4-3H1a.974.974 0 0 1-.703-.29A.953.953 0 0 1 0 12V1A.96.96 0 0 1 .29.29.966.966 0 0 1 1 0zM7 3l-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C4.156 5.229 4 6 4 7l.002.063.006.062a.896.896 0 0 1 .008.11l-.002.074-.006.066a1.447 1.447 0 0 0 .43 1.188C4.729 8.854 5.082 9 5.5 9c.417 0 .77-.146 1.063-.438C6.854 8.271 7 7.918 7 7.5c0-.417-.146-.77-.438-1.063A1.447 1.447 0 0 0 5.5 6a1.467 1.467 0 0 0-.422.062c.177-1.03.542-1.632 1.094-1.804L7 4zm5 0-.469.063c-.312.041-.656.187-1.031.437-.375.25-.719.646-1.031 1.188C9.156 5.229 9 6 9 7l.002.063.006.062a.896.896 0 0 1 .008.11l-.002.074-.006.066a1.447 1.447 0 0 0 .43 1.188c.291.291.645.437 1.062.437.417 0 .77-.146 1.063-.438.291-.291.437-.645.437-1.062 0-.417-.146-.77-.438-1.063A1.447 1.447 0 0 0 10.5 6a1.467 1.467 0 0 0-.422.062c.177-1.03.542-1.632 1.094-1.804L12 4z"},void 0,0,{fileName:Ee,lineNumber:19,columnNumber:7},this)},void 0,0,{fileName:Ee,lineNumber:11,columnNumber:5},this)}
|
|
41
41
|
var Te="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Cancel.tsx";function ke(t){return we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CancelIcon",...t,children:we("g",{fill:"none","fill-rule":"evenodd",children:[we("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Te,lineNumber:21,columnNumber:9},this),we("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 8 3.536-3.536zL4.464 4.464zm0 0-3.536 3.536zl3.536 3.536z"},void 0,0,{fileName:Te,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Te,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Te,lineNumber:11,columnNumber:5},this)}var Re="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretDown.tsx";function Pe(t){return we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretDownIcon",...t,
|
|
42
42
|
children:we("g",{fill:"none","fill-rule":"evenodd",children:[we("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Re,lineNumber:21,columnNumber:9},this),we("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 6-4 4-4-4"},void 0,0,{fileName:Re,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:Re,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:Re,lineNumber:11,columnNumber:5},this)}var Oe="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretLeft.tsx";function Me(t){return we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretLeftIcon",...t,children:we("g",{fill:"none","fill-rule":"evenodd",children:[we("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:Oe,lineNumber:21,columnNumber:9},this),we("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 12 6 8l4-4"},void 0,0,{fileName:Oe,lineNumber:22,
|
|
@@ -140,7 +140,7 @@ this._sidebarRPC.on("scrollToAnnotation",(t=>{this._scrollToAnnotation(t)})),thi
|
|
|
140
140
|
this._selectionObserver.disconnect(),this._adder.destroy(),this._bucketBarClient.destroy(),null===(t=this._clusterToolbar)||void 0===t||t.destroy(),null===(e=this._outsideAssignmentNotice)||void 0===e||e.destroy(),function(t){ti(Array.from(t.querySelectorAll("hypothesis-highlight")))}(this.element),this._integration.destroy()}async anchor(t){this._contentReady&&(await this._contentReady,this._contentReady=void 0);const e=t=>{var e;const n=vr(t);if(!n)return;const i=Qn(n,null===(e=t.annotation)||void 0===e?void 0:e.$cluster);i.forEach((e=>{e._annotation=t.annotation})),t.highlights=i,this._hoveredAnnotations.has(t.annotation.$tag)&&ei(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=Un.fromRange(i);n={annotation:t,target:e,range:o}}catch(i){n={
|
|
141
141
|
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&&ti(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)}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}))),r={uri:n.uri,document:n.metadata,target:o,$highlight:t,$cluster:t?"user-highlights":"user-annotations",$tag:"a:"+s(8)};return this._sidebarRPC.call("createAnnotation",r),
|
|
142
142
|
this.anchor(r),br(),r}_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);ei(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=jn(n),o=Gn(n);o?(this.selectedRanges=[e],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=gr(),this._isAdderVisible=!0,this._adder.show(o,i)):this._onClearSelection()}_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")}
|
|
143
|
-
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){le(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(t){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new fr(this.element)),this._outsideAssignmentNotice.setVisible(t)}}function xr(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function Cr(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.
|
|
143
|
+
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){le(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}_setOutsideAssignmentNoticeVisible(t){this._outsideAssignmentNotice||(this._outsideAssignmentNotice=new fr(this.element)),this._outsideAssignmentNotice.setVisible(t)}}function xr(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function Cr(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.1465.0";const o=new URL(window.location.href);if(o.hash="",
|
|
144
144
|
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 Sr({closed:t,onClose:e,children:n,"data-testid":i,"aria-label":o}){const r=Kt(null);return Yt((()=>{var e,n;t?null===(e=r.current)||void 0===e||e.close():null===(n=r.current)||void 0===n||n.showModal()}),[t]),Yt((()=>{const t=r.current;return null==t||t.addEventListener("cancel",e),()=>{null==t||t.removeEventListener("cancel",e)}}),[e]),we("dialog",{ref:r,className:"relative w-full h-full backdrop:bg-black/50","data-testid":i,"aria-label":o,children:n})}function Nr({closed:t,children:e,...n}){return we("div",{...n,className:be("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:t}),children:we("div",{
|
|
145
145
|
className:"relative w-full h-full",children:e})})}function Er({document_:t=document,...e}){return we(Zt((()=>function(t){return"function"==typeof t.createElement("dialog").showModal}(t)?Sr:Nr),[t]),{...e})}function Ar({config:t,groupId:e}){return we("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allow:"fullscreen; clipboard-write",src:xr(t.notebookAppUrl,{...Cr(t.notebookAppUrl,t),group:e})})}function Tr({eventBus:t,config:e}){const[n,i]=Xt(0),[o,r]=Xt(!0),[s,a]=Xt(null),l=Kt(""),c=Kt(null);Yt((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),Yt((()=>{document.body.style.overflow=o?l.current:"hidden"}),[o]),Yt((()=>{const e=t.createEmitter();return e.subscribe("openNotebook",(t=>{r(!1),i((t=>t+1)),a(t)})),c.current=e,()=>{e.destroy()}}),[t]);const h=Qt((()=>{var t;r(!0),null===(t=c.current)||void 0===t||t.publish("closeNotebook")}),[]);return null===s?null:we(Er,{closed:o,onClose:h,"data-testid":"notebook-outer",
|
|
146
146
|
"aria-label":"Hypothesis notebook",children:[we("div",{className:"absolute right-0 m-3",children:we(an,{title:"Close notebook",onClick:h,variant:"dark",classes:be("!bg-transparent enabled:hover:!bg-grey-3"),"data-testid":"close-button",children:we(ke,{className:"w-4 h-4"})})}),we(Ar,{config:e,groupId:s},n)]})}class kr{constructor(t,e,n){i(this,"_container",void 0),this._container=new kn("notebook",(()=>we(Tr,{eventBus:e,config:n}))),t.append(this._container.element),this._container.render()}destroy(){this._container.destroy()}}function Rr({eventBus:t,config:e}){const[n,i]=Xt(!0),o=Kt(null);Yt((()=>{const e=t.createEmitter();return e.subscribe("openProfile",(()=>{i(!1)})),o.current=e,()=>{e.destroy()}}),[t]);const r=()=>{var t;i(!0),null===(t=o.current)||void 0===t||t.publish("closeProfile")};return n?null:we(Er,{closed:n,onClose:r,"data-testid":"profile-outer","aria-label":"Hypothesis profile",children:[we("div",{className:"absolute right-0 m-3",children:we(an,{title:"Close profile dialog",onClick:r,
|