hypothesis 1.1358.0 → 1.1360.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/boot.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?5a857c","styles/annotator.css":"styles/annotator.css?0f15d2","styles/annotator.css.map":"styles/annotator.css.map?85af3b","styles/highlights.css":"styles/highlights.css?6b4ebd","styles/highlights.css.map":"styles/highlights.css.map?241350","styles/katex.min.css":"styles/katex.min.css?0b5991","styles/katex.min.css.map":"styles/katex.min.css.map?42d80c","styles/pdfjs-overrides.css":"styles/pdfjs-overrides.css?c95edf","styles/pdfjs-overrides.css.map":"styles/pdfjs-overrides.css.map?1d8ac6","styles/sidebar.css":"styles/sidebar.css?e2cf56","styles/sidebar.css.map":"styles/sidebar.css.map?1ea137","styles/ui-playground.css":"styles/ui-playground.css?daa1e5","styles/ui-playground.css.map":"styles/ui-playground.css.map?776ff6","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?ea9d25","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?a25e89","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?1349a2","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?b798f3","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?5d10ba"};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),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1358.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,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)e(s,i(t,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var 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 p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,u=p;c<u.length;c++)e(s,i(t,u[c]))}}(document,{assetRoot:p,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/.")}();
1
+ !function(){"use strict";var s={"scripts/annotator.bundle.js":"scripts/annotator.bundle.js?954427","styles/annotator.css":"styles/annotator.css?0f15d2","styles/annotator.css.map":"styles/annotator.css.map?85af3b","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?42d80c","styles/katex.min.css":"styles/katex.min.css?0b5991","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?1ea137","styles/sidebar.css":"styles/sidebar.css?e2cf56","styles/ui-playground.css.map":"styles/ui-playground.css.map?776ff6","styles/ui-playground.css":"styles/ui-playground.css?daa1e5","scripts/sidebar.bundle.js":"scripts/sidebar.bundle.js?9e7c5c","scripts/annotator.bundle.js.map":"scripts/annotator.bundle.js.map?3613d7","scripts/ui-playground.bundle.js":"scripts/ui-playground.bundle.js?1349a2","scripts/ui-playground.bundle.js.map":"scripts/ui-playground.bundle.js.map?b798f3","scripts/sidebar.bundle.js.map":"scripts/sidebar.bundle.js.map?0742b2"};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),p=a(l.assetRoot||"https://cdn.hypothes.is/hypothesis/1.1360.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,p=["styles/katex.min.css","styles/sidebar.css"];l<p.length;l++)e(s,i(t,p[l]))}(document,{assetRoot:p,manifest:s,apiUrl:l.apiUrl})}else{var c=function(){var s;return null===(s=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome)||void 0===s||null===(s=s.runtime)||void 0===s?void 0:s.id}();if(c&&!function(s){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("script.js-hypothesis-config[data-extension-id=".concat(s,"]"))}(c))throw new Error("Could not start Hypothesis extension as configuration is missing");var 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 p=[];void 0!==window.PDFViewerApplication&&p.push("styles/pdfjs-overrides.css"),p.push("styles/highlights.css");for(var c=0,u=p;c<u.length;c++)e(s,i(t,u[c]))}}(document,{assetRoot:p,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/.")}();
@@ -1,20 +1,20 @@
1
1
  {
2
- "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?5a857c",
2
+ "scripts/annotator.bundle.js": "scripts/annotator.bundle.js?954427",
3
3
  "styles/annotator.css": "styles/annotator.css?0f15d2",
4
4
  "styles/annotator.css.map": "styles/annotator.css.map?85af3b",
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?0b5991",
8
7
  "styles/katex.min.css.map": "styles/katex.min.css.map?42d80c",
8
+ "styles/katex.min.css": "styles/katex.min.css?0b5991",
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?e2cf56",
12
11
  "styles/sidebar.css.map": "styles/sidebar.css.map?1ea137",
13
- "styles/ui-playground.css": "styles/ui-playground.css?daa1e5",
12
+ "styles/sidebar.css": "styles/sidebar.css?e2cf56",
14
13
  "styles/ui-playground.css.map": "styles/ui-playground.css.map?776ff6",
15
- "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?ea9d25",
16
- "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?a25e89",
14
+ "styles/ui-playground.css": "styles/ui-playground.css?daa1e5",
15
+ "scripts/sidebar.bundle.js": "scripts/sidebar.bundle.js?9e7c5c",
16
+ "scripts/annotator.bundle.js.map": "scripts/annotator.bundle.js.map?3613d7",
17
17
  "scripts/ui-playground.bundle.js": "scripts/ui-playground.bundle.js?1349a2",
18
18
  "scripts/ui-playground.bundle.js.map": "scripts/ui-playground.bundle.js.map?b798f3",
19
- "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?5d10ba"
19
+ "scripts/sidebar.bundle.js.map": "scripts/sidebar.bundle.js.map?0742b2"
20
20
  }
