export const __webpack_ids__=["6406"];export const __webpack_modules__={56828:function(e,t,r){r.r(t),r.d(t,{default:()=>d});var n=r(67294),l=r(34966),a=r(27484),o=r.n(a),u=r(84110),c=r.n(u),i=r(15714);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(){var e,t=(0,i.d9)(),r=(e=n.useState(void 0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,l=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=l){var a=[],o=!0,u=!1;try{for(l=l.call(e);!(o=(r=l.next()).done)&&(a.push(r.value),a.length!==t);o=!0);}catch(e){u=!0,n=e}finally{try{o||null==l.return||l.return()}finally{if(u)throw n}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return m(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],u=r[1];return n.useEffect(function(){if(t)try{var e=localStorage.getItem("viewed-documents"),r=JSON.parse(e||"[]"),n=[],l=!0,a=!1,o=void 0;try{for(var c,i=r[Symbol.iterator]();!(l=(c=i.next()).done);l=!0){var m=c.value;n.push({url:m.url,title:m.title,timestamp:m.timestamp})}}catch(e){a=!0,o=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw o}}u(n)}catch(e){console.warn("Failed to read recently viewed documents from localStorage",e),u(null)}},[t]),n.createElement("article",{id:"recently-viewed-documents","aria-labelledby":"recently-viewed-documents"},n.createElement("h3",null,"Recently viewed documents"),void 0===a?n.createElement(f,null,"Loading recently viewed documents"):null===a?n.createElement(f,null,"This feature requires cookies"):a.length?n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,n.createElement("th",null,"Document"),n.createElement("th",null,"When"))),n.createElement("tbody",null,a.map(function(e){return n.createElement("tr",{key:e.url},n.createElement("td",null,n.createElement(l.rU,{to:e.url},e.title," ",n.createElement("small",null,e.url))),n.createElement("td",null,o()(new Date(e.timestamp)).fromNow()))}))):n.createElement(f,null,"No recently viewed documents at the moment"))}function f(e){var t=e.children;return n.createElement("p",{className:"notification"},t)}o().extend(c())}};
//# sourceMappingURL=6406.1efe760aefd904c8.js.map