/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/quicklink@3.0.1/dist/quicklink.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
function e(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function r(r,n){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,n){if(r){if("string"==typeof r)return e(r,n);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?e(r,n):void 0}}(r))||n&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,r,n,t){var o={headers:{accept:"*/*"}};return r||(o.mode="no-cors"),n&&(o.credentials="include"),o.priority=t?"high":"low",window.fetch?fetch(e,o):function(e,r){return new Promise(function(n,t,o){(o=new XMLHttpRequest).open("GET",e,o.withCredentials=r),o.setRequestHeader("Accept","*/*"),o.onload=function(){200===o.status?n():t()},o.send()})}(e,n)}var t,o=(t=document.createElement("link")).relList&&t.relList.supports&&t.relList.supports("prefetch")?function(e,r){return new Promise(function(n,t,o){(o=document.createElement("link")).rel="prefetch",o.href=e,r&&o.setAttribute("crossorigin","anonymous"),o.onload=n,o.onerror=t,document.head.appendChild(o)})}:n,i=window.requestIdleCallback||function(e){var r=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-r))}})},1)},a=new Set,c=new Set,s=!1;function u(e,r){return Array.isArray(r)?r.some(function(r){return u(e,r)}):(r.test||r).call(r,e.href,e)}function l(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function f(e,t,i,u,f){var d=l(navigator.connection);return d instanceof Error?Promise.reject(new Error("Cannot prefetch, "+d.message)):(c.size>0&&!s&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){return a.has(e)?[]:(a.add(e),function(e,n,t){var o=[].slice.call(arguments,3);if(!t)return e.apply(void 0,[n].concat(o));for(var i,a=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===n}),c=new Map,s=function(){var r=i.value,t=function(i){var s=setTimeout(function(){return r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",a),e.apply(void 0,[n].concat(o))},200);c.set(r,s)},a=function(e){var n=c.get(r);n&&(clearTimeout(n),c.delete(r))};r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",a)},u=r(a);!(i=u()).done;)s()}(t?n:o,new URL(e,location.href).toString(),f,i,u,t))})))}function d(e,n){void 0===n&&(n="immediate");var t=l(navigator.connection);if(t instanceof Error)return Promise.reject(new Error("Cannot prerender, "+t.message));if(!HTMLScriptElement.supports("speculationrules"))return f(e,!0,!1,!1,"moderate"===n||"conservative"===n),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var o,i=r([].concat(e));!(o=i()).done;)c.add(o.value);a.size>0&&!s&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var u=function(e,r){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n                      "urls": ["'+Array.from(e).join('","')+'"],\n                      "eagerness": "'+r+'"}]}';try{document.head.appendChild(n)}catch(e){return e}return!0}(c,n);return!0===u?Promise.resolve():Promise.reject(u)}exports.listen=function(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var r=function(e){e=e||1;var r=[],n=0;function t(){n<e&&r.length>0&&(r.shift()(),n++)}return[function(e){r.push(e)>1||t()},function(){n--,t()}]}(e.throttle||1/0),n=r[0],t=r[1],o=e.limit||1/0,l=e.origins||[location.hostname],h=e.ignores||[],m=e.delay||0,p=[],v=e.timeoutFn||i,g="function"==typeof e.hrefFn&&e.hrefFn,w=e.prerender||!1;s=e.prerenderAndPrefetch||!1;var y=new IntersectionObserver(function(r){r.forEach(function(r){if(r.isIntersecting)p.push((r=r.target).href),function(e,r){r?setTimeout(e,r):e()}(function(){p.includes(r.href)&&(y.unobserve(r),(s||w)&&c.size<o?d(g?g(r):r.href,e.eagerness).catch(function(r){if(!e.onError)throw r;e.onError(r)}):a.size<o&&!w&&n(function(){f(g?g(r):r.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(t).catch(function(r){t(),e.onError&&e.onError(r)})}))},m);else{var i=p.indexOf((r=r.target).href);i>-1&&p.splice(i)}})},{threshold:e.threshold||0});return v(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){l.length&&!l.includes(e.hostname)||u(e,h)||y.observe(e)})},{timeout:e.timeout||2e3}),function(){a.clear(),y.disconnect()}}},exports.prefetch=f,exports.prerender=d;
