mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-26 20:41:37 +01:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
var e,t,fuse,resList,sInput,first,last,resultsAvailable;e=this,t=function(){"use strict";var q,n,o,a,x,f,y,m,e;function C(a){return(C="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})(a)}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function z(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 g(a,b,c){return b&&z(a.prototype,b),c&&z(a,c),a}function G(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function t(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 r(c){for(var a=1,b;a<arguments.length;a++)b=null!=arguments[a]?arguments[a]:{},a%2?t(Object(b),!0).forEach(function(a){G(c,a,b[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(b)):t(Object(b)).forEach(function(a){Object.defineProperty(c,a,Object.getOwnPropertyDescriptor(b,a))});return c}function k(a){return function(a){if(Array.isArray(a))return l(a)}(a)||function(a){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(a))return Array.from(a)}(a)||function(a,c){if(a){if("string"==typeof a)return l(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)?l(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 l(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 d(a){return Array.isArray?Array.isArray(a):"[object Array]"===p(a)}function c(a){return"string"==typeof a}function s(a){return"number"==typeof a}function L(a){return!0===a||!1===a||function(a){return function(a){return"object"===C(a)}(a)&&null!==a}(a)&&"[object Boolean]"==p(a)}function b(a){return null!=a}function j(a){return!a.trim().length}function p(a){return null==a?void 0===a?"[object Undefined]":"[object Null]":Object.prototype.toString.call(a)}q=function(a){return"Pattern length exceeds max of ".concat(a,".")},n=Object.prototype.hasOwnProperty,o=function(){function a(d){var c=this,b;h(this,a),this._keys=[],this._keyMap={},b=0,d.forEach(function(d){var a=B(d);b+=a.weight,c._keys.push(a),c._keyMap[a.id]=a,b+=a.weight}),this._keys.forEach(function(a){a.weight/=b})}return g(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 B(a){var e=null,f=null,g=null,h=1,b;if(c(a)||d(a))g=a,e=u(a),f=v(a);else{if(!n.call(a,"name"))throw new Error(function(a){return"Missing ".concat(a," property in key")}("name"));if(b=a.name,g=b,n.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));e=u(b),f=v(b)}return{path:e,id:f,weight:h,src:g}}function u(a){return d(a)?a:a.split(".")}function v(a){return d(a)?a.join("."):a}a=r({},{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},{},{useExtendedSearch:!1,getFn:function(g,e){var a=[],f=!1;return function k(j,g,h){var e,i,l;if(b(j))if(g[h]){if(e=j[g[h]],!b(e))return;if(h===g.length-1&&(c(e)||s(e)||L(e)))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)}(e));else if(d(
|