diff --git a/assets/lib/quicklink/quicklink.umd.js b/assets/lib/quicklink/quicklink.umd.js index 153efcf..3ff0b6c 100644 --- a/assets/lib/quicklink/quicklink.umd.js +++ b/assets/lib/quicklink/quicklink.umd.js @@ -1 +1 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.quicklink={})}(this,function(e){function n(e){return new Promise(function(n,r,t){(t=new XMLHttpRequest).open("GET",e,t.withCredentials=!0),t.onload=function(){200===t.status?n():r()},t.send()})}var r,t=(r=document.createElement("link")).relList&&r.relList.supports&&r.relList.supports("prefetch")?function(e){return new Promise(function(n,r,t){(t=document.createElement("link")).rel="prefetch",t.href=e,t.onload=n,t.onerror=r,document.head.appendChild(t)})}:n,o=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},i=new Set,c=new Set,u=!1;function a(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 s(e,r,o){var s=a(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(c.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){if(!i.has(e))return i.add(e),(r?function(e){return window.fetch?fetch(e,{credentials:"include"}):n(e)}:t)(new URL(e,location.href).toString())})))}function f(e,n){var r=a(navigator.connection);if(r instanceof Error)return Promise.reject(new Error("Cannot prerender, "+r.message));if(!HTMLScriptElement.supports("speculationrules"))return s(e),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));if(document.querySelector('script[type="speculationrules"]'))return Promise.reject(new Error("Speculation Rules is already defined and cannot be altered."));for(var t=0,o=[].concat(e);t0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var l=function(e){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list","urls": ["'+Array.from(e).join('","')+'"]}]}';try{document.head.appendChild(n)}catch(e){return e}return!0}(c);return!0===l?Promise.resolve():Promise.reject(l)}e.listen=function(e){if(e||(e={}),window.IntersectionObserver){var n=function(e){e=e||1;var n=[],r=0;function t(){r0&&(n.shift()(),r++)}return[function(e){n.push(e)>1||t()},function(){r--,t()}]}(e.throttle||1/0),r=n[0],t=n[1],a=e.limit||1/0,l=e.origins||[location.hostname],d=e.ignores||[],h=e.delay||0,p=[],m=e.timeoutFn||o,w="function"==typeof e.hrefFn&&e.hrefFn,g=e.prerender||!1;u=e.prerenderAndPrefetch||!1;var v=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)p.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){-1!==p.indexOf(n.href)&&(v.unobserve(n),(u||g)&&c.size<1?f(w?w(n):n.href).catch(function(n){if(!e.onError)throw n;e.onError(n)}):i.size-1&&p.splice(o)}})},{threshold:e.threshold||0});return m(function(){(e.el||document).querySelectorAll("a").forEach(function(e){l.length&&!l.includes(e.hostname)||function e(n,r){return Array.isArray(r)?r.some(function(r){return e(n,r)}):(r.test||r).call(r,n.href,n)}(e,d)||v.observe(e)})},{timeout:e.timeout||2e3}),function(){i.clear(),v.disconnect()}}},e.prefetch=s,e.prerender=f}); +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e||self).quicklink={})}(this,function(e){function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=Array(n);r=e.length?{done:!0}:{done:!1,value:e[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 t(e,n,r,t){var o={headers:{accept:"*/*"}};return n||(o.mode="no-cors"),r&&(o.credentials="include"),o.priority=t?"high":"low",window.fetch?fetch(e,o):function(e,n){return new Promise(function(r,t,o){(o=new XMLHttpRequest).open("GET",e,o.withCredentials=n),o.setRequestHeader("Accept","*/*"),o.onload=function(){200===o.status?r():t()},o.send()})}(e,r)}var o,i=(o=document.createElement("link")).relList&&o.relList.supports&&o.relList.supports("prefetch")?function(e,n){return new Promise(function(r,t,o){(o=document.createElement("link")).rel="prefetch",o.href=e,n&&o.setAttribute("crossorigin","anonymous"),o.onload=r,o.onerror=t,document.head.appendChild(o)})}:t,c=window.requestIdleCallback||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},a=new Set,s=new Set,u=!1;function l(e,n){return Array.isArray(n)?n.some(function(n){return l(e,n)}):(n.test||n).call(n,e.href,e)}function f(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 d(e,n,o,c,l){var d=f(navigator.connection);return d instanceof Error?Promise.reject(new Error("Cannot prefetch, "+d.message)):(s.size>0&&!u&&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,c=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===n}),a=new Map,s=function(){var r=i.value,t=function(i){var s=setTimeout(function(){return r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",c),e.apply(void 0,[n].concat(o))},200);a.set(r,s)},c=function(e){var n=a.get(r);n&&(clearTimeout(n),a.delete(r))};r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",c)},u=r(c);!(i=u()).done;)s()}(n?t:i,new URL(e,location.href).toString(),l,o,c,n))})))}function h(e,n){void 0===n&&(n="immediate");var t=f(navigator.connection);if(t instanceof Error)return Promise.reject(new Error("Cannot prerender, "+t.message));if(!HTMLScriptElement.supports("speculationrules"))return d(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;)s.add(o.value);a.size>0&&!u&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var c=function(e,n){var r=document.createElement("script");r.type="speculationrules",r.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+n+'"}]}';try{document.head.appendChild(r)}catch(e){return e}return!0}(s,n);return!0===c?Promise.resolve():Promise.reject(c)}e.listen=function(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var n=function(e){e=e||1;var n=[],r=0;function t(){r0&&(n.shift()(),r++)}return[function(e){n.push(e)>1||t()},function(){r--,t()}]}(e.throttle||1/0),r=n[0],t=n[1],o=e.limit||1/0,i=e.origins||[location.hostname],f=e.ignores||[],m=e.delay||0,p=[],v=e.timeoutFn||c,g="function"==typeof e.hrefFn&&e.hrefFn,y=e.prerender||!1;u=e.prerenderAndPrefetch||!1;var w=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting)p.push((n=n.target).href),function(e,n){n?setTimeout(e,n):e()}(function(){p.includes(n.href)&&(w.unobserve(n),(u||y)&&s.size-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){i.length&&!i.includes(e.hostname)||l(e,f)||w.observe(e)})},{timeout:e.timeout||2e3}),function(){a.clear(),w.disconnect()}}},e.prefetch=d,e.prerender=h});