{"version":3,"file":"index-BjUQyJv_.js","sources":["../../../node_modules/.pnpm/debounce@2.2.0/node_modules/debounce/index.js"],"sourcesContent":["function debounce(function_, wait = 100, options = {}) {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError(`Expected the first parameter to be a function, got \\`${typeof function_}\\`.`);\n\t}\n\n\tif (wait < 0) {\n\t\tthrow new RangeError('`wait` must not be negative.');\n\t}\n\n\t// TODO: Deprecate the boolean parameter at some point.\n\tconst {immediate} = typeof options === 'boolean' ? {immediate: options} : options;\n\n\tlet storedContext;\n\tlet storedArguments;\n\tlet timeoutId;\n\tlet timestamp;\n\tlet result;\n\n\tfunction run() {\n\t\tconst callContext = storedContext;\n\t\tconst callArguments = storedArguments;\n\t\tstoredContext = undefined;\n\t\tstoredArguments = undefined;\n\t\tresult = function_.apply(callContext, callArguments);\n\t\treturn result;\n\t}\n\n\tfunction later() {\n\t\tconst last = Date.now() - timestamp;\n\n\t\tif (last < wait && last >= 0) {\n\t\t\ttimeoutId = setTimeout(later, wait - last);\n\t\t} else {\n\t\t\ttimeoutId = undefined;\n\n\t\t\tif (!immediate) {\n\t\t\t\tresult = run();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst debounced = function (...arguments_) {\n\t\tif (\n\t\t\tstoredContext\n\t\t\t&& this !== storedContext\n\t\t\t&& Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)\n\t\t) {\n\t\t\tthrow new Error('Debounced method called with different contexts of the same prototype.');\n\t\t}\n\n\t\tstoredContext = this; // eslint-disable-line unicorn/no-this-assignment\n\t\tstoredArguments = arguments_;\n\t\ttimestamp = Date.now();\n\n\t\tconst callNow = immediate && !timeoutId;\n\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = setTimeout(later, wait);\n\t\t}\n\n\t\tif (callNow) {\n\t\t\tresult = run();\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tObject.defineProperty(debounced, 'isPending', {\n\t\tget() {\n\t\t\treturn timeoutId !== undefined;\n\t\t},\n\t});\n\n\tdebounced.clear = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = undefined;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tdebounced.trigger();\n\t};\n\n\tdebounced.trigger = () => {\n\t\tresult = run();\n\n\t\tdebounced.clear();\n\t};\n\n\treturn debounced;\n}\n\n// Adds compatibility for ES modules\nmodule.exports.debounce = debounce;\n\nmodule.exports = debounce;\n"],"names":["debounce","function_","wait","options","immediate","storedContext","storedArguments","timeoutId","timestamp","result","run","callContext","callArguments","later","last","debounced","arguments_","callNow","debounceModule"],"mappings":"sEAAA,SAASA,EAASC,EAAWC,EAAO,IAAKC,EAAU,CAAA,EAAI,CACtD,GAAI,OAAOF,GAAc,WACxB,MAAM,IAAI,UAAU,wDAAwD,OAAOA,CAAS,KAAK,EAGlG,GAAIC,EAAO,EACV,MAAM,IAAI,WAAW,8BAA8B,EAIpD,KAAM,CAAC,UAAAE,CAAS,EAAI,OAAOD,GAAY,UAAY,CAAC,UAAWA,CAAO,EAAIA,EAE1E,IAAIE,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,GAAM,CACd,MAAMC,EAAcN,EACdO,EAAgBN,EACtB,OAAAD,EAAgB,OAChBC,EAAkB,OAClBG,EAASR,EAAU,MAAMU,EAAaC,CAAa,EAC5CH,CACP,CAED,SAASI,GAAQ,CAChB,MAAMC,EAAO,KAAK,IAAG,EAAKN,EAEtBM,EAAOZ,GAAQY,GAAQ,EAC1BP,EAAY,WAAWM,EAAOX,EAAOY,CAAI,GAEzCP,EAAY,OAEPH,IACJK,EAASC,EAAG,GAGd,CAED,MAAMK,EAAY,YAAaC,EAAY,CAC1C,GACCX,GACG,OAASA,GACT,OAAO,eAAe,IAAI,IAAM,OAAO,eAAeA,CAAa,EAEtE,MAAM,IAAI,MAAM,wEAAwE,EAGzFA,EAAgB,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