congo/js/main.bundle.min.ac8bae0637d...

11 lines
29 KiB
JavaScript

var e,t,fuse,showButton,hideButton,wrapper,modal,input,output,first,last,searchVisible,indexed,hasResults,scriptBundle,copyText,copiedText;const browserIsDark=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,sitePreference=document.documentElement.getAttribute("data-default-appearance"),userPreference=localStorage.getItem("appearance"),switcher=document.getElementById("appearance-switcher");(browserIsDark&&userPreference===null||browserIsDark&&userPreference==="dark"||sitePreference==="dark"&&userPreference===null||sitePreference==="dark"&&userPreference==="dark"||userPreference==="dark")&&document.documentElement.classList.add("dark"),document.documentElement.getAttribute("data-auto-appearance")==="true"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",a=>{a.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),window.addEventListener("DOMContentLoaded",a=>{switcher&&(switcher.addEventListener("click",()=>{document.documentElement.classList.toggle("dark"),localStorage.setItem("appearance",document.documentElement.classList.contains("dark")?"dark":"light")}),switcher.addEventListener("contextmenu",a=>{a.preventDefault(),localStorage.removeItem("appearance")}))}),e=this,t=function(){"use strict";var Y,X,y,W,N,a,L,t,i,D,e,Q,R,S,T,U,V,z,x,q,v,_,aa,ab,n,r,af,H,M,s,K,ac,B,m;function ag(a,d){var b=Object.keys(a),c;return Object.getOwnPropertySymbols&&(c=Object.getOwnPropertySymbols(a),d&&(c=c.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),b.push.apply(b,c)),b}function l(c){for(var a=1,b;a<arguments.length;a++)b=null!=arguments[a]?arguments[a]:{},a%2?ag(Object(b),!0).forEach(function(a){F(c,a,b[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(b)):ag(Object(b)).forEach(function(a){Object.defineProperty(c,a,Object.getOwnPropertyDescriptor(b,a))});return c}function G(a){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},G(a)}function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function ae(d,c){for(var b=0,a;b<c.length;b++)a=c[b],a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}function c(a,b,c){return b&&ae(a.prototype,b),c&&ae(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function F(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function j(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(b,"prototype",{value:Object.create(a&&a.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),writable:!1}),a&&E(b,a)}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},p(a)}function E(a,b){return E=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},E(a,b)}function al(b,a){if(a&&("object"==typeof a||"function"==typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(b)}function h(a){var b=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(a){return!1}}();return function(){var c,d=p(a),e;return b?(e=p(this).constructor,c=Reflect.construct(d,arguments,e)):c=d.apply(this,arguments),al(this,c)}}function k(a){return function(a){if(Array.isArray(a))return u(a)}(a)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||function(a,c){if(a){if("string"==typeof a)return u(a,c);var b=Object.prototype.toString.call(a).slice(8,-1);return"Object"===b&&a.constructor&&(b=a.constructor.name),"Map"===b||"Set"===b?Array.from(a):"Arguments"===b||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?u(a,c):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(c,a){(null==a||a>c.length)&&(a=c.length);for(var b=0,d=new Array(a);b<a;b++)d[b]=c[b];return d}function g(a){return Array.isArray?Array.isArray(a):"[object Array]"===Z(a)}function f(a){return"string"==typeof a}function ad(a){return"number"==typeof a}function ak(a){return!0===a||!1===a||function(a){return $(a)&&null!==a}(a)&&"[object Boolean]"==Z(a)}function $(a){return"object"===G(a)}function d(a){return null!=a}function A(a){return!a.trim().length}function Z(a){return null==a?void 0===a?"[object Undefined]":"[object Null]":Object.prototype.toString.call(a)}Y=function(a){return"Invalid value for key ".concat(a)},X=function(a){return"Pattern length exceeds max of ".concat(a,".")},y=Object.prototype.hasOwnProperty,W=function(){function a(e){var d=this,c;b(this,a),this._keys=[],this._keyMap={},c=0,e.forEach(function(b){var a=O(b);c+=a.weight,d._keys.push(a),d._keyMap[a.id]=a,c+=a.weight}),this._keys.forEach(function(a){a.weight/=c})}return c(a,[{key:"get",value:function(a){return this._keyMap[a]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),a}();function O(a){var c=null,d=null,e=null,h=1,b;if(f(a)||g(a))e=a,c=I(a),d=C(a);else{if(!y.call(a,"name"))throw new Error(function(a){return"Missing ".concat(a," property in key")}("name"));if(b=a.name,e=b,y.call(a,"weight")&&(h=a.weight)<=0)throw new Error(function(a){return"Property 'weight' in key '".concat(a,"' must be a positive integer")}(b));c=I(b),d=C(b)}return{path:c,id:d,weight:h,src:e}}function I(a){return g(a)?a:a.split(".")}function C(a){return g(a)?a.join("."):a}N={useExtendedSearch:!1,getFn:function(e,b){var a=[],c=!1;return function k(j,e,h){var b,i,l;if(d(j))if(e[h]){if(b=j[e[h]],!d(b))return;if(h===e.length-1&&(f(b)||ad(b)||ak(b)))a.push(function(a){return null==a?"":function(a){if("string"==typeof a)return a;var b=a+"";return"0"==b&&1/a==-1/0?"-0":b}(a)}(b));else if(g(b)){c=!0;for(i=0,l=b.length;i<l;i+=1)k(b[i],e,h+1)}else e.length&&k(b,e,h+1)}else a.push(j)}(e,f(b)?b.split("."):b,0),c?a:a[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},a=l(l(l(l({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(a,b){return a.score===b.score?a.idx<b.idx?-1:1:a.score<b.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),N),L=/[^ ]+/g;function aj(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,a=new Map,b=Math.pow(10,d);return{get:function(f){var d=f.match(L).length,g,e;return a.has(d)?a.get(d):(g=1/Math.pow(d,.5*c),e=parseFloat(Math.round(g*b)/b),a.set(d,e),e)},clear:function(){a.clear()}}}t=function(){function e(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=c.getFn,g=void 0===d?a.getFn:d,f=c.fieldNormWeight,h=void 0===f?a.fieldNormWeight:f;b(this,e),this.norm=aj(h,3),this.getFn=g,this.isCreated=!1,this.setIndexRecords()}return c(e,[{key:"setSources",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=a}},{key:"setIndexRecords",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=a}},{key:"setKeys",value:function(){var b=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=a,this._keysMap={},a.forEach(function(a,c){b._keysMap[a.id]=c})}},{key:"create",value:function(){var a=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,f(this.docs[0])?this.docs.forEach(function(b,c){a._addString(b,c)}):this.docs.forEach(function(b,c){a._addObject(b,c)}),this.norm.clear())}},{key:"add",value:function(a){var b=this.size();f(a)?this._addString(a,b):this._addObject(a,b)}},{key:"removeAt",value:function(b){this.records.splice(b,1);for(var a=b,c=this.size();a<c;a+=1)this.records[a].i-=1}},{key:"getValueForItemAtKeyId",value:function(a,b){return a[this._keysMap[b]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(a,b){if(d(a)&&!A(a)){var c={v:a,i:b,n:this.norm.get(a)};this.records.push(c)}}},{key:"_addObject",value:function(c,e){var a=this,b={i:e,$:{}};this.keys.forEach(function(i,h){var e=a.getFn(c,i.path),j;d(e)&&(g(e)?!function(){for(var j=[],i=[{nestedArrIndex:-1,value:e}],k,l,c,m;i.length;)k=i.pop(),l=k.nestedArrIndex,c=k.value,d(c)&&(f(c)&&!A(c)?(m={v:c,i:l,n:a.norm.get(c)},j.push(m)):g(c)&&c.forEach(function(a,b){i.push({nestedArrIndex:b,value:a})}));b.$[h]=j}():A(e)||(j={v:e,n:a.norm.get(e)},b.$[h]=j))}),this.records.push(b)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function J(f,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=c.getFn,g=void 0===d?a.getFn:d,e=c.fieldNormWeight,h=void 0===e?a.fieldNormWeight:e,b=new t({getFn:g,fieldNormWeight:h});return b.setKeys(f.map(O)),b.setSources(i),b.create(),b}function o(o){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=b.errors,n=void 0===e?0:e,f=b.currentLocation,l=void 0===f?0:f,h=b.expectedLocation,k=void 0===h?0:h,j=b.distance,d=void 0===j?a.distance:j,g=b.ignoreLocation,m=void 0===g?a.ignoreLocation:g,c=n/o.length,i;return m?c:(i=Math.abs(k-l),d?c+i/d:i?1:c)}function ai(){for(var d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.minMatchCharLength,e=[],b=-1,g=-1,c=0,i=d.length,h;c<i;c+=1)h=d[c],h&&-1===b?b=c:h||-1===b||((g=c-1)-b+1>=f&&e.push([b,g]),b=-1);return d[c-1]&&c-b>=f&&e.push([b,c-1]),e}i=32;function ah(c){for(var b={},a=0,d=c.length,e;a<d;a+=1)e=c.charAt(a),b[e]=(b[e]||0)|1<<d-a-1;return b}D=function(){function d(q){var A=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},k=c.location,z=void 0===k?a.location:k,j=c.threshold,y=void 0===j?a.threshold:j,l=c.distance,x=void 0===l?a.distance:l,n=c.includeMatches,v=void 0===n?a.includeMatches:n,p=c.findAllMatches,C=void 0===p?a.findAllMatches:p,r=c.minMatchCharLength,u=void 0===r?a.minMatchCharLength:r,h=c.isCaseSensitive,s=void 0===h?a.isCaseSensitive:h,o=c.ignoreLocation,w=void 0===o?a.ignoreLocation:o,g,f,e,m,B,t;if(b(this,d),this.options={location:z,threshold:y,distance:x,includeMatches:v,findAllMatches:C,minMatchCharLength:u,isCaseSensitive:s,ignoreLocation:w},this.pattern=s?q:q.toLowerCase(),this.chunks=[],this.pattern.length)if(g=function(a,b){A.chunks.push({pattern:a,alphabet:ah(a),startIndex:b})},f=this.pattern.length,f>i){for(e=0,m=f%i,B=f-m;e<B;)g(this.pattern.substr(e,i),e),e+=i;m&&(t=f-i,g(this.pattern.substr(t),t))}else g(this.pattern,0)}return c(d,[{key:"searchIn",value:function(c){var j=this.options,s=j.isCaseSensitive,f=j.includeMatches,g,b,r,q,t,m,n,p,e,h,d,l;return s||(c=c.toLowerCase()),this.pattern===c?(g={isMatch:!0,score:0},f&&(g.indices=[[0,c.length-1]]),g):(b=this.options,r=b.location,q=b.distance,t=b.threshold,m=b.findAllMatches,n=b.minMatchCharLength,p=b.ignoreLocation,e=[],h=0,d=!1,this.chunks.forEach(function(b){var w=b.pattern,s=b.alphabet,u=b.startIndex,g=function(z,e,S){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},L=f.location,Q=void 0===L?a.location:L,K=f.distance,s=void 0===K?a.distance:K,I=f.threshold,R=void 0===I?a.threshold:I,N=f.findAllMatches,P=void 0===N?a.findAllMatches:N,G=f.minMatchCharLength,F=void 0===G?a.minMatchCharLength:G,E=f.includeMatches,D=void 0===E?a.includeMatches:E,C=f.ignoreLocation,u=void 0===C?a.ignoreLocation:C,v,l,m,b,j,h,p,B,O,x,q,w,n,T,g,t,d,M,y,k,c,r,H,A,J;if(e.length>i)throw new Error(X(i));for(v,l=e.length,m=z.length,b=Math.max(0,Math.min(Q,m)),j=R,h=b,p=F>1||D,B=p?Array(m):[];(v=z.indexOf(e,h))>-1;)if(O=o(e,{currentLocation:v,expectedLocation:b,distance:s,ignoreLocation:u}),j=Math.min(O,j),h=v+l,p)for(x=0;x<l;)B[v+x]=1,x+=1;h=-1;for(q=[],w=1,n=l+m,T=1<<l-1,g=0;g<l;g+=1){for(t=0,d=n;t<d;)o(e,{errors:g,currentLocation:b+d,expectedLocation:b,distance:s,ignoreLocation:u})<=j?t=d:n=d,d=Math.floor((n-t)/2+t);n=d,M=Math.max(1,b-d+1),y=P?m:Math.min(b+d,m)+l,k=Array(y+2),k[y+1]=(1<<g)-1;for(c=y;c>=M;c-=1)if(r=c-1,H=S[z.charAt(r)],p&&(B[r]=+!!H),k[c]=(k[c+1]<<1|1)&H,g&&(k[c]|=(q[c+1]|q[c])<<1|1|q[c+1]),k[c]&T&&(w=o(e,{errors:g,currentLocation:r,expectedLocation:b,distance:s,ignoreLocation:u}))<=j){if(j=w,(h=r)<=b)break;M=Math.max(1,2*b-h)}if(o(e,{errors:g+1,currentLocation:b,expectedLocation:b,distance:s,ignoreLocation:u})>j)break;q=k}return A={isMatch:h>=0,score:Math.max(.001,w)},p&&(J=ai(B,F),J.length?D&&(A.indices=J):A.isMatch=!1),A}(c,w,s,{location:r+u,distance:q,threshold:t,findAllMatches:m,minMatchCharLength:n,includeMatches:f,ignoreLocation:p}),l=g.isMatch,v=g.score,j=g.indices;l&&(d=!0),h+=v,l&&j&&(e=[].concat(k(e),k(j)))}),l={isMatch:d,score:d?h/this.chunks.length:1},d&&f&&(l.indices=e),l)}}]),d}(),e=function(){function a(c){b(this,a),this.pattern=c}return c(a,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(a){return P(a,this.multiRegex)}},{key:"isSingleMatch",value:function(a){return P(a,this.singleRegex)}}]),a}();function P(b,c){var a=b.match(c);return a?a[1]:null}Q=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(b){var a=b===this.pattern;return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),a}(e),R=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(a){var b=-1===a.indexOf(this.pattern);return{isMatch:b,score:b?0:1,indices:[0,a.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),a}(e),S=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(b){var a=b.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),a}(e),T=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(a){var b=!a.startsWith(this.pattern);return{isMatch:b,score:b?0:1,indices:[0,a.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),a}(e),U=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(a){var b=a.endsWith(this.pattern);return{isMatch:b,score:b?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),a}(e),V=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(a){var b=!a.endsWith(this.pattern);return{isMatch:b,score:b?0:1,indices:[0,a.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),a}(e),z=function(e){j(d,e);var f=h(d);function d(o){var g,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=c.location,v=void 0===h?a.location:h,j=c.threshold,t=void 0===j?a.threshold:j,l=c.distance,r=void 0===l?a.distance:l,n=c.includeMatches,p=void 0===n?a.includeMatches:n,e=c.findAllMatches,q=void 0===e?a.findAllMatches:e,m=c.minMatchCharLength,s=void 0===m?a.minMatchCharLength:m,k=c.isCaseSensitive,u=void 0===k?a.isCaseSensitive:k,i=c.ignoreLocation,w=void 0===i?a.ignoreLocation:i;return b(this,d),(g=f.call(this,o))._bitapSearch=new D(o,{location:v,threshold:t,distance:r,includeMatches:p,findAllMatches:q,minMatchCharLength:s,isCaseSensitive:u,ignoreLocation:w}),g}return c(d,[{key:"search",value:function(a){return this._bitapSearch.searchIn(a)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),d}(e),x=function(d){j(a,d);var e=h(a);function a(c){return b(this,a),e.call(this,c)}return c(a,[{key:"search",value:function(e){for(var a,b=0,c=[],f=this.pattern.length,d;(a=e.indexOf(this.pattern,b))>-1;)b=a+f,c.push([a,b-1]);return d=!!c.length,{isMatch:d,score:d?0:1,indices:c}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),a}(e),q=[Q,x,S,T,V,U,R,z],v=q.length,_=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function aq(b){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b.split("|").map(function(l){for(var h=l.trim().split(_).filter(function(a){return a&&!!a.trim()}),d=[],e=0,m=h.length,g,c,b,i,j,f,k;e<m;e+=1){for(g=h[e],c=!1,b=-1;!c&&++b<v;)i=q[b],j=i.isMultiMatch(g),j&&(d.push(new i(j,a)),c=!0);if(!c)for(b=-1;++b<v;)if(f=q[b],k=f.isSingleMatch(g),k){d.push(new f(k,a));break}}return d})}aa=new Set([z.type,x.type]),ab=function(){function d(m){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=c.isCaseSensitive,g=void 0===f?a.isCaseSensitive:f,h=c.includeMatches,t=void 0===h?a.includeMatches:h,j=c.minMatchCharLength,r=void 0===j?a.minMatchCharLength:j,l=c.ignoreLocation,o=void 0===l?a.ignoreLocation:l,n=c.findAllMatches,p=void 0===n?a.findAllMatches:n,e=c.location,q=void 0===e?a.location:e,k=c.threshold,s=void 0===k?a.threshold:k,i=c.distance,u=void 0===i?a.distance:i;b(this,d),this.query=null,this.options={isCaseSensitive:g,includeMatches:t,minMatchCharLength:r,findAllMatches:p,ignoreLocation:o,location:q,threshold:s,distance:u},this.pattern=g?m:m.toLowerCase(),this.query=aq(this.pattern,this.options)}return c(d,[{key:"searchIn",value:function(c){var e=this.query,i,m,b,a,d,f,r,n,g,p,j,h,q,l,s,t,o;if(!e)return{isMatch:!1,score:1};i=this.options,m=i.includeMatches,c=i.isCaseSensitive?c:c.toLowerCase();for(b=0,a=[],d=0,f=0,r=e.length;f<r;f+=1){n=e[f],a.length=0,b=0;for(g=0,p=n.length;g<p;g+=1){if(j=n[g],h=j.search(c),q=h.isMatch,l=h.indices,s=h.score,!q){d=0,b=0,a.length=0;break}b+=1,d+=s,m&&(t=j.constructor.type,aa.has(t)?a=[].concat(k(a),k(l)):a.push(l))}if(b)return o={isMatch:!0,score:d/b},m&&(o.indices=a),o}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(b,a){return a.useExtendedSearch}}]),d}(),n=[];function w(a,b){for(var c=0,e=n.length,d;c<e;c+=1)if(d=n[c],d.condition(a,b))return new d(a,b);return new D(a,b)}r="$and",af="$or",H="$path",M="$val",s=function(a){return!(!a[r]&&!a[af])},K=function(a){return!!a[H]},ac=function(a){return!g(a)&&$(a)&&!s(a)},B=function(a){return F({},r,Object.keys(a).map(function(b){return F({},b,a[b])}))};function am(c,d){var b=d.ignoreFieldNorm,e=void 0===b?a.ignoreFieldNorm:b;c.forEach(function(a){var b=1;a.matches.forEach(function(a){var c=a.key,g=a.norm,d=a.score,f=c?c.weight:null;b*=Math.pow(0===d&&f?Number.EPSILON:d,(f||1)*(e?1:g))}),a.score=b})}function an(c,a){var b=c.matches;a.matches=[],d(b)&&b.forEach(function(b){if(d(b.indices)&&b.indices.length){var c={indices:b.indices,value:b.value};b.key&&(c.key=b.key.src),b.idx>-1&&(c.refIndex=b.idx),a.matches.push(c)}})}function ao(a,b){b.score=a.score}function ap(f,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=c.includeMatches,g=void 0===d?a.includeMatches:d,e=c.includeScore,h=void 0===e?a.includeScore:e,b=[];return g&&b.push(an),h&&b.push(ao),f.map(function(a){var c=a.idx,d={item:i[c],refIndex:c};return b.length&&b.forEach(function(b){b(a,d)}),d})}return m=function(){function e(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=arguments.length>2?arguments[2]:void 0;b(this,e),this.options=l(l({},a),d),this.options.useExtendedSearch,this._keyStore=new W(this.options.keys),this.setCollection(c,f)}return c(e,[{key:"setCollection",value:function(b,a){if(this._docs=b,a&&!(a instanceof t))throw new Error("Incorrect 'index' type");this._myIndex=a||J(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(a){d(a)&&(this._docs.push(a),this._myIndex.add(a))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},b=[],a=0,c=this._docs.length,d;a<c;a+=1)d=this._docs[a],e(d,a)&&(this.removeAt(a),a-=1,c-=1,b.push(d));return b}},{key:"removeAt",value:function(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(c){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=g.limit,d=void 0===e?-1:e,a=this.options,h=a.includeMatches,i=a.includeScore,j=a.shouldSort,k=a.sortFn,l=a.ignoreFieldNorm,b=f(c)?f(this._docs[0])?this._searchStringList(c):this._searchObjectList(c):this._searchLogical(c);return am(b,{ignoreFieldNorm:l}),j&&b.sort(k),ad(d)&&d>-1&&(b=b.slice(0,d)),ap(b,this._docs,{includeMatches:h,includeScore:i})}},{key:"_searchStringList",value:function(b){var c=w(b,this.options),e=this._myIndex.records,a=[];return e.forEach(function(e){var b=e.v,g=e.i,h=e.n,f,i,j,k;d(b)&&(f=c.searchIn(b),i=f.isMatch,j=f.score,k=f.indices,i&&a.push({item:b,idx:g,matches:[{score:j,value:b,norm:h,indices:k}]}))}),a}},{key:"_searchLogical",value:function(j){var b=this,e=function(a,c){var b=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,d=void 0===b||b,e=function j(a){var b=Object.keys(a),e=K(a),h,i,k,l;if(!e&&b.length>1&&!s(a))return j(B(a));if(ac(a)){if(h=e?a[H]:b[0],i=e?a[M]:a[h],!f(i))throw new Error(Y(h));return k={keyId:C(h),pattern:i},d&&(k.searcher=w(i,c)),k}return l={children:[],operator:b[0]},b.forEach(function(c){var b=a[c];g(b)&&b.forEach(function(a){l.children.push(j(a))})}),l};return s(a)||(a=B(a)),e(a)}(j,this.options),h=function m(a,g,i){var f,j,c,e,d,l,h;if(!a.children)return f=a.keyId,j=a.searcher,c=b._findMatches({key:b._keyStore.get(f),value:b._myIndex.getValueForItemAtKeyId(g,f),searcher:j}),c&&c.length?[{idx:i,item:g,matches:c}]:[];for(e=[],d=0,l=a.children.length;d<l;d+=1)if(h=m(a.children[d],g,i),h.length)e.push.apply(e,k(h));else if(a.operator===r)return[];return e},i=this._myIndex.records,a={},c=[];return i.forEach(function(g){var f=g.$,b=g.i,i;d(f)&&(i=h(e,f,b),i.length&&(a[b]||(a[b]={idx:b,item:f,matches:[]},c.push(a[b])),i.forEach(function(d){var c,e=d.matches;(c=a[b].matches).push.apply(c,k(e))})))}),c}},{key:"_searchObjectList",value:function(h){var c=this,e=w(h,this.options),b=this._myIndex,f=b.keys,g=b.records,a=[];return g.forEach(function(h){var g=h.$,i=h.i,b;d(g)&&(b=[],f.forEach(function(a,d){b.push.apply(b,k(c._findMatches({key:a,value:g[d],searcher:e})))}),b.length&&a.push({idx:i,item:g,matches:b}))}),a}},{key:"_findMatches",value:function(b){var i=b.key,a=b.value,f=b.searcher,e,h,j,c,k,l,m;return d(a)?(e=[],g(a)?a.forEach(function(a){var b=a.v,g=a.i,h=a.n,c,j,k,l;d(b)&&(c=f.searchIn(b),j=c.isMatch,k=c.score,l=c.indices,j&&e.push({score:k,key:i,value:b,idx:g,norm:h,indices:l}))}):(h=a.v,j=a.n,c=f.searchIn(h),k=c.isMatch,l=c.score,m=c.indices,k&&e.push({score:l,key:i,value:h,norm:j,indices:m})),e):[]}}]),e}(),m.version="6.5.3",m.createIndex=J,m.parseIndex=function(c){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=d.getFn,g=void 0===f?a.getFn:f,e=d.fieldNormWeight,h=void 0===e?a.fieldNormWeight:e,i=c.keys,j=c.records,b=new t({getFn:g,fieldNormWeight:h});return b.setKeys(i),b.setIndexRecords(j),b},m.config=a,function(){n.push.apply(n,arguments)}(ab),m},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(),showButton=document.getElementById("search-button"),hideButton=document.getElementById("close-search-button"),wrapper=document.getElementById("search-wrapper"),modal=document.getElementById("search-modal"),input=document.getElementById("search-query"),output=document.getElementById("search-results"),first=output.firstChild,last=output.lastChild,searchVisible=!1,indexed=!1,hasResults=!1,showButton.addEventListener("click",displaySearch),hideButton.addEventListener("click",hideSearch),wrapper.addEventListener("click",hideSearch),modal.addEventListener("click",function(a){return a.stopPropagation(),a.stopImmediatePropagation(),!1}),document.addEventListener("keydown",function(a){a.key=="/"&&(searchVisible||(a.preventDefault(),displaySearch())),a.key=="Escape"&&hideSearch(),a.key=="ArrowDown"&&searchVisible&&hasResults&&(a.preventDefault(),document.activeElement==input?first.focus():document.activeElement==last?last.focus():document.activeElement.parentElement.nextSibling.firstElementChild.focus()),a.key=="ArrowUp"&&searchVisible&&hasResults&&(a.preventDefault(),document.activeElement==input?input.focus():document.activeElement==first?input.focus():document.activeElement.parentElement.previousSibling.firstElementChild.focus())}),input.onkeyup=function(a){executeQuery(this.value)};function displaySearch(){indexed||buildIndex(),searchVisible||(document.body.style.overflow="hidden",wrapper.style.visibility="visible",input.focus(),searchVisible=!0)}function hideSearch(){searchVisible&&(document.body.style.overflow="visible",wrapper.style.visibility="hidden",document.activeElement.blur(),searchVisible=!1)}function fetchJSON(c,b){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState===4)if(a.status===200){var c=JSON.parse(a.responseText);b&&b(c)}},a.open("GET",c),a.send()}function buildIndex(){var a=wrapper.getAttribute("data-url");fetchJSON(a+"index.json",function(a){var b={shouldSort:!0,ignoreLocation:!0,threshold:0,includeMatches:!0,keys:[{name:"title",weight:.8},{name:"section",weight:.2},{name:"summary",weight:.6},{name:"content",weight:.4}]};fuse=new Fuse(a,b),indexed=!0})}function executeQuery(c){let b=fuse.search(c),a="";b.length>0?(b.forEach(function(b,c){a=a+`<li class="mb-2">
<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" href="${b.item.permalink}" tabindex="0">
<div class="grow">
<div class="-mb-1 text-lg font-bold">${b.item.title}</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">${b.item.section}<span class="px-2 text-primary-500">&middot;</span>${b.item.date}</span></div>
<div class="text-sm italic">${b.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):(a="",hasResults=!1),output.innerHTML=a,b.length>0&&(first=output.firstChild.firstElementChild,last=output.lastChild.firstElementChild)}scriptBundle=document.getElementById("script-bundle"),copyText=scriptBundle?scriptBundle.getAttribute("data-copy"):"Copy",copiedText=scriptBundle?scriptBundle.getAttribute("data-copied"):"Copied";function createCopyButton(b){const a=document.createElement("button");a.className="copy-button",a.type="button",a.ariaLabel=copyText,a.innerText=copyText,a.addEventListener("click",()=>copyCodeToClipboard(a,b)),addCopyButtonToDom(a,b)}async function copyCodeToClipboard(c,a){const b=a.querySelector(":last-child > .chroma > code").innerText;try{result=await navigator.permissions.query({name:"clipboard-write"}),result.state=="granted"||result.state=="prompt"?await navigator.clipboard.writeText(b):copyCodeBlockExecCommand(b,a)}catch(c){copyCodeBlockExecCommand(b,a)}finally{codeWasCopied(c)}}function copyCodeBlockExecCommand(e,b){const a=document.createElement("textArea");a.contentEditable="true",a.readOnly="false",a.className="copy-textarea",a.value=e,b.insertBefore(a,b.firstChild);const c=document.createRange();c.selectNodeContents(a);const d=window.getSelection();d.removeAllRanges(),d.addRange(c),a.setSelectionRange(0,999999),document.execCommand("copy"),b.removeChild(a)}function codeWasCopied(a){a.blur(),a.innerText=copiedText,setTimeout(function(){a.innerText=copyText},2e3)}function addCopyButtonToDom(c,a){a.insertBefore(c,a.firstChild);const b=document.createElement("div");b.className="highlight-wrapper",a.parentNode.insertBefore(b,a),b.appendChild(a)}window.addEventListener("DOMContentLoaded",a=>{document.querySelectorAll(".highlight").forEach(a=>createCopyButton(a))})