@microlink/mql 0.10.14 → 0.10.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mql.js +10 -7
- package/dist/mql.js.map +1 -1
- package/dist/mql.min.js +2 -2
- package/dist/mql.min.js.map +1 -1
- package/package.json +19 -15
- package/src/browser.js +5 -2
- package/src/factory.js +4 -4
package/dist/mql.js
CHANGED
|
@@ -349,10 +349,10 @@
|
|
|
349
349
|
const mapRules = rules => {
|
|
350
350
|
if (!isObject(rules)) return
|
|
351
351
|
const flatRules = flatten(rules);
|
|
352
|
-
return Object.keys(flatRules).reduce(
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
)
|
|
352
|
+
return Object.keys(flatRules).reduce((acc, key) => {
|
|
353
|
+
acc[`data.${key}`] = flatRules[key].toString();
|
|
354
|
+
return acc
|
|
355
|
+
}, {})
|
|
356
356
|
};
|
|
357
357
|
|
|
358
358
|
const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {
|
|
@@ -854,8 +854,11 @@
|
|
|
854
854
|
const { response } = err;
|
|
855
855
|
err.response = {
|
|
856
856
|
...response,
|
|
857
|
-
headers:
|
|
858
|
-
(acc, [key, value]) =>
|
|
857
|
+
headers: Array.from(response.headers.entries()).reduce(
|
|
858
|
+
(acc, [key, value]) => {
|
|
859
|
+
acc[key] = value;
|
|
860
|
+
return acc
|
|
861
|
+
},
|
|
859
862
|
{}
|
|
860
863
|
),
|
|
861
864
|
statusCode: response.status,
|
|
@@ -872,7 +875,7 @@
|
|
|
872
875
|
stringify,
|
|
873
876
|
got,
|
|
874
877
|
flatten,
|
|
875
|
-
VERSION: '0.10.
|
|
878
|
+
VERSION: '0.10.18'
|
|
876
879
|
});
|
|
877
880
|
|
|
878
881
|
return browser;
|
package/dist/mql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mql.js","sources":["../node_modules/.pnpm/is-url-http@2.2.7/node_modules/is-url-http/lightweight.js","../node_modules/.pnpm/flattie@1.1.0/node_modules/flattie/dist/index.js","../node_modules/.pnpm/qss@2.0.3/node_modules/qss/dist/qss.m.js","../node_modules/.pnpm/mimic-fn@3.0.0/node_modules/mimic-fn/index.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/helpers.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/add-error-props.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-extend-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatalclient',\n code: 'EFATALCLIENT',\n message,\n url\n }\n }\n}\n\nconst factory = ({\n VERSION,\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten\n}) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n const isBuffer = Buffer.isBuffer(rawBody)\n\n const body =\n isObject(rawBody) && !isBuffer\n ? rawBody\n : parseBody(isBuffer ? rawBody.toString() : rawBody, err, uri)\n\n if (body.code === 'EFATALCLIENT' && retryCount++ < 2) {\n return fetchFromApi(apiUrl, opts, retryCount)\n }\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro\n ? { ...gotHeaders, 'x-api-key': apiKey }\n : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ky = {}));\n})(this, (function (exports) { 'use strict';\n\n // eslint-lint-disable-next-line @typescript-eslint/naming-convention\n class HTTPError extends Error {\n constructor(response, request, options) {\n const code = (response.status || response.status === 0) ? response.status : '';\n const title = response.statusText || '';\n const status = `${code} ${title}`.trim();\n const reason = status ? `status code ${status}` : 'an unknown error';\n super(`Request failed with ${reason}`);\n this.name = 'HTTPError';\n this.response = response;\n this.request = request;\n this.options = options;\n }\n }\n\n class TimeoutError extends Error {\n constructor(request) {\n super('Request timed out');\n this.name = 'TimeoutError';\n this.request = request;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const isObject = (value) => value !== null && typeof value === 'object';\n\n const validateAndMerge = (...sources) => {\n for (const source of sources) {\n if ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n throw new TypeError('The `options` argument must be an object');\n }\n }\n return deepMerge({}, ...sources);\n };\n const mergeHeaders = (source1 = {}, source2 = {}) => {\n const result = new globalThis.Headers(source1);\n const isHeadersInstance = source2 instanceof globalThis.Headers;\n const source = new globalThis.Headers(source2);\n for (const [key, value] of source.entries()) {\n if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n result.delete(key);\n }\n else {\n result.set(key, value);\n }\n }\n return result;\n };\n // TODO: Make this strongly-typed (no `any`).\n const deepMerge = (...sources) => {\n let returnValue = {};\n let headers = {};\n for (const source of sources) {\n if (Array.isArray(source)) {\n if (!Array.isArray(returnValue)) {\n returnValue = [];\n }\n returnValue = [...returnValue, ...source];\n }\n else if (isObject(source)) {\n for (let [key, value] of Object.entries(source)) {\n if (isObject(value) && key in returnValue) {\n value = deepMerge(returnValue[key], value);\n }\n returnValue = { ...returnValue, [key]: value };\n }\n if (isObject(source.headers)) {\n headers = mergeHeaders(headers, source.headers);\n returnValue.headers = headers;\n }\n }\n }\n return returnValue;\n };\n\n const supportsAbortController = typeof globalThis.AbortController === 'function';\n const supportsStreams = typeof globalThis.ReadableStream === 'function';\n const supportsFormData = typeof globalThis.FormData === 'function';\n const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\n const responseTypes = {\n json: 'application/json',\n text: 'text/*',\n formData: 'multipart/form-data',\n arrayBuffer: '*/*',\n blob: '*/*',\n };\n // The maximum value of a 32bit int (see issue #117)\n const maxSafeTimeout = 2147483647;\n const stop = Symbol('stop');\n\n const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\n const retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\n const retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\n const retryAfterStatusCodes = [413, 429, 503];\n const defaultRetryOptions = {\n limit: 2,\n methods: retryMethods,\n statusCodes: retryStatusCodes,\n afterStatusCodes: retryAfterStatusCodes,\n maxRetryAfter: Number.POSITIVE_INFINITY,\n };\n const normalizeRetryOptions = (retry = {}) => {\n if (typeof retry === 'number') {\n return {\n ...defaultRetryOptions,\n limit: retry,\n };\n }\n if (retry.methods && !Array.isArray(retry.methods)) {\n throw new Error('retry.methods must be an array');\n }\n if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n throw new Error('retry.statusCodes must be an array');\n }\n return {\n ...defaultRetryOptions,\n ...retry,\n afterStatusCodes: retryAfterStatusCodes,\n };\n };\n\n // `Promise.race()` workaround (#91)\n const timeout = async (request, abortController, options) => new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n if (abortController) {\n abortController.abort();\n }\n reject(new TimeoutError(request));\n }, options.timeout);\n /* eslint-disable promise/prefer-await-to-then */\n void options\n .fetch(request)\n .then(resolve)\n .catch(reject)\n .then(() => {\n clearTimeout(timeoutId);\n });\n /* eslint-enable promise/prefer-await-to-then */\n });\n const delay = async (ms) => new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n\n class Ky {\n // eslint-disable-next-line complexity\n constructor(input, options = {}) {\n var _a, _b;\n this._retryCount = 0;\n this._input = input;\n this._options = {\n // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n credentials: this._input.credentials || 'same-origin',\n ...options,\n headers: mergeHeaders(this._input.headers, options.headers),\n hooks: deepMerge({\n beforeRequest: [],\n beforeRetry: [],\n afterResponse: [],\n }, options.hooks),\n method: normalizeRequestMethod((_a = options.method) !== null && _a !== void 0 ? _a : this._input.method),\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n prefixUrl: String(options.prefixUrl || ''),\n retry: normalizeRetryOptions(options.retry),\n throwHttpErrors: options.throwHttpErrors !== false,\n timeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n fetch: (_b = options.fetch) !== null && _b !== void 0 ? _b : globalThis.fetch.bind(globalThis),\n };\n if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n throw new TypeError('`input` must be a string, URL, or Request');\n }\n if (this._options.prefixUrl && typeof this._input === 'string') {\n if (this._input.startsWith('/')) {\n throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n }\n if (!this._options.prefixUrl.endsWith('/')) {\n this._options.prefixUrl += '/';\n }\n this._input = this._options.prefixUrl + this._input;\n }\n if (supportsAbortController) {\n this.abortController = new globalThis.AbortController();\n if (this._options.signal) {\n this._options.signal.addEventListener('abort', () => {\n this.abortController.abort();\n });\n }\n this._options.signal = this.abortController.signal;\n }\n this.request = new globalThis.Request(this._input, this._options);\n if (this._options.searchParams) {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const textSearchParams = typeof this._options.searchParams === 'string'\n ? this._options.searchParams.replace(/^\\?/, '')\n : new URLSearchParams(this._options.searchParams).toString();\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const searchParams = '?' + textSearchParams;\n const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n this.request.headers.delete('content-type');\n }\n this.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n }\n if (this._options.json !== undefined) {\n this._options.body = JSON.stringify(this._options.json);\n this.request.headers.set('content-type', 'application/json');\n this.request = new globalThis.Request(this.request, { body: this._options.body });\n }\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n static create(input, options) {\n const ky = new Ky(input, options);\n const fn = async () => {\n if (ky._options.timeout > maxSafeTimeout) {\n throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n }\n // Delay the fetch so that body method shortcuts can set the Accept header\n await Promise.resolve();\n let response = await ky._fetch();\n for (const hook of ky._options.hooks.afterResponse) {\n // eslint-disable-next-line no-await-in-loop\n const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n if (modifiedResponse instanceof globalThis.Response) {\n response = modifiedResponse;\n }\n }\n ky._decorateResponse(response);\n if (!response.ok && ky._options.throwHttpErrors) {\n throw new HTTPError(response, ky.request, ky._options);\n }\n // If `onDownloadProgress` is passed, it uses the stream API internally\n /* istanbul ignore next */\n if (ky._options.onDownloadProgress) {\n if (typeof ky._options.onDownloadProgress !== 'function') {\n throw new TypeError('The `onDownloadProgress` option must be a function');\n }\n if (!supportsStreams) {\n throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n }\n return ky._stream(response.clone(), ky._options.onDownloadProgress);\n }\n return response;\n };\n const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n const result = (isRetriableMethod ? ky._retry(fn) : fn());\n for (const [type, mimeType] of Object.entries(responseTypes)) {\n result[type] = async () => {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n const response = (await result).clone();\n if (type === 'json') {\n if (response.status === 204) {\n return '';\n }\n if (options.parseJson) {\n return options.parseJson(await response.text());\n }\n }\n return response[type]();\n };\n }\n return result;\n }\n _calculateRetryDelay(error) {\n this._retryCount++;\n if (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n if (error instanceof HTTPError) {\n if (!this._options.retry.statusCodes.includes(error.response.status)) {\n return 0;\n }\n const retryAfter = error.response.headers.get('Retry-After');\n if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n let after = Number(retryAfter);\n if (Number.isNaN(after)) {\n after = Date.parse(retryAfter) - Date.now();\n }\n else {\n after *= 1000;\n }\n if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n return 0;\n }\n return after;\n }\n if (error.response.status === 413) {\n return 0;\n }\n }\n const BACKOFF_FACTOR = 0.3;\n return BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n }\n return 0;\n }\n _decorateResponse(response) {\n if (this._options.parseJson) {\n response.json = async () => this._options.parseJson(await response.text());\n }\n return response;\n }\n async _retry(fn) {\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n }\n catch (error) {\n const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n if (ms !== 0 && this._retryCount > 0) {\n await delay(ms);\n for (const hook of this._options.hooks.beforeRetry) {\n // eslint-disable-next-line no-await-in-loop\n const hookResult = await hook({\n request: this.request,\n options: this._options,\n error: error,\n retryCount: this._retryCount,\n });\n // If `stop` is returned from the hook, the retry process is stopped\n if (hookResult === stop) {\n return;\n }\n }\n return this._retry(fn);\n }\n throw error;\n }\n }\n async _fetch() {\n for (const hook of this._options.hooks.beforeRequest) {\n // eslint-disable-next-line no-await-in-loop\n const result = await hook(this.request, this._options);\n if (result instanceof Request) {\n this.request = result;\n break;\n }\n if (result instanceof Response) {\n return result;\n }\n }\n if (this._options.timeout === false) {\n return this._options.fetch(this.request.clone());\n }\n return timeout(this.request.clone(), this.abortController, this._options);\n }\n /* istanbul ignore next */\n _stream(response, onDownloadProgress) {\n const totalBytes = Number(response.headers.get('content-length')) || 0;\n let transferredBytes = 0;\n return new globalThis.Response(new globalThis.ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n }\n async function read() {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n return;\n }\n if (onDownloadProgress) {\n transferredBytes += value.byteLength;\n const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n }\n controller.enqueue(value);\n await read();\n }\n await read();\n },\n }));\n }\n }\n\n /*! MIT License © Sindre Sorhus */\n const createInstance = (defaults) => {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n for (const method of requestMethods) {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n }\n ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n ky.extend = (newDefaults) => createInstance(validateAndMerge(defaults, newDefaults));\n ky.stop = stop;\n return ky;\n };\n const ky = createInstance();\n\n exports.HTTPError = HTTPError;\n exports.TimeoutError = TimeoutError;\n exports[\"default\"] = ky;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst { default: ky } = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","require$$0","mimicFn","addErrorProps","require$$1","require$$2","require$$3","createExtendError","createError","libModule","factory","this","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,MAAMA,KAAG,GAAGC,cAAM,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAGC,8BAAc,CAAC,IAAG;CAC3D,MAAM,mBAAmB,GAAG,gBAAe;AAC3C;KACA,WAAc,GAAG,GAAG,IAAI;CACxB,EAAE,IAAI;CACN,IAAI,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAIF,KAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;CACtD,GAAG,CAAC,OAAO,GAAG,EAAE;CAChB,IAAI,OAAO,KAAK;CAChB,GAAG;CACH;;;;CCXA,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;CAC9C,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG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AC,QAAQ,GAAG;CACrB,QAAQ,GAAG,QAAQ;CACnB,QAAQ,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM;CACvD,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,KAAK,EAAE,CAAC;CAC3D,UAAU,EAAE;CACZ,SAAS;CACT,QAAQ,UAAU,EAAE,QAAQ,CAAC,MAAM;CACnC,QAAQ,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE;CACnC,QAAO;CACP,KAAK;CACL,IAAI,MAAM,GAAG;CACb,GAAG;CACH,EAAC;AACD;KACA,OAAc,GAAG,OAAO,CAAC;CACzB,EAAE,cAAc;CAChB,EAAE,SAAS;CACX,EAAE,SAAS;CACX,EAAE,GAAG;CACL,EAAE,OAAO;CACT,EAAE,OAAO,EAAE,SAAiB;CAC5B,CAAC;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mql.js","sources":["../node_modules/.pnpm/is-url-http@2.2.7/node_modules/is-url-http/lightweight.js","../node_modules/.pnpm/flattie@1.1.0/node_modules/flattie/dist/index.js","../node_modules/.pnpm/qss@2.0.3/node_modules/qss/dist/qss.m.js","../node_modules/.pnpm/mimic-fn@3.0.0/node_modules/mimic-fn/index.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/helpers.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/add-error-props.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-extend-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatalclient',\n code: 'EFATALCLIENT',\n message,\n url\n }\n }\n}\n\nconst factory = ({\n VERSION,\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten\n}) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce((acc, key) => {\n acc[`data.${key}`] = flatRules[key].toString()\n return acc\n }, {})\n }\n\n const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n const isBuffer = Buffer.isBuffer(rawBody)\n\n const body =\n isObject(rawBody) && !isBuffer\n ? rawBody\n : parseBody(isBuffer ? rawBody.toString() : rawBody, err, uri)\n\n if (body.code === 'EFATALCLIENT' && retryCount++ < 2) {\n return fetchFromApi(apiUrl, opts, retryCount)\n }\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro\n ? { ...gotHeaders, 'x-api-key': apiKey }\n : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ky = {}));\n})(this, (function (exports) { 'use strict';\n\n // eslint-lint-disable-next-line @typescript-eslint/naming-convention\n class HTTPError extends Error {\n constructor(response, request, options) {\n const code = (response.status || response.status === 0) ? response.status : '';\n const title = response.statusText || '';\n const status = `${code} ${title}`.trim();\n const reason = status ? `status code ${status}` : 'an unknown error';\n super(`Request failed with ${reason}`);\n this.name = 'HTTPError';\n this.response = response;\n this.request = request;\n this.options = options;\n }\n }\n\n class TimeoutError extends Error {\n constructor(request) {\n super('Request timed out');\n this.name = 'TimeoutError';\n this.request = request;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const isObject = (value) => value !== null && typeof value === 'object';\n\n const validateAndMerge = (...sources) => {\n for (const source of sources) {\n if ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n throw new TypeError('The `options` argument must be an object');\n }\n }\n return deepMerge({}, ...sources);\n };\n const mergeHeaders = (source1 = {}, source2 = {}) => {\n const result = new globalThis.Headers(source1);\n const isHeadersInstance = source2 instanceof globalThis.Headers;\n const source = new globalThis.Headers(source2);\n for (const [key, value] of source.entries()) {\n if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n result.delete(key);\n }\n else {\n result.set(key, value);\n }\n }\n return result;\n };\n // TODO: Make this strongly-typed (no `any`).\n const deepMerge = (...sources) => {\n let returnValue = {};\n let headers = {};\n for (const source of sources) {\n if (Array.isArray(source)) {\n if (!Array.isArray(returnValue)) {\n returnValue = [];\n }\n returnValue = [...returnValue, ...source];\n }\n else if (isObject(source)) {\n for (let [key, value] of Object.entries(source)) {\n if (isObject(value) && key in returnValue) {\n value = deepMerge(returnValue[key], value);\n }\n returnValue = { ...returnValue, [key]: value };\n }\n if (isObject(source.headers)) {\n headers = mergeHeaders(headers, source.headers);\n returnValue.headers = headers;\n }\n }\n }\n return returnValue;\n };\n\n const supportsAbortController = typeof globalThis.AbortController === 'function';\n const supportsStreams = typeof globalThis.ReadableStream === 'function';\n const supportsFormData = typeof globalThis.FormData === 'function';\n const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\n const responseTypes = {\n json: 'application/json',\n text: 'text/*',\n formData: 'multipart/form-data',\n arrayBuffer: '*/*',\n blob: '*/*',\n };\n // The maximum value of a 32bit int (see issue #117)\n const maxSafeTimeout = 2147483647;\n const stop = Symbol('stop');\n\n const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\n const retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\n const retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\n const retryAfterStatusCodes = [413, 429, 503];\n const defaultRetryOptions = {\n limit: 2,\n methods: retryMethods,\n statusCodes: retryStatusCodes,\n afterStatusCodes: retryAfterStatusCodes,\n maxRetryAfter: Number.POSITIVE_INFINITY,\n };\n const normalizeRetryOptions = (retry = {}) => {\n if (typeof retry === 'number') {\n return {\n ...defaultRetryOptions,\n limit: retry,\n };\n }\n if (retry.methods && !Array.isArray(retry.methods)) {\n throw new Error('retry.methods must be an array');\n }\n if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n throw new Error('retry.statusCodes must be an array');\n }\n return {\n ...defaultRetryOptions,\n ...retry,\n afterStatusCodes: retryAfterStatusCodes,\n };\n };\n\n // `Promise.race()` workaround (#91)\n const timeout = async (request, abortController, options) => new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n if (abortController) {\n abortController.abort();\n }\n reject(new TimeoutError(request));\n }, options.timeout);\n /* eslint-disable promise/prefer-await-to-then */\n void options\n .fetch(request)\n .then(resolve)\n .catch(reject)\n .then(() => {\n clearTimeout(timeoutId);\n });\n /* eslint-enable promise/prefer-await-to-then */\n });\n const delay = async (ms) => new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n\n class Ky {\n // eslint-disable-next-line complexity\n constructor(input, options = {}) {\n var _a, _b;\n this._retryCount = 0;\n this._input = input;\n this._options = {\n // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n credentials: this._input.credentials || 'same-origin',\n ...options,\n headers: mergeHeaders(this._input.headers, options.headers),\n hooks: deepMerge({\n beforeRequest: [],\n beforeRetry: [],\n afterResponse: [],\n }, options.hooks),\n method: normalizeRequestMethod((_a = options.method) !== null && _a !== void 0 ? _a : this._input.method),\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n prefixUrl: String(options.prefixUrl || ''),\n retry: normalizeRetryOptions(options.retry),\n throwHttpErrors: options.throwHttpErrors !== false,\n timeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n fetch: (_b = options.fetch) !== null && _b !== void 0 ? _b : globalThis.fetch.bind(globalThis),\n };\n if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n throw new TypeError('`input` must be a string, URL, or Request');\n }\n if (this._options.prefixUrl && typeof this._input === 'string') {\n if (this._input.startsWith('/')) {\n throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n }\n if (!this._options.prefixUrl.endsWith('/')) {\n this._options.prefixUrl += '/';\n }\n this._input = this._options.prefixUrl + this._input;\n }\n if (supportsAbortController) {\n this.abortController = new globalThis.AbortController();\n if (this._options.signal) {\n this._options.signal.addEventListener('abort', () => {\n this.abortController.abort();\n });\n }\n this._options.signal = this.abortController.signal;\n }\n this.request = new globalThis.Request(this._input, this._options);\n if (this._options.searchParams) {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const textSearchParams = typeof this._options.searchParams === 'string'\n ? this._options.searchParams.replace(/^\\?/, '')\n : new URLSearchParams(this._options.searchParams).toString();\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const searchParams = '?' + textSearchParams;\n const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n this.request.headers.delete('content-type');\n }\n this.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n }\n if (this._options.json !== undefined) {\n this._options.body = JSON.stringify(this._options.json);\n this.request.headers.set('content-type', 'application/json');\n this.request = new globalThis.Request(this.request, { body: this._options.body });\n }\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n static create(input, options) {\n const ky = new Ky(input, options);\n const fn = async () => {\n if (ky._options.timeout > maxSafeTimeout) {\n throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n }\n // Delay the fetch so that body method shortcuts can set the Accept header\n await Promise.resolve();\n let response = await ky._fetch();\n for (const hook of ky._options.hooks.afterResponse) {\n // eslint-disable-next-line no-await-in-loop\n const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n if (modifiedResponse instanceof globalThis.Response) {\n response = modifiedResponse;\n }\n }\n ky._decorateResponse(response);\n if (!response.ok && ky._options.throwHttpErrors) {\n throw new HTTPError(response, ky.request, ky._options);\n }\n // If `onDownloadProgress` is passed, it uses the stream API internally\n /* istanbul ignore next */\n if (ky._options.onDownloadProgress) {\n if (typeof ky._options.onDownloadProgress !== 'function') {\n throw new TypeError('The `onDownloadProgress` option must be a function');\n }\n if (!supportsStreams) {\n throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n }\n return ky._stream(response.clone(), ky._options.onDownloadProgress);\n }\n return response;\n };\n const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n const result = (isRetriableMethod ? ky._retry(fn) : fn());\n for (const [type, mimeType] of Object.entries(responseTypes)) {\n result[type] = async () => {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n const response = (await result).clone();\n if (type === 'json') {\n if (response.status === 204) {\n return '';\n }\n if (options.parseJson) {\n return options.parseJson(await response.text());\n }\n }\n return response[type]();\n };\n }\n return result;\n }\n _calculateRetryDelay(error) {\n this._retryCount++;\n if (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n if (error instanceof HTTPError) {\n if (!this._options.retry.statusCodes.includes(error.response.status)) {\n return 0;\n }\n const retryAfter = error.response.headers.get('Retry-After');\n if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n let after = Number(retryAfter);\n if (Number.isNaN(after)) {\n after = Date.parse(retryAfter) - Date.now();\n }\n else {\n after *= 1000;\n }\n if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n return 0;\n }\n return after;\n }\n if (error.response.status === 413) {\n return 0;\n }\n }\n const BACKOFF_FACTOR = 0.3;\n return BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n }\n return 0;\n }\n _decorateResponse(response) {\n if (this._options.parseJson) {\n response.json = async () => this._options.parseJson(await response.text());\n }\n return response;\n }\n async _retry(fn) {\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n }\n catch (error) {\n const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n if (ms !== 0 && this._retryCount > 0) {\n await delay(ms);\n for (const hook of this._options.hooks.beforeRetry) {\n // eslint-disable-next-line no-await-in-loop\n const hookResult = await hook({\n request: this.request,\n options: this._options,\n error: error,\n retryCount: this._retryCount,\n });\n // If `stop` is returned from the hook, the retry process is stopped\n if (hookResult === stop) {\n return;\n }\n }\n return this._retry(fn);\n }\n throw error;\n }\n }\n async _fetch() {\n for (const hook of this._options.hooks.beforeRequest) {\n // eslint-disable-next-line no-await-in-loop\n const result = await hook(this.request, this._options);\n if (result instanceof Request) {\n this.request = result;\n break;\n }\n if (result instanceof Response) {\n return result;\n }\n }\n if (this._options.timeout === false) {\n return this._options.fetch(this.request.clone());\n }\n return timeout(this.request.clone(), this.abortController, this._options);\n }\n /* istanbul ignore next */\n _stream(response, onDownloadProgress) {\n const totalBytes = Number(response.headers.get('content-length')) || 0;\n let transferredBytes = 0;\n return new globalThis.Response(new globalThis.ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n }\n async function read() {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n return;\n }\n if (onDownloadProgress) {\n transferredBytes += value.byteLength;\n const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n }\n controller.enqueue(value);\n await read();\n }\n await read();\n },\n }));\n }\n }\n\n /*! MIT License © Sindre Sorhus */\n const createInstance = (defaults) => {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n for (const method of requestMethods) {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n }\n ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n ky.extend = (newDefaults) => createInstance(validateAndMerge(defaults, newDefaults));\n ky.stop = stop;\n return ky;\n };\n const ky = createInstance();\n\n exports.HTTPError = HTTPError;\n exports.TimeoutError = TimeoutError;\n exports[\"default\"] = ky;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst { default: ky } = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: Array.from(response.headers.entries()).reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","require$$0","mimicFn","addErrorProps","require$$1","require$$2","require$$3","createExtendError","createError","libModule","factory","this","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,MAAMA,KAAG,GAAGC,cAAM,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAGC,8BAAc,CAAC,IAAG;CAC3D,MAAM,mBAAmB,GAAG,gBAAe;AAC3C;KACA,WAAc,GAAG,GAAG,IAAI;CACxB,EAAE,IAAI;CACN,IAAI,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAIF,KAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;CACtD,GAAG,CAAC,OAAO,GAAG,EAAE;CAChB,IAAI,OAAO,KAAK;CAChB,GAAG;CACH;;;;CCXA,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;CAC9C,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;AACtC;CACA,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE;CAClB,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACjC,EAAE,MAAM,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE;CACpC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpB,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;CAChC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACjC,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GA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AG,OAAO,CAAC;CACzB,EAAE,cAAc;CAChB,EAAE,SAAS;CACX,EAAE,SAAS;CACX,EAAE,GAAG;CACL,EAAE,OAAO;CACT,EAAE,OAAO,EAAE,SAAiB;CAC5B,CAAC;;;;;;;;"}
|
package/dist/mql.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("url")):"function"==typeof define&&define.amd?define(["url"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).mql=e(t.require$$0$1)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})})),e}const n=o.window?window.URL:r.default.URL,i=/^https?:\/\//i;var a={};function u(t,e,r,o,s){var n,i=s?s+r:s;if(null==o)e&&(t[s]=o);else if("object"!=typeof o)t[s]=o;else if(Array.isArray(o))for(n=0;n<o.length;n++)u(t,e,r,o[n],i+n);else for(n in o)u(t,e,r,o[n],i+n)}function c(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}a.flattie=function(t,e,r){var o={};return"object"==typeof t&&u(o,!!r,e||".",t,""),o};var p=s(Object.freeze({__proto__:null,encode:function(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n},decode:function(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],c(e.shift())):o[r]=c(e.shift());return o}})),l={exports:{}},f=s(Object.freeze({__proto__:null,default:t=>t}));const h=(t,e,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!d(s,n)&&o||Object.defineProperty(t,r,n)},d=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},y=(t,e)=>`/* Wrapped ${t}*/\n${e}`,b=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),m=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var g=(t,e,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(e))h(t,e,o,r);return((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=y.bind(null,o,e.toString());Object.defineProperty(s,"name",m),Object.defineProperty(t,"toString",{...b,value:s})})(t,e,o),t},w={isFunction:t=>"function"==typeof t,isString:t=>"string"==typeof t,composeErrorMessage:(t,e)=>`${t}, ${e}`,inherits:(t,e)=>{t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:_,composeErrorMessage:R}=w;const T=f,E=g,v=function(t,...e){Object.assign(t,...e),t.description=_(t.message)?t.message(t):t.message,t.message=t.code?R(t.code,t.description):t.description},{isString:j}=w;var x=function(t,e){function r(r){const o=new t,s=j(r)?{message:r}:r;return v(o,e,s),o.stack=T(o.stack),o}return r.prototype=t.prototype,E(r,t),r};const{inherits:O}=w,q=g,C=/[^0-9a-zA-Z_$]/;const P=x,A=function(t){if("string"!=typeof t)throw new TypeError("Expected className to be a string");if(C.test(t))throw new Error("className contains invalid characters");function e(){Object.defineProperty(this,"name",{configurable:!0,value:t,writable:!0}),Error.captureStackTrace(this,this.constructor)}return O(e,Error),q(e,Error),e},S=t=>(e,r)=>{const o=A(e||t.name);return P(o,r)};l.exports=S(Error),l.exports.type=S(TypeError),l.exports.range=S(RangeError),l.exports.eval=S(EvalError),l.exports.syntax=S(SyntaxError),l.exports.reference=S(ReferenceError),l.exports.uri=S(URIError);const U={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"},k=t=>null!==t&&"object"==typeof t;var N=({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n})=>{const i=t=>{if(!k(t))return;const e=n(t);return Object.keys(e).reduce(((t,r)=>({...t,[`data.${r}`]:e[r].toString()})),{})},a=async(t,r={},o=0)=>{try{const e=await s(t,r);return"buffer"===r.responseType?{body:e.body,response:e}:{...e.body,response:e}}catch(s){const{response:n={}}=s,{statusCode:i,body:u,headers:c,url:p=t}=n,l=Buffer.isBuffer(u),f=k(u)&&!l?u:((t,e,r)=>{try{return JSON.parse(t)}catch(o){const s=t||e.message;return{status:"error",data:{url:s},more:"https://microlink.io/efatalclient",code:"EFATALCLIENT",message:s,url:r}}})(l?u.toString():u,s,p);if("EFATALCLIENT"===f.code&&o++<2)return a(t,r,o);throw e({...f,message:f.message,url:p,statusCode:i,headers:c})}},u=(t,{data:e,apiKey:r,endpoint:s,retry:a,cache:u,...c}={},{responseType:p="json",headers:l,...f}={})=>{const h=!!r;return[`${s||U[h?"PRO":"FREE"]}?${o({url:t,...i(e),...n(c)})}`,{...f,responseType:p,cache:u,retry:a,headers:h?{...l,"x-api-key":r}:{...l}}]},c=t=>async(o,s,n)=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({status:"fail",data:{url:r},more:"https://microlink.io/docs/api/api-parameters/url",code:"EINVALURLCLIENT",message:r,url:t})}})(o);const[i,c]=u(o,s,{...t,...n});return a(i,c)},p=c();return p.MicrolinkError=e,p.getApiUrl=u,p.fetchFromApi=a,p.mapRules=i,p.version=t,p.stream=s.stream,p.buffer=c({responseType:"buffer"}),p},$={exports:{}};!function(t,e){!function(t){class e extends Error{constructor(t,e,r){const o=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super("Request failed with "+(o?`status code ${o}`:"an unknown error")),this.name="HTTPError",this.response=t,this.request=e,this.options=r}}class r extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const o=t=>null!==t&&"object"==typeof t,s=(...t)=>{for(const e of t)if((!o(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return i({},...t)},n=(t={},e={})=>{const r=new globalThis.Headers(t),o=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[t,e]of s.entries())o&&"undefined"===e||void 0===e?r.delete(t):r.set(t,e);return r},i=(...t)=>{let e={},r={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(o(s)){for(let[t,r]of Object.entries(s))o(r)&&t in e&&(r=i(e[t],r)),e={...e,[t]:r};o(s.headers)&&(r=n(r,s.headers),e.headers=r)}return e},a="function"==typeof globalThis.AbortController,u="function"==typeof globalThis.ReadableStream,c="function"==typeof globalThis.FormData,p=["get","post","put","patch","head","delete"],l={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},f=2147483647,h=Symbol("stop"),d=t=>p.includes(t)?t.toUpperCase():t,y=[413,429,503],b={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:y,maxRetryAfter:Number.POSITIVE_INFINITY},m=(t={})=>{if("number"==typeof t)return{...b,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...b,...t,afterStatusCodes:y}},g=async(t,e,o)=>new Promise(((s,n)=>{const i=setTimeout((()=>{e&&e.abort(),n(new r(t))}),o.timeout);o.fetch(t).then(s).catch(n).then((()=>{clearTimeout(i)}))})),w=async t=>new Promise((e=>{setTimeout(e,t)}));class _{constructor(t,e={}){var r,o;if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...e,headers:n(this._input.headers,e.headers),hooks:i({beforeRequest:[],beforeRetry:[],afterResponse:[]},e.hooks),method:d(null!==(r=e.method)&&void 0!==r?r:this._input.method),prefixUrl:String(e.prefixUrl||""),retry:m(e.retry),throwHttpErrors:!1!==e.throwHttpErrors,timeout:void 0===e.timeout?1e4:e.timeout,fetch:null!==(o=e.fetch)&&void 0!==o?o:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(a&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(c&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}static create(t,r){const o=new _(t,r),s=async()=>{if(o._options.timeout>f)throw new RangeError(`The \`timeout\` option cannot be greater than ${f}`);await Promise.resolve();let t=await o._fetch();for(const e of o._options.hooks.afterResponse){const r=await e(o.request,o._options,o._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(o._decorateResponse(t),!t.ok&&o._options.throwHttpErrors)throw new e(t,o.request,o._options);if(o._options.onDownloadProgress){if("function"!=typeof o._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!u)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return o._stream(t.clone(),o._options.onDownloadProgress)}return t},n=o._options.retry.methods.includes(o.request.method.toLowerCase())?o._retry(s):s();for(const[t,e]of Object.entries(l))n[t]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||e);const s=(await n).clone();if("json"===t){if(204===s.status)return"";if(r.parseJson)return r.parseJson(await s.text())}return s[t]()};return n}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof r)){if(t instanceof e){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),f);if(0!==r&&this._retryCount>0){await w(r);for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===h)return;return this._retry(t)}throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):g(this.request.clone(),this.abortController,this._options)}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let o=0;return new globalThis.Response(new globalThis.ReadableStream({async start(s){const n=t.body.getReader();async function i(){const{done:t,value:a}=await n.read();t?s.close():(e&&(o+=a.byteLength,e({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},a)),s.enqueue(a),await i())}e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await i()}}))}}
|
|
2
|
-
/*! MIT License © Sindre Sorhus */const R=t=>{const e=(e,r)=>_.create(e,s(t,r));for(const r of p)e[r]=(e,o)=>_.create(e,s(t,o,{method:r}));return e.create=t=>R(s(t)),e.extend=e=>R(s(t,e)),e.stop=h,e},T=R();t.HTTPError=e,t.TimeoutError=r,t.default=T,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,$.exports);const I=t=>{try{return i.test(new n(t).href)}catch(t){return!1}},{flattie:D}=a,{encode:L}=p,F=l.exports,M=N,{default:H}=$.exports;return M({MicrolinkError:F("MicrolinkError"),isUrlHttp:I,stringify:L,got:async(t,e)=>{try{void 0===e.timeout&&(e.timeout=!1);const r=await H(t,e),o=await r.json(),{headers:s,status:n,statusText:i}=r;return{url:r.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("url")):"function"==typeof define&&define.amd?define(["url"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).mql=e(t.require$$0$1)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})})),e}const n=o.window?window.URL:r.default.URL,i=/^https?:\/\//i;var a={};function u(t,e,r,o,s){var n,i=s?s+r:s;if(null==o)e&&(t[s]=o);else if("object"!=typeof o)t[s]=o;else if(Array.isArray(o))for(n=0;n<o.length;n++)u(t,e,r,o[n],i+n);else for(n in o)u(t,e,r,o[n],i+n)}function c(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}a.flattie=function(t,e,r){var o={};return"object"==typeof t&&u(o,!!r,e||".",t,""),o};var p=s(Object.freeze({__proto__:null,encode:function(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n},decode:function(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],c(e.shift())):o[r]=c(e.shift());return o}})),l={exports:{}},f=s(Object.freeze({__proto__:null,default:t=>t}));const h=(t,e,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!d(s,n)&&o||Object.defineProperty(t,r,n)},d=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},y=(t,e)=>`/* Wrapped ${t}*/\n${e}`,b=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),m=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var g=(t,e,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(e))h(t,e,o,r);return((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=y.bind(null,o,e.toString());Object.defineProperty(s,"name",m),Object.defineProperty(t,"toString",{...b,value:s})})(t,e,o),t},w={isFunction:t=>"function"==typeof t,isString:t=>"string"==typeof t,composeErrorMessage:(t,e)=>`${t}, ${e}`,inherits:(t,e)=>{t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:_,composeErrorMessage:R}=w;const T=f,E=g,v=function(t,...e){Object.assign(t,...e),t.description=_(t.message)?t.message(t):t.message,t.message=t.code?R(t.code,t.description):t.description},{isString:j}=w;var x=function(t,e){function r(r){const o=new t,s=j(r)?{message:r}:r;return v(o,e,s),o.stack=T(o.stack),o}return r.prototype=t.prototype,E(r,t),r};const{inherits:O}=w,q=g,C=/[^0-9a-zA-Z_$]/;const P=x,A=function(t){if("string"!=typeof t)throw new TypeError("Expected className to be a string");if(C.test(t))throw new Error("className contains invalid characters");function e(){Object.defineProperty(this,"name",{configurable:!0,value:t,writable:!0}),Error.captureStackTrace(this,this.constructor)}return O(e,Error),q(e,Error),e},S=t=>(e,r)=>{const o=A(e||t.name);return P(o,r)};l.exports=S(Error),l.exports.type=S(TypeError),l.exports.range=S(RangeError),l.exports.eval=S(EvalError),l.exports.syntax=S(SyntaxError),l.exports.reference=S(ReferenceError),l.exports.uri=S(URIError);const U={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"},k=t=>null!==t&&"object"==typeof t;var N=({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n})=>{const i=t=>{if(!k(t))return;const e=n(t);return Object.keys(e).reduce(((t,r)=>(t[`data.${r}`]=e[r].toString(),t)),{})},a=async(t,r={},o=0)=>{try{const e=await s(t,r);return"buffer"===r.responseType?{body:e.body,response:e}:{...e.body,response:e}}catch(s){const{response:n={}}=s,{statusCode:i,body:u,headers:c,url:p=t}=n,l=Buffer.isBuffer(u),f=k(u)&&!l?u:((t,e,r)=>{try{return JSON.parse(t)}catch(o){const s=t||e.message;return{status:"error",data:{url:s},more:"https://microlink.io/efatalclient",code:"EFATALCLIENT",message:s,url:r}}})(l?u.toString():u,s,p);if("EFATALCLIENT"===f.code&&o++<2)return a(t,r,o);throw e({...f,message:f.message,url:p,statusCode:i,headers:c})}},u=(t,{data:e,apiKey:r,endpoint:s,retry:a,cache:u,...c}={},{responseType:p="json",headers:l,...f}={})=>{const h=!!r;return[`${s||U[h?"PRO":"FREE"]}?${o({url:t,...i(e),...n(c)})}`,{...f,responseType:p,cache:u,retry:a,headers:h?{...l,"x-api-key":r}:{...l}}]},c=t=>async(o,s,n)=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({status:"fail",data:{url:r},more:"https://microlink.io/docs/api/api-parameters/url",code:"EINVALURLCLIENT",message:r,url:t})}})(o);const[i,c]=u(o,s,{...t,...n});return a(i,c)},p=c();return p.MicrolinkError=e,p.getApiUrl=u,p.fetchFromApi=a,p.mapRules=i,p.version=t,p.stream=s.stream,p.buffer=c({responseType:"buffer"}),p},$={exports:{}};!function(t,e){!function(t){class e extends Error{constructor(t,e,r){const o=`${t.status||0===t.status?t.status:""} ${t.statusText||""}`.trim();super("Request failed with "+(o?`status code ${o}`:"an unknown error")),this.name="HTTPError",this.response=t,this.request=e,this.options=r}}class r extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const o=t=>null!==t&&"object"==typeof t,s=(...t)=>{for(const e of t)if((!o(e)||Array.isArray(e))&&void 0!==e)throw new TypeError("The `options` argument must be an object");return i({},...t)},n=(t={},e={})=>{const r=new globalThis.Headers(t),o=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[t,e]of s.entries())o&&"undefined"===e||void 0===e?r.delete(t):r.set(t,e);return r},i=(...t)=>{let e={},r={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(o(s)){for(let[t,r]of Object.entries(s))o(r)&&t in e&&(r=i(e[t],r)),e={...e,[t]:r};o(s.headers)&&(r=n(r,s.headers),e.headers=r)}return e},a="function"==typeof globalThis.AbortController,u="function"==typeof globalThis.ReadableStream,c="function"==typeof globalThis.FormData,p=["get","post","put","patch","head","delete"],l={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},f=2147483647,h=Symbol("stop"),d=t=>p.includes(t)?t.toUpperCase():t,y=[413,429,503],b={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:y,maxRetryAfter:Number.POSITIVE_INFINITY},m=(t={})=>{if("number"==typeof t)return{...b,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...b,...t,afterStatusCodes:y}},g=async(t,e,o)=>new Promise(((s,n)=>{const i=setTimeout((()=>{e&&e.abort(),n(new r(t))}),o.timeout);o.fetch(t).then(s).catch(n).then((()=>{clearTimeout(i)}))})),w=async t=>new Promise((e=>{setTimeout(e,t)}));class _{constructor(t,e={}){var r,o;if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...e,headers:n(this._input.headers,e.headers),hooks:i({beforeRequest:[],beforeRetry:[],afterResponse:[]},e.hooks),method:d(null!==(r=e.method)&&void 0!==r?r:this._input.method),prefixUrl:String(e.prefixUrl||""),retry:m(e.retry),throwHttpErrors:!1!==e.throwHttpErrors,timeout:void 0===e.timeout?1e4:e.timeout,fetch:null!==(o=e.fetch)&&void 0!==o?o:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(a&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(c&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}static create(t,r){const o=new _(t,r),s=async()=>{if(o._options.timeout>f)throw new RangeError(`The \`timeout\` option cannot be greater than ${f}`);await Promise.resolve();let t=await o._fetch();for(const e of o._options.hooks.afterResponse){const r=await e(o.request,o._options,o._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(o._decorateResponse(t),!t.ok&&o._options.throwHttpErrors)throw new e(t,o.request,o._options);if(o._options.onDownloadProgress){if("function"!=typeof o._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!u)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return o._stream(t.clone(),o._options.onDownloadProgress)}return t},n=o._options.retry.methods.includes(o.request.method.toLowerCase())?o._retry(s):s();for(const[t,e]of Object.entries(l))n[t]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||e);const s=(await n).clone();if("json"===t){if(204===s.status)return"";if(r.parseJson)return r.parseJson(await s.text())}return s[t]()};return n}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof r)){if(t instanceof e){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),f);if(0!==r&&this._retryCount>0){await w(r);for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===h)return;return this._retry(t)}throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):g(this.request.clone(),this.abortController,this._options)}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let o=0;return new globalThis.Response(new globalThis.ReadableStream({async start(s){const n=t.body.getReader();async function i(){const{done:t,value:a}=await n.read();t?s.close():(e&&(o+=a.byteLength,e({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},a)),s.enqueue(a),await i())}e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await i()}}))}}
|
|
2
|
+
/*! MIT License © Sindre Sorhus */const R=t=>{const e=(e,r)=>_.create(e,s(t,r));for(const r of p)e[r]=(e,o)=>_.create(e,s(t,o,{method:r}));return e.create=t=>R(s(t)),e.extend=e=>R(s(t,e)),e.stop=h,e},T=R();t.HTTPError=e,t.TimeoutError=r,t.default=T,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,$.exports);const I=t=>{try{return i.test(new n(t).href)}catch(t){return!1}},{flattie:D}=a,{encode:L}=p,F=l.exports,M=N,{default:H}=$.exports;return M({MicrolinkError:F("MicrolinkError"),isUrlHttp:I,stringify:L,got:async(t,e)=>{try{void 0===e.timeout&&(e.timeout=!1);const r=await H(t,e),o=await r.json(),{headers:s,status:n,statusText:i}=r;return{url:r.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:Array.from(e.headers.entries()).reduce(((t,[e,r])=>(t[e]=r,t)),{}),statusCode:e.status,body:await e.text()}}throw t}},flatten:D,VERSION:"0.10.18"})}));
|
|
3
3
|
//# sourceMappingURL=mql.min.js.map
|
package/dist/mql.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mql.min.js","sources":["../node_modules/.pnpm/is-url-http@2.2.7/node_modules/is-url-http/lightweight.js","../node_modules/.pnpm/flattie@1.1.0/node_modules/flattie/dist/index.js","../node_modules/.pnpm/qss@2.0.3/node_modules/qss/dist/qss.m.js","../node_modules/.pnpm/mimic-fn@3.0.0/node_modules/mimic-fn/index.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/helpers.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/add-error-props.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-extend-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatalclient',\n code: 'EFATALCLIENT',\n message,\n url\n }\n }\n}\n\nconst factory = ({\n VERSION,\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten\n}) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n const isBuffer = Buffer.isBuffer(rawBody)\n\n const body =\n isObject(rawBody) && !isBuffer\n ? rawBody\n : parseBody(isBuffer ? rawBody.toString() : rawBody, err, uri)\n\n if (body.code === 'EFATALCLIENT' && retryCount++ < 2) {\n return fetchFromApi(apiUrl, opts, retryCount)\n }\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro\n ? { ...gotHeaders, 'x-api-key': apiKey }\n : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ky = {}));\n})(this, (function (exports) { 'use strict';\n\n // eslint-lint-disable-next-line @typescript-eslint/naming-convention\n class HTTPError extends Error {\n constructor(response, request, options) {\n const code = (response.status || response.status === 0) ? response.status : '';\n const title = response.statusText || '';\n const status = `${code} ${title}`.trim();\n const reason = status ? `status code ${status}` : 'an unknown error';\n super(`Request failed with ${reason}`);\n this.name = 'HTTPError';\n this.response = response;\n this.request = request;\n this.options = options;\n }\n }\n\n class TimeoutError extends Error {\n constructor(request) {\n super('Request timed out');\n this.name = 'TimeoutError';\n this.request = request;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const isObject = (value) => value !== null && typeof value === 'object';\n\n const validateAndMerge = (...sources) => {\n for (const source of sources) {\n if ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n throw new TypeError('The `options` argument must be an object');\n }\n }\n return deepMerge({}, ...sources);\n };\n const mergeHeaders = (source1 = {}, source2 = {}) => {\n const result = new globalThis.Headers(source1);\n const isHeadersInstance = source2 instanceof globalThis.Headers;\n const source = new globalThis.Headers(source2);\n for (const [key, value] of source.entries()) {\n if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n result.delete(key);\n }\n else {\n result.set(key, value);\n }\n }\n return result;\n };\n // TODO: Make this strongly-typed (no `any`).\n const deepMerge = (...sources) => {\n let returnValue = {};\n let headers = {};\n for (const source of sources) {\n if (Array.isArray(source)) {\n if (!Array.isArray(returnValue)) {\n returnValue = [];\n }\n returnValue = [...returnValue, ...source];\n }\n else if (isObject(source)) {\n for (let [key, value] of Object.entries(source)) {\n if (isObject(value) && key in returnValue) {\n value = deepMerge(returnValue[key], value);\n }\n returnValue = { ...returnValue, [key]: value };\n }\n if (isObject(source.headers)) {\n headers = mergeHeaders(headers, source.headers);\n returnValue.headers = headers;\n }\n }\n }\n return returnValue;\n };\n\n const supportsAbortController = typeof globalThis.AbortController === 'function';\n const supportsStreams = typeof globalThis.ReadableStream === 'function';\n const supportsFormData = typeof globalThis.FormData === 'function';\n const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\n const responseTypes = {\n json: 'application/json',\n text: 'text/*',\n formData: 'multipart/form-data',\n arrayBuffer: '*/*',\n blob: '*/*',\n };\n // The maximum value of a 32bit int (see issue #117)\n const maxSafeTimeout = 2147483647;\n const stop = Symbol('stop');\n\n const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\n const retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\n const retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\n const retryAfterStatusCodes = [413, 429, 503];\n const defaultRetryOptions = {\n limit: 2,\n methods: retryMethods,\n statusCodes: retryStatusCodes,\n afterStatusCodes: retryAfterStatusCodes,\n maxRetryAfter: Number.POSITIVE_INFINITY,\n };\n const normalizeRetryOptions = (retry = {}) => {\n if (typeof retry === 'number') {\n return {\n ...defaultRetryOptions,\n limit: retry,\n };\n }\n if (retry.methods && !Array.isArray(retry.methods)) {\n throw new Error('retry.methods must be an array');\n }\n if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n throw new Error('retry.statusCodes must be an array');\n }\n return {\n ...defaultRetryOptions,\n ...retry,\n afterStatusCodes: retryAfterStatusCodes,\n };\n };\n\n // `Promise.race()` workaround (#91)\n const timeout = async (request, abortController, options) => new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n if (abortController) {\n abortController.abort();\n }\n reject(new TimeoutError(request));\n }, options.timeout);\n /* eslint-disable promise/prefer-await-to-then */\n void options\n .fetch(request)\n .then(resolve)\n .catch(reject)\n .then(() => {\n clearTimeout(timeoutId);\n });\n /* eslint-enable promise/prefer-await-to-then */\n });\n const delay = async (ms) => new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n\n class Ky {\n // eslint-disable-next-line complexity\n constructor(input, options = {}) {\n var _a, _b;\n this._retryCount = 0;\n this._input = input;\n this._options = {\n // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n credentials: this._input.credentials || 'same-origin',\n ...options,\n headers: mergeHeaders(this._input.headers, options.headers),\n hooks: deepMerge({\n beforeRequest: [],\n beforeRetry: [],\n afterResponse: [],\n }, options.hooks),\n method: normalizeRequestMethod((_a = options.method) !== null && _a !== void 0 ? _a : this._input.method),\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n prefixUrl: String(options.prefixUrl || ''),\n retry: normalizeRetryOptions(options.retry),\n throwHttpErrors: options.throwHttpErrors !== false,\n timeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n fetch: (_b = options.fetch) !== null && _b !== void 0 ? _b : globalThis.fetch.bind(globalThis),\n };\n if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n throw new TypeError('`input` must be a string, URL, or Request');\n }\n if (this._options.prefixUrl && typeof this._input === 'string') {\n if (this._input.startsWith('/')) {\n throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n }\n if (!this._options.prefixUrl.endsWith('/')) {\n this._options.prefixUrl += '/';\n }\n this._input = this._options.prefixUrl + this._input;\n }\n if (supportsAbortController) {\n this.abortController = new globalThis.AbortController();\n if (this._options.signal) {\n this._options.signal.addEventListener('abort', () => {\n this.abortController.abort();\n });\n }\n this._options.signal = this.abortController.signal;\n }\n this.request = new globalThis.Request(this._input, this._options);\n if (this._options.searchParams) {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const textSearchParams = typeof this._options.searchParams === 'string'\n ? this._options.searchParams.replace(/^\\?/, '')\n : new URLSearchParams(this._options.searchParams).toString();\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const searchParams = '?' + textSearchParams;\n const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n this.request.headers.delete('content-type');\n }\n this.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n }\n if (this._options.json !== undefined) {\n this._options.body = JSON.stringify(this._options.json);\n this.request.headers.set('content-type', 'application/json');\n this.request = new globalThis.Request(this.request, { body: this._options.body });\n }\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n static create(input, options) {\n const ky = new Ky(input, options);\n const fn = async () => {\n if (ky._options.timeout > maxSafeTimeout) {\n throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n }\n // Delay the fetch so that body method shortcuts can set the Accept header\n await Promise.resolve();\n let response = await ky._fetch();\n for (const hook of ky._options.hooks.afterResponse) {\n // eslint-disable-next-line no-await-in-loop\n const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n if (modifiedResponse instanceof globalThis.Response) {\n response = modifiedResponse;\n }\n }\n ky._decorateResponse(response);\n if (!response.ok && ky._options.throwHttpErrors) {\n throw new HTTPError(response, ky.request, ky._options);\n }\n // If `onDownloadProgress` is passed, it uses the stream API internally\n /* istanbul ignore next */\n if (ky._options.onDownloadProgress) {\n if (typeof ky._options.onDownloadProgress !== 'function') {\n throw new TypeError('The `onDownloadProgress` option must be a function');\n }\n if (!supportsStreams) {\n throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n }\n return ky._stream(response.clone(), ky._options.onDownloadProgress);\n }\n return response;\n };\n const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n const result = (isRetriableMethod ? ky._retry(fn) : fn());\n for (const [type, mimeType] of Object.entries(responseTypes)) {\n result[type] = async () => {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n const response = (await result).clone();\n if (type === 'json') {\n if (response.status === 204) {\n return '';\n }\n if (options.parseJson) {\n return options.parseJson(await response.text());\n }\n }\n return response[type]();\n };\n }\n return result;\n }\n _calculateRetryDelay(error) {\n this._retryCount++;\n if (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n if (error instanceof HTTPError) {\n if (!this._options.retry.statusCodes.includes(error.response.status)) {\n return 0;\n }\n const retryAfter = error.response.headers.get('Retry-After');\n if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n let after = Number(retryAfter);\n if (Number.isNaN(after)) {\n after = Date.parse(retryAfter) - Date.now();\n }\n else {\n after *= 1000;\n }\n if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n return 0;\n }\n return after;\n }\n if (error.response.status === 413) {\n return 0;\n }\n }\n const BACKOFF_FACTOR = 0.3;\n return BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n }\n return 0;\n }\n _decorateResponse(response) {\n if (this._options.parseJson) {\n response.json = async () => this._options.parseJson(await response.text());\n }\n return response;\n }\n async _retry(fn) {\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n }\n catch (error) {\n const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n if (ms !== 0 && this._retryCount > 0) {\n await delay(ms);\n for (const hook of this._options.hooks.beforeRetry) {\n // eslint-disable-next-line no-await-in-loop\n const hookResult = await hook({\n request: this.request,\n options: this._options,\n error: error,\n retryCount: this._retryCount,\n });\n // If `stop` is returned from the hook, the retry process is stopped\n if (hookResult === stop) {\n return;\n }\n }\n return this._retry(fn);\n }\n throw error;\n }\n }\n async _fetch() {\n for (const hook of this._options.hooks.beforeRequest) {\n // eslint-disable-next-line no-await-in-loop\n const result = await hook(this.request, this._options);\n if (result instanceof Request) {\n this.request = result;\n break;\n }\n if (result instanceof Response) {\n return result;\n }\n }\n if (this._options.timeout === false) {\n return this._options.fetch(this.request.clone());\n }\n return timeout(this.request.clone(), this.abortController, this._options);\n }\n /* istanbul ignore next */\n _stream(response, onDownloadProgress) {\n const totalBytes = Number(response.headers.get('content-length')) || 0;\n let transferredBytes = 0;\n return new globalThis.Response(new globalThis.ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n }\n async function read() {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n return;\n }\n if (onDownloadProgress) {\n transferredBytes += value.byteLength;\n const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n }\n controller.enqueue(value);\n await read();\n }\n await read();\n },\n }));\n }\n }\n\n /*! MIT License © Sindre Sorhus */\n const createInstance = (defaults) => {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n for (const method of requestMethods) {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n }\n ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n ky.extend = (newDefaults) => createInstance(validateAndMerge(defaults, newDefaults));\n ky.stop = stop;\n return ky;\n };\n const ky = createInstance();\n\n exports.HTTPError = HTTPError;\n exports.TimeoutError = TimeoutError;\n exports[\"default\"] = ky;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst { default: ky } = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","window","require$$0","REGEX_HTTP_PROTOCOL","iter","output","nullish","sep","val","key","k","pfx","Array","isArray","length","toValue","mix","str","decodeURIComponent","input","glue","toNull","obj","i","tmp","encodeURIComponent","out","arr","split","shift","concat","copyProperty","to","from","property","ignoreNonConfigurable","toDescriptor","Object","getOwnPropertyDescriptor","fromDescriptor","canCopyProperty","defineProperty","undefined","configurable","writable","enumerable","value","wrappedToString","withName","fromBody","toStringDescriptor","Function","prototype","toStringName","toString","mimicFn_1","name","Reflect","ownKeys","fromPrototype","getPrototypeOf","setPrototypeOf","changePrototype","trim","newToString","bind","changeToString","helpers","isFunction","isString","composeErrorMessage","code","description","inherits","ctor","superCtor","super_","create","constructor","cleanStack","mimicFn","require$$1","addErrorProps","error","props","assign","message","require$$3","createExtendError_1","ErrorClass","classProps","ExtendError","errorProps","stack","REGEX_CLASS_NAME","createExtendError","createError","className","TypeError","test","Error","this","captureStackTrace","createErrorClass","errorClass","RangeError","EvalError","SyntaxError","ReferenceError","URIError","ENDPOINT","FREE","PRO","isObject","factory_1","VERSION","MicrolinkError","isUrlHttp","stringify","got","flatten","mapRules","rules","flatRules","keys","reduce","acc","fetchFromApi","async","apiUrl","opts","retryCount","response","responseType","body","err","statusCode","rawBody","headers","url","uri","isBuffer","Buffer","JSON","parse","_","status","data","more","parseBody","getApiUrl","apiKey","endpoint","retry","cache","gotHeaders","gotOpts","isPro","createMql","defaultOpts","assertUrl","fetchOpts","mql","version","stream","buffer","exports","HTTPError","request","options","statusText","super","TimeoutError","validateAndMerge","sources","source","deepMerge","mergeHeaders","source1","source2","result","globalThis","Headers","isHeadersInstance","entries","delete","set","returnValue","supportsAbortController","AbortController","supportsStreams","ReadableStream","supportsFormData","FormData","requestMethods","responseTypes","json","text","formData","arrayBuffer","blob","maxSafeTimeout","stop","Symbol","normalizeRequestMethod","includes","toUpperCase","retryAfterStatusCodes","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","maxRetryAfter","Number","POSITIVE_INFINITY","normalizeRetryOptions","timeout","abortController","Promise","resolve","reject","timeoutId","setTimeout","abort","fetch","then","catch","clearTimeout","delay","ms","Ky","_a","_b","_retryCount","_input","_options","credentials","hooks","beforeRequest","beforeRetry","afterResponse","method","prefixUrl","String","throwHttpErrors","Request","startsWith","endsWith","signal","addEventListener","searchParams","replace","URLSearchParams","static","ky","fn","_fetch","hook","modifiedResponse","_decorateResponse","clone","Response","ok","onDownloadProgress","_stream","toLowerCase","_retry","type","mimeType","get","parseJson","_calculateRetryDelay","retryAfter","after","isNaN","Date","now","Math","min","totalBytes","transferredBytes","controller","reader","getReader","read","done","close","byteLength","percent","enqueue","Uint8Array","createInstance","defaults","newDefaults","extend","factory","href","flattie","encode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UD,GAAgBF,EAAevH,EAAiBwH,EAAUC,IACvEvC,EAAGrD,KAAOA,EACHqD,GAELA,EAAKqC,IAEX9H,EAAQC,UAAYA,EACpBD,EAAQM,aAAeA,EACvBN,EAAiB,QAAIyF,EAErB1N,OAAOI,eAAe6H,EAAS,aAAc,CAAExH,OAAO,IA9YS0P,CAAQlI,iBCC3E,MAAMjD,EXGWsB,IACf,IACE,OAAOxI,EAAoBgG,KAAK,IAAIpG,EAAI4I,GAAK8J,MAC7C,MAAOlK,GACP,OAAO,KWNHmK,QAASlL,GAAYvC,GACrB0N,OAAQrL,GAAcsL,EACxBC,EAAStN,UAETiN,EAAUM,GACRC,QAAShD,GAAOiD,iBA4BPR,EAAQ,CACvBpL,eA3BqByL,EAAO,kBA4B5BxL,UAAAA,EACAC,UAAAA,EACAC,IA5BUS,MAAOW,EAAKT,KACtB,SACuBxF,IAAjBwF,EAAKuF,UAAuBvF,EAAKuF,SAAU,GAC/C,MAAMrF,QAAiB2H,EAAGpH,EAAKT,GACzBI,QAAaF,EAASgE,QACtB1D,QAAEA,EAASQ,OAAQV,EAAYkC,WAAYuI,GAAkB7K,EACnE,MAAO,CAAEO,IAAKP,EAASO,IAAKL,KAAAA,EAAMI,QAAAA,EAASF,WAAAA,EAAYyK,cAAAA,GACvD,MAAO1K,GACP,GAAIA,EAAIH,SAAU,CAChB,MAAMA,SAAEA,GAAaG,EACrBA,EAAIH,SAAW,IACVA,EACHM,QAAS,IAAIN,EAASM,QAAQ8C,WAAW3D,QACvC,CAACC,GAAMrH,EAAKqC,UAAiBgF,EAAKrH,CAACA,GAAMqC,KACzC,IAEF0F,WAAYJ,EAASc,OACrBZ,WAAYF,EAASiE,QAGzB,MAAM9D,IASRf,QAAAA,EACAL,QAAS"}
|
|
1
|
+
{"version":3,"file":"mql.min.js","sources":["../node_modules/.pnpm/is-url-http@2.2.7/node_modules/is-url-http/lightweight.js","../node_modules/.pnpm/flattie@1.1.0/node_modules/flattie/dist/index.js","../node_modules/.pnpm/qss@2.0.3/node_modules/qss/dist/qss.m.js","../node_modules/.pnpm/mimic-fn@3.0.0/node_modules/mimic-fn/index.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/helpers.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/add-error-props.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-extend-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/create-error.js","../node_modules/.pnpm/whoops@4.1.0/node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatalclient',\n code: 'EFATALCLIENT',\n message,\n url\n }\n }\n}\n\nconst factory = ({\n VERSION,\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten\n}) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce((acc, key) => {\n acc[`data.${key}`] = flatRules[key].toString()\n return acc\n }, {})\n }\n\n const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n const isBuffer = Buffer.isBuffer(rawBody)\n\n const body =\n isObject(rawBody) && !isBuffer\n ? rawBody\n : parseBody(isBuffer ? rawBody.toString() : rawBody, err, uri)\n\n if (body.code === 'EFATALCLIENT' && retryCount++ < 2) {\n return fetchFromApi(apiUrl, opts, retryCount)\n }\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro\n ? { ...gotHeaders, 'x-api-key': apiKey }\n : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ky = {}));\n})(this, (function (exports) { 'use strict';\n\n // eslint-lint-disable-next-line @typescript-eslint/naming-convention\n class HTTPError extends Error {\n constructor(response, request, options) {\n const code = (response.status || response.status === 0) ? response.status : '';\n const title = response.statusText || '';\n const status = `${code} ${title}`.trim();\n const reason = status ? `status code ${status}` : 'an unknown error';\n super(`Request failed with ${reason}`);\n this.name = 'HTTPError';\n this.response = response;\n this.request = request;\n this.options = options;\n }\n }\n\n class TimeoutError extends Error {\n constructor(request) {\n super('Request timed out');\n this.name = 'TimeoutError';\n this.request = request;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const isObject = (value) => value !== null && typeof value === 'object';\n\n const validateAndMerge = (...sources) => {\n for (const source of sources) {\n if ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n throw new TypeError('The `options` argument must be an object');\n }\n }\n return deepMerge({}, ...sources);\n };\n const mergeHeaders = (source1 = {}, source2 = {}) => {\n const result = new globalThis.Headers(source1);\n const isHeadersInstance = source2 instanceof globalThis.Headers;\n const source = new globalThis.Headers(source2);\n for (const [key, value] of source.entries()) {\n if ((isHeadersInstance && value === 'undefined') || value === undefined) {\n result.delete(key);\n }\n else {\n result.set(key, value);\n }\n }\n return result;\n };\n // TODO: Make this strongly-typed (no `any`).\n const deepMerge = (...sources) => {\n let returnValue = {};\n let headers = {};\n for (const source of sources) {\n if (Array.isArray(source)) {\n if (!Array.isArray(returnValue)) {\n returnValue = [];\n }\n returnValue = [...returnValue, ...source];\n }\n else if (isObject(source)) {\n for (let [key, value] of Object.entries(source)) {\n if (isObject(value) && key in returnValue) {\n value = deepMerge(returnValue[key], value);\n }\n returnValue = { ...returnValue, [key]: value };\n }\n if (isObject(source.headers)) {\n headers = mergeHeaders(headers, source.headers);\n returnValue.headers = headers;\n }\n }\n }\n return returnValue;\n };\n\n const supportsAbortController = typeof globalThis.AbortController === 'function';\n const supportsStreams = typeof globalThis.ReadableStream === 'function';\n const supportsFormData = typeof globalThis.FormData === 'function';\n const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'];\n const responseTypes = {\n json: 'application/json',\n text: 'text/*',\n formData: 'multipart/form-data',\n arrayBuffer: '*/*',\n blob: '*/*',\n };\n // The maximum value of a 32bit int (see issue #117)\n const maxSafeTimeout = 2147483647;\n const stop = Symbol('stop');\n\n const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;\n const retryMethods = ['get', 'put', 'head', 'delete', 'options', 'trace'];\n const retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];\n const retryAfterStatusCodes = [413, 429, 503];\n const defaultRetryOptions = {\n limit: 2,\n methods: retryMethods,\n statusCodes: retryStatusCodes,\n afterStatusCodes: retryAfterStatusCodes,\n maxRetryAfter: Number.POSITIVE_INFINITY,\n };\n const normalizeRetryOptions = (retry = {}) => {\n if (typeof retry === 'number') {\n return {\n ...defaultRetryOptions,\n limit: retry,\n };\n }\n if (retry.methods && !Array.isArray(retry.methods)) {\n throw new Error('retry.methods must be an array');\n }\n if (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n throw new Error('retry.statusCodes must be an array');\n }\n return {\n ...defaultRetryOptions,\n ...retry,\n afterStatusCodes: retryAfterStatusCodes,\n };\n };\n\n // `Promise.race()` workaround (#91)\n const timeout = async (request, abortController, options) => new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n if (abortController) {\n abortController.abort();\n }\n reject(new TimeoutError(request));\n }, options.timeout);\n /* eslint-disable promise/prefer-await-to-then */\n void options\n .fetch(request)\n .then(resolve)\n .catch(reject)\n .then(() => {\n clearTimeout(timeoutId);\n });\n /* eslint-enable promise/prefer-await-to-then */\n });\n const delay = async (ms) => new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n\n class Ky {\n // eslint-disable-next-line complexity\n constructor(input, options = {}) {\n var _a, _b;\n this._retryCount = 0;\n this._input = input;\n this._options = {\n // TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n credentials: this._input.credentials || 'same-origin',\n ...options,\n headers: mergeHeaders(this._input.headers, options.headers),\n hooks: deepMerge({\n beforeRequest: [],\n beforeRetry: [],\n afterResponse: [],\n }, options.hooks),\n method: normalizeRequestMethod((_a = options.method) !== null && _a !== void 0 ? _a : this._input.method),\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n prefixUrl: String(options.prefixUrl || ''),\n retry: normalizeRetryOptions(options.retry),\n throwHttpErrors: options.throwHttpErrors !== false,\n timeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n fetch: (_b = options.fetch) !== null && _b !== void 0 ? _b : globalThis.fetch.bind(globalThis),\n };\n if (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n throw new TypeError('`input` must be a string, URL, or Request');\n }\n if (this._options.prefixUrl && typeof this._input === 'string') {\n if (this._input.startsWith('/')) {\n throw new Error('`input` must not begin with a slash when using `prefixUrl`');\n }\n if (!this._options.prefixUrl.endsWith('/')) {\n this._options.prefixUrl += '/';\n }\n this._input = this._options.prefixUrl + this._input;\n }\n if (supportsAbortController) {\n this.abortController = new globalThis.AbortController();\n if (this._options.signal) {\n this._options.signal.addEventListener('abort', () => {\n this.abortController.abort();\n });\n }\n this._options.signal = this.abortController.signal;\n }\n this.request = new globalThis.Request(this._input, this._options);\n if (this._options.searchParams) {\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const textSearchParams = typeof this._options.searchParams === 'string'\n ? this._options.searchParams.replace(/^\\?/, '')\n : new URLSearchParams(this._options.searchParams).toString();\n // eslint-disable-next-line unicorn/prevent-abbreviations\n const searchParams = '?' + textSearchParams;\n const url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n // To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n if (((supportsFormData && this._options.body instanceof globalThis.FormData)\n || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n this.request.headers.delete('content-type');\n }\n this.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n }\n if (this._options.json !== undefined) {\n this._options.body = JSON.stringify(this._options.json);\n this.request.headers.set('content-type', 'application/json');\n this.request = new globalThis.Request(this.request, { body: this._options.body });\n }\n }\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n static create(input, options) {\n const ky = new Ky(input, options);\n const fn = async () => {\n if (ky._options.timeout > maxSafeTimeout) {\n throw new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n }\n // Delay the fetch so that body method shortcuts can set the Accept header\n await Promise.resolve();\n let response = await ky._fetch();\n for (const hook of ky._options.hooks.afterResponse) {\n // eslint-disable-next-line no-await-in-loop\n const modifiedResponse = await hook(ky.request, ky._options, ky._decorateResponse(response.clone()));\n if (modifiedResponse instanceof globalThis.Response) {\n response = modifiedResponse;\n }\n }\n ky._decorateResponse(response);\n if (!response.ok && ky._options.throwHttpErrors) {\n throw new HTTPError(response, ky.request, ky._options);\n }\n // If `onDownloadProgress` is passed, it uses the stream API internally\n /* istanbul ignore next */\n if (ky._options.onDownloadProgress) {\n if (typeof ky._options.onDownloadProgress !== 'function') {\n throw new TypeError('The `onDownloadProgress` option must be a function');\n }\n if (!supportsStreams) {\n throw new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n }\n return ky._stream(response.clone(), ky._options.onDownloadProgress);\n }\n return response;\n };\n const isRetriableMethod = ky._options.retry.methods.includes(ky.request.method.toLowerCase());\n const result = (isRetriableMethod ? ky._retry(fn) : fn());\n for (const [type, mimeType] of Object.entries(responseTypes)) {\n result[type] = async () => {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n ky.request.headers.set('accept', ky.request.headers.get('accept') || mimeType);\n const response = (await result).clone();\n if (type === 'json') {\n if (response.status === 204) {\n return '';\n }\n if (options.parseJson) {\n return options.parseJson(await response.text());\n }\n }\n return response[type]();\n };\n }\n return result;\n }\n _calculateRetryDelay(error) {\n this._retryCount++;\n if (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n if (error instanceof HTTPError) {\n if (!this._options.retry.statusCodes.includes(error.response.status)) {\n return 0;\n }\n const retryAfter = error.response.headers.get('Retry-After');\n if (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n let after = Number(retryAfter);\n if (Number.isNaN(after)) {\n after = Date.parse(retryAfter) - Date.now();\n }\n else {\n after *= 1000;\n }\n if (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n return 0;\n }\n return after;\n }\n if (error.response.status === 413) {\n return 0;\n }\n }\n const BACKOFF_FACTOR = 0.3;\n return BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n }\n return 0;\n }\n _decorateResponse(response) {\n if (this._options.parseJson) {\n response.json = async () => this._options.parseJson(await response.text());\n }\n return response;\n }\n async _retry(fn) {\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-implicit-any-catch\n }\n catch (error) {\n const ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n if (ms !== 0 && this._retryCount > 0) {\n await delay(ms);\n for (const hook of this._options.hooks.beforeRetry) {\n // eslint-disable-next-line no-await-in-loop\n const hookResult = await hook({\n request: this.request,\n options: this._options,\n error: error,\n retryCount: this._retryCount,\n });\n // If `stop` is returned from the hook, the retry process is stopped\n if (hookResult === stop) {\n return;\n }\n }\n return this._retry(fn);\n }\n throw error;\n }\n }\n async _fetch() {\n for (const hook of this._options.hooks.beforeRequest) {\n // eslint-disable-next-line no-await-in-loop\n const result = await hook(this.request, this._options);\n if (result instanceof Request) {\n this.request = result;\n break;\n }\n if (result instanceof Response) {\n return result;\n }\n }\n if (this._options.timeout === false) {\n return this._options.fetch(this.request.clone());\n }\n return timeout(this.request.clone(), this.abortController, this._options);\n }\n /* istanbul ignore next */\n _stream(response, onDownloadProgress) {\n const totalBytes = Number(response.headers.get('content-length')) || 0;\n let transferredBytes = 0;\n return new globalThis.Response(new globalThis.ReadableStream({\n async start(controller) {\n const reader = response.body.getReader();\n if (onDownloadProgress) {\n onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());\n }\n async function read() {\n const { done, value } = await reader.read();\n if (done) {\n controller.close();\n return;\n }\n if (onDownloadProgress) {\n transferredBytes += value.byteLength;\n const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n onDownloadProgress({ percent, transferredBytes, totalBytes }, value);\n }\n controller.enqueue(value);\n await read();\n }\n await read();\n },\n }));\n }\n }\n\n /*! MIT License © Sindre Sorhus */\n const createInstance = (defaults) => {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n const ky = (input, options) => Ky.create(input, validateAndMerge(defaults, options));\n for (const method of requestMethods) {\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n ky[method] = (input, options) => Ky.create(input, validateAndMerge(defaults, options, { method }));\n }\n ky.create = (newDefaults) => createInstance(validateAndMerge(newDefaults));\n ky.extend = (newDefaults) => createInstance(validateAndMerge(defaults, newDefaults));\n ky.stop = stop;\n return ky;\n };\n const ky = createInstance();\n\n exports.HTTPError = HTTPError;\n exports.TimeoutError = TimeoutError;\n exports[\"default\"] = ky;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst { default: ky } = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: Array.from(response.headers.entries()).reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","window","require$$0","REGEX_HTTP_PROTOCOL","iter","output","nullish","sep","val","key","k","pfx","Array","isArray","length","toValue","mix","str","decodeURIComponent","input","glue","toNull","obj","i","tmp","encodeURIComponent","out","arr","split","shift","concat","copyProperty","to","from","property","ignoreNonConfigurable","toDescriptor","Object","getOwnPropertyDescriptor","fromDescriptor","canCopyProperty","defineProperty","undefined","configurable","writable","enumerable","value","wrappedToString","withName","fromBody","toStringDescriptor","Function","prototype","toStringName","toString","mimicFn_1","name","Reflect","ownKeys","fromPrototype","getPrototypeOf","setPrototypeOf","changePrototype","trim","newToString","bind","changeToString","helpers","isFunction","isString","composeErrorMessage","code","description","inherits","ctor","superCtor","super_","create","constructor","cleanStack","mimicFn","require$$1","addErrorProps","error","props","assign","message","require$$3","createExtendError_1","ErrorClass","classProps","ExtendError","errorProps","stack","REGEX_CLASS_NAME","createExtendError","createError","className","TypeError","test","Error","this","captureStackTrace","createErrorClass","errorClass","RangeError","EvalError","SyntaxError","ReferenceError","URIError","ENDPOINT","FREE","PRO","isObject","factory_1","VERSION","MicrolinkError","isUrlHttp","stringify","got","flatten","mapRules","rules","flatRules","keys","reduce","acc","fetchFromApi","async","apiUrl","opts","retryCount","response","responseType","body","err","statusCode","rawBody","headers","url","uri","isBuffer","Buffer","JSON","parse","_","status","data","more","parseBody","getApiUrl","apiKey","endpoint","retry","cache","gotHeaders","gotOpts","isPro","createMql","defaultOpts","assertUrl","fetchOpts","mql","version","stream","buffer","exports","HTTPError","request","options","statusText","super","TimeoutError","validateAndMerge","sources","source","deepMerge","mergeHeaders","source1","source2","result","globalThis","Headers","isHeadersInstance","entries","delete","set","returnValue","supportsAbortController","AbortController","supportsStreams","ReadableStream","supportsFormData","FormData","requestMethods","responseTypes","json","text","formData","arrayBuffer","blob","maxSafeTimeout","stop","Symbol","normalizeRequestMethod","includes","toUpperCase","retryAfterStatusCodes","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","maxRetryAfter","Number","POSITIVE_INFINITY","normalizeRetryOptions","timeout","abortController","Promise","resolve","reject","timeoutId","setTimeout","abort","fetch","then","catch","clearTimeout","delay","ms","Ky","_a","_b","_retryCount","_input","_options","credentials","hooks","beforeRequest","beforeRetry","afterResponse","method","prefixUrl","String","throwHttpErrors","Request","startsWith","endsWith","signal","addEventListener","searchParams","replace","URLSearchParams","static","ky","fn","_fetch","hook","modifiedResponse","_decorateResponse","clone","Response","ok","onDownloadProgress","_stream","toLowerCase","_retry","type","mimeType","get","parseJson","_calculateRetryDelay","retryAfter","after","isNaN","Date","now","Math","min","totalBytes","transferredBytes","controller","reader","getReader","read","done","close","byteLength","percent","enqueue","Uint8Array","createInstance","defaults","newDefaults","extend","factory","href","flattie","encode","require$$2","whoops","require$$4","default","require$$5","statusMessage"],"mappings":"svBAEA,MAAMA,EAAMC,EAAOC,OAASA,OAAOF,IAAMG,UAAeH,IAClDI,EAAsB,yBCH5B,SAASC,EAAKC,EAAQC,EAASC,EAAKC,EAAKC,GACxC,IAAIC,EAAGC,EAAMF,EAAOA,EAAMF,EAAOE,EAEjC,GAAW,MAAPD,EACCF,IAASD,EAAOI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OAAOxI,EAAoBgG,KAAK,IAAIpG,EAAI4I,GAAK8J,MAC7C,MAAOlK,GACP,OAAO,KWNHmK,QAASlL,GAAYvC,GACrB0N,OAAQrL,GAAcsL,EACxBC,EAAStN,UAETiN,EAAUM,GACRC,QAAShD,GAAOiD,iBA+BPR,EAAQ,CACvBpL,eA9BqByL,EAAO,kBA+B5BxL,UAAAA,EACAC,UAAAA,EACAC,IA/BUS,MAAOW,EAAKT,KACtB,SACuBxF,IAAjBwF,EAAKuF,UAAuBvF,EAAKuF,SAAU,GAC/C,MAAMrF,QAAiB2H,EAAGpH,EAAKT,GACzBI,QAAaF,EAASgE,QACtB1D,QAAEA,EAASQ,OAAQV,EAAYkC,WAAYuI,GAAkB7K,EACnE,MAAO,CAAEO,IAAKP,EAASO,IAAKL,KAAAA,EAAMI,QAAAA,EAASF,WAAAA,EAAYyK,cAAAA,GACvD,MAAO1K,GACP,GAAIA,EAAIH,SAAU,CAChB,MAAMA,SAAEA,GAAaG,EACrBA,EAAIH,SAAW,IACVA,EACHM,QAAS9H,MAAMqB,KAAKmG,EAASM,QAAQ8C,WAAW3D,QAC9C,CAACC,GAAMrH,EAAKqC,MACVgF,EAAIrH,GAAOqC,EACJgF,IAET,IAEFU,WAAYJ,EAASc,OACrBZ,WAAYF,EAASiE,QAGzB,MAAM9D,IASRf,QAAAA,EACAL,QAAS"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@microlink/mql",
|
|
3
3
|
"description": "Microlink Query Language. The official HTTP client to interact with Microlink API for Node.js, browsers & Deno.",
|
|
4
4
|
"homepage": "https://nicedoc.io/microlinkhq/mql",
|
|
5
|
-
"version": "0.10.
|
|
5
|
+
"version": "0.10.18",
|
|
6
6
|
"browser": "src/browser.js",
|
|
7
7
|
"main": "src/node.js",
|
|
8
8
|
"author": {
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"name": "ndom91",
|
|
20
20
|
"email": "yo@ndo.dev"
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
"name": "Askar Yusupov",
|
|
24
|
-
"email": "devex.soft@gmail.com"
|
|
25
|
-
},
|
|
26
22
|
{
|
|
27
23
|
"name": "Gabe O'Leary",
|
|
28
24
|
"email": "oleary.gabe@gmail.com"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Askar Yusupov",
|
|
28
|
+
"email": "devex.soft@gmail.com"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
31
|
"repository": {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"abort-controller": "latest",
|
|
59
59
|
"ava": "3",
|
|
60
60
|
"beauty-error": "latest",
|
|
61
|
+
"c8": "latest",
|
|
61
62
|
"chalk": "latest",
|
|
62
63
|
"ci-publish": "latest",
|
|
63
64
|
"conventional-github-releaser": "latest",
|
|
@@ -65,13 +66,11 @@
|
|
|
65
66
|
"esm": "latest",
|
|
66
67
|
"exists-file": "latest",
|
|
67
68
|
"git-authors-cli": "latest",
|
|
68
|
-
"git-dirty": "latest",
|
|
69
69
|
"ky": "latest",
|
|
70
70
|
"meow": "latest",
|
|
71
71
|
"nano-staged": "latest",
|
|
72
72
|
"node-fetch": "2",
|
|
73
73
|
"npm-check-updates": "latest",
|
|
74
|
-
"nyc": "latest",
|
|
75
74
|
"prettier-standard": "latest",
|
|
76
75
|
"rollup": "latest",
|
|
77
76
|
"rollup-plugin-filesize": "latest",
|
|
@@ -99,25 +98,25 @@
|
|
|
99
98
|
"build": "rollup -c rollup.config.js",
|
|
100
99
|
"build:ky": "[ -f src/ky.js ] || rollup node_modules/ky/distribution/index.js --format=umd --name=ky --file=src/ky.js",
|
|
101
100
|
"clean": "rm -rf node_modules",
|
|
101
|
+
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
102
102
|
"dev": "npm run build -- -w",
|
|
103
103
|
"lint": "standard",
|
|
104
|
-
"postrelease": "npm run release:
|
|
105
|
-
"prerelease": "
|
|
104
|
+
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
|
|
105
|
+
"prerelease": "npm run update:check && npm run contributors",
|
|
106
106
|
"pretest": "npm run lint && npm run build:ky",
|
|
107
|
-
"release": "
|
|
108
|
-
"release:build": "npm run build && git add dist/ && git commit -m \"build(no-release): generate bundle\"",
|
|
107
|
+
"release": "standard-version -a",
|
|
109
108
|
"release:github": "conventional-github-releaser -p angular",
|
|
110
|
-
"release:tags": "git push --follow-tags origin master",
|
|
111
|
-
"test": "
|
|
109
|
+
"release:tags": "git push --follow-tags origin HEAD:master",
|
|
110
|
+
"test": "c8 ava --verbose",
|
|
112
111
|
"update": "ncu -u",
|
|
113
112
|
"update:check": "ncu -- --error-level 2"
|
|
114
113
|
},
|
|
115
114
|
"license": "MIT",
|
|
116
115
|
"ava": {
|
|
117
116
|
"files": [
|
|
118
|
-
"test/**/*",
|
|
119
117
|
"!test/browser-globals.js",
|
|
120
|
-
"!test/clients.js"
|
|
118
|
+
"!test/clients.js",
|
|
119
|
+
"test/**/*"
|
|
121
120
|
],
|
|
122
121
|
"require": [
|
|
123
122
|
"esm"
|
|
@@ -150,6 +149,11 @@
|
|
|
150
149
|
"src/ky.js"
|
|
151
150
|
]
|
|
152
151
|
},
|
|
152
|
+
"standard-version": {
|
|
153
|
+
"scripts": {
|
|
154
|
+
"postbump": "npm run build"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
153
157
|
"types": "index.d.ts",
|
|
154
158
|
"umd:main": "dist/mql.js",
|
|
155
159
|
"unpkg": "dist/mql.js"
|
package/src/browser.js
CHANGED
|
@@ -22,8 +22,11 @@ const got = async (url, opts) => {
|
|
|
22
22
|
const { response } = err
|
|
23
23
|
err.response = {
|
|
24
24
|
...response,
|
|
25
|
-
headers:
|
|
26
|
-
(acc, [key, value]) =>
|
|
25
|
+
headers: Array.from(response.headers.entries()).reduce(
|
|
26
|
+
(acc, [key, value]) => {
|
|
27
|
+
acc[key] = value
|
|
28
|
+
return acc
|
|
29
|
+
},
|
|
27
30
|
{}
|
|
28
31
|
),
|
|
29
32
|
statusCode: response.status,
|
package/src/factory.js
CHANGED
|
@@ -47,10 +47,10 @@ const factory = ({
|
|
|
47
47
|
const mapRules = rules => {
|
|
48
48
|
if (!isObject(rules)) return
|
|
49
49
|
const flatRules = flatten(rules)
|
|
50
|
-
return Object.keys(flatRules).reduce(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
50
|
+
return Object.keys(flatRules).reduce((acc, key) => {
|
|
51
|
+
acc[`data.${key}`] = flatRules[key].toString()
|
|
52
|
+
return acc
|
|
53
|
+
}, {})
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
const fetchFromApi = async (apiUrl, opts = {}, retryCount = 0) => {
|