This commit is contained in:
remoliebmann committed 2026-01-26 03:17:14 +01:00
1 parent 467fd7f099
commit d29f55f6fd
110 files changed
+25682

No files matched your search

@@ -0,0 +1 @@
const sitePreference=document.documentElement.getAttribute("data-default-appearance"),userPreference=localStorage.getItem("appearance");(sitePreference==="dark"&&userPreference===null||userPreference==="dark")&&document.documentElement.classList.add("dark"),document.documentElement.getAttribute("data-auto-appearance")==="true"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&userPreference!=="light"&&document.documentElement.classList.add("dark"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{e.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}));var updateMeta,getTargetAppearance,updateMermaidTheme=()=>{if(typeof mermaid!="undefined"){const e=document.documentElement.classList.contains("dark"),t=document.querySelectorAll("pre.mermaid");t.forEach(e=>{e.getAttribute("data-processed")?(e.removeAttribute("data-processed"),e.innerHTML=e.getAttribute("data-graph")):e.setAttribute("data-graph",e.textContent)}),e?(initMermaidDark(),mermaid.run()):(initMermaidLight(),mermaid.run())}};window.addEventListener("DOMContentLoaded",e=>{const t=document.getElementById("appearance-switcher"),n=document.getElementById("appearance-switcher-mobile");updateMeta(),this.updateLogo?.(getTargetAppearance()),updateMermaidTheme(),t&&(t.addEventListener("click",()=>{document.documentElement.classList.toggle("dark");var e=getTargetAppearance();localStorage.setItem("appearance",e),updateMeta(),updateMermaidTheme(),this.updateLogo?.(e)}),t.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")})),n&&(n.addEventListener("click",()=>{document.documentElement.classList.toggle("dark");var e=getTargetAppearance();localStorage.setItem("appearance",e),updateMeta(),updateMermaidTheme(),this.updateLogo?.(e)}),n.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")}))}),updateMeta=()=>{var e=document.querySelector("body"),t=getComputedStyle(e);document.querySelector('meta[name="theme-color"]').setAttribute("content",t.backgroundColor)},getTargetAppearance=()=>document.documentElement.classList.contains("dark")?"dark":"light",window.addEventListener("DOMContentLoaded",e=>{const t=document.getElementById("top-scroller"),n=document.getElementById("site-footer");t&&n&&t.getBoundingClientRect().top>n.getBoundingClientRect().top&&(t.hidden=!0)})
@@ -0,0 +1 @@
function setBackgroundBlur(e,t=300,n=!1,s=!1){if(!e){console.error("data-blur-id is null");return}const o=document.getElementById(e);if(!o)return;n?(o.setAttribute("aria-hidden","true"),s?o.style.display="":(o.style.display="none",o.style.opacity="0")):(o.style.display="",o.removeAttribute("aria-hidden"));const i=()=>{if(!n||s){const e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;o.style.opacity=e/t}};o.setAttribute("role","presentation"),o.setAttribute("tabindex","-1"),window.addEventListener("scroll",i),i()}document.querySelectorAll("script[data-blur-id]").forEach(e=>{const t=e.getAttribute("data-blur-id"),n=Number(e.getAttribute("data-scroll-divisor")||300),s=t==="menu-blur",o=JSON.parse(localStorage.getItem("a11ySettings")||"{}"),i=o.disableBlur||!1;setBackgroundBlur(t,n,i,s)})
@@ -0,0 +1,15 @@
function scrollToTop(){const e=document.getElementById("scroll-to-top");window.scrollY>window.innerHeight*.5?(e.classList.remove("translate-y-4","opacity-0"),e.classList.add("translate-y-0","opacity-100")):(e.classList.remove("translate-y-0","opacity-100"),e.classList.add("translate-y-4","opacity-0"))}window.addEventListener("scroll",scrollToTop),window.addEventListener("load",scrollToTop),e=this,t=function(){"use strict";function R(e,t){var n,s=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,n)),s}function h(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?R(Object(t),!0).forEach(function(n){x(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,N(n.key),n)}function n(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function de(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(0[0]!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(0[0]===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,o,s=g(e);return t?(o=g(this).constructor,n=Reflect.construct(s,arguments,o)):n=s.apply(this,arguments),de(this,n)}}function d(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):0[0]}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function N(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n,s=e[Symbol.toPrimitive];if(0[0]!==s){if(n=s.call(e,t||"default"),"object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e){return Array.isArray?Array.isArray(e):"[object Array]"===P(e)}A=1/0;function oe(e){return e==null?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-A?"-0":t}(e)}function o(e){return"string"==typeof e}function $(e){return"number"==typeof e}function J(e){return!0===e||!1===e||function(e){return B(e)&&null!==e}(e)&&"[object Boolean]"==P(e)}function B(e){return"object"===k(e)}function s(e){return e!=null}function O(e){return!e.trim().length}function P(e){return e==null?0[0]===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var ie=function(e){return"Missing ".concat(e," property in key")},ae=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},z=Object.prototype.hasOwnProperty,pe=function(){function e(n){var s,o=this;t(this,e),this._keys=[],this._keyMap={},s=0,n.forEach(function(e){var t=H(e);o._keys.push(t),o._keyMap[t.id]=t,s+=t.weight}),this._keys.forEach(function(e){e.weight/=s})}return n(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function H(e){var t,n=null,s=null,a=null,r=1,c=null;if(o(e)||i(e))a=e,n=M(e),s=_(e);else{if(!z.call(e,"name"))throw new Error(ie("name"));if(t=e.name,a=t,z.call(e,"weight")&&(r=e.weight)<=0)throw new Error(ae(t));n=M(t),s=_(t),c=e.getFn}return{path:n,id:s,weight:r,src:a,getFn:c}}function M(e){return i(e)?e:e.split(".")}function _(e){return i(e)?e.join("."):e}var ue={useExtendedSearch:!1,getFn:function(e,t){var n=[],a=!1;return function e(t,r,c){if(s(t))if(r[c]){if(l=t[r[c]],!s(l))return;if(c===r.length-1&&(o(l)||$(l)||J(l)))n.push(oe(l));else if(i(l)){a=!0;for(var l,d=0,u=l.length;d<u;d+=1)e(l[d],r,c+1)}else r.length&&e(l,r,c+1)}else n.push(t)}(e,o(t)?t.split("."):t,0),a?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},e=h(h(h(h({},{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),ue),ce=/[^ ]+/g,E=function(){function a(){var n=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:{},s=n.getFn,i=0[0]===s?e.getFn:s,o=n.fieldNormWeight,r=0[0]===o?e.fieldNormWeight:o;t(this,a),this.norm=function(){var n=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:1,s=arguments.length>1&&0[0]!==arguments[1]?arguments[1]:3,e=new Map,t=10**s;return{get:function(s){if(o=s.match(ce).length,e.has(o))return e.get(o);var o,a=1/o**(.5*n),i=parseFloat(Math.round(a*t)/t);return e.set(o,i),i},clear:function(){e.clear()}}}(r,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return n(a,[{key:"setSources",value:function(){var e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var t=this,e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach(function(e,n){t._keysMap[e.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();o(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(s(e)&&!O(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,a={i:t,$:{}};this.keys.forEach(function(t,r){if(c=t.getFn?t.getFn(e):n.getFn(e,t.path),s(c))if(i(c)){for(u=[],d=[{nestedArrIndex:-1,value:c}];d.length;){var c,d,u,m,f,h=d.pop(),p=h.nestedArrIndex,l=h.value;s(l)&&(o(l)&&!O(l)?(m={v:l,i:p,n:n.norm.get(l)},u.push(m)):i(l)&&l.forEach(function(e,t){d.push({nestedArrIndex:t,value:e})}))}a.$[r]=u}else o(c)&&!O(c)&&(f={v:c,n:n.norm.get(c)},a.$[r]=f)}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),a}();function L( Line truncated
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2"
${i} tabindex="0">
<div class="grow">
<div class="-mb-1 text-lg font-bold">
${o}
</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${e.item.section}<span class="px-2 text-primary-500">&middot;</span>${e.item.date?e.item.date:""}</span></div>
<div class="text-sm italic">${e.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">&larr;</div>
</a>
</li>`}),hasResults=!0):(t="",hasResults=!1),output.innerHTML=t,n.length>0&&(first=output.firstChild.firstElementChild,last=output.lastChild.firstElementChild)}document.getElementById("button_likes")&&document.getElementById("button_likes").addEventListener("click",()=>{process_article()}),document.getElementById("katex-render")&&document.getElementById("katex-render").addEventListener("load",()=>{renderMathInElement(document.body)}),function(){"use strict";var e=[];window.addEventListener("beforeprint",function(){for(var n=document.querySelectorAll("details:not([open])"),t=0;t<n.length;t++)n[t].open=!0,e.push(n[t])}),window.addEventListener("afterprint",function(){for(var t=0;t<e.length;t++)e[t].open=!1;e=[]})}()
@@ -0,0 +1,16 @@
function scrollToTop(){const e=document.getElementById("scroll-to-top");window.scrollY>window.innerHeight*.5?(e.classList.remove("translate-y-4","opacity-0"),e.classList.add("translate-y-0","opacity-100")):(e.classList.remove("translate-y-0","opacity-100"),e.classList.add("translate-y-4","opacity-0"))}window.addEventListener("scroll",scrollToTop),window.addEventListener("load",scrollToTop),e=this,t=function(){"use strict";function R(e,t){var n,s=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,n)),s}function h(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?R(Object(t),!0).forEach(function(n){x(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,N(n.key),n)}function n(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function de(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(0[0]!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(0[0]===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,o,s=g(e);return t?(o=g(this).constructor,n=Reflect.construct(s,arguments,o)):n=s.apply(this,arguments),de(this,n)}}function d(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):0[0]}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function N(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n,s=e[Symbol.toPrimitive];if(0[0]!==s){if(n=s.call(e,t||"default"),"object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e){return Array.isArray?Array.isArray(e):"[object Array]"===P(e)}A=1/0;function oe(e){return e==null?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-A?"-0":t}(e)}function o(e){return"string"==typeof e}function $(e){return"number"==typeof e}function J(e){return!0===e||!1===e||function(e){return B(e)&&null!==e}(e)&&"[object Boolean]"==P(e)}function B(e){return"object"===k(e)}function s(e){return e!=null}function O(e){return!e.trim().length}function P(e){return e==null?0[0]===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var ie=function(e){return"Missing ".concat(e," property in key")},ae=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},z=Object.prototype.hasOwnProperty,pe=function(){function e(n){var s,o=this;t(this,e),this._keys=[],this._keyMap={},s=0,n.forEach(function(e){var t=H(e);o._keys.push(t),o._keyMap[t.id]=t,s+=t.weight}),this._keys.forEach(function(e){e.weight/=s})}return n(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function H(e){var t,n=null,s=null,a=null,r=1,c=null;if(o(e)||i(e))a=e,n=M(e),s=_(e);else{if(!z.call(e,"name"))throw new Error(ie("name"));if(t=e.name,a=t,z.call(e,"weight")&&(r=e.weight)<=0)throw new Error(ae(t));n=M(t),s=_(t),c=e.getFn}return{path:n,id:s,weight:r,src:a,getFn:c}}function M(e){return i(e)?e:e.split(".")}function _(e){return i(e)?e.join("."):e}var ue={useExtendedSearch:!1,getFn:function(e,t){var n=[],a=!1;return function e(t,r,c){if(s(t))if(r[c]){if(l=t[r[c]],!s(l))return;if(c===r.length-1&&(o(l)||$(l)||J(l)))n.push(oe(l));else if(i(l)){a=!0;for(var l,d=0,u=l.length;d<u;d+=1)e(l[d],r,c+1)}else r.length&&e(l,r,c+1)}else n.push(t)}(e,o(t)?t.split("."):t,0),a?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},e=h(h(h(h({},{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),ue),ce=/[^ ]+/g,E=function(){function a(){var n=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:{},s=n.getFn,i=0[0]===s?e.getFn:s,o=n.fieldNormWeight,r=0[0]===o?e.fieldNormWeight:o;t(this,a),this.norm=function(){var n=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:1,s=arguments.length>1&&0[0]!==arguments[1]?arguments[1]:3,e=new Map,t=10**s;return{get:function(s){if(o=s.match(ce).length,e.has(o))return e.get(o);var o,a=1/o**(.5*n),i=parseFloat(Math.round(a*t)/t);return e.set(o,i),i},clear:function(){e.clear()}}}(r,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return n(a,[{key:"setSources",value:function(){var e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var t=this,e=arguments.length>0&&0[0]!==arguments[0]?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach(function(e,n){t._keysMap[e.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();o(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(s(e)&&!O(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,a={i:t,$:{}};this.keys.forEach(function(t,r){if(c=t.getFn?t.getFn(e):n.getFn(e,t.path),s(c))if(i(c)){for(u=[],d=[{nestedArrIndex:-1,value:c}];d.length;){var c,d,u,m,f,h=d.pop(),p=h.nestedArrIndex,l=h.value;s(l)&&(o(l)&&!O(l)?(m={v:l,i:p,n:n.norm.get(l)},u.push(m)):i(l)&&l.forEach(function(e,t){d.push({nestedArrIndex:t,value:e})}))}a.$[r]=u}else o(c)&&!O(c)&&(f={v:c,n:n.norm.get(c)},a.$[r]=f)}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),a}();function L( Line truncated
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2"
${i} tabindex="0">
<div class="grow">
<div class="-mb-1 text-lg font-bold">
${o}
</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${e.item.section}<span class="px-2 text-primary-500">&middot;</span>${e.item.date?e.item.date:""}</span></div>
<div class="text-sm italic">${e.item.summary}</div>
</div>
<div class="ml-2 ltr:block rtl:hidden text-neutral-500">&rarr;</div>
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">&larr;</div>
</a>
</li>`}),hasResults=!0):(t="",hasResults=!1),output.innerHTML=t,n.length>0&&(first=output.firstChild.firstElementChild,last=output.lastChild.firstElementChild)}scriptBundle=document.getElementById("script-bundle"),copyText=scriptBundle?.getAttribute("data-copy")||"Copy",copiedText=scriptBundle?.getAttribute("data-copied")||"Copied";function createCopyButton(e){const t=document.createElement("button");t.className="copy-button",t.type="button",t.ariaLabel=copyText,t.innerText=copyText,t.addEventListener("click",()=>copyCodeToClipboard(t,e)),e.insertBefore(t,e.firstChild)}async function copyCodeToClipboard(e,t){const n=getCodeText(t);function s(e,t){const n=document.createElement("textArea");n.contentEditable="true",n.readOnly="false",n.className="copy-textarea",n.value=e,t.insertBefore(n,t.firstChild);const s=document.createRange();s.selectNodeContents(n);const o=window.getSelection();o.removeAllRanges(),o.addRange(s),n.focus(),n.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(n)}try{result=await navigator.permissions.query({name:"clipboard-write"}),result.state=="granted"||result.state=="prompt"?await navigator.clipboard.writeText(n):s(n,t)}catch{s(n,t)}finally{e.blur(),e.innerText=copiedText,setTimeout(function(){e.innerText=copyText},2e3)}}function getCodeText(e){const t=e.querySelector(".highlight");if(!t)return"";const n=t.querySelector("code"),s=n?.querySelectorAll(".cl"),o=t?.querySelector(".lntable .lntd:last-child code");if(!n)return"";if(s.length>0){const e=Array.from(s).map(e=>e.textContent.replace(/\n$/,""));return e.join(`
`)}return o?o.textContent.trim():n.textContent.trim()}window.addEventListener("DOMContentLoaded",e=>{document.querySelectorAll(".highlight-wrapper").forEach(e=>createCopyButton(e))}),document.getElementById("button_likes")&&document.getElementById("button_likes").addEventListener("click",()=>{process_article()}),document.getElementById("katex-render")&&document.getElementById("katex-render").addEventListener("load",()=>{renderMathInElement(document.body)}),function(){"use strict";var e=[];window.addEventListener("beforeprint",function(){for(var n=document.querySelectorAll("details:not([open])"),t=0;t<n.length;t++)n[t].open=!0,e.push(n[t])}),window.addEventListener("afterprint",function(){for(var t=0;t<e.length;t++)e[t].open=!1;e=[]})}()
@@ -0,0 +1 @@
const pageScriptElement=document.currentScript,oid=pageScriptElement&&pageScriptElement.getAttribute("data-oid")?pageScriptElement.getAttribute("data-oid"):(console.error("data-oid is null"),null),oid_likes=pageScriptElement&&pageScriptElement.getAttribute("data-oid-likes")?pageScriptElement.getAttribute("data-oid-likes"):(console.error("data-oid-likes is null"),null);let liked_page=!1;const id=oid&&oid.replaceAll("/","-"),id_likes=oid_likes&&oid_likes.replaceAll("/","-");if(typeof auth!="undefined"){const e=localStorage.getItem(id);e||auth.signInAnonymously().then(()=>{const e=db.collection("views").doc(id);localStorage.setItem(id,!0),e.get().then(e=>{e.exists?db.collection("views").doc(id).update({views:firebase.firestore.FieldValue.increment(1)}):db.collection("views").doc(id).set({views:1})}).catch(e=>{console.log("Error getting document:",e)})}).catch(e=>{const t=e.code,n=e.message;console.error(t,n)});const t=localStorage.getItem(id_likes);t&&(liked_page=!0,document.querySelectorAll("span[id='button_likes_heart']")[0].style.display="",document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display="none",document.querySelectorAll("span[id='button_likes_text']")[0].innerText="")}function like_article(e){auth.signInAnonymously().then(()=>{const t=db.collection("likes").doc(e);t.get().then(t=>{liked_page=!0,localStorage.setItem(e,!0),document.querySelectorAll("span[id='button_likes_heart']")[0].style.display="",document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display="none",document.querySelectorAll("span[id='button_likes_text']")[0].innerText="",t.exists?db.collection("likes").doc(e).update({likes:firebase.firestore.FieldValue.increment(1)}):db.collection("likes").doc(e).set({likes:1})}).catch(e=>{console.log("Error getting document:",e)})}).catch(e=>{const t=e.code,n=e.message;console.error(t,n)})}function remove_like_article(e){auth.signInAnonymously().then(()=>{const t=db.collection("likes").doc(e);t.get().then(t=>{liked_page=!1,localStorage.removeItem(e),document.querySelectorAll("span[id='button_likes_heart']")[0].style.display="none",document.querySelectorAll("span[id='button_likes_emtpty_heart']")[0].style.display="",document.querySelectorAll("span[id='button_likes_text']")[0].innerText="\xa0Like",t.exists?db.collection("likes").doc(e).update({likes:firebase.firestore.FieldValue.increment(-1)}):db.collection("likes").doc(e).set({likes:0})}).catch(e=>{console.log("Error getting document:",e)})}).catch(e=>{const t=e.code,n=e.message;console.error(t,n)})}function process_article(){liked_page?remove_like_article(id_likes):like_article(id_likes)}
@@ -0,0 +1 @@
if(typeof auth!="undefined"){var update_views,update_likes,viewsCollection=db.collection("views"),likesCollection=db.collection("likes");function numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function toggleLoaders(e){var t,s,n=e.className;if(n=="")return;t=n.split(" ");for(s in t)e.classList.toggle(t[s])}update_views=function(e,t){viewsCollection.doc(t).onSnapshot(t=>{var n=t.data();n?e.innerText=numberWithCommas(n.views):e.innerText=0,toggleLoaders(e)})},update_likes=function(e,t){likesCollection.doc(t).onSnapshot(t=>{var n=t.data();n?e.innerText=numberWithCommas(n.likes):e.innerText=0,toggleLoaders(e)})},auth.signInAnonymously().then(()=>{var e,t,n,s,o=document.querySelectorAll("span[id^='views_']");for(n in o)e=o[n],t=e.id?e.id.replaceAll("/","-"):e.id,t&&update_views(e,t);s=document.querySelectorAll("span[id^='likes_']");for(n in s)e=s[n],t=e.id?e.id.replaceAll("/","-"):e.id,t&&update_likes(e,t)}).catch(e=>{var t=e.code,n=e.message;console.error(t,n)})}