@@ -29,9 +29,9 @@ if(function(t,e,n,i,o){var r;for(r in n)"children"===r||"key"===r||r in e||bt(t,
29
29
  ;var kt,Pt,Ot,Lt,Mt=0,It=[],Bt=[],Ft=Y.__b,Dt=Y.__r,Ht=Y.diffed,Vt=Y.__c,Ut=Y.unmount;function qt(t,e){Y.__h&&Y.__h(Pt,t,Mt||e),Mt=0;var n=Pt.__H||(Pt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Bt}),n.__[t]}function Wt(t){return Mt=1,function(t,e,n){var i=qt(kt++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):te(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=Pt,!Pt.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))};Pt.u=!0;var r=Pt.shouldComponentUpdate,s=Pt.componentWillUpdate;Pt.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)},Pt.shouldComponentUpdate=o}return i.__N||i.__}(te,t)}function $t(t,e){
30
30
  var n=qt(kt++,3);!Y.__s&&Jt(n.__H,e)&&(n.__=t,n.i=e,Pt.__H.__h.push(n))}function zt(t){return Mt=5,jt((function(){return{current:t}}),[])}function jt(t,e){var n=qt(kt++,7);return Jt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Xt(t,e){return Mt=8,jt((function(){return t}),e)}function Yt(){for(var t;t=It.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Kt),t.__H.__h.forEach(Qt),t.__H.__h=[]}catch(e){t.__H.__h=[],Y.__e(e,t.__v)}}Y.__b=function(t){Pt=null,Ft&&Ft(t)},Y.__r=function(t){Dt&&Dt(t),kt=0;var e=(Pt=t.__c).__H;e&&(Ot===Pt?(e.__h=[],Pt.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Bt,t.__N=t.i=void 0}))):(e.__h.forEach(Kt),e.__h.forEach(Qt),e.__h=[],kt=0)),Ot=Pt},Y.diffed=function(t){Ht&&Ht(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==It.push(e)&&Lt===Y.requestAnimationFrame||((Lt=Y.requestAnimationFrame)||Zt)(Yt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Bt&&(t.__=t.__V),t.i=void 0,t.__V=Bt}))),Ot=Pt=null},Y.__c=function(t,e){e.some((function(t){try{
31
31
  t.__h.forEach(Kt),t.__h=t.__h.filter((function(t){return!t.__||Qt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Y.__e(n,t.__v)}})),Vt&&Vt(t,e)},Y.unmount=function(t){Ut&&Ut(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Kt(t)}catch(t){e=t}})),n.__H=void 0,e&&Y.__e(e,n.__v))};var Gt="function"==typeof requestAnimationFrame;function Zt(t){var e,n=function(){clearTimeout(i),Gt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);Gt&&(e=requestAnimationFrame(n))}function Kt(t){var e=Pt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Pt=e}function Qt(t){var e=Pt;t.__c=t.__(),Pt=e}function Jt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function te(t,e){return"function"==typeof e?e(t):e}const ee={alt:1,ctrl:2,meta:4,shift:8};function ne(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=ee[t];if(e)i|=e;else{
32
- if(null!==o)throw new Error("Multiple non-modifier keys specified");o=t}}if(!o)throw new Error(`Invalid shortcut: ${e}`);return((t.ctrlKey?ee.ctrl:0)|(t.metaKey?ee.meta:0)|(t.altKey?ee.alt:0)|(t.shiftKey?ee.shift:0))===i&&t.key.toLowerCase()===o}function ie(t,e,{rootElement:n}={}){$t((()=>{if(t)return function(t,e,{rootElement:n=document.documentElement}={}){const i=n=>{ne(n,t)&&e(n)};return n.addEventListener("keydown",i),()=>n.removeEventListener("keydown",i)}(t,e,{rootElement:n})}),[t,e,n])}const oe=(t=window)=>t.matchMedia("(pointer: coarse)").matches;var re,se={exports:{}};re=se,function(){var t={}.hasOwnProperty;function e(){for(var n=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var r=typeof o;if("string"===r||"number"===r)n.push(o);else if(Array.isArray(o)){if(o.length){var s=e.apply(null,o);s&&n.push(s)}}else if("object"===r){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&n.push(a)}
33
- }}return n.join(" ")}re.exports?(e.default=e,re.exports=e):window.classNames=e}();var ae=e(se.exports);var le=0;function ce(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={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--le,__source:o,__self:r};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return Y.vnode&&Y.vnode(c),c}Tt({}),Tt({});const he=function({children:t,classes:e,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return ce("div",{"data-component":"Card",...s,ref:n,className:ae("rounded 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:"/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx",lineNumber:40,columnNumber:5},this)};const ue=function({children:t,classes:e,elementRef:n,size:i="md",...o}){return ce("div",{
34
- "data-component":"CardContent",...o,ref:n,className:ae({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,"p-4 space-y-6":"lg"===i},e),children:t},void 0,0,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx",lineNumber:29,columnNumber:5},this)};var de="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function fe(t){return ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...t,children:ce("path",{fill:"currentColor",
32
+ if(null!==o)throw new Error("Multiple non-modifier keys specified");o=t}}if(!o)throw new Error(`Invalid shortcut: ${e}`);return((t.ctrlKey?ee.ctrl:0)|(t.metaKey?ee.meta:0)|(t.altKey?ee.alt:0)|(t.shiftKey?ee.shift:0))===i&&t.key.toLowerCase()===o}function ie(t,e,{rootElement:n}={}){$t((()=>{if(t)return function(t,e,{rootElement:n=(t=>null!==(t=document.documentElement)&&void 0!==t?t:void 0)()}={}){const i=n=>{ne(n,t)&&e(n)};return n?(n.addEventListener("keydown",i),()=>n.removeEventListener("keydown",i)):()=>{}}(t,e,{rootElement:n})}),[t,e,n])}const oe=(t=window)=>t.matchMedia("(pointer: coarse)").matches;var re,se={exports:{}};re=se,function(){var t={}.hasOwnProperty;function e(){for(var n=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var r=typeof o;if("string"===r||"number"===r)n.push(o);else if(Array.isArray(o)){if(o.length){var s=e.apply(null,o);s&&n.push(s)}}else if("object"===r){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString())
33
+ ;continue}for(var a in o)t.call(o,a)&&o[a]&&n.push(a)}}}return n.join(" ")}re.exports?(e.default=e,re.exports=e):window.classNames=e}();var ae=e(se.exports);var le=0;function ce(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={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--le,__source:o,__self:r};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return Y.vnode&&Y.vnode(c),c}Tt({}),Tt({});const he=function({children:t,classes:e,elementRef:n,active:i=!1,variant:o="raised",width:r="full",...s}){return ce("div",{"data-component":"Card",...s,ref:n,className:ae("rounded 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:"/home/runner/work/frontend-shared/frontend-shared/src/components/layout/Card.tsx",lineNumber:40,columnNumber:5},this)}
34
+ ;const ue=function({children:t,classes:e,elementRef:n,size:i="md",...o}){return ce("div",{"data-component":"CardContent",...o,ref:n,className:ae({"p-3 space-y-4":"md"===i,"p-2 space-y-3":"sm"===i,"p-4 space-y-6":"lg"===i},e),children:t},void 0,0,{fileName:"/home/runner/work/frontend-shared/frontend-shared/src/components/layout/CardContent.tsx",lineNumber:29,columnNumber:5},this)};var de="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Annotate.tsx";function fe(t){return ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16","data-component":"AnnotateIcon",...t,children:ce("path",{fill:"currentColor",
35
35
  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 0h14zM7 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 4V3zm5 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 4V3z"},void 0,0,{fileName:de,lineNumber:19,columnNumber:7},this)},void 0,0,{fileName:de,lineNumber:11,columnNumber:5},this)}
36
36
  var pe="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/Cancel.tsx";function me(t){return ce("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:ce("g",{fill:"none","fill-rule":"evenodd",children:[ce("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:pe,lineNumber:21,columnNumber:9},this),ce("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 8 3.536-3.536L8 8 4.464 4.464 8 8zm0 0-3.536 3.536L8 8l3.536 3.536L8 8z"},void 0,0,{fileName:pe,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:pe,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:pe,lineNumber:11,columnNumber:5},this)}var ge="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretDown.tsx";function _e(t){return ce("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16","data-component":"CaretDownIcon",
37
37
  ...t,children:ce("g",{fill:"none","fill-rule":"evenodd",children:[ce("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:ge,lineNumber:21,columnNumber:9},this),ce("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 6-4 4-4-4"},void 0,0,{fileName:ge,lineNumber:22,columnNumber:9},this)]},void 0,0,{fileName:ge,lineNumber:20,columnNumber:7},this)},void 0,0,{fileName:ge,lineNumber:11,columnNumber:5},this)}var ve="/home/runner/work/frontend-shared/frontend-shared/src/components/icons/CaretLeft.tsx";function be(t){return ce("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:ce("g",{fill:"none","fill-rule":"evenodd",children:[ce("path",{d:"M0 0h16v16H0z"},void 0,0,{fileName:ve,lineNumber:21,columnNumber:9},this),ce("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 12 6 8l4-4"},void 0,0,{fileName:ve,lineNumber:22,
@@ -127,7 +127,7 @@ this._sidebarRPC.on("hoverAnnotations",(t=>this._hoverAnnotations(t))),this._sid
127
127
  this._bucketBarClient.destroy(),null===(t=this._clusterToolbar)||void 0===t||t.destroy(),function(t){En(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=Ho(t);if(!n)return;const i=Cn(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)&&Nn(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=dn.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)
128
128
  ;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&&En(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}))),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),Vo(),s}_hoverAnnotations(t){this._hoveredAnnotations.clear(),
129
129
  t.forEach((t=>this._hoveredAnnotations.add(t)));for(const e of this.anchors)if(e.highlights){const n=t.includes(e.annotation.$tag);Nn(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=_n(n),o=yn(n);o?(this.selectedRanges=[e],this._hostRPC.call("textSelected"),this._adder.annotationsForSelection=Fo(),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")}setHighlightsVisible(t,e=!0){!function(t,e){t.classList.toggle("hypothesis-highlights-always-on",e)
130
- }(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){ne(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}}function Wo(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function $o(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.1358.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),
130
+ }(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){ne(t,"Ctrl+Shift+H")&&this.setHighlightsVisible(!this._highlightsVisible)}}function Wo(t,e){const n=new URL(t),i=new URLSearchParams;return i.append("config",JSON.stringify(e)),n.hash=i.toString(),n.toString()}function $o(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.1360.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),
131
131
  t.onProfileRequest&&(t.onProfileRequestProvided=!0),t.onHelpRequest&&(t.onHelpRequestProvided=!0)}return i}function zo({config:t,groupId:e}){return ce("iframe",{title:"Hypothesis annotation notebook",className:"h-full w-full border-0",allowFullScreen:!0,src:Wo(t.notebookAppUrl,{...$o(t.notebookAppUrl,t),group:e})})}function jo({eventBus:t,config:e}){const[n,i]=Wt(0),[o,r]=Wt(!0),[s,a]=Wt(null),l=zt(""),c=zt(null);$t((()=>(l.current=document.body.style.overflow,()=>{document.body.style.overflow=l.current})),[]),$t((()=>{document.body.style.overflow=o?l.current:"hidden"}),[o]),$t((()=>{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:ce("div",{className:ae("fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50",{hidden:o}),"data-testid":"notebook-outer",children:ce("div",{className:"relative w-full h-full","data-testid":"notebook-inner",children:[ce("div",{className:"absolute right-0 m-3",children:ce(Ue,{
132
132
  title:"Close the Notebook",onClick:()=>{var t;r(!0),null===(t=c.current)||void 0===t||t.publish("closeNotebook")},variant:"dark",classes:ae("!bg-transparent enabled:hover:!bg-grey-3"),children:ce(me,{className:"w-4 h-4"})})}),ce(zo,{config:e,groupId:s},n)]})})}class Xo{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=Je(this._outerContainer),Rt(ce(jo,{eventBus:e,config:i}),this._shadowRoot)}destroy(){Rt(null,this._shadowRoot),this._outerContainer.remove()}}function Yo({eventBus:t,config:e}){const[n,i]=Wt(!0),o=zt(null);$t((()=>{const e=t.createEmitter();return e.subscribe("openProfile",(()=>{i(!1)})),o.current=e,()=>{e.destroy()}}),[t]);return n?null:ce("div",{className:"fixed z-max top-0 left-0 right-0 bottom-0 p-3 bg-black/50","data-testid":"profile-outer",children:ce("div",{className:"relative w-full h-full","data-testid":"profile-inner",
133
133
  children:[ce("div",{className:"absolute right-0 m-3",children:ce(Ue,{title:"Close the Profile",onClick:()=>{var t;i(!0),null===(t=o.current)||void 0===t||t.publish("closeProfile")},variant:"dark",classes:ae("!bg-transparent enabled:hover:!bg-grey-3"),children:ce(me,{className:"w-4 h-4"})})}),ce("iframe",{title:"Hypothesis profile",className:"h-full w-full border-0",src:e.profileAppUrl})]})})}class Go{constructor(t,e,i){n(this,"_outerContainer",void 0),n(this,"shadowRoot",void 0),this._outerContainer=document.createElement("hypothesis-profile"),t.appendChild(this._outerContainer),this.shadowRoot=Je(this._outerContainer),Rt(ce(Yo,{eventBus:e,config:i}),this.shadowRoot)}destroy(){Rt(null,this.shadowRoot),this._outerContainer.remove()}}var Zo={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)}
@@ -169,6 +169,6 @@ this._sidebarRPC.on("toastMessageDismissed",(t=>{this._emitter.publish("toastMes
169
169
  this._updateLayoutState()}})))}_updateLayoutState(t){var e,n;const i=this.iframeContainer&&this.toolbar.getWidth()||0,o=null!==(e=this.iframeContainer)&&void 0!==e?e:this.externalFrame,{height:r}=o.getBoundingClientRect(),s=window.getComputedStyle(o),a=parseInt(s.width),l=parseInt(s.marginLeft);let c=i;"boolean"==typeof t?t&&(c+=a):(l<ar?c-=l:c+=a,t=c>i);const h={expanded:t,width:t?c:i,height:r,toolbarWidth:i};this._layoutState=h,null===(n=this.onLayoutChange)||void 0===n||n.call(this,h),this._guestRPC.forEach((t=>t.call("sidebarLayoutChanged",h)))}_onResize(){!0===this.toolbar.sidebarOpen&&(window.innerWidth<ar?this.close():this.open())}_onPan(t){const e=this.iframeContainer;if(e)switch(t.type){case"panstart":this._resetGestureState(),e.classList.add("sidebar-no-transition"),e.style.pointerEvents="none",this._gestureState.initial=parseInt(getComputedStyle(e).marginLeft);break;case"panend":e.classList.remove("sidebar-no-transition"),e.style.pointerEvents="",
170
170
  null===this._gestureState.final||this._gestureState.final<=-280?this.open():this.close(),this._resetGestureState();break;case"panleft":case"panright":{if("number"!=typeof this._gestureState.initial)return;const e=this._gestureState.initial,n=t.deltaX;this._gestureState.final=Math.min(Math.round(e+n),0),this._updateLayout();break}}}open(){if(this._sidebarRPC.call("sidebarOpened"),this.iframeContainer){const t=this.iframeContainer.getBoundingClientRect().width;this.iframeContainer.style.marginLeft=-1*t+"px",this.iframeContainer.classList.remove("sidebar-collapsed")}this.toolbar.sidebarOpen=!0,"whenSidebarOpen"===this._config.showHighlights&&this.setHighlightsVisible(!0),this._updateLayoutState(!0)}close(){this._sidebarRPC.call("sidebarClosed"),this.iframeContainer&&(this.iframeContainer.style.marginLeft="",this.iframeContainer.classList.add("sidebar-collapsed")),this.toolbar.sidebarOpen=!1,"whenSidebarOpen"===this._config.showHighlights&&this.setHighlightsVisible(!1),this._updateLayoutState(!1)}
171
171
  setHighlightsVisible(t){this.toolbar.highlightsVisible=t,this._sidebarRPC.call("setHighlightsVisible",t)}show(){var t;null===(t=this.iframeContainer)||void 0===t||t.classList.remove("is-hidden")}hide(){var t;null===(t=this.iframeContainer)||void 0===t||t.classList.add("is-hidden")}}class cr{constructor(t){n(this,"_emitter",void 0),n(this,"_subscriptions",void 0),this._emitter=t,this._subscriptions=[]}publish(t,...e){this._emitter.emit(t,...e)}subscribe(t,e){this._emitter.on(t,e),this._subscriptions.push([t,e])}unsubscribe(t,e){this._emitter.off(t,e),this._subscriptions=this._subscriptions.filter((([n,i])=>n!==t||i!==e))}destroy(){for(const[t,e]of this._subscriptions)this._emitter.off(t,e);this._subscriptions=[]}}class hr{constructor(){n(this,"_emitter",void 0),this._emitter=new u}createEmitter(){return new cr(this._emitter)}}const ur=document.querySelector('link[type="application/annotator+html"][rel="sidebar"]');new Promise((t=>{"loading"!==document.readyState&&t(),
172
- document.addEventListener("readystatechange",(()=>t()))})).then((function(){const t=j("annotator");let e=()=>{};const n=new Promise((t=>{e=t}));ur.addEventListener("destroy",e);const i=t.subFrameIdentifier?window.parent:window,o=[];if(i===window){const t=function(t=navigator.userAgent){if(!y(t))return()=>{};const e=t=>{var e;if("hypothesisPortClosed"===(null===(e=t.data)||void 0===e?void 0:e.type)&&t.ports[0]){const e=t.ports[0];b(e,"close"),e.close()}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}();o.push({destroy:t});const e=j("sidebar"),n=new URL(e.sidebarAppUrl).origin,i=new g(n),r=new hr,s=new lr(document.body,r,e),a=new Xo(document.body,r,j("notebook")),l=new Go(document.body,r,j("profile"));i.on("frameConnected",((t,e)=>s.onFrameConnected(t,e))),o.push(i,s,a,l)}if("container"===ko()){const e=new Po(t);o.push(e)}else{const n=new No(document.body,t),r=new qo(document.body,t,i);r.on("hostDisconnected",e),o.push(n,r)}n.then((()=>{o.forEach((t=>t.destroy()))
173
- ;document.querySelectorAll("[data-hypothesis-asset]").forEach((t=>t.remove())),function(t=document){Array.from(t.querySelectorAll("script.js-hypothesis-config[data-remove-on-unload]")).forEach((t=>t.remove()))}()}))}))}();
172
+ document.addEventListener("readystatechange",(()=>t()))})).then((function(){const t=j("annotator");let e=()=>{};const n=new Promise((t=>{e=t}));ur.addEventListener("destroy",e);const i=t.subFrameIdentifier?window.parent:window,o=[];if(i===window){if(function(){const t=document.querySelectorAll(["hypothesis-sidebar","hypothesis-notebook","hypothesis-profile"].join(","));return t.forEach((t=>t.remove())),t.length>0}())return void console.warn("Hypothesis did not load because it found an existing instance on the page.");const t=function(t=navigator.userAgent){if(!y(t))return()=>{};const e=t=>{var e;if("hypothesisPortClosed"===(null===(e=t.data)||void 0===e?void 0:e.type)&&t.ports[0]){const e=t.ports[0];b(e,"close"),e.close()}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}();o.push({destroy:t})
173
+ ;const e=j("sidebar"),n=new URL(e.sidebarAppUrl).origin,i=new g(n),r=new hr,s=new lr(document.body,r,e),a=new Xo(document.body,r,j("notebook")),l=new Go(document.body,r,j("profile"));i.on("frameConnected",((t,e)=>s.onFrameConnected(t,e))),o.push(i,s,a,l)}if("container"===ko()){const e=new Po(t);o.push(e)}else{const n=new No(document.body,t),r=new qo(document.body,t,i);r.on("hostDisconnected",e),o.push(n,r)}n.then((()=>{o.forEach((t=>t.destroy()));document.querySelectorAll("[data-hypothesis-asset]").forEach((t=>t.remove())),function(t=document){Array.from(t.querySelectorAll("script.js-hypothesis-config[data-remove-on-unload]")).forEach((t=>t.remove()))}()}))}))}();
174
174
  //# sourceMappingURL=annotator.bundle.js.map