diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f8ae40..9856c59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## v2.1.2 + +**features** +new option `fetchOptions` on all possible functions, allow customizing fetch options + +##### improvements +- updated docs +- updated dependencies + ## v2.1.1 ##### improvements diff --git a/dist/package.json b/dist/package.json index 3ceffe3..3b73c77 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.1.1", + "version": "2.1.2", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", @@ -48,41 +48,41 @@ "dependencies": { "base-64": "1.0.0", "cross-fetch": "4.0.0", - "debug": "4.3.5", + "debug": "4.3.7", "xml-js": "1.6.11" }, "devDependencies": { - "@rollup/plugin-commonjs": "25.0.7", + "@rollup/plugin-commonjs": "26.0.1", "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-terser": "0.4.4", "@rollup/plugin-typescript": "11.1.6", "@types/base-64": "1.0.2", "@types/debug": "4.1.12", "@types/jest": "29.5.12", - "@types/node": "20.14.10", - "@typescript-eslint/eslint-plugin": "7.16.1", - "@typescript-eslint/parser": "7.16.1", + "@types/node": "22.5.4", + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", "copyfiles": "2.4.1", "cross-env": "7.0.3", "dotenv": "16.4.5", - "eslint": "9.7.0", + "eslint": "9.10.0", "eslint-config-airbnb": "19.0.4", "eslint-config-airbnb-typescript": "18.0.0", "eslint-config-prettier": "9.1.0", - "eslint-module-utils": "2.8.1", - "eslint-plugin-import": "2.29.1", + "eslint-module-utils": "2.11.0", + "eslint-plugin-import": "2.30.0", "eslint-plugin-prettier": "5.1.3", "jest": "29.7.0", "prettier": "3.3.3", - "rimraf": "5.0.7", - "rollup": "4.18.1", + "rimraf": "6.0.1", + "rollup": "4.21.2", "rollup-plugin-dts": "6.1.1", "rollup-plugin-node-builtins": "2.1.2", "rollup-plugin-polyfill-node": "0.13.0", - "sort-package-json": "2.10.0", - "ts-jest": "29.2.2", - "tslib": "2.6.3", - "typescript": "5.5.3" + "sort-package-json": "2.10.1", + "ts-jest": "29.2.5", + "tslib": "2.7.0", + "typescript": "5.6.2" }, "engines": { "node": ">=10" diff --git a/dist/tsdav.cjs b/dist/tsdav.cjs index 3703636..6826b2d 100644 --- a/dist/tsdav.cjs +++ b/dist/tsdav.cjs @@ -123,7 +123,7 @@ var requestHelpers = /*#__PURE__*/Object.freeze({ const debug$5 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml({ @@ -162,6 +162,7 @@ const davRequest = async (params) => { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); // filter out invalid responses @@ -250,7 +251,7 @@ const davRequest = async (params) => { }); }; const propfind = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -270,29 +271,33 @@ const propfind = async (params) => { }, }, }, + fetchOptions, }); }; const createObject = async (params) => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; const updateObject = async (params) => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; const deleteObject = async (params) => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; @@ -317,7 +322,7 @@ const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (ob /* eslint-disable no-underscore-dangle */ const debug$4 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { - const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, } = params; + const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {} } = params; const queryResults = await davRequest({ url, init: { @@ -326,6 +331,7 @@ const collectionQuery = async (params) => { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result if (queryResults.length === 1 && !queryResults[0].raw) { @@ -334,7 +340,7 @@ const collectionQuery = async (params) => { return queryResults; }; const makeCollection = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -351,11 +357,12 @@ const makeCollection = async (params) => { } : undefined, }, + fetchOptions }); }; const supportedReportSet = async (params) => { var _a, _b, _c, _d, _e; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -363,12 +370,13 @@ const supportedReportSet = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ((_e = (_d = (_c = (_b = (_a = res[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.supportedReportSet) === null || _c === void 0 ? void 0 : _c.supportedReport) === null || _d === void 0 ? void 0 : _d.map((sr) => Object.keys(sr.report)[0])) !== null && _e !== void 0 ? _e : []); }; const isCollectionDirty = async (params) => { var _a, _b, _c; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -376,6 +384,7 @@ const isCollectionDirty = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -390,7 +399,7 @@ const isCollectionDirty = async (params) => { * This is for webdav sync-collection only */ const syncCollection = (params) => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -410,12 +419,13 @@ const syncCollection = (params) => { }, }, }, + fetchOptions }); }; /** remote collection to local */ const smartCollectionSync = async (params) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -436,6 +446,7 @@ const smartCollectionSync = async (params) => { syncLevel: 1, syncToken: collection.syncToken, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const objectResponses = result.filter((r) => { var _a; @@ -456,6 +467,7 @@ const smartCollectionSync = async (params) => { objectUrls: changedObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _c !== void 0 ? _c : []) : []; const remoteObjects = multiGetObjectResponse.map((res) => { @@ -500,11 +512,13 @@ const smartCollectionSync = async (params) => { const { isDirty, newCtag } = await isCollectionDirty({ collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const localObjects = (_j = collection.objects) !== null && _j !== void 0 ? _j : []; const remoteObjects = (_l = (await ((_k = collection.fetchObjects) === null || _k === void 0 ? void 0 : _k.call(collection, { collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _l !== void 0 ? _l : []; // no existing url const created = remoteObjects.filter((ro) => localObjects.every((lo) => !urlContains(lo.url, ro.url))); @@ -557,7 +571,7 @@ var collection = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$3 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -576,10 +590,11 @@ const addressBookQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; const addressBookMultiGet = async (params) => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -591,11 +606,12 @@ const addressBookMultiGet = async (params) => { }, defaultNamespace: exports.DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const fetchAddressBooks = async (params) => { - const { account, headers, props: customProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -613,6 +629,7 @@ const fetchAddressBooks = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('addressbook'); }) @@ -631,11 +648,11 @@ const fetchAddressBooks = async (params) => { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), }))); }; const fetchVCards = async (params) => { - const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, } = params; + const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {} } = params; debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { @@ -651,6 +668,7 @@ const fetchVCards = async (params) => { props: { [`${exports.DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, })).map((res) => { var _a; return (res.ok ? (_a = res.href) !== null && _a !== void 0 ? _a : '' : ''); })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, addressBook.url).href)) .filter(urlFilter) @@ -667,6 +685,7 @@ const fetchVCards = async (params) => { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -678,6 +697,7 @@ const fetchVCards = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -691,7 +711,7 @@ const fetchVCards = async (params) => { }); }; const createVCard = async (params) => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -700,10 +720,11 @@ const createVCard = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -712,14 +733,16 @@ const updateVCard = async (params) => { 'content-type': 'text/vcard; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions, }); }; const deleteVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -737,7 +760,7 @@ var addressBook = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$2 = getLogger('tsdav:calendar'); const calendarQuery = async (params) => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -756,10 +779,11 @@ const calendarQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const calendarMultiGet = async (params) => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -774,10 +798,11 @@ const calendarMultiGet = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const makeCalendar = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -797,10 +822,11 @@ const makeCalendar = async (params) => { }, }, }, + fetchOptions }); }; const fetchCalendars = async (params) => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -822,6 +848,7 @@ const fetchCalendars = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('calendar'); }) @@ -830,7 +857,7 @@ const fetchCalendars = async (params) => { // filter out none iCal format calendars. const components = Array.isArray((_a = rc.props) === null || _a === void 0 ? void 0 : _a.supportedCalendarComponentSet.comp) ? (_b = rc.props) === null || _b === void 0 ? void 0 : _b.supportedCalendarComponentSet.comp.map((sc) => sc._attributes.name) - : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name] || []; + : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -858,11 +885,12 @@ const fetchCalendars = async (params) => { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -938,6 +966,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) // patch up to full url if url is not full .filter(urlFilter) // custom filter function on calendar objects @@ -971,6 +1000,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -1000,6 +1030,7 @@ const fetchCalendarObjects = async (params) => { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -1013,7 +1044,7 @@ const fetchCalendarObjects = async (params) => { }); }; const createCalendarObject = async (params) => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, data: iCalString, @@ -1022,10 +1053,11 @@ const createCalendarObject = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -1034,14 +1066,16 @@ const updateCalendarObject = async (params) => { 'content-type': 'text/calendar; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions }); }; const deleteCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; /** @@ -1049,7 +1083,7 @@ const deleteCalendarObject = async (params) => { */ const syncCalendars = async (params) => { var _a; - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -1057,6 +1091,7 @@ const syncCalendars = async (params) => { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); @@ -1078,6 +1113,7 @@ const syncCalendars = async (params) => { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; })); @@ -1097,7 +1133,7 @@ const syncCalendars = async (params) => { : [...unchanged, ...created, ...updatedWithObjects]; }; const freeBusyQuery = async (params) => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -1126,6 +1162,7 @@ const freeBusyQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; @@ -1148,7 +1185,7 @@ const debug$1 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; debug$1('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); uri.protocol = (_a = endpoint.protocol) !== null && _a !== void 0 ? _a : 'http'; @@ -1157,6 +1194,7 @@ const serviceDiscovery = async (params) => { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { // http redirect. @@ -1179,7 +1217,7 @@ const serviceDiscovery = async (params) => { }; const fetchPrincipalUrl = async (params) => { var _a, _b, _c, _d, _e; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); @@ -1192,6 +1230,7 @@ const fetchPrincipalUrl = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug$1(`Fetch principal url failed: ${response.statusText}`); @@ -1204,7 +1243,7 @@ const fetchPrincipalUrl = async (params) => { }; const fetchHomeUrl = async (params) => { var _a, _b; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); @@ -1217,6 +1256,7 @@ const fetchHomeUrl = async (params) => { : { [`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { @@ -1229,19 +1269,22 @@ const fetchHomeUrl = async (params) => { return result; }; const createAccount = async (params) => { - const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, } = params; + const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, fetchOptions = {}, } = params; const newAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -1249,12 +1292,14 @@ const createAccount = async (params) => { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -1265,6 +1310,7 @@ const createAccount = async (params) => { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1274,6 +1320,7 @@ const createAccount = async (params) => { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1305,7 +1352,7 @@ const getBasicAuthHeaders = (credentials) => { authorization: `Basic ${base64.encode(`${credentials.username}:${credentials.password}`)}`, }; }; -const fetchOauthTokens = async (credentials) => { +const fetchOauthTokens = async (credentials, fetchOptions) => { const requireFields = [ 'authorizationCode', 'redirectUrl', @@ -1332,6 +1379,7 @@ const fetchOauthTokens = async (credentials) => { 'content-length': `${param.toString().length}`, 'content-type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1340,7 +1388,7 @@ const fetchOauthTokens = async (credentials) => { debug(`Fetch Oauth tokens failed: ${await response.text()}`); return {}; }; -const refreshAccessToken = async (credentials) => { +const refreshAccessToken = async (credentials, fetchOptions) => { const requireFields = [ 'refreshToken', 'clientId', @@ -1362,6 +1410,7 @@ const refreshAccessToken = async (credentials) => { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1370,19 +1419,19 @@ const refreshAccessToken = async (credentials) => { debug(`Refresh access token failed: ${await response.text()}`); return {}; }; -const getOauthHeaders = async (credentials) => { +const getOauthHeaders = async (credentials, fetchOptions) => { var _a; debug('Fetching oauth headers'); let tokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ((credentials.refreshToken && !credentials.accessToken) || Date.now() > ((_a = credentials.expiration) !== null && _a !== void 0 ? _a : 0)) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`); @@ -1545,12 +1594,13 @@ const createDAVClient = async (params) => { }; class DAVClient { constructor(params) { - var _a, _b; + var _a, _b, _c; this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = (_a = params.authMethod) !== null && _a !== void 0 ? _a : 'Basic'; this.accountType = (_b = params.defaultAccountType) !== null && _b !== void 0 ? _b : 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = (_c = params.fetchOptions) !== null && _c !== void 0 ? _c : {}; } async login() { var _a; @@ -1559,7 +1609,7 @@ class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -1580,6 +1630,7 @@ class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -1595,103 +1646,116 @@ class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } async createObject(...params) { return defaultParam(createObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params) { - return defaultParam(updateObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(updateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async deleteObject(...params) { - return defaultParam(deleteObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(deleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async propfind(...params) { - return defaultParam(propfind, { headers: this.authHeaders })(params[0]); + return defaultParam(propfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0) { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return createAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : this.fetchOptions, }); } async collectionQuery(...params) { - return defaultParam(collectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(collectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params) { - return defaultParam(makeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params) { - return defaultParam(syncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(syncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params) { - return defaultParam(supportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(supportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params) { - return defaultParam(isCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(isCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(...params) { return defaultParam(smartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, })(params[0]); } async calendarQuery(...params) { - return defaultParam(calendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params) { - return defaultParam(makeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet(...params) { - return defaultParam(calendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params) { - return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchCalendarObjects(...params) { - return defaultParam(fetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject(...params) { - return defaultParam(createCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(createCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject(...params) { - return defaultParam(updateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(updateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject(...params) { - return defaultParam(deleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params) { return defaultParam(syncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions })(params[0]); } async addressBookQuery(...params) { - return defaultParam(addressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet(...params) { - return defaultParam(addressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks(...params) { - return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchVCards(...params) { - return defaultParam(fetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params) { - return defaultParam(createVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(createVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params) { - return defaultParam(updateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(updateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params) { - return defaultParam(deleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/dist/tsdav.cjs.js b/dist/tsdav.cjs.js index 3703636..6826b2d 100644 --- a/dist/tsdav.cjs.js +++ b/dist/tsdav.cjs.js @@ -123,7 +123,7 @@ var requestHelpers = /*#__PURE__*/Object.freeze({ const debug$5 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml({ @@ -162,6 +162,7 @@ const davRequest = async (params) => { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); // filter out invalid responses @@ -250,7 +251,7 @@ const davRequest = async (params) => { }); }; const propfind = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -270,29 +271,33 @@ const propfind = async (params) => { }, }, }, + fetchOptions, }); }; const createObject = async (params) => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; const updateObject = async (params) => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; const deleteObject = async (params) => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return crossFetch.fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; @@ -317,7 +322,7 @@ const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (ob /* eslint-disable no-underscore-dangle */ const debug$4 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { - const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, } = params; + const { url, body, depth, defaultNamespace = exports.DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {} } = params; const queryResults = await davRequest({ url, init: { @@ -326,6 +331,7 @@ const collectionQuery = async (params) => { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result if (queryResults.length === 1 && !queryResults[0].raw) { @@ -334,7 +340,7 @@ const collectionQuery = async (params) => { return queryResults; }; const makeCollection = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -351,11 +357,12 @@ const makeCollection = async (params) => { } : undefined, }, + fetchOptions }); }; const supportedReportSet = async (params) => { var _a, _b, _c, _d, _e; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -363,12 +370,13 @@ const supportedReportSet = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ((_e = (_d = (_c = (_b = (_a = res[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.supportedReportSet) === null || _c === void 0 ? void 0 : _c.supportedReport) === null || _d === void 0 ? void 0 : _d.map((sr) => Object.keys(sr.report)[0])) !== null && _e !== void 0 ? _e : []); }; const isCollectionDirty = async (params) => { var _a, _b, _c; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -376,6 +384,7 @@ const isCollectionDirty = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -390,7 +399,7 @@ const isCollectionDirty = async (params) => { * This is for webdav sync-collection only */ const syncCollection = (params) => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -410,12 +419,13 @@ const syncCollection = (params) => { }, }, }, + fetchOptions }); }; /** remote collection to local */ const smartCollectionSync = async (params) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -436,6 +446,7 @@ const smartCollectionSync = async (params) => { syncLevel: 1, syncToken: collection.syncToken, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const objectResponses = result.filter((r) => { var _a; @@ -456,6 +467,7 @@ const smartCollectionSync = async (params) => { objectUrls: changedObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _c !== void 0 ? _c : []) : []; const remoteObjects = multiGetObjectResponse.map((res) => { @@ -500,11 +512,13 @@ const smartCollectionSync = async (params) => { const { isDirty, newCtag } = await isCollectionDirty({ collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const localObjects = (_j = collection.objects) !== null && _j !== void 0 ? _j : []; const remoteObjects = (_l = (await ((_k = collection.fetchObjects) === null || _k === void 0 ? void 0 : _k.call(collection, { collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _l !== void 0 ? _l : []; // no existing url const created = remoteObjects.filter((ro) => localObjects.every((lo) => !urlContains(lo.url, ro.url))); @@ -557,7 +571,7 @@ var collection = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$3 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -576,10 +590,11 @@ const addressBookQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; const addressBookMultiGet = async (params) => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -591,11 +606,12 @@ const addressBookMultiGet = async (params) => { }, defaultNamespace: exports.DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const fetchAddressBooks = async (params) => { - const { account, headers, props: customProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -613,6 +629,7 @@ const fetchAddressBooks = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('addressbook'); }) @@ -631,11 +648,11 @@ const fetchAddressBooks = async (params) => { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), }))); }; const fetchVCards = async (params) => { - const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, } = params; + const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {} } = params; debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { @@ -651,6 +668,7 @@ const fetchVCards = async (params) => { props: { [`${exports.DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, })).map((res) => { var _a; return (res.ok ? (_a = res.href) !== null && _a !== void 0 ? _a : '' : ''); })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, addressBook.url).href)) .filter(urlFilter) @@ -667,6 +685,7 @@ const fetchVCards = async (params) => { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -678,6 +697,7 @@ const fetchVCards = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -691,7 +711,7 @@ const fetchVCards = async (params) => { }); }; const createVCard = async (params) => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -700,10 +720,11 @@ const createVCard = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -712,14 +733,16 @@ const updateVCard = async (params) => { 'content-type': 'text/vcard; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions, }); }; const deleteVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -737,7 +760,7 @@ var addressBook = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$2 = getLogger('tsdav:calendar'); const calendarQuery = async (params) => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -756,10 +779,11 @@ const calendarQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const calendarMultiGet = async (params) => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -774,10 +798,11 @@ const calendarMultiGet = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const makeCalendar = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -797,10 +822,11 @@ const makeCalendar = async (params) => { }, }, }, + fetchOptions }); }; const fetchCalendars = async (params) => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -822,6 +848,7 @@ const fetchCalendars = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('calendar'); }) @@ -830,7 +857,7 @@ const fetchCalendars = async (params) => { // filter out none iCal format calendars. const components = Array.isArray((_a = rc.props) === null || _a === void 0 ? void 0 : _a.supportedCalendarComponentSet.comp) ? (_b = rc.props) === null || _b === void 0 ? void 0 : _b.supportedCalendarComponentSet.comp.map((sc) => sc._attributes.name) - : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name] || []; + : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -858,11 +885,12 @@ const fetchCalendars = async (params) => { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -938,6 +966,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) // patch up to full url if url is not full .filter(urlFilter) // custom filter function on calendar objects @@ -971,6 +1000,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -1000,6 +1030,7 @@ const fetchCalendarObjects = async (params) => { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -1013,7 +1044,7 @@ const fetchCalendarObjects = async (params) => { }); }; const createCalendarObject = async (params) => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, data: iCalString, @@ -1022,10 +1053,11 @@ const createCalendarObject = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -1034,14 +1066,16 @@ const updateCalendarObject = async (params) => { 'content-type': 'text/calendar; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions }); }; const deleteCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; /** @@ -1049,7 +1083,7 @@ const deleteCalendarObject = async (params) => { */ const syncCalendars = async (params) => { var _a; - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -1057,6 +1091,7 @@ const syncCalendars = async (params) => { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); @@ -1078,6 +1113,7 @@ const syncCalendars = async (params) => { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; })); @@ -1097,7 +1133,7 @@ const syncCalendars = async (params) => { : [...unchanged, ...created, ...updatedWithObjects]; }; const freeBusyQuery = async (params) => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -1126,6 +1162,7 @@ const freeBusyQuery = async (params) => { defaultNamespace: exports.DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; @@ -1148,7 +1185,7 @@ const debug$1 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; debug$1('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); uri.protocol = (_a = endpoint.protocol) !== null && _a !== void 0 ? _a : 'http'; @@ -1157,6 +1194,7 @@ const serviceDiscovery = async (params) => { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { // http redirect. @@ -1179,7 +1217,7 @@ const serviceDiscovery = async (params) => { }; const fetchPrincipalUrl = async (params) => { var _a, _b, _c, _d, _e; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); @@ -1192,6 +1230,7 @@ const fetchPrincipalUrl = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug$1(`Fetch principal url failed: ${response.statusText}`); @@ -1204,7 +1243,7 @@ const fetchPrincipalUrl = async (params) => { }; const fetchHomeUrl = async (params) => { var _a, _b; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); @@ -1217,6 +1256,7 @@ const fetchHomeUrl = async (params) => { : { [`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { @@ -1229,19 +1269,22 @@ const fetchHomeUrl = async (params) => { return result; }; const createAccount = async (params) => { - const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, } = params; + const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, fetchOptions = {}, } = params; const newAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -1249,12 +1292,14 @@ const createAccount = async (params) => { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -1265,6 +1310,7 @@ const createAccount = async (params) => { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1274,6 +1320,7 @@ const createAccount = async (params) => { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1305,7 +1352,7 @@ const getBasicAuthHeaders = (credentials) => { authorization: `Basic ${base64.encode(`${credentials.username}:${credentials.password}`)}`, }; }; -const fetchOauthTokens = async (credentials) => { +const fetchOauthTokens = async (credentials, fetchOptions) => { const requireFields = [ 'authorizationCode', 'redirectUrl', @@ -1332,6 +1379,7 @@ const fetchOauthTokens = async (credentials) => { 'content-length': `${param.toString().length}`, 'content-type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1340,7 +1388,7 @@ const fetchOauthTokens = async (credentials) => { debug(`Fetch Oauth tokens failed: ${await response.text()}`); return {}; }; -const refreshAccessToken = async (credentials) => { +const refreshAccessToken = async (credentials, fetchOptions) => { const requireFields = [ 'refreshToken', 'clientId', @@ -1362,6 +1410,7 @@ const refreshAccessToken = async (credentials) => { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1370,19 +1419,19 @@ const refreshAccessToken = async (credentials) => { debug(`Refresh access token failed: ${await response.text()}`); return {}; }; -const getOauthHeaders = async (credentials) => { +const getOauthHeaders = async (credentials, fetchOptions) => { var _a; debug('Fetching oauth headers'); let tokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ((credentials.refreshToken && !credentials.accessToken) || Date.now() > ((_a = credentials.expiration) !== null && _a !== void 0 ? _a : 0)) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`); @@ -1545,12 +1594,13 @@ const createDAVClient = async (params) => { }; class DAVClient { constructor(params) { - var _a, _b; + var _a, _b, _c; this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = (_a = params.authMethod) !== null && _a !== void 0 ? _a : 'Basic'; this.accountType = (_b = params.defaultAccountType) !== null && _b !== void 0 ? _b : 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = (_c = params.fetchOptions) !== null && _c !== void 0 ? _c : {}; } async login() { var _a; @@ -1559,7 +1609,7 @@ class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -1580,6 +1630,7 @@ class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -1595,103 +1646,116 @@ class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } async createObject(...params) { return defaultParam(createObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params) { - return defaultParam(updateObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(updateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async deleteObject(...params) { - return defaultParam(deleteObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(deleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async propfind(...params) { - return defaultParam(propfind, { headers: this.authHeaders })(params[0]); + return defaultParam(propfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0) { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return createAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : this.fetchOptions, }); } async collectionQuery(...params) { - return defaultParam(collectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(collectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params) { - return defaultParam(makeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params) { - return defaultParam(syncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(syncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params) { - return defaultParam(supportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(supportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params) { - return defaultParam(isCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(isCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(...params) { return defaultParam(smartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, })(params[0]); } async calendarQuery(...params) { - return defaultParam(calendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params) { - return defaultParam(makeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet(...params) { - return defaultParam(calendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params) { - return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchCalendarObjects(...params) { - return defaultParam(fetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject(...params) { - return defaultParam(createCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(createCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject(...params) { - return defaultParam(updateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(updateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject(...params) { - return defaultParam(deleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params) { return defaultParam(syncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions })(params[0]); } async addressBookQuery(...params) { - return defaultParam(addressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet(...params) { - return defaultParam(addressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks(...params) { - return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchVCards(...params) { - return defaultParam(fetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params) { - return defaultParam(createVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(createVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params) { - return defaultParam(updateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(updateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params) { - return defaultParam(deleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/dist/tsdav.d.ts b/dist/tsdav.d.ts index 1dd16fa..5191965 100644 --- a/dist/tsdav.d.ts +++ b/dist/tsdav.d.ts @@ -48,12 +48,15 @@ type DAVCollection = { resourcetype?: any; syncToken?: string; url: string; + fetchOptions?: RequestInit; fetchObjects?: ((params?: { collection: DAVCalendar; headers?: Record; + fetchOptions?: RequestInit; }) => Promise) | ((params?: { collection: DAVAddressBook; headers?: Record; + fetchOptions?: RequestInit; }) => Promise); objectMultiGet?: (params: { url: string; @@ -62,6 +65,7 @@ type DAVCollection = { filters?: ElementCompact; timezone?: string; depth: DAVDepth; + fetchOptions?: RequestInit; headers?: Record; }) => Promise; }; @@ -108,6 +112,7 @@ interface SmartCollectionSync { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise & { @@ -121,6 +126,7 @@ interface SmartCollectionSync { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; @@ -129,6 +135,7 @@ interface SyncCalendars { (params: { oldCalendars: DAVCalendar[]; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise<{ @@ -139,6 +146,7 @@ interface SyncCalendars { (params: { oldCalendars: DAVCalendar[]; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; @@ -178,6 +186,7 @@ declare const addressBookQuery: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const addressBookMultiGet: (params: { url: string; @@ -185,12 +194,15 @@ declare const addressBookMultiGet: (params: { objectUrls: string[]; depth: DAVDepth; headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const fetchAddressBooks: (params?: { account?: DAVAccount; props?: ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const fetchVCards: (params: { addressBook: DAVAddressBook; @@ -199,6 +211,7 @@ declare const fetchVCards: (params: { urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const createVCard: (params: { addressBook: DAVAddressBook; @@ -206,16 +219,19 @@ declare const createVCard: (params: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const calendarQuery: (params: { @@ -226,6 +242,7 @@ declare const calendarQuery: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const calendarMultiGet: (params: { url: string; @@ -236,6 +253,7 @@ declare const calendarMultiGet: (params: { filters?: ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const makeCalendar: (params: { url: string; @@ -243,6 +261,7 @@ declare const makeCalendar: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const fetchCalendars: (params?: { account?: DAVAccount; @@ -250,6 +269,7 @@ declare const fetchCalendars: (params?: { projectedProps?: Record; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const fetchCalendarObjects: (params: { calendar: DAVCalendar; @@ -264,6 +284,7 @@ declare const fetchCalendarObjects: (params: { headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; + fetchOptions?: RequestInit; }) => Promise; declare const createCalendarObject: (params: { calendar: DAVCalendar; @@ -271,16 +292,19 @@ declare const createCalendarObject: (params: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; /** * Sync remote calendars to local @@ -295,6 +319,7 @@ declare const freeBusyQuery: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const collectionQuery: (params: { @@ -304,6 +329,7 @@ declare const collectionQuery: (params: { defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const makeCollection: (params: { url: string; @@ -311,16 +337,19 @@ declare const makeCollection: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; @@ -335,6 +364,7 @@ declare const syncCollection: (params: { headersToExclude?: string[]; syncLevel?: number; syncToken?: string; + fetchOptions?: RequestInit; }) => Promise; /** remote collection to local */ declare const smartCollectionSync: SmartCollectionSync; @@ -344,6 +374,7 @@ declare const davRequest: (params: { init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; + fetchOptions?: RequestInit; }) => Promise; declare const propfind: (params: { url: string; @@ -351,12 +382,14 @@ declare const propfind: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const updateObject: (params: { url: string; @@ -364,12 +397,14 @@ declare const updateObject: (params: { etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; declare const createDAVClient: (params: { @@ -391,13 +426,8 @@ declare const createDAVClient: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createAccount: (params0: { account: Optional; headers?: Record; @@ -409,36 +439,23 @@ declare const createDAVClient: (params: { data: BodyInit; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - data: BodyInit; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - data: BodyInit; - etag?: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - etag?: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; calendarQuery: (params: { url: string; props: xml_js.ElementCompact; @@ -447,15 +464,8 @@ declare const createDAVClient: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - filters?: xml_js.ElementCompact; - timezone?: string; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; addressBookQuery: (params: { url: string; props: xml_js.ElementCompact; @@ -463,14 +473,8 @@ declare const createDAVClient: (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - filters?: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; collectionQuery: (params: { url: string; body: any; @@ -478,27 +482,16 @@ declare const createDAVClient: (params: { defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - body: any; - depth?: DAVDepth; - defaultNamespace?: DAVNamespaceShort; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; makeCollection: (params: { url: string; props?: xml_js.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props?: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; calendarMultiGet: (params: { url: string; props: xml_js.ElementCompact; @@ -508,29 +501,16 @@ declare const createDAVClient: (params: { filters?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - objectUrls?: string[]; - timezone?: string; - depth: DAVDepth; - filters?: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; makeCalendar: (params: { url: string; props: xml_js.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; syncCollection: (params: { url: string; props: xml_js.ElementCompact; @@ -538,35 +518,23 @@ declare const createDAVClient: (params: { headersToExclude?: string[]; syncLevel?: number; syncToken?: string; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - syncLevel?: number; - syncToken?: string; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - collection: DAVCollection; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - collection: DAVCollection; - headers?: Record; - headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; - }>>; + }>; smartCollectionSync: SmartCollectionSync; fetchCalendars: (params?: { account?: DAVAccount; @@ -574,13 +542,8 @@ declare const createDAVClient: (params: { projectedProps?: Record; headers?: Record; headersToExclude?: string[]; - } | undefined) => ReturnType<(params?: { - account?: DAVAccount; - props?: xml_js.ElementCompact; - projectedProps?: Record; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + } | undefined) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; @@ -594,122 +557,74 @@ declare const createDAVClient: (params: { headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; - }) => ReturnType<(params: { - calendar: DAVCalendar; - objectUrls?: string[]; - filters?: xml_js.ElementCompact; - timeRange?: { - start: string; - end: string; - }; - expand?: boolean; - urlFilter?: (url: string) => boolean; - headers?: Record; - headersToExclude?: string[]; - useMultiGet?: boolean; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendar: DAVCalendar; - iCalString: string; - filename: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendarObject: DAVCalendarObject; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendarObject: DAVCalendarObject; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; syncCalendars: SyncCalendars; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; - } | undefined) => ReturnType<(params?: { - account?: DAVAccount; - props?: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + } | undefined) => Promise; addressBookMultiGet: (params: { url: string; props: xml_js.ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - objectUrls: string[]; - depth: DAVDepth; - headers?: Record; - }) => Promise>; - fetchVCards: (params: { - addressBook: DAVAddressBook; - headers?: Record; - objectUrls?: string[]; - urlFilter?: (url: string) => boolean; - useMultiGet?: boolean; headersToExclude?: string[]; - }) => ReturnType<(params: { + fetchOptions?: RequestInit; + }) => Promise; + fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - addressBook: DAVAddressBook; - vCardString: string; - filename: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - vCard: DAVVCard; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - vCard: DAVVCard; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; }>; declare class DAVClient { serverUrl: string; @@ -718,6 +633,7 @@ declare class DAVClient { accountType: DAVAccount['accountType']; authHeaders?: Record; account?: DAVAccount; + fetchOptions?: RequestInit; authFunction?: (credentials: DAVCredentials) => Promise>; constructor(params: { serverUrl: string; @@ -725,6 +641,7 @@ declare class DAVClient { authMethod?: 'Basic' | 'Oauth' | 'Digest' | 'Custom'; authFunction?: (credentials: DAVCredentials) => Promise>; defaultAccountType?: DAVAccount['accountType'] | undefined; + fetchOptions?: RequestInit; }); login(): Promise; davRequest(params0: { @@ -732,6 +649,7 @@ declare class DAVClient { init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; + fetchOptions?: RequestInit; }): Promise; createObject(...params: Parameters): Promise; updateObject(...params: Parameters): Promise; @@ -742,6 +660,7 @@ declare class DAVClient { headers?: Record; loadCollections?: boolean; loadObjects?: boolean; + fetchOptions?: RequestInit; }): Promise; collectionQuery(...params: Parameters): Promise; makeCollection(...params: Parameters): Promise; @@ -755,6 +674,7 @@ declare class DAVClient { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; @@ -762,6 +682,7 @@ declare class DAVClient { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise & { @@ -795,17 +716,18 @@ declare const createAccount: (params: { headersToExclude?: string[]; loadCollections?: boolean; loadObjects?: boolean; + fetchOptions?: RequestInit; }) => Promise; declare const getBasicAuthHeaders: (credentials: DAVCredentials) => { authorization?: string; }; -declare const fetchOauthTokens: (credentials: DAVCredentials) => Promise; -declare const refreshAccessToken: (credentials: DAVCredentials) => Promise<{ +declare const fetchOauthTokens: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise; +declare const refreshAccessToken: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ access_token?: string; expires_in?: number; }>; -declare const getOauthHeaders: (credentials: DAVCredentials) => Promise<{ +declare const getOauthHeaders: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ tokens: DAVTokens; headers: { authorization?: string; @@ -834,12 +756,12 @@ declare const _default: { getBasicAuthHeaders: (credentials: DAVCredentials) => { authorization?: string; }; - fetchOauthTokens: (credentials: DAVCredentials) => Promise; - refreshAccessToken: (credentials: DAVCredentials) => Promise<{ + fetchOauthTokens: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise; + refreshAccessToken: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ access_token?: string; expires_in?: number; }>; - getOauthHeaders: (credentials: DAVCredentials) => Promise<{ + getOauthHeaders: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ tokens: DAVTokens; headers: { authorization?: string; @@ -853,6 +775,7 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; calendarMultiGet: (params: { url: string; @@ -863,6 +786,7 @@ declare const _default: { filters?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; makeCalendar: (params: { url: string; @@ -870,6 +794,7 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchCalendars: (params?: { account?: DAVAccount; @@ -877,6 +802,7 @@ declare const _default: { projectedProps?: Record; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; @@ -891,6 +817,7 @@ declare const _default: { headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; + fetchOptions?: RequestInit; }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; @@ -898,16 +825,19 @@ declare const _default: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; syncCalendars: SyncCalendars; freeBusyQuery: (params: { @@ -919,6 +849,7 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; addressBookQuery: (params: { url: string; @@ -927,6 +858,7 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; addressBookMultiGet: (params: { url: string; @@ -934,12 +866,15 @@ declare const _default: { objectUrls: string[]; depth: DAVDepth; headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; @@ -948,6 +883,7 @@ declare const _default: { urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; @@ -955,31 +891,37 @@ declare const _default: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; serviceDiscovery: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchPrincipalUrl: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; fetchHomeUrl: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; createAccount: (params: { account: DAVAccount; @@ -987,6 +929,7 @@ declare const _default: { headersToExclude?: string[]; loadCollections?: boolean; loadObjects?: boolean; + fetchOptions?: RequestInit; }) => Promise; collectionQuery: (params: { url: string; @@ -995,6 +938,7 @@ declare const _default: { defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; makeCollection: (params: { url: string; @@ -1002,16 +946,19 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; @@ -1023,6 +970,7 @@ declare const _default: { headersToExclude?: string[]; syncLevel?: number; syncToken?: string; + fetchOptions?: RequestInit; }) => Promise; smartCollectionSync: SmartCollectionSync; davRequest: (params: { @@ -1030,6 +978,7 @@ declare const _default: { init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; + fetchOptions?: RequestInit; }) => Promise; propfind: (params: { url: string; @@ -1037,12 +986,14 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; updateObject: (params: { url: string; @@ -1050,12 +1001,14 @@ declare const _default: { etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise; createDAVClient: (params: { serverUrl: string; @@ -1076,13 +1029,8 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createAccount: (params0: { account: Optional; headers?: Record; @@ -1094,36 +1042,23 @@ declare const _default: { data: BodyInit; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - data: BodyInit; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - data: BodyInit; - etag?: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - etag?: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; calendarQuery: (params: { url: string; props: xml_js.ElementCompact; @@ -1132,15 +1067,8 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - filters?: xml_js.ElementCompact; - timezone?: string; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; addressBookQuery: (params: { url: string; props: xml_js.ElementCompact; @@ -1148,14 +1076,8 @@ declare const _default: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - filters?: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; collectionQuery: (params: { url: string; body: any; @@ -1163,27 +1085,16 @@ declare const _default: { defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - body: any; - depth?: DAVDepth; - defaultNamespace?: DAVNamespaceShort; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; makeCollection: (params: { url: string; props?: xml_js.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props?: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; calendarMultiGet: (params: { url: string; props: xml_js.ElementCompact; @@ -1193,29 +1104,16 @@ declare const _default: { filters?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - objectUrls?: string[]; - timezone?: string; - depth: DAVDepth; - filters?: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; makeCalendar: (params: { url: string; props: xml_js.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - depth?: DAVDepth; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; syncCollection: (params: { url: string; props: xml_js.ElementCompact; @@ -1223,35 +1121,23 @@ declare const _default: { headersToExclude?: string[]; syncLevel?: number; syncToken?: string; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - syncLevel?: number; - syncToken?: string; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - collection: DAVCollection; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - collection: DAVCollection; - headers?: Record; - headersToExclude?: string[]; + fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; - }>>; + }>; smartCollectionSync: SmartCollectionSync; fetchCalendars: (params?: { account?: DAVAccount; @@ -1259,13 +1145,8 @@ declare const _default: { projectedProps?: Record; headers?: Record; headersToExclude?: string[]; - } | undefined) => ReturnType<(params?: { - account?: DAVAccount; - props?: xml_js.ElementCompact; - projectedProps?: Record; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + } | undefined) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; @@ -1279,122 +1160,74 @@ declare const _default: { headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; - }) => ReturnType<(params: { - calendar: DAVCalendar; - objectUrls?: string[]; - filters?: xml_js.ElementCompact; - timeRange?: { - start: string; - end: string; - }; - expand?: boolean; - urlFilter?: (url: string) => boolean; - headers?: Record; - headersToExclude?: string[]; - useMultiGet?: boolean; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendar: DAVCalendar; - iCalString: string; - filename: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendarObject: DAVCalendarObject; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - calendarObject: DAVCalendarObject; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; syncCalendars: SyncCalendars; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js.ElementCompact; headers?: Record; headersToExclude?: string[]; - } | undefined) => ReturnType<(params?: { - account?: DAVAccount; - props?: xml_js.ElementCompact; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + } | undefined) => Promise; addressBookMultiGet: (params: { url: string; props: xml_js.ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; - }) => ReturnType<(params: { - url: string; - props: xml_js.ElementCompact; - objectUrls: string[]; - depth: DAVDepth; - headers?: Record; - }) => Promise>; - fetchVCards: (params: { - addressBook: DAVAddressBook; - headers?: Record; - objectUrls?: string[]; - urlFilter?: (url: string) => boolean; - useMultiGet?: boolean; headersToExclude?: string[]; - }) => ReturnType<(params: { + fetchOptions?: RequestInit; + }) => Promise; + fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - addressBook: DAVAddressBook; - vCardString: string; - filename: string; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - vCard: DAVVCard; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; - }) => ReturnType<(params: { - vCard: DAVVCard; - headers?: Record; - headersToExclude?: string[]; - }) => Promise>; + fetchOptions?: RequestInit; + }) => Promise; }>; DAVClient: typeof DAVClient; DAVNamespace: typeof DAVNamespace; diff --git a/dist/tsdav.esm.js b/dist/tsdav.esm.js index 7e9d608..bc823cc 100644 --- a/dist/tsdav.esm.js +++ b/dist/tsdav.esm.js @@ -119,7 +119,7 @@ var requestHelpers = /*#__PURE__*/Object.freeze({ const debug$5 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml({ @@ -158,6 +158,7 @@ const davRequest = async (params) => { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); // filter out invalid responses @@ -246,7 +247,7 @@ const davRequest = async (params) => { }); }; const propfind = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -266,29 +267,33 @@ const propfind = async (params) => { }, }, }, + fetchOptions, }); }; const createObject = async (params) => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; const updateObject = async (params) => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; const deleteObject = async (params) => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; @@ -313,7 +318,7 @@ const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (ob /* eslint-disable no-underscore-dangle */ const debug$4 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { - const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, } = params; + const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {} } = params; const queryResults = await davRequest({ url, init: { @@ -322,6 +327,7 @@ const collectionQuery = async (params) => { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result if (queryResults.length === 1 && !queryResults[0].raw) { @@ -330,7 +336,7 @@ const collectionQuery = async (params) => { return queryResults; }; const makeCollection = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -347,11 +353,12 @@ const makeCollection = async (params) => { } : undefined, }, + fetchOptions }); }; const supportedReportSet = async (params) => { var _a, _b, _c, _d, _e; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -359,12 +366,13 @@ const supportedReportSet = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ((_e = (_d = (_c = (_b = (_a = res[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.supportedReportSet) === null || _c === void 0 ? void 0 : _c.supportedReport) === null || _d === void 0 ? void 0 : _d.map((sr) => Object.keys(sr.report)[0])) !== null && _e !== void 0 ? _e : []); }; const isCollectionDirty = async (params) => { var _a, _b, _c; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -372,6 +380,7 @@ const isCollectionDirty = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -386,7 +395,7 @@ const isCollectionDirty = async (params) => { * This is for webdav sync-collection only */ const syncCollection = (params) => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -406,12 +415,13 @@ const syncCollection = (params) => { }, }, }, + fetchOptions }); }; /** remote collection to local */ const smartCollectionSync = async (params) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -432,6 +442,7 @@ const smartCollectionSync = async (params) => { syncLevel: 1, syncToken: collection.syncToken, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const objectResponses = result.filter((r) => { var _a; @@ -452,6 +463,7 @@ const smartCollectionSync = async (params) => { objectUrls: changedObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _c !== void 0 ? _c : []) : []; const remoteObjects = multiGetObjectResponse.map((res) => { @@ -496,11 +508,13 @@ const smartCollectionSync = async (params) => { const { isDirty, newCtag } = await isCollectionDirty({ collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const localObjects = (_j = collection.objects) !== null && _j !== void 0 ? _j : []; const remoteObjects = (_l = (await ((_k = collection.fetchObjects) === null || _k === void 0 ? void 0 : _k.call(collection, { collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _l !== void 0 ? _l : []; // no existing url const created = remoteObjects.filter((ro) => localObjects.every((lo) => !urlContains(lo.url, ro.url))); @@ -553,7 +567,7 @@ var collection = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$3 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -572,10 +586,11 @@ const addressBookQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; const addressBookMultiGet = async (params) => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -587,11 +602,12 @@ const addressBookMultiGet = async (params) => { }, defaultNamespace: DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const fetchAddressBooks = async (params) => { - const { account, headers, props: customProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -609,6 +625,7 @@ const fetchAddressBooks = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('addressbook'); }) @@ -627,11 +644,11 @@ const fetchAddressBooks = async (params) => { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), }))); }; const fetchVCards = async (params) => { - const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, } = params; + const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {} } = params; debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { @@ -647,6 +664,7 @@ const fetchVCards = async (params) => { props: { [`${DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, })).map((res) => { var _a; return (res.ok ? (_a = res.href) !== null && _a !== void 0 ? _a : '' : ''); })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, addressBook.url).href)) .filter(urlFilter) @@ -663,6 +681,7 @@ const fetchVCards = async (params) => { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -674,6 +693,7 @@ const fetchVCards = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -687,7 +707,7 @@ const fetchVCards = async (params) => { }); }; const createVCard = async (params) => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -696,10 +716,11 @@ const createVCard = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -708,14 +729,16 @@ const updateVCard = async (params) => { 'content-type': 'text/vcard; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions, }); }; const deleteVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -733,7 +756,7 @@ var addressBook = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$2 = getLogger('tsdav:calendar'); const calendarQuery = async (params) => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -752,10 +775,11 @@ const calendarQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const calendarMultiGet = async (params) => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -770,10 +794,11 @@ const calendarMultiGet = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const makeCalendar = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -793,10 +818,11 @@ const makeCalendar = async (params) => { }, }, }, + fetchOptions }); }; const fetchCalendars = async (params) => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -818,6 +844,7 @@ const fetchCalendars = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('calendar'); }) @@ -826,7 +853,7 @@ const fetchCalendars = async (params) => { // filter out none iCal format calendars. const components = Array.isArray((_a = rc.props) === null || _a === void 0 ? void 0 : _a.supportedCalendarComponentSet.comp) ? (_b = rc.props) === null || _b === void 0 ? void 0 : _b.supportedCalendarComponentSet.comp.map((sc) => sc._attributes.name) - : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name] || []; + : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -854,11 +881,12 @@ const fetchCalendars = async (params) => { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -934,6 +962,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) // patch up to full url if url is not full .filter(urlFilter) // custom filter function on calendar objects @@ -967,6 +996,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -996,6 +1026,7 @@ const fetchCalendarObjects = async (params) => { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -1009,7 +1040,7 @@ const fetchCalendarObjects = async (params) => { }); }; const createCalendarObject = async (params) => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, data: iCalString, @@ -1018,10 +1049,11 @@ const createCalendarObject = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -1030,14 +1062,16 @@ const updateCalendarObject = async (params) => { 'content-type': 'text/calendar; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions }); }; const deleteCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; /** @@ -1045,7 +1079,7 @@ const deleteCalendarObject = async (params) => { */ const syncCalendars = async (params) => { var _a; - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -1053,6 +1087,7 @@ const syncCalendars = async (params) => { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); @@ -1074,6 +1109,7 @@ const syncCalendars = async (params) => { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; })); @@ -1093,7 +1129,7 @@ const syncCalendars = async (params) => { : [...unchanged, ...created, ...updatedWithObjects]; }; const freeBusyQuery = async (params) => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -1122,6 +1158,7 @@ const freeBusyQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; @@ -1144,7 +1181,7 @@ const debug$1 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; debug$1('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); uri.protocol = (_a = endpoint.protocol) !== null && _a !== void 0 ? _a : 'http'; @@ -1153,6 +1190,7 @@ const serviceDiscovery = async (params) => { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { // http redirect. @@ -1175,7 +1213,7 @@ const serviceDiscovery = async (params) => { }; const fetchPrincipalUrl = async (params) => { var _a, _b, _c, _d, _e; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); @@ -1188,6 +1226,7 @@ const fetchPrincipalUrl = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug$1(`Fetch principal url failed: ${response.statusText}`); @@ -1200,7 +1239,7 @@ const fetchPrincipalUrl = async (params) => { }; const fetchHomeUrl = async (params) => { var _a, _b; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); @@ -1213,6 +1252,7 @@ const fetchHomeUrl = async (params) => { : { [`${DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { @@ -1225,19 +1265,22 @@ const fetchHomeUrl = async (params) => { return result; }; const createAccount = async (params) => { - const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, } = params; + const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, fetchOptions = {}, } = params; const newAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -1245,12 +1288,14 @@ const createAccount = async (params) => { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -1261,6 +1306,7 @@ const createAccount = async (params) => { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1270,6 +1316,7 @@ const createAccount = async (params) => { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1301,7 +1348,7 @@ const getBasicAuthHeaders = (credentials) => { authorization: `Basic ${encode(`${credentials.username}:${credentials.password}`)}`, }; }; -const fetchOauthTokens = async (credentials) => { +const fetchOauthTokens = async (credentials, fetchOptions) => { const requireFields = [ 'authorizationCode', 'redirectUrl', @@ -1328,6 +1375,7 @@ const fetchOauthTokens = async (credentials) => { 'content-length': `${param.toString().length}`, 'content-type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1336,7 +1384,7 @@ const fetchOauthTokens = async (credentials) => { debug(`Fetch Oauth tokens failed: ${await response.text()}`); return {}; }; -const refreshAccessToken = async (credentials) => { +const refreshAccessToken = async (credentials, fetchOptions) => { const requireFields = [ 'refreshToken', 'clientId', @@ -1358,6 +1406,7 @@ const refreshAccessToken = async (credentials) => { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1366,19 +1415,19 @@ const refreshAccessToken = async (credentials) => { debug(`Refresh access token failed: ${await response.text()}`); return {}; }; -const getOauthHeaders = async (credentials) => { +const getOauthHeaders = async (credentials, fetchOptions) => { var _a; debug('Fetching oauth headers'); let tokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ((credentials.refreshToken && !credentials.accessToken) || Date.now() > ((_a = credentials.expiration) !== null && _a !== void 0 ? _a : 0)) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`); @@ -1541,12 +1590,13 @@ const createDAVClient = async (params) => { }; class DAVClient { constructor(params) { - var _a, _b; + var _a, _b, _c; this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = (_a = params.authMethod) !== null && _a !== void 0 ? _a : 'Basic'; this.accountType = (_b = params.defaultAccountType) !== null && _b !== void 0 ? _b : 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = (_c = params.fetchOptions) !== null && _c !== void 0 ? _c : {}; } async login() { var _a; @@ -1555,7 +1605,7 @@ class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -1576,6 +1626,7 @@ class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -1591,103 +1642,116 @@ class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } async createObject(...params) { return defaultParam(createObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params) { - return defaultParam(updateObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(updateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async deleteObject(...params) { - return defaultParam(deleteObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(deleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async propfind(...params) { - return defaultParam(propfind, { headers: this.authHeaders })(params[0]); + return defaultParam(propfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0) { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return createAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : this.fetchOptions, }); } async collectionQuery(...params) { - return defaultParam(collectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(collectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params) { - return defaultParam(makeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params) { - return defaultParam(syncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(syncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params) { - return defaultParam(supportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(supportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params) { - return defaultParam(isCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(isCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(...params) { return defaultParam(smartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, })(params[0]); } async calendarQuery(...params) { - return defaultParam(calendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params) { - return defaultParam(makeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet(...params) { - return defaultParam(calendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params) { - return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchCalendarObjects(...params) { - return defaultParam(fetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject(...params) { - return defaultParam(createCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(createCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject(...params) { - return defaultParam(updateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(updateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject(...params) { - return defaultParam(deleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params) { return defaultParam(syncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions })(params[0]); } async addressBookQuery(...params) { - return defaultParam(addressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet(...params) { - return defaultParam(addressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks(...params) { - return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchVCards(...params) { - return defaultParam(fetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params) { - return defaultParam(createVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(createVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params) { - return defaultParam(updateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(updateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params) { - return defaultParam(deleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/dist/tsdav.js b/dist/tsdav.js index 662fd50..2361a4b 100644 --- a/dist/tsdav.js +++ b/dist/tsdav.js @@ -942,7 +942,7 @@ function requireMs () { * @api public */ - ms = function(val, options) { + ms = function (val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { @@ -1482,6 +1482,8 @@ var common = setup; return false; } + let m; + // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || @@ -1489,7 +1491,7 @@ var common = setup; (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || // Double check webkit in userAgent just in case we are in a worker (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } @@ -3671,7 +3673,7 @@ EventEmitter.init = function() { this.domain = null; if (EventEmitter.usingDomains) { // if there is an active domain, then attach to it. - if (domain.active ) ; + if (domain.active) ; } if (!this._events || this._events === Object.getPrototypeOf(this)._events) { @@ -9062,7 +9064,7 @@ var requestHelpers = /*#__PURE__*/Object.freeze({ const debug$5 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml({ @@ -9101,6 +9103,7 @@ const davRequest = async (params) => { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); // filter out invalid responses @@ -9189,7 +9192,7 @@ const davRequest = async (params) => { }); }; const propfind = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -9209,29 +9212,33 @@ const propfind = async (params) => { }, }, }, + fetchOptions, }); }; const createObject = async (params) => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return browserPonyfillExports.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; const updateObject = async (params) => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return browserPonyfillExports.fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; const deleteObject = async (params) => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return browserPonyfillExports.fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; @@ -9256,7 +9263,7 @@ const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (ob /* eslint-disable no-underscore-dangle */ const debug$4 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { - const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, } = params; + const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {} } = params; const queryResults = await davRequest({ url, init: { @@ -9265,6 +9272,7 @@ const collectionQuery = async (params) => { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result if (queryResults.length === 1 && !queryResults[0].raw) { @@ -9273,7 +9281,7 @@ const collectionQuery = async (params) => { return queryResults; }; const makeCollection = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -9290,11 +9298,12 @@ const makeCollection = async (params) => { } : undefined, }, + fetchOptions }); }; const supportedReportSet = async (params) => { var _a, _b, _c, _d, _e; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -9302,12 +9311,13 @@ const supportedReportSet = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ((_e = (_d = (_c = (_b = (_a = res[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.supportedReportSet) === null || _c === void 0 ? void 0 : _c.supportedReport) === null || _d === void 0 ? void 0 : _d.map((sr) => Object.keys(sr.report)[0])) !== null && _e !== void 0 ? _e : []); }; const isCollectionDirty = async (params) => { var _a, _b, _c; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -9315,6 +9325,7 @@ const isCollectionDirty = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -9329,7 +9340,7 @@ const isCollectionDirty = async (params) => { * This is for webdav sync-collection only */ const syncCollection = (params) => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -9349,12 +9360,13 @@ const syncCollection = (params) => { }, }, }, + fetchOptions }); }; /** remote collection to local */ const smartCollectionSync = async (params) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -9375,6 +9387,7 @@ const smartCollectionSync = async (params) => { syncLevel: 1, syncToken: collection.syncToken, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const objectResponses = result.filter((r) => { var _a; @@ -9395,6 +9408,7 @@ const smartCollectionSync = async (params) => { objectUrls: changedObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _c !== void 0 ? _c : []) : []; const remoteObjects = multiGetObjectResponse.map((res) => { @@ -9439,11 +9453,13 @@ const smartCollectionSync = async (params) => { const { isDirty, newCtag } = await isCollectionDirty({ collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const localObjects = (_j = collection.objects) !== null && _j !== void 0 ? _j : []; const remoteObjects = (_l = (await ((_k = collection.fetchObjects) === null || _k === void 0 ? void 0 : _k.call(collection, { collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _l !== void 0 ? _l : []; // no existing url const created = remoteObjects.filter((ro) => localObjects.every((lo) => !urlContains(lo.url, ro.url))); @@ -9496,7 +9512,7 @@ var collection = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$3 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -9515,10 +9531,11 @@ const addressBookQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; const addressBookMultiGet = async (params) => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -9530,11 +9547,12 @@ const addressBookMultiGet = async (params) => { }, defaultNamespace: DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const fetchAddressBooks = async (params) => { - const { account, headers, props: customProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -9552,6 +9570,7 @@ const fetchAddressBooks = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('addressbook'); }) @@ -9570,11 +9589,11 @@ const fetchAddressBooks = async (params) => { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), }))); }; const fetchVCards = async (params) => { - const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, } = params; + const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {} } = params; debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { @@ -9590,6 +9609,7 @@ const fetchVCards = async (params) => { props: { [`${DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, })).map((res) => { var _a; return (res.ok ? (_a = res.href) !== null && _a !== void 0 ? _a : '' : ''); })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, addressBook.url).href)) .filter(urlFilter) @@ -9606,6 +9626,7 @@ const fetchVCards = async (params) => { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -9617,6 +9638,7 @@ const fetchVCards = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -9630,7 +9652,7 @@ const fetchVCards = async (params) => { }); }; const createVCard = async (params) => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -9639,10 +9661,11 @@ const createVCard = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -9651,14 +9674,16 @@ const updateVCard = async (params) => { 'content-type': 'text/vcard; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions, }); }; const deleteVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -9676,7 +9701,7 @@ var addressBook = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$2 = getLogger('tsdav:calendar'); const calendarQuery = async (params) => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -9695,10 +9720,11 @@ const calendarQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const calendarMultiGet = async (params) => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -9713,10 +9739,11 @@ const calendarMultiGet = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const makeCalendar = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -9736,10 +9763,11 @@ const makeCalendar = async (params) => { }, }, }, + fetchOptions }); }; const fetchCalendars = async (params) => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -9761,6 +9789,7 @@ const fetchCalendars = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('calendar'); }) @@ -9769,7 +9798,7 @@ const fetchCalendars = async (params) => { // filter out none iCal format calendars. const components = Array.isArray((_a = rc.props) === null || _a === void 0 ? void 0 : _a.supportedCalendarComponentSet.comp) ? (_b = rc.props) === null || _b === void 0 ? void 0 : _b.supportedCalendarComponentSet.comp.map((sc) => sc._attributes.name) - : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name] || []; + : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -9797,11 +9826,12 @@ const fetchCalendars = async (params) => { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -9877,6 +9907,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) // patch up to full url if url is not full .filter(urlFilter) // custom filter function on calendar objects @@ -9910,6 +9941,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -9939,6 +9971,7 @@ const fetchCalendarObjects = async (params) => { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -9952,7 +9985,7 @@ const fetchCalendarObjects = async (params) => { }); }; const createCalendarObject = async (params) => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, data: iCalString, @@ -9961,10 +9994,11 @@ const createCalendarObject = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -9973,14 +10007,16 @@ const updateCalendarObject = async (params) => { 'content-type': 'text/calendar; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions }); }; const deleteCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; /** @@ -9988,7 +10024,7 @@ const deleteCalendarObject = async (params) => { */ const syncCalendars = async (params) => { var _a; - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -9996,6 +10032,7 @@ const syncCalendars = async (params) => { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); @@ -10017,6 +10054,7 @@ const syncCalendars = async (params) => { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; })); @@ -10036,7 +10074,7 @@ const syncCalendars = async (params) => { : [...unchanged, ...created, ...updatedWithObjects]; }; const freeBusyQuery = async (params) => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -10065,6 +10103,7 @@ const freeBusyQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; @@ -10087,7 +10126,7 @@ const debug$1 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; debug$1('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); uri.protocol = (_a = endpoint.protocol) !== null && _a !== void 0 ? _a : 'http'; @@ -10096,6 +10135,7 @@ const serviceDiscovery = async (params) => { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { // http redirect. @@ -10118,7 +10158,7 @@ const serviceDiscovery = async (params) => { }; const fetchPrincipalUrl = async (params) => { var _a, _b, _c, _d, _e; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); @@ -10131,6 +10171,7 @@ const fetchPrincipalUrl = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug$1(`Fetch principal url failed: ${response.statusText}`); @@ -10143,7 +10184,7 @@ const fetchPrincipalUrl = async (params) => { }; const fetchHomeUrl = async (params) => { var _a, _b; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); @@ -10156,6 +10197,7 @@ const fetchHomeUrl = async (params) => { : { [`${DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { @@ -10168,19 +10210,22 @@ const fetchHomeUrl = async (params) => { return result; }; const createAccount = async (params) => { - const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, } = params; + const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, fetchOptions = {}, } = params; const newAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -10188,12 +10233,14 @@ const createAccount = async (params) => { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -10204,6 +10251,7 @@ const createAccount = async (params) => { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -10213,6 +10261,7 @@ const createAccount = async (params) => { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -10409,7 +10458,7 @@ const getBasicAuthHeaders = (credentials) => { authorization: `Basic ${base64Exports.encode(`${credentials.username}:${credentials.password}`)}`, }; }; -const fetchOauthTokens = async (credentials) => { +const fetchOauthTokens = async (credentials, fetchOptions) => { const requireFields = [ 'authorizationCode', 'redirectUrl', @@ -10436,6 +10485,7 @@ const fetchOauthTokens = async (credentials) => { 'content-length': `${param.toString().length}`, 'content-type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -10444,7 +10494,7 @@ const fetchOauthTokens = async (credentials) => { debug(`Fetch Oauth tokens failed: ${await response.text()}`); return {}; }; -const refreshAccessToken = async (credentials) => { +const refreshAccessToken = async (credentials, fetchOptions) => { const requireFields = [ 'refreshToken', 'clientId', @@ -10466,6 +10516,7 @@ const refreshAccessToken = async (credentials) => { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -10474,19 +10525,19 @@ const refreshAccessToken = async (credentials) => { debug(`Refresh access token failed: ${await response.text()}`); return {}; }; -const getOauthHeaders = async (credentials) => { +const getOauthHeaders = async (credentials, fetchOptions) => { var _a; debug('Fetching oauth headers'); let tokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ((credentials.refreshToken && !credentials.accessToken) || Date.now() > ((_a = credentials.expiration) !== null && _a !== void 0 ? _a : 0)) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`); @@ -10649,12 +10700,13 @@ const createDAVClient = async (params) => { }; class DAVClient { constructor(params) { - var _a, _b; + var _a, _b, _c; this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = (_a = params.authMethod) !== null && _a !== void 0 ? _a : 'Basic'; this.accountType = (_b = params.defaultAccountType) !== null && _b !== void 0 ? _b : 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = (_c = params.fetchOptions) !== null && _c !== void 0 ? _c : {}; } async login() { var _a; @@ -10663,7 +10715,7 @@ class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -10684,6 +10736,7 @@ class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -10699,103 +10752,116 @@ class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } async createObject(...params) { return defaultParam(createObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params) { - return defaultParam(updateObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(updateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async deleteObject(...params) { - return defaultParam(deleteObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(deleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async propfind(...params) { - return defaultParam(propfind, { headers: this.authHeaders })(params[0]); + return defaultParam(propfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0) { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return createAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : this.fetchOptions, }); } async collectionQuery(...params) { - return defaultParam(collectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(collectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params) { - return defaultParam(makeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params) { - return defaultParam(syncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(syncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params) { - return defaultParam(supportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(supportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params) { - return defaultParam(isCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(isCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(...params) { return defaultParam(smartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, })(params[0]); } async calendarQuery(...params) { - return defaultParam(calendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params) { - return defaultParam(makeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet(...params) { - return defaultParam(calendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params) { - return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchCalendarObjects(...params) { - return defaultParam(fetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject(...params) { - return defaultParam(createCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(createCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject(...params) { - return defaultParam(updateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(updateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject(...params) { - return defaultParam(deleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params) { return defaultParam(syncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions })(params[0]); } async addressBookQuery(...params) { - return defaultParam(addressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet(...params) { - return defaultParam(addressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks(...params) { - return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchVCards(...params) { - return defaultParam(fetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params) { - return defaultParam(createVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(createVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params) { - return defaultParam(updateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(updateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params) { - return defaultParam(deleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/dist/tsdav.min.cjs b/dist/tsdav.min.cjs index 22402ba..497f8e3 100644 --- a/dist/tsdav.min.cjs +++ b/dist/tsdav.min.cjs @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("cross-fetch"),r=require("debug"),a=require("xml-js"),s=require("base-64");exports.DAVNamespace=void 0,(e=exports.DAVNamespace||(exports.DAVNamespace={})).CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:";const o={[exports.DAVNamespace.CALDAV]:"xmlns:c",[exports.DAVNamespace.CARDDAV]:"xmlns:card",[exports.DAVNamespace.CALENDAR_SERVER]:"xmlns:cs",[exports.DAVNamespace.CALDAV_APPLE]:"xmlns:ca",[exports.DAVNamespace.DAV]:"xmlns:d"};var n,d;exports.DAVNamespaceShort=void 0,(n=exports.DAVNamespaceShort||(exports.DAVNamespaceShort={})).CALDAV="c",n.CARDDAV="card",n.CALENDAR_SERVER="cs",n.CALDAV_APPLE="ca",n.DAV="d",function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(d||(d={}));const c=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},i=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},u=e=>e.reduce(((e,t)=>({...e,[o[t]]:t})),{}),p=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),h=(e,t)=>t?{[e]:t}:{},m=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var A=Object.freeze({__proto__:null,cleanupFalsy:p,conditionalParam:h,excludeHeaders:m,getDAVAttribute:u,urlContains:i,urlEquals:l});const v=r("tsdav:request"),D=async e=>{var r;const{url:s,init:o,convertIncoming:n=!0,parseOutgoing:d=!0}=e,{headers:l={},body:i,namespace:u,method:h,attributes:m}=o,A=n?a.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...i,_attributes:m},{compact:!0,spaces:2,elementNameFn:e=>u&&!/^.+:.+/.test(e)?`${u}:${e}`:e}):i,D=await t.fetch(s,{headers:{"Content-Type":"text/xml;charset=UTF-8",...p(l)},body:A,method:h}),y=await D.text();if(!D.ok||!(null===(r=D.headers.get("content-type"))||void 0===r?void 0:r.includes("xml"))||!d)return[{href:D.url,ok:D.ok,status:D.status,statusText:D.statusText,raw:y}];const f=a.xml2js(y,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=c(e)}else r[s]=c(e)}catch(e){v(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(f.multistatus.response)?f.multistatus.response:[f.multistatus.response]).map((e=>{var t,r;if(!e)return{status:D.status,statusText:D.statusText,ok:D.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:f,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):D.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:D.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},y=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o}=e;return D({url:t,init:{method:"PROPFIND",headers:m(p({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{propfind:{_attributes:u([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),prop:r}}}})},f=async e=>{const{url:r,data:a,headers:s,headersToExclude:o}=e;return t.fetch(r,{method:"PUT",body:a,headers:m(s,o)})},V=async e=>{const{url:r,data:a,etag:s,headers:o,headersToExclude:n}=e;return t.fetch(r,{method:"PUT",body:a,headers:m(p({"If-Match":s,...o}),n)})},x=async e=>{const{url:r,headers:a,etag:s,headersToExclude:o}=e;return t.fetch(r,{method:"DELETE",headers:m(p({"If-Match":s,...a}),o)})};var C=Object.freeze({__proto__:null,createObject:f,davRequest:D,deleteObject:x,propfind:y,updateObject:V});function g(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const b=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),w=r("tsdav:collection"),S=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=exports.DAVNamespaceShort.DAV,headers:o,headersToExclude:n}=e,d=await D({url:t,init:{method:"REPORT",headers:m(p({depth:a,...o}),n),namespace:s,body:r}});return 1!==d.length||d[0].raw?d:[]},N=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o}=e;return D({url:t,init:{method:"MKCOL",headers:m(p({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0}})},$=async e=>{var t,r,a,s,o;const{collection:n,headers:d,headersToExclude:c}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await y({url:n.url,props:{[`${exports.DAVNamespaceShort.DAV}:supported-report-set`]:{}},depth:"0",headers:m(d,c)}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map((e=>Object.keys(e.report)[0])))&&void 0!==o?o:[]},E=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:n}=e,d=(await y({url:s.url,props:{[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:m(o,n)})).filter((e=>i(s.url,e.href)))[0];if(!d)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=d.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=d.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},k=e=>{const{url:t,props:r,headers:a,syncLevel:s,syncToken:o,headersToExclude:n}=e;return D({url:t,init:{method:"REPORT",namespace:exports.DAVNamespaceShort.DAV,headers:m({...a},n),body:{"sync-collection":{_attributes:u([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),"sync-level":s,"sync-token":o,[`${exports.DAVNamespaceShort.DAV}:prop`]:r}}}})},T=async e=>{var t,r,a,s,o,n,d,c,l,u,p;const{collection:h,method:A,headers:v,headersToExclude:D,account:y,detailedResult:f}=e,V=["accountType","homeUrl"];if(!y||!g(y,V)){if(!y)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${b(y,V)} before smartCollectionSync`)}const x=null!=A?A:(null===(t=h.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(w(`smart collection sync with type ${y.accountType} and method ${x}`),"webdav"===x){const e=await k({url:h.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===y.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{}},syncLevel:1,syncToken:h.syncToken,headers:m(v,D)}),t=e.filter((e=>{var t;const r="caldav"===y.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),l=t.filter((e=>404!==e.status)).map((e=>e.href)),u=t.filter((e=>404===e.status)).map((e=>e.href)),p=(l.length&&null!==(a=await(null===(r=null==h?void 0:h.objectMultiGet)||void 0===r?void 0:r.call(h,{url:h.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===y.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:l,depth:"1",headers:m(v,D)})))&&void 0!==a?a:[]).map((e=>{var t,r,a,s,o,n,d,c,l,i;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==y?void 0:y.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(n=e.props)||void 0===n?void 0:n.calendarData:null!==(l=null===(c=null===(d=e.props)||void 0===d?void 0:d.addressData)||void 0===c?void 0:c._cdata)&&void 0!==l?l:null===(i=e.props)||void 0===i?void 0:i.addressData}})),A=null!==(s=h.objects)&&void 0!==s?s:[],V=p.filter((e=>A.every((t=>!i(t.url,e.url))))),x=A.reduce(((e,t)=>{const r=p.find((e=>i(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),C=u.map((e=>({url:e,etag:""}))),g=A.filter((e=>p.some((t=>i(e.url,t.url)&&t.etag===e.etag))));return{...h,objects:f?{created:V,updated:x,deleted:C}:[...g,...V,...x],syncToken:null!==(c=null===(d=null===(n=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===n?void 0:n.multistatus)||void 0===d?void 0:d.syncToken)&&void 0!==c?c:h.syncToken}}if("basic"===x){const{isDirty:e,newCtag:t}=await E({collection:h,headers:m(v,D)}),r=null!==(l=h.objects)&&void 0!==l?l:[],a=null!==(p=await(null===(u=h.fetchObjects)||void 0===u?void 0:u.call(h,{collection:h,headers:m(v,D)})))&&void 0!==p?p:[],s=a.filter((e=>r.every((t=>!i(t.url,e.url))))),o=r.reduce(((e,t)=>{const r=a.find((e=>i(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),n=r.filter((e=>a.every((t=>!i(t.url,e.url))))),d=r.filter((e=>a.some((t=>i(e.url,t.url)&&t.etag===e.etag))));if(e)return{...h,objects:f?{created:s,updated:o,deleted:n}:[...d,...s,...o],ctag:t}}return f?{...h,objects:{created:[],updated:[],deleted:[]}}:h};var O=Object.freeze({__proto__:null,collectionQuery:S,isCollectionDirty:E,makeCollection:N,smartCollectionSync:T,supportedReportSet:$,syncCollection:k});const _=r("tsdav:addressBook"),R=async e=>{const{url:t,props:r,filters:a,depth:s,headers:o,headersToExclude:n}=e;return S({url:t,body:{"addressbook-query":{_attributes:u([exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:m(o,n)})},j=async e=>{const{url:t,props:r,objectUrls:a,depth:s,headers:o}=e;return S({url:t,body:{"addressbook-multiget":{_attributes:u([exports.DAVNamespace.DAV,exports.DAVNamespace.CARDDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a}},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:o})},U=async e=>{const{account:t,headers:r,props:a,headersToExclude:s}=null!=e?e:{},o=["homeUrl","rootUrl"];if(!t||!g(t,o)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${b(t,o)} before fetchAddressBooks`)}const n=await y({url:t.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:m(r,s)});return Promise.all(n.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,a,s,o,n,d,c,l,i;const u=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return _(`Found address book named ${"string"==typeof u?u:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(d=t.rootUrl)&&void 0!==d?d:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,displayName:"string"==typeof u?u:"",resourcetype:Object.keys(null===(l=e.props)||void 0===l?void 0:l.resourcetype),syncToken:null===(i=e.props)||void 0===i?void 0:i.syncToken}})).map((async e=>({...e,reports:await $({collection:e,headers:r})}))))},L=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:n=!0}=e;_(`Fetching vcards from ${null==t?void 0:t.url}`);const d=["url"];if(!t||!g(t,d)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${b(t,d)} before fetchVCards`)}const c=(null!=a?a:(await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{}},depth:"1",headers:m(r,s)})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(o).map((e=>new URL(e).pathname));let l=[];return c.length>0&&(l=n?await j({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},objectUrls:c,depth:"1",headers:m(r,s)}):await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},depth:"1",headers:m(r,s)})),l.map((e=>{var r,a,s,o,n,d;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(d=e.props)||void 0===d?void 0:d.addressData}}))},H=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o}=e;return f({url:new URL(a,t.url).href,data:r,headers:m({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o)})},P=async e=>{const{vCard:t,headers:r,headersToExclude:a}=e;return V({url:t.url,data:t.data,etag:t.etag,headers:m({"content-type":"text/vcard; charset=utf-8",...r},a)})},B=async e=>{const{vCard:t,headers:r,headersToExclude:a}=e;return x({url:t.url,etag:t.etag,headers:m(r,a)})};var M=Object.freeze({__proto__:null,addressBookMultiGet:j,addressBookQuery:R,createVCard:H,deleteVCard:B,fetchAddressBooks:U,fetchVCards:L,updateVCard:P});const I=r("tsdav:calendar"),F=async e=>{const{url:t,props:r,filters:a,timezone:s,depth:o,headers:n,headersToExclude:d}=e;return S({url:t,body:{"calendar-query":p({_attributes:u([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:a,timezone:s})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:o,headers:m(n,d)})},z=async e=>{const{url:t,props:r,objectUrls:a,filters:s,timezone:o,depth:n,headers:d,headersToExclude:c}=e;return S({url:t,body:{"calendar-multiget":{_attributes:u([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a,...h("filter",s),timezone:o}},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:n,headers:m(d,c)})},Z=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o}=e;return D({url:t,init:{method:"MKCALENDAR",headers:m(p({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{[`${exports.DAVNamespaceShort.CALDAV}:mkcalendar`]:{_attributes:u([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE]),set:{prop:r}}}}})},q=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o}=null!=e?e:{},n=["homeUrl","rootUrl"];if(!r||!g(r,n)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${b(r,n)} before fetchCalendars`)}const c=await y({url:r.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-description`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-timezone`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALDAV_APPLE}:calendar-color`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.CALDAV}:supported-calendar-component-set`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:m(t,o)});return Promise.all(c.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,a,s;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(s=null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp)||void 0===s?void 0:s._attributes.name]||[]).some((e=>Object.values(d).includes(e)))})).map((e=>{var t,a,o,n,d,c,l,i,u,p,m,A,v,D,y,f;const V=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,x=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof V?V:"",timezone:"string"==typeof x?x:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(n=r.rootUrl)&&void 0!==n?n:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,calendarColor:null===(c=e.props)||void 0===c?void 0:c.calendarColor,displayName:null!==(i=null===(l=e.props)||void 0===l?void 0:l.displayname._cdata)&&void 0!==i?i:null===(u=e.props)||void 0===u?void 0:u.displayname,components:Array.isArray(null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)?null===(m=e.props)||void 0===m?void 0:m.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(v=null===(A=e.props)||void 0===A?void 0:A.supportedCalendarComponentSet.comp)||void 0===v?void 0:v._attributes.name],resourcetype:Object.keys(null===(D=e.props)||void 0===D?void 0:D.resourcetype),syncToken:null===(y=e.props)||void 0===y?void 0:y.syncToken,...h("projectedProps",Object.fromEntries(Object.entries(null!==(f=e.props)&&void 0!==f?f:{}).filter((([e])=>null==s?void 0:s[e]))))}})).map((async e=>({...e,reports:await $({collection:e,headers:m(t,o)})}))))},Q=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:n,urlFilter:d=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:c=!0,headersToExclude:l}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}I(`Fetching calendar objects from ${null==t?void 0:t.url}`);const i=["url"];if(!t||!g(t,i)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${b(t,i)} before fetchCalendarObjects`)}const u=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],p=(null!=r?r:(await F({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:u,depth:"1",headers:m(o,l)})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(d).map((e=>new URL(e).pathname));let h=[];return p.length>0&&(h=!c||n?await F({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:u,depth:"1",headers:m(o,l)}):await z({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:p,depth:"1",headers:m(o,l)})),h.map((e=>{var r,a,s,o,n,d;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(d=e.props)||void 0===d?void 0:d.calendarData}}))},G=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o}=e;return f({url:new URL(a,t.url).href,data:r,headers:m({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o)})},J=async e=>{const{calendarObject:t,headers:r,headersToExclude:a}=e;return V({url:t.url,data:t.data,etag:t.etag,headers:m({"content-type":"text/calendar; charset=utf-8",...r},a)})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a}=e;return x({url:t.url,etag:t.etag,headers:m(r,a)})},W=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:n}=e;if(!a)throw new Error("Must have account before syncCalendars");const d=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],c=await q({account:a,headers:m(o,n)}),l=c.filter((e=>d.every((t=>!i(t.url,e.url)))));I(`new calendars: ${l.map((e=>e.displayName))}`);const u=d.reduce(((e,t)=>{const r=c.find((e=>i(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);I(`updated calendars: ${u.map((e=>e.displayName))}`);const p=await Promise.all(u.map((async e=>await T({collection:{...e,objectMultiGet:z},method:"webdav",headers:m(o,n),account:a})))),h=d.filter((e=>c.every((t=>!i(t.url,e.url)))));I(`deleted calendars: ${h.map((e=>e.displayName))}`);const A=d.filter((e=>c.some((t=>i(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return s?{created:l,updated:u,deleted:h}:[...A,...l,...p]},Y=async e=>{const{url:t,timeRange:r,depth:a,headers:s,headersToExclude:o}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await S({url:t,body:{"free-busy-query":p({_attributes:u([exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:a,headers:m(s,o)}))[0]};var X=Object.freeze({__proto__:null,calendarMultiGet:z,calendarQuery:F,createCalendarObject:G,deleteCalendarObject:K,fetchCalendarObjects:Q,fetchCalendars:q,freeBusyQuery:Y,makeCalendar:Z,syncCalendars:W,updateCalendarObject:J});const ee=r("tsdav:account"),te=async e=>{var r,a;ee("Service discovery...");const{account:s,headers:o,headersToExclude:n}=e,d=new URL(s.serverUrl),c=new URL(`/.well-known/${s.accountType}`,d);c.protocol=null!==(r=d.protocol)&&void 0!==r?r:"http";try{const e=await t.fetch(c.href,{headers:m(o,n),method:"PROPFIND",redirect:"manual"});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){ee(`Service discovery redirected to ${t}`);const e=new URL(t,d);return e.hostname===c.hostname&&c.port&&!e.port&&(e.port=c.port),e.protocol=null!==(a=d.protocol)&&void 0!==a?a:"http",e.href}}}catch(e){ee(`Service discovery failed: ${e.stack}`)}return d.href},re=async e=>{var t,r,a,s,o;const{account:n,headers:d,headersToExclude:c}=e,l=["rootUrl"];if(!g(n,l))throw new Error(`account must have ${b(n,l)} before fetchPrincipalUrl`);ee(`Fetching principal url from path ${n.rootUrl}`);const[i]=await y({url:n.rootUrl,props:{[`${exports.DAVNamespaceShort.DAV}:current-user-principal`]:{}},depth:"0",headers:m(d,c)});if(!i.ok&&(ee(`Fetch principal url failed: ${i.statusText}`),401===i.status))throw new Error("Invalid credentials");return ee(`Fetched principal url ${null===(r=null===(t=i.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=i.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",n.rootUrl).href},ae=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o}=e,n=["principalUrl","rootUrl"];if(!g(a,n))throw new Error(`account must have ${b(a,n)} before fetchHomeUrl`);ee(`Fetch home url from ${a.principalUrl}`);const d=(await y({url:a.principalUrl,props:"caldav"===a.accountType?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-home-set`]:{}}:{[`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:m(s,o)})).find((e=>i(a.principalUrl,e.href)));if(!d||!d.ok)throw new Error("cannot find homeUrl");const c=new URL("caldav"===a.accountType?null===(t=null==d?void 0:d.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==d?void 0:d.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return ee(`Fetched home url ${c}`),c},se=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o}=e,n={...t};return n.rootUrl=await te({account:t,headers:m(r,o)}),n.principalUrl=await re({account:n,headers:m(r,o)}),n.homeUrl=await ae({account:n,headers:m(r,o)}),(a||s)&&("caldav"===t.accountType?n.calendars=await q({headers:m(r,o),account:n}):"carddav"===t.accountType&&(n.addressBooks=await U({headers:m(r,o),account:n}))),s&&("caldav"===t.accountType&&n.calendars?n.calendars=await Promise.all(n.calendars.map((async e=>({...e,objects:await Q({calendar:e,headers:m(r,o)})})))):"carddav"===t.accountType&&n.addressBooks&&(n.addressBooks=await Promise.all(n.addressBooks.map((async e=>({...e,objects:await L({addressBook:e,headers:m(r,o)})})))))),n};var oe=Object.freeze({__proto__:null,createAccount:se,fetchHomeUrl:ae,fetchPrincipalUrl:re,serviceDiscovery:te});const ne=r("tsdav:authHelper"),de=(e,t)=>(...r)=>e({...t,...r[0]}),ce=e=>(ne(`Basic auth token generated: ${s.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${s.encode(`${e.username}:${e.password}`)}`}),le=async e=>{const r=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!g(e,r))throw new Error(`Oauth credentials missing: ${b(e,r)}`);const a=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ne(e.tokenUrl),ne(a.toString());const s=await t.fetch(e.tokenUrl,{method:"POST",body:a.toString(),headers:{"content-length":`${a.toString().length}`,"content-type":"application/x-www-form-urlencoded"}});if(s.ok){return await s.json()}return ne(`Fetch Oauth tokens failed: ${await s.text()}`),{}},ie=async e=>{const r=["refreshToken","clientId","clientSecret","tokenUrl"];if(!g(e,r))throw new Error(`Oauth credentials missing: ${b(e,r)}`);const a=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),s=await t.fetch(e.tokenUrl,{method:"POST",body:a.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(s.ok){return await s.json()}return ne(`Refresh access token failed: ${await s.text()}`),{}},ue=async e=>{var t;ne("Fetching oauth headers");let r={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(t=e.expiration)&&void 0!==t?t:0))&&(r=await ie(e)):r=await le(e),ne(`Oauth tokens fetched: ${r.access_token}`),{tokens:r,headers:{authorization:`Bearer ${r.access_token}`}}};var pe=Object.freeze({__proto__:null,defaultParam:de,fetchOauthTokens:le,getBasicAuthHeaders:ce,getOauthHeaders:ue,refreshAccessToken:ie});const he=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:n}=e;let d={};switch(s){case"Basic":d=ce(a);break;case"Oauth":d=(await ue(a)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==n?void 0:n(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const c=o?await se({account:{serverUrl:r,credentials:a,accountType:o},headers:d}):void 0,l=de(f,{url:r,headers:d}),i=de(V,{headers:d,url:r}),u=de(x,{headers:d,url:r}),p=de(y,{headers:d}),h=de(S,{headers:d}),m=de(N,{headers:d}),A=de(k,{headers:d}),v=de($,{headers:d}),C=de(E,{headers:d}),g=de(T,{headers:d,account:c}),b=de(F,{headers:d}),w=de(z,{headers:d}),O=de(Z,{headers:d}),_=de(q,{headers:d,account:c}),M=de(Q,{headers:d}),I=de(G,{headers:d}),Y=de(J,{headers:d}),X=de(K,{headers:d}),ee=de(W,{account:c,headers:d}),te=de(R,{headers:d}),re=de(j,{headers:d});return{davRequest:async e=>{const{init:t,...r}=e,{headers:a,...s}=t;return D({...r,init:{...s,headers:{...d,...a}}})},propfind:p,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:n}=e;return se({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:o,loadObjects:n})},createObject:l,updateObject:i,deleteObject:u,calendarQuery:b,addressBookQuery:te,collectionQuery:h,makeCollection:m,calendarMultiGet:w,makeCalendar:O,syncCollection:A,supportedReportSet:v,isCollectionDirty:C,smartCollectionSync:g,fetchCalendars:_,fetchCalendarObjects:M,createCalendarObject:I,updateCalendarObject:Y,deleteCalendarObject:X,syncCalendars:ee,fetchAddressBooks:de(U,{account:c,headers:d}),addressBookMultiGet:re,fetchVCards:de(L,{headers:d}),createVCard:de(H,{headers:d}),updateVCard:de(P,{headers:d}),deleteVCard:de(B,{headers:d})}};class me{constructor(e){var t,r;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=ce(this.credentials);break;case"Oauth":this.authHeaders=(await ue(this.credentials)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await se({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:a,...s}=t;return D({...r,init:{...s,headers:{...this.authHeaders,...a}}})}async createObject(...e){return de(f,{url:this.serverUrl,headers:this.authHeaders})(e[0])}async updateObject(...e){return de(V,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async deleteObject(...e){return de(x,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async propfind(...e){return de(y,{headers:this.authHeaders})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s}=e;return se({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s})}async collectionQuery(...e){return de(S,{headers:this.authHeaders})(e[0])}async makeCollection(...e){return de(N,{headers:this.authHeaders})(e[0])}async syncCollection(...e){return de(k,{headers:this.authHeaders})(e[0])}async supportedReportSet(...e){return de($,{headers:this.authHeaders})(e[0])}async isCollectionDirty(...e){return de(E,{headers:this.authHeaders})(e[0])}async smartCollectionSync(...e){return de(T,{headers:this.authHeaders,account:this.account})(e[0])}async calendarQuery(...e){return de(F,{headers:this.authHeaders})(e[0])}async makeCalendar(...e){return de(Z,{headers:this.authHeaders})(e[0])}async calendarMultiGet(...e){return de(z,{headers:this.authHeaders})(e[0])}async fetchCalendars(...e){return de(q,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return de(Q,{headers:this.authHeaders})(e[0])}async createCalendarObject(...e){return de(G,{headers:this.authHeaders})(e[0])}async updateCalendarObject(...e){return de(J,{headers:this.authHeaders})(e[0])}async deleteCalendarObject(...e){return de(K,{headers:this.authHeaders})(e[0])}async syncCalendars(...e){return de(W,{headers:this.authHeaders,account:this.account})(e[0])}async addressBookQuery(...e){return de(R,{headers:this.authHeaders})(e[0])}async addressBookMultiGet(...e){return de(j,{headers:this.authHeaders})(e[0])}async fetchAddressBooks(...e){return de(U,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchVCards(...e){return de(L,{headers:this.authHeaders})(e[0])}async createVCard(...e){return de(H,{headers:this.authHeaders})(e[0])}async updateVCard(...e){return de(P,{headers:this.authHeaders})(e[0])}async deleteVCard(...e){return de(B,{headers:this.authHeaders})(e[0])}}var Ae=Object.freeze({__proto__:null,DAVClient:me,createDAVClient:he}),ve={DAVNamespace:exports.DAVNamespace,DAVNamespaceShort:exports.DAVNamespaceShort,DAVAttributeMap:o,...Ae,...C,...O,...oe,...M,...X,...pe,...A};exports.DAVAttributeMap=o,exports.DAVClient=me,exports.addressBookQuery=R,exports.calendarMultiGet=z,exports.calendarQuery=F,exports.cleanupFalsy=p,exports.collectionQuery=S,exports.createAccount=se,exports.createCalendarObject=G,exports.createDAVClient=he,exports.createObject=f,exports.createVCard=H,exports.davRequest=D,exports.default=ve,exports.deleteCalendarObject=K,exports.deleteObject=x,exports.deleteVCard=B,exports.fetchAddressBooks=U,exports.fetchCalendarObjects=Q,exports.fetchCalendars=q,exports.fetchOauthTokens=le,exports.fetchVCards=L,exports.freeBusyQuery=Y,exports.getBasicAuthHeaders=ce,exports.getDAVAttribute=u,exports.getOauthHeaders=ue,exports.isCollectionDirty=E,exports.makeCalendar=Z,exports.propfind=y,exports.refreshAccessToken=ie,exports.smartCollectionSync=T,exports.supportedReportSet=$,exports.syncCalendars=W,exports.syncCollection=k,exports.updateCalendarObject=J,exports.updateObject=V,exports.updateVCard=P,exports.urlContains=i,exports.urlEquals=l; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("cross-fetch"),r=require("debug"),a=require("xml-js"),s=require("base-64");exports.DAVNamespace=void 0,(e=exports.DAVNamespace||(exports.DAVNamespace={})).CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:";const o={[exports.DAVNamespace.CALDAV]:"xmlns:c",[exports.DAVNamespace.CARDDAV]:"xmlns:card",[exports.DAVNamespace.CALENDAR_SERVER]:"xmlns:cs",[exports.DAVNamespace.CALDAV_APPLE]:"xmlns:ca",[exports.DAVNamespace.DAV]:"xmlns:d"};var n,c;exports.DAVNamespaceShort=void 0,(n=exports.DAVNamespaceShort||(exports.DAVNamespaceShort={})).CALDAV="c",n.CARDDAV="card",n.CALENDAR_SERVER="cs",n.CALDAV_APPLE="ca",n.DAV="d",function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(c||(c={}));const d=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},i=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},p=e=>e.reduce(((e,t)=>({...e,[o[t]]:t})),{}),h=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),u=(e,t)=>t?{[e]:t}:{},f=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var m=Object.freeze({__proto__:null,cleanupFalsy:h,conditionalParam:u,excludeHeaders:f,getDAVAttribute:p,urlContains:l,urlEquals:i});const A=r("tsdav:request"),v=async e=>{var r;const{url:s,init:o,convertIncoming:n=!0,parseOutgoing:c=!0,fetchOptions:i={}}=e,{headers:l={},body:p,namespace:u,method:f,attributes:m}=o,v=n?a.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...p,_attributes:m},{compact:!0,spaces:2,elementNameFn:e=>u&&!/^.+:.+/.test(e)?`${u}:${e}`:e}):p,D=await t.fetch(s,{headers:{"Content-Type":"text/xml;charset=UTF-8",...h(l)},body:v,method:f,...i}),y=await D.text();if(!D.ok||!(null===(r=D.headers.get("content-type"))||void 0===r?void 0:r.includes("xml"))||!c)return[{href:D.url,ok:D.ok,status:D.status,statusText:D.statusText,raw:y}];const O=a.xml2js(y,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=d(e)}else r[s]=d(e)}catch(e){A(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(O.multistatus.response)?O.multistatus.response:[O.multistatus.response]).map((e=>{var t,r;if(!e)return{status:D.status,statusText:D.statusText,ok:D.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:O,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):D.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:D.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},D=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return v({url:t,init:{method:"PROPFIND",headers:f(h({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{propfind:{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),prop:r}}},fetchOptions:n})},y=async e=>{const{url:r,data:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return t.fetch(r,{method:"PUT",body:a,headers:f(s,o),...n})},O=async e=>{const{url:r,data:a,etag:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e;return t.fetch(r,{method:"PUT",body:a,headers:f(h({"If-Match":s,...o}),n),...c})},V=async e=>{const{url:r,headers:a,etag:s,headersToExclude:o,fetchOptions:n={}}=e;return t.fetch(r,{method:"DELETE",headers:f(h({"If-Match":s,...a}),o),...n})};var x=Object.freeze({__proto__:null,createObject:y,davRequest:v,deleteObject:V,propfind:D,updateObject:O});function C(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const g=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),b=r("tsdav:collection"),w=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=exports.DAVNamespaceShort.DAV,headers:o,headersToExclude:n,fetchOptions:c={}}=e,d=await v({url:t,init:{method:"REPORT",headers:f(h({depth:a,...o}),n),namespace:s,body:r},fetchOptions:c});return 1!==d.length||d[0].raw?d:[]},S=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return v({url:t,init:{method:"MKCOL",headers:f(h({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:n})},N=async e=>{var t,r,a,s,o;const{collection:n,headers:c,headersToExclude:d,fetchOptions:i={}}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await D({url:n.url,props:{[`${exports.DAVNamespaceShort.DAV}:supported-report-set`]:{}},depth:"0",headers:f(c,d),fetchOptions:i}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map((e=>Object.keys(e.report)[0])))&&void 0!==o?o:[]},$=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e,d=(await D({url:s.url,props:{[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:f(o,n),fetchOptions:c})).filter((e=>l(s.url,e.href)))[0];if(!d)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=d.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=d.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},E=e=>{const{url:t,props:r,headers:a,syncLevel:s,syncToken:o,headersToExclude:n,fetchOptions:c}=e;return v({url:t,init:{method:"REPORT",namespace:exports.DAVNamespaceShort.DAV,headers:f({...a},n),body:{"sync-collection":{_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),"sync-level":s,"sync-token":o,[`${exports.DAVNamespaceShort.DAV}:prop`]:r}}},fetchOptions:c})},T=async e=>{var t,r,a,s,o,n,c,d,i,p,h;const{collection:u,method:m,headers:A,headersToExclude:v,account:D,detailedResult:y,fetchOptions:O={}}=e,V=["accountType","homeUrl"];if(!D||!C(D,V)){if(!D)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${g(D,V)} before smartCollectionSync`)}const x=null!=m?m:(null===(t=u.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(b(`smart collection sync with type ${D.accountType} and method ${x}`),"webdav"===x){const e=await E({url:u.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===D.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===D.accountType?"calendar-data":"address-data"}`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{}},syncLevel:1,syncToken:u.syncToken,headers:f(A,v),fetchOptions:O}),t=e.filter((e=>{var t;const r="caldav"===D.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),i=t.filter((e=>404!==e.status)).map((e=>e.href)),p=t.filter((e=>404===e.status)).map((e=>e.href)),h=(i.length&&null!==(a=await(null===(r=null==u?void 0:u.objectMultiGet)||void 0===r?void 0:r.call(u,{url:u.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${"caldav"===D.accountType?exports.DAVNamespaceShort.CALDAV:exports.DAVNamespaceShort.CARDDAV}:${"caldav"===D.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:i,depth:"1",headers:f(A,v),fetchOptions:O})))&&void 0!==a?a:[]).map((e=>{var t,r,a,s,o,n,c,d,i,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==D?void 0:D.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(n=e.props)||void 0===n?void 0:n.calendarData:null!==(i=null===(d=null===(c=e.props)||void 0===c?void 0:c.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(l=e.props)||void 0===l?void 0:l.addressData}})),m=null!==(s=u.objects)&&void 0!==s?s:[],V=h.filter((e=>m.every((t=>!l(t.url,e.url))))),x=m.reduce(((e,t)=>{const r=h.find((e=>l(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),C=p.map((e=>({url:e,etag:""}))),g=m.filter((e=>h.some((t=>l(e.url,t.url)&&t.etag===e.etag))));return{...u,objects:y?{created:V,updated:x,deleted:C}:[...g,...V,...x],syncToken:null!==(d=null===(c=null===(n=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===n?void 0:n.multistatus)||void 0===c?void 0:c.syncToken)&&void 0!==d?d:u.syncToken}}if("basic"===x){const{isDirty:e,newCtag:t}=await $({collection:u,headers:f(A,v),fetchOptions:O}),r=null!==(i=u.objects)&&void 0!==i?i:[],a=null!==(h=await(null===(p=u.fetchObjects)||void 0===p?void 0:p.call(u,{collection:u,headers:f(A,v),fetchOptions:O})))&&void 0!==h?h:[],s=a.filter((e=>r.every((t=>!l(t.url,e.url))))),o=r.reduce(((e,t)=>{const r=a.find((e=>l(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),n=r.filter((e=>a.every((t=>!l(t.url,e.url))))),c=r.filter((e=>a.some((t=>l(e.url,t.url)&&t.etag===e.etag))));if(e)return{...u,objects:y?{created:s,updated:o,deleted:n}:[...c,...s,...o],ctag:t}}return y?{...u,objects:{created:[],updated:[],deleted:[]}}:u};var k=Object.freeze({__proto__:null,collectionQuery:w,isCollectionDirty:$,makeCollection:S,smartCollectionSync:T,supportedReportSet:N,syncCollection:E});const _=r("tsdav:addressBook"),R=async e=>{const{url:t,props:r,filters:a,depth:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e;return w({url:t,body:{"addressbook-query":{_attributes:p([exports.DAVNamespace.CARDDAV,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:f(o,n),fetchOptions:c})},j=async e=>{const{url:t,props:r,objectUrls:a,depth:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e;return w({url:t,body:{"addressbook-multiget":{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CARDDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a}},defaultNamespace:exports.DAVNamespaceShort.CARDDAV,depth:s,headers:f(o,n),fetchOptions:c})},U=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:o={}}=null!=e?e:{},n=["homeUrl","rootUrl"];if(!t||!C(t,n)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${g(t,n)} before fetchAddressBooks`)}const c=await D({url:t.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:f(r,s),fetchOptions:o});return Promise.all(c.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,a,s,o,n,c,d,i,l;const p=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return _(`Found address book named ${"string"==typeof p?p:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(c=t.rootUrl)&&void 0!==c?c:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof p?p:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}})).map((async e=>({...e,reports:await N({collection:e,headers:f(r,s),fetchOptions:o})}))))},L=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:n=!0,fetchOptions:c={}}=e;_(`Fetching vcards from ${null==t?void 0:t.url}`);const d=["url"];if(!t||!C(t,d)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${g(t,d)} before fetchVCards`)}const i=(null!=a?a:(await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{}},depth:"1",headers:f(r,s),fetchOptions:c})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(o).map((e=>new URL(e).pathname));let l=[];return i.length>0&&(l=n?await j({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},objectUrls:i,depth:"1",headers:f(r,s),fetchOptions:c}):await R({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CARDDAV}:address-data`]:{}},depth:"1",headers:f(r,s),fetchOptions:c})),l.map((e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.addressData}}))},H=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return y({url:new URL(a,t.url).href,data:r,headers:f({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n})},P=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return O({url:t.url,data:t.data,etag:t.etag,headers:f({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s})},B=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return V({url:t.url,etag:t.etag,headers:f(r,a),fetchOptions:s})};var M=Object.freeze({__proto__:null,addressBookMultiGet:j,addressBookQuery:R,createVCard:H,deleteVCard:B,fetchAddressBooks:U,fetchVCards:L,updateVCard:P});const I=r("tsdav:calendar"),F=async e=>{const{url:t,props:r,filters:a,timezone:s,depth:o,headers:n,headersToExclude:c,fetchOptions:d={}}=e;return w({url:t,body:{"calendar-query":h({_attributes:p([exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALENDAR_SERVER,exports.DAVNamespace.CALDAV_APPLE,exports.DAVNamespace.DAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,filter:a,timezone:s})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:o,headers:f(n,c),fetchOptions:d})},z=async e=>{const{url:t,props:r,objectUrls:a,filters:s,timezone:o,depth:n,headers:c,headersToExclude:d,fetchOptions:i={}}=e;return w({url:t,body:{"calendar-multiget":{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.DAV}:prop`]:r,[`${exports.DAVNamespaceShort.DAV}:href`]:a,...u("filter",s),timezone:o}},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:n,headers:f(c,d),fetchOptions:i})},Z=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return v({url:t,init:{method:"MKCALENDAR",headers:f(h({depth:a,...s}),o),namespace:exports.DAVNamespaceShort.DAV,body:{[`${exports.DAVNamespaceShort.CALDAV}:mkcalendar`]:{_attributes:p([exports.DAVNamespace.DAV,exports.DAVNamespace.CALDAV,exports.DAVNamespace.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:n})},q=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o,fetchOptions:n={}}=null!=e?e:{},d=["homeUrl","rootUrl"];if(!r||!C(r,d)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${g(r,d)} before fetchCalendars`)}const i=await D({url:r.homeUrl,props:null!=a?a:{[`${exports.DAVNamespaceShort.CALDAV}:calendar-description`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-timezone`]:{},[`${exports.DAVNamespaceShort.DAV}:displayname`]:{},[`${exports.DAVNamespaceShort.CALDAV_APPLE}:calendar-color`]:{},[`${exports.DAVNamespaceShort.CALENDAR_SERVER}:getctag`]:{},[`${exports.DAVNamespaceShort.DAV}:resourcetype`]:{},[`${exports.DAVNamespaceShort.CALDAV}:supported-calendar-component-set`]:{},[`${exports.DAVNamespaceShort.DAV}:sync-token`]:{}},depth:"1",headers:f(t,o),fetchOptions:n});return Promise.all(i.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,a,s;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(s=null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp)||void 0===s?void 0:s._attributes.name]).some((e=>Object.values(c).includes(e)))})).map((e=>{var t,a,o,n,c,d,i,l,p,h,f,m,A,v,D,y;const O=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,V=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof O?O:"",timezone:"string"==typeof V?V:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(n=r.rootUrl)&&void 0!==n?n:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(l=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==l?l:null===(p=e.props)||void 0===p?void 0:p.displayname,components:Array.isArray(null===(h=e.props)||void 0===h?void 0:h.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(A=null===(m=e.props)||void 0===m?void 0:m.supportedCalendarComponentSet.comp)||void 0===A?void 0:A._attributes.name],resourcetype:Object.keys(null===(v=e.props)||void 0===v?void 0:v.resourcetype),syncToken:null===(D=e.props)||void 0===D?void 0:D.syncToken,...u("projectedProps",Object.fromEntries(Object.entries(null!==(y=e.props)&&void 0!==y?y:{}).filter((([e])=>null==s?void 0:s[e]))))}})).map((async e=>({...e,reports:await N({collection:e,headers:f(t,o),fetchOptions:n})}))))},Q=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:n,urlFilter:c=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:d=!0,headersToExclude:i,fetchOptions:l={}}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}I(`Fetching calendar objects from ${null==t?void 0:t.url}`);const p=["url"];if(!t||!C(t,p)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${g(t,p)} before fetchCalendarObjects`)}const h=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],u=(null!=r?r:(await F({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:h,depth:"1",headers:f(o,i),fetchOptions:l})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(c).map((e=>new URL(e).pathname));let m=[];return u.length>0&&(m=!d||n?await F({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:h,depth:"1",headers:f(o,i),fetchOptions:l}):await z({url:t.url,props:{[`${exports.DAVNamespaceShort.DAV}:getetag`]:{},[`${exports.DAVNamespaceShort.CALDAV}:calendar-data`]:{...n&&s?{[`${exports.DAVNamespaceShort.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:u,depth:"1",headers:f(o,i),fetchOptions:l})),m.map((e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.calendarData}}))},G=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return y({url:new URL(a,t.url).href,data:r,headers:f({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n})},J=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return O({url:t.url,data:t.data,etag:t.etag,headers:f({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return V({url:t.url,etag:t.etag,headers:f(r,a),fetchOptions:s})},W=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e;if(!a)throw new Error("Must have account before syncCalendars");const d=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],i=await q({account:a,headers:f(o,n),fetchOptions:c}),p=i.filter((e=>d.every((t=>!l(t.url,e.url)))));I(`new calendars: ${p.map((e=>e.displayName))}`);const h=d.reduce(((e,t)=>{const r=i.find((e=>l(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);I(`updated calendars: ${h.map((e=>e.displayName))}`);const u=await Promise.all(h.map((async e=>await T({collection:{...e,objectMultiGet:z},method:"webdav",headers:f(o,n),account:a,fetchOptions:c})))),m=d.filter((e=>i.every((t=>!l(t.url,e.url)))));I(`deleted calendars: ${m.map((e=>e.displayName))}`);const A=d.filter((e=>i.some((t=>l(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return s?{created:p,updated:h,deleted:m}:[...A,...p,...u]},Y=async e=>{const{url:t,timeRange:r,depth:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await w({url:t,body:{"free-busy-query":h({_attributes:p([exports.DAVNamespace.CALDAV]),[`${exports.DAVNamespaceShort.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:exports.DAVNamespaceShort.CALDAV,depth:a,headers:f(s,o),fetchOptions:n}))[0]};var X=Object.freeze({__proto__:null,calendarMultiGet:z,calendarQuery:F,createCalendarObject:G,deleteCalendarObject:K,fetchCalendarObjects:Q,fetchCalendars:q,freeBusyQuery:Y,makeCalendar:Z,syncCalendars:W,updateCalendarObject:J});const ee=r("tsdav:account"),te=async e=>{var r,a;ee("Service discovery...");const{account:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e,d=new URL(s.serverUrl),i=new URL(`/.well-known/${s.accountType}`,d);i.protocol=null!==(r=d.protocol)&&void 0!==r?r:"http";try{const e=await t.fetch(i.href,{headers:f(o,n),method:"PROPFIND",redirect:"manual",...c});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){ee(`Service discovery redirected to ${t}`);const e=new URL(t,d);return e.hostname===i.hostname&&i.port&&!e.port&&(e.port=i.port),e.protocol=null!==(a=d.protocol)&&void 0!==a?a:"http",e.href}}}catch(e){ee(`Service discovery failed: ${e.stack}`)}return d.href},re=async e=>{var t,r,a,s,o;const{account:n,headers:c,headersToExclude:d,fetchOptions:i={}}=e,l=["rootUrl"];if(!C(n,l))throw new Error(`account must have ${g(n,l)} before fetchPrincipalUrl`);ee(`Fetching principal url from path ${n.rootUrl}`);const[p]=await D({url:n.rootUrl,props:{[`${exports.DAVNamespaceShort.DAV}:current-user-principal`]:{}},depth:"0",headers:f(c,d),fetchOptions:i});if(!p.ok&&(ee(`Fetch principal url failed: ${p.statusText}`),401===p.status))throw new Error("Invalid credentials");return ee(`Fetched principal url ${null===(r=null===(t=p.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=p.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",n.rootUrl).href},ae=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e,c=["principalUrl","rootUrl"];if(!C(a,c))throw new Error(`account must have ${g(a,c)} before fetchHomeUrl`);ee(`Fetch home url from ${a.principalUrl}`);const d=(await D({url:a.principalUrl,props:"caldav"===a.accountType?{[`${exports.DAVNamespaceShort.CALDAV}:calendar-home-set`]:{}}:{[`${exports.DAVNamespaceShort.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:f(s,o),fetchOptions:n})).find((e=>l(a.principalUrl,e.href)));if(!d||!d.ok)throw new Error("cannot find homeUrl");const i=new URL("caldav"===a.accountType?null===(t=null==d?void 0:d.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==d?void 0:d.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return ee(`Fetched home url ${i}`),i},se=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o,fetchOptions:n={}}=e,c={...t};return c.rootUrl=await te({account:t,headers:f(r,o),fetchOptions:n}),c.principalUrl=await re({account:c,headers:f(r,o),fetchOptions:n}),c.homeUrl=await ae({account:c,headers:f(r,o),fetchOptions:n}),(a||s)&&("caldav"===t.accountType?c.calendars=await q({headers:f(r,o),account:c,fetchOptions:n}):"carddav"===t.accountType&&(c.addressBooks=await U({headers:f(r,o),account:c,fetchOptions:n}))),s&&("caldav"===t.accountType&&c.calendars?c.calendars=await Promise.all(c.calendars.map((async e=>({...e,objects:await Q({calendar:e,headers:f(r,o),fetchOptions:n})})))):"carddav"===t.accountType&&c.addressBooks&&(c.addressBooks=await Promise.all(c.addressBooks.map((async e=>({...e,objects:await L({addressBook:e,headers:f(r,o),fetchOptions:n})})))))),c};var oe=Object.freeze({__proto__:null,createAccount:se,fetchHomeUrl:ae,fetchPrincipalUrl:re,serviceDiscovery:te});const ne=r("tsdav:authHelper"),ce=(e,t)=>(...r)=>e({...t,...r[0]}),de=e=>(ne(`Basic auth token generated: ${s.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${s.encode(`${e.username}:${e.password}`)}`}),ie=async(e,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!C(e,a))throw new Error(`Oauth credentials missing: ${g(e,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ne(e.tokenUrl),ne(s.toString());const o=await t.fetch(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=r?r:{}});if(o.ok){return await o.json()}return ne(`Fetch Oauth tokens failed: ${await o.text()}`),{}},le=async(e,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!C(e,a))throw new Error(`Oauth credentials missing: ${g(e,a)}`);const s=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=await t.fetch(e.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=r?r:{}});if(o.ok){return await o.json()}return ne(`Refresh access token failed: ${await o.text()}`),{}},pe=async(e,t)=>{var r;ne("Fetching oauth headers");let a={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(r=e.expiration)&&void 0!==r?r:0))&&(a=await le(e,t)):a=await ie(e,t),ne(`Oauth tokens fetched: ${a.access_token}`),{tokens:a,headers:{authorization:`Bearer ${a.access_token}`}}};var he=Object.freeze({__proto__:null,defaultParam:ce,fetchOauthTokens:ie,getBasicAuthHeaders:de,getOauthHeaders:pe,refreshAccessToken:le});const ue=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:n}=e;let c={};switch(s){case"Basic":c=de(a);break;case"Oauth":c=(await pe(a)).headers;break;case"Digest":c={Authorization:`Digest ${a.digestString}`};break;case"Custom":c=null!==(t=await(null==n?void 0:n(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const d=o?await se({account:{serverUrl:r,credentials:a,accountType:o},headers:c}):void 0,i=ce(y,{url:r,headers:c}),l=ce(O,{headers:c,url:r}),p=ce(V,{headers:c,url:r}),h=ce(D,{headers:c}),u=ce(w,{headers:c}),f=ce(S,{headers:c}),m=ce(E,{headers:c}),A=ce(N,{headers:c}),x=ce($,{headers:c}),C=ce(T,{headers:c,account:d}),g=ce(F,{headers:c}),b=ce(z,{headers:c}),k=ce(Z,{headers:c}),_=ce(q,{headers:c,account:d}),M=ce(Q,{headers:c}),I=ce(G,{headers:c}),Y=ce(J,{headers:c}),X=ce(K,{headers:c}),ee=ce(W,{account:d,headers:c}),te=ce(R,{headers:c}),re=ce(j,{headers:c});return{davRequest:async e=>{const{init:t,...r}=e,{headers:a,...s}=t;return v({...r,init:{...s,headers:{...c,...a}}})},propfind:h,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:n}=e;return se({account:{serverUrl:r,credentials:a,...t},headers:{...c,...s},loadCollections:o,loadObjects:n})},createObject:i,updateObject:l,deleteObject:p,calendarQuery:g,addressBookQuery:te,collectionQuery:u,makeCollection:f,calendarMultiGet:b,makeCalendar:k,syncCollection:m,supportedReportSet:A,isCollectionDirty:x,smartCollectionSync:C,fetchCalendars:_,fetchCalendarObjects:M,createCalendarObject:I,updateCalendarObject:Y,deleteCalendarObject:X,syncCalendars:ee,fetchAddressBooks:ce(U,{account:d,headers:c}),addressBookMultiGet:re,fetchVCards:ce(L,{headers:c}),createVCard:ce(H,{headers:c}),updateVCard:ce(P,{headers:c}),deleteVCard:ce(B,{headers:c})}};class fe{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{}}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=de(this.credentials);break;case"Oauth":this.authHeaders=(await pe(this.credentials,this.fetchOptions)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await se({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:a,...s}=t;return v({...r,init:{...s,headers:{...this.authHeaders,...a}},fetchOptions:this.fetchOptions})}async createObject(...e){return ce(y,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateObject(...e){return ce(O,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteObject(...e){return ce(V,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async propfind(...e){return ce(D,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:o}=e;return se({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=o?o:this.fetchOptions})}async collectionQuery(...e){return ce(w,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCollection(...e){return ce(S,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCollection(...e){return ce(E,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async supportedReportSet(...e){return ce(N,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async isCollectionDirty(...e){return ce($,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async smartCollectionSync(...e){return ce(T,{headers:this.authHeaders,fetchOptions:this.fetchOptions,account:this.account})(e[0])}async calendarQuery(...e){return ce(F,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCalendar(...e){return ce(Z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async calendarMultiGet(...e){return ce(z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchCalendars(...e){return ce(q,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ce(Q,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createCalendarObject(...e){return ce(G,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateCalendarObject(...e){return ce(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteCalendarObject(...e){return ce(K,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCalendars(...e){return ce(W,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(e[0])}async addressBookQuery(...e){return ce(R,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async addressBookMultiGet(...e){return ce(j,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return ce(U,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchVCards(...e){return ce(L,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createVCard(...e){return ce(H,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateVCard(...e){return ce(P,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteVCard(...e){return ce(B,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var me=Object.freeze({__proto__:null,DAVClient:fe,createDAVClient:ue}),Ae={DAVNamespace:exports.DAVNamespace,DAVNamespaceShort:exports.DAVNamespaceShort,DAVAttributeMap:o,...me,...x,...k,...oe,...M,...X,...he,...m};exports.DAVAttributeMap=o,exports.DAVClient=fe,exports.addressBookQuery=R,exports.calendarMultiGet=z,exports.calendarQuery=F,exports.cleanupFalsy=h,exports.collectionQuery=w,exports.createAccount=se,exports.createCalendarObject=G,exports.createDAVClient=ue,exports.createObject=y,exports.createVCard=H,exports.davRequest=v,exports.default=Ae,exports.deleteCalendarObject=K,exports.deleteObject=V,exports.deleteVCard=B,exports.fetchAddressBooks=U,exports.fetchCalendarObjects=Q,exports.fetchCalendars=q,exports.fetchOauthTokens=ie,exports.fetchVCards=L,exports.freeBusyQuery=Y,exports.getBasicAuthHeaders=de,exports.getDAVAttribute=p,exports.getOauthHeaders=pe,exports.isCollectionDirty=$,exports.makeCalendar=Z,exports.propfind=D,exports.refreshAccessToken=le,exports.smartCollectionSync=T,exports.supportedReportSet=N,exports.syncCalendars=W,exports.syncCollection=E,exports.updateCalendarObject=J,exports.updateObject=O,exports.updateVCard=P,exports.urlContains=l,exports.urlEquals=i; diff --git a/dist/tsdav.min.js b/dist/tsdav.min.js index f4a7711..7b180dc 100644 --- a/dist/tsdav.min.js +++ b/dist/tsdav.min.js @@ -1,2 +1,2 @@ -var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var n={exports:{}};!function(t,r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e&&e,a=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,a="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=p(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=g(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}})),t}function A(e,t){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];A.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,n){return new Promise((function(a,o){var u=new w(e,n);if(u.signal&&u.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function l(){c.abort()}c.onload=function(){var e,t,r={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}})),t)};r.url="responseURL"in c?c.responseURL:r.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout((function(){a(new A(n,r))}),0)},c.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},c.open(u.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?c.withCredentials=!0:"omit"===u.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":s&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof f?u.headers.forEach((function(e,t){c.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){c.setRequestHeader(e,d(n.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",l),c.onreadystatechange=function(){4===c.readyState&&u.signal.removeEventListener("abort",l)}),c.send(void 0===u._bodyInit?null:u._bodyInit)}))}_.polyfill=!0,r.fetch||(r.fetch=_,r.Headers=f,r.Request=w,r.Response=A),t.Headers=f,t.Request=w,t.Response=A,t.fetch=_}({})}(a),a.fetch.ponyfill=!0,delete a.fetch.polyfill;var i=n.fetch?n:a;(r=i.fetch).default=i.fetch,r.fetch=i.fetch,r.Headers=i.Headers,r.Request=i.Request,r.Response=i.Response,t.exports=r}(n,n.exports);var a=n.exports,i="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}var u=o,c=s;function l(e){if(u===setTimeout)return setTimeout(e,0);if((u===o||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}"function"==typeof i.setTimeout&&(u=setTimeout),"function"==typeof i.clearTimeout&&(c=clearTimeout);var d,h=[],f=!1,p=-1;function g(){f&&d&&(f=!1,d.length?h=d.concat(h):p=-1,h.length&&y())}function y(){if(!f){var e=l(g);f=!0;for(var t=h.length;t;){for(d=h,h=[];++p1)for(var r=1;r=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}return F=function(s,u){u=u||{};var c=typeof s;if("string"===c&&s.length>0)return function(o){if((o=String(o)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(!s)return;var u=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*a;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===c&&isFinite(s))return u.long?function(a){var i=Math.abs(a);if(i>=n)return o(a,i,n,"day");if(i>=r)return o(a,i,r,"hour");if(i>=t)return o(a,i,t,"minute");if(i>=e)return o(a,i,e,"second");return a+" ms"}(s):function(a){var i=Math.abs(a);if(i>=n)return Math.round(a/n)+"d";if(i>=r)return Math.round(a/r)+"h";if(i>=t)return Math.round(a/t)+"m";if(i>=e)return Math.round(a/e)+"s";return a+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},F}var I=function(e){function t(e){let n,a,i,o=null;function s(...e){if(!s.enabled)return;const r=s,a=Number(new Date),i=a-(n||a);r.diff=i,r.prev=n,r.curr=a,n=a,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,a)=>{if("%%"===n)return"%";o++;const i=t.formatters[a];if("function"==typeof i){const t=e[o];n=i.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(a!==t.namespaces&&(a=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),a=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==N&&"env"in N&&(e=N.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=I(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(L,L.exports);var P,U=t(L.exports);!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(P||(P={}));const j={[P.CALDAV]:"xmlns:c",[P.CARDDAV]:"xmlns:card",[P.CALENDAR_SERVER]:"xmlns:cs",[P.CALDAV_APPLE]:"xmlns:ca",[P.DAV]:"xmlns:d"};var B,M;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(B||(B={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(M||(M={}));var V=[],$=[],K="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function Y(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)V[t]=e[t],$[e.charCodeAt(t)]=t;$["-".charCodeAt(0)]=62,$["_".charCodeAt(0)]=63}function q(e,t,r){for(var n,a,i=[],o=t;o>18&63]+V[a>>12&63]+V[a>>6&63]+V[63&a]);return i.join("")}function z(e){var t;H||Y();for(var r=e.length,n=r%3,a="",i=[],o=16383,s=0,u=r-n;su?u:s+o));return 1===n?(t=e[r-1],a+=V[t>>2],a+=V[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=V[t>>10],a+=V[t>>4&63],a+=V[t<<2&63],a+="="),i.push(a),i.join("")}function G(e,t,r,n,a){var i,o,s=8*a-n-1,u=(1<>1,l=-7,d=r?a-1:0,h=r?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=h,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),i-=c}return(f?-1:1)*o*Math.pow(2,i-n)}function W(e,t,r,n,a,i){var o,s,u,c=8*i-a-1,l=(1<>1,h=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+f]=255&s,f+=p,s/=256,a-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*g}var Q={}.toString,X=Array.isArray||function(e){return"[object Array]"==Q.call(e)};function Z(){return ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function J(e,t){if(Z()=Z())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z().toString(16)+" bytes");return 0|e}function oe(e){return!(null==e||!e._isBuffer)}function se(e,t){if(oe(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ke(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ie(e).length;default:if(n)return ke(e).length;t=(""+t).toLowerCase(),n=!0}}function ue(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Te(this,t,r);case"utf8":case"utf-8":return be(this,t,r);case"ascii":return Ee(this,t,r);case"latin1":case"binary":return Ae(this,t,r);case"base64":return ve(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function ce(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function le(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=ee.from(t,n)),oe(t))return 0===t.length?-1:de(e,t,r,n,a);if("number"==typeof t)return t&=255,ee.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):de(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function de(e,t,r,n,a){var i,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var d=!0,h=0;ha&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function ve(e,t,r){return 0===t&&r===e.length?z(e):z(e.slice(t,r))}function be(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[a+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(u=(15&c)<<12|(63&i)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=d}return function(e){var t=e.length;if(t<=we)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},ee.prototype.compare=function(e,t,r,n,a){if(!oe(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),u=this.slice(n,a),c=e.slice(t,r),l=0;la)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return he(this,e,t,r);case"utf8":case"utf-8":return fe(this,e,t,r);case"ascii":return pe(this,e,t,r);case"latin1":case"binary":return ge(this,e,t,r);case"base64":return ye(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var we=4096;function Ee(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;an)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function De(e,t,r,n,a,i){if(!oe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function xe(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function Oe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function Re(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Fe(e,t,r,n,a){return a||Re(e,0,r,4),W(e,t,r,n,23,4),r+4}function Se(e,t,r,n,a){return a||Re(e,0,r,8),W(e,t,r,n,52,8),r+8}ee.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},ee.prototype.readUInt8=function(e,t){return t||Ce(e,1,this.length),this[e]},ee.prototype.readUInt16LE=function(e,t){return t||Ce(e,2,this.length),this[e]|this[e+1]<<8},ee.prototype.readUInt16BE=function(e,t){return t||Ce(e,2,this.length),this[e]<<8|this[e+1]},ee.prototype.readUInt32LE=function(e,t){return t||Ce(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ee.prototype.readUInt32BE=function(e,t){return t||Ce(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ee.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ce(e,t,this.length);for(var n=this[e],a=1,i=0;++i=(a*=128)&&(n-=Math.pow(2,8*t)),n},ee.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ce(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},ee.prototype.readInt8=function(e,t){return t||Ce(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ee.prototype.readInt16LE=function(e,t){t||Ce(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},ee.prototype.readInt16BE=function(e,t){t||Ce(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},ee.prototype.readInt32LE=function(e,t){return t||Ce(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ee.prototype.readInt32BE=function(e,t){return t||Ce(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ee.prototype.readFloatLE=function(e,t){return t||Ce(e,4,this.length),G(this,e,!0,23,4)},ee.prototype.readFloatBE=function(e,t){return t||Ce(e,4,this.length),G(this,e,!1,23,4)},ee.prototype.readDoubleLE=function(e,t){return t||Ce(e,8,this.length),G(this,e,!0,52,8)},ee.prototype.readDoubleBE=function(e,t){return t||Ce(e,8,this.length),G(this,e,!1,52,8)},ee.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||De(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+a]=e/i&255;return t+r},ee.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,1,255,0),ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ee.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):xe(this,e,t,!0),t+2},ee.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):xe(this,e,t,!1),t+2},ee.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Oe(this,e,t,!0),t+4},ee.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Oe(this,e,t,!1),t+4},ee.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);De(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},ee.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,1,127,-128),ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ee.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):xe(this,e,t,!0),t+2},ee.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):xe(this,e,t,!1),t+2},ee.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,4,2147483647,-2147483648),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Oe(this,e,t,!0),t+4},ee.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||De(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Oe(this,e,t,!1),t+4},ee.prototype.writeFloatLE=function(e,t,r){return Fe(this,e,t,!0,r)},ee.prototype.writeFloatBE=function(e,t,r){return Fe(this,e,t,!1,r)},ee.prototype.writeDoubleLE=function(e,t,r){return Se(this,e,t,!0,r)},ee.prototype.writeDoubleBE=function(e,t,r){return Se(this,e,t,!1,r)},ee.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(i<1e3||!ee.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Ie(e){return function(e){var t,r,n,a,i,o;H||Y();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[s-2]?2:"="===e[s-1]?1:0,o=new K(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0,r=0;t>16&255,o[u++]=a>>8&255,o[u++]=255&a;return 2===i?(a=$[e.charCodeAt(t)]<<2|$[e.charCodeAt(t+1)]>>4,o[u++]=255&a):1===i&&(a=$[e.charCodeAt(t)]<<10|$[e.charCodeAt(t+1)]<<4|$[e.charCodeAt(t+2)]>>2,o[u++]=a>>8&255,o[u++]=255&a),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Ne,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Pe(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function Ue(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var je,Be={};function Me(){}function Ve(){Ve.init.call(this)}function $e(e){return void 0===e._maxListeners?Ve.defaultMaxListeners:e._maxListeners}function Ke(e,t,r,n){var a,i,o,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]):(i=e._events=new Me,e._eventsCount=0),o){if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),!o.warned&&(a=$e(e))&&a>0&&o.length>a){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,"function"==typeof console.warn?console.warn(s):console.log(s)}}else o=i[t]=r,++e._eventsCount;return e}function He(e,t,r){var n=!1;function a(){e.removeListener(t,a),n||(n=!0,r.apply(e,arguments))}return a.listener=r,a}function Ye(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function qe(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Me.prototype=Object.create(null),Ve.EventEmitter=Ve,Ve.usingDomains=!1,Ve.prototype.domain=void 0,Ve.prototype._events=void 0,Ve.prototype._maxListeners=void 0,Ve.defaultMaxListeners=10,Ve.init=function(){this.domain=null,Ve.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Me,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ve.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Ve.prototype.getMaxListeners=function(){return $e(this)},Ve.prototype.emit=function(e){var t,r,n,a,i,o,s,u="error"===e;if(o=this._events)u=u&&null==o.error;else if(!u)return!1;if(s=this.domain,u){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=o[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,a=qe(e,n),i=0;i0;)if(r[i]===t||r[i].listener&&r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Me,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,a=e.length;n0?Reflect.ownKeys(this._events):[]},je="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};var ze=/%[sdj%]/g;function Ge(e){if(!ot(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),at(t)?r.showHidden=t:t&&function(e,t){if(!t||!ct(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),st(r.showHidden)&&(r.showHidden=!1),st(r.depth)&&(r.depth=2),st(r.colors)&&(r.colors=!1),st(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Je),tt(r,e,r.depth)}function Je(e,t){var r=Ze.styles[t];return r?"["+Ze.colors[r][0]+"m"+e+"["+Ze.colors[r][1]+"m":e}function et(e,t){return e}function tt(e,t,r){if(e.customInspect&&t&&ht(t.inspect)&&t.inspect!==Ze&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return ot(n)||(n=tt(e,n,r)),n}var a=function(e,t){if(st(t))return e.stylize("undefined","undefined");if(ot(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"==typeof n)return e.stylize(""+t,"number");var n;if(at(t))return e.stylize(""+t,"boolean");if(it(t))return e.stylize("null","null")}(e,t);if(a)return a;var i=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),dt(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return rt(t);if(0===i.length){if(ht(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ut(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(lt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(dt(t))return rt(t)}var u,c,l="",d=!1,h=["{","}"];(u=t,Array.isArray(u)&&(d=!0,h=["[","]"]),ht(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return ut(t)&&(l=" "+RegExp.prototype.toString.call(t)),lt(t)&&(l=" "+Date.prototype.toUTCString.call(t)),dt(t)&&(l=" "+rt(t)),0!==i.length||d&&0!=t.length?r<0?ut(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=d?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,h)):h[0]+l+h[1]}function rt(e){return"["+Error.prototype.toString.call(e)+"]"}function nt(e,t,r,n,a,i){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),pt(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(u.value)<0?(s=it(r)?tt(e,u.value,null):tt(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),st(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function at(e){return"boolean"==typeof e}function it(e){return null===e}function ot(e){return"string"==typeof e}function st(e){return void 0===e}function ut(e){return ct(e)&&"[object RegExp]"===ft(e)}function ct(e){return"object"==typeof e&&null!==e}function lt(e){return ct(e)&&"[object Date]"===ft(e)}function dt(e){return ct(e)&&("[object Error]"===ft(e)||e instanceof Error)}function ht(e){return"function"==typeof e}function ft(e){return Object.prototype.toString.call(e)}function pt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gt(){this.head=null,this.tail=null,this.length=0}Ze.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ze.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},gt.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},gt.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},gt.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},gt.prototype.clear=function(){this.head=this.tail=null,this.length=0},gt.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},gt.prototype.concat=function(e){if(0===this.length)return ee.alloc(0);if(1===this.length)return this.head.data;for(var t=ee.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var yt=ee.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function mt(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!yt(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=bt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=wt;break;default:return void(this.write=vt)}this.charBuffer=new ee(6),this.charReceived=0,this.charLength=0}function vt(e){return e.toString(this.encoding)}function bt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function wt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}mt.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&a<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var a;n=(t+=e.toString(this.encoding,0,n)).length-1;if((a=t.charCodeAt(n))>=55296&&a<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,n)}return t},mt.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},mt.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,a=this.encoding;t+=n.slice(0,r).toString(a)}return t};var Et=Object.freeze({__proto__:null,StringDecoder:mt});_t.ReadableState=Tt;var At=function(e){if(st(Qe)&&(Qe=N.env.NODE_DEBUG||""),e=e.toUpperCase(),!Xe[e])if(new RegExp("\\b"+e+"\\b","i").test(Qe)){Xe[e]=function(){var t=Ge.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Xe[e]=function(){};return Xe[e]}("stream");function Tt(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Zt&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new gt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new mt(e.encoding),this.encoding=e.encoding)}function _t(e){if(!(this instanceof _t))return new _t(e);this._readableState=new Tt(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Ve.call(this)}function Ct(e,t,r,n,a){var i=function(e,t){var r=null;ee.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(i)e.emit("error",i);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Ot(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!a){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&a){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||a||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),a||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ot(e))),function(e,t){t.readingMore||(t.readingMore=!0,m(Ft,e,t))}(e,t)}else a||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=Dt?e=Dt:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Ot(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(At("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m(Rt,e):Rt(e))}function Rt(e){At("emit readable"),e.emit("readable"),Lt(e)}function Ft(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ei.length?i.length:e;if(o===i.length?a+=i:a+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++n}return t.length-=n,a}(e,t):function(e,t){var r=ee.allocUnsafe(e),n=t.head,a=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),0===(e-=o)){o===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++a}return t.length-=a,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function It(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,m(Pt,t,e))}function Pt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Ut(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return At("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?It(this):Ot(this),null;if(0===(e=xt(e,t))&&t.ended)return 0===t.length&&It(this),null;var n,a=t.needReadable;return At("need readable",a),(0===t.length||t.length-e0?kt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&It(this)),null!==n&&this.emit("data",n),n},_t.prototype._read=function(e){this.emit("error",new Error("not implemented"))},_t.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,At("pipe count=%d opts=%j",n.pipesCount,t);var a=!t||!1!==t.end?o:c;function i(e){At("onunpipe"),e===r&&c()}function o(){At("onend"),e.end()}n.endEmitted?m(a):r.once("end",a),e.on("unpipe",i);var s=function(e){return function(){var t=e._readableState;At("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Lt(e))}}(r);e.on("drain",s);var u=!1;function c(){At("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",h),e.removeListener("unpipe",i),r.removeListener("end",o),r.removeListener("end",c),r.removeListener("data",d),u=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function d(t){At("ondata"),l=!1,!1!==e.write(t)||l||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Ut(n.pipes,e))&&!u&&(At("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function h(t){var r;At("onerror",t),g(),e.removeListener("error",h),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){At("onfinish"),e.removeListener("close",f),g()}function g(){At("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",f),e.once("finish",p),e.emit("pipe",r),n.flowing||(At("pipe resume"),r.resume()),e},_t.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Vt.prototype._write=function(e,t,r){r(new Error("not implemented"))},Vt.prototype._writev=null,Vt.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,zt(e,t),r&&(t.finished?m(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},je(Zt,_t);for(var Wt=Object.keys(Vt.prototype),Qt=0;Qt"===i?(D(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=T.TEXT):y(i)?(n.state=T.SGML_DECL_QUOTED,n.sgmlDecl+=i):n.sgmlDecl+=i;continue;case T.SGML_DECL_QUOTED:i===n.q&&(n.state=T.SGML_DECL,n.q=""),n.sgmlDecl+=i;continue;case T.DOCTYPE:">"===i?(n.state=T.TEXT,D(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=i,"["===i?n.state=T.DOCTYPE_DTD:y(i)&&(n.state=T.DOCTYPE_QUOTED,n.q=i));continue;case T.DOCTYPE_QUOTED:n.doctype+=i,i===n.q&&(n.q="",n.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:"]"===i?(n.doctype+=i,n.state=T.DOCTYPE):"<"===i?(n.state=T.OPEN_WAKA,n.startTagPosition=n.position):y(i)?(n.doctype+=i,n.state=T.DOCTYPE_DTD_QUOTED,n.q=i):n.doctype+=i;continue;case T.DOCTYPE_DTD_QUOTED:n.doctype+=i,i===n.q&&(n.state=T.DOCTYPE_DTD,n.q="");continue;case T.COMMENT:"-"===i?n.state=T.COMMENT_ENDING:n.comment+=i;continue;case T.COMMENT_ENDING:"-"===i?(n.state=T.COMMENT_ENDED,n.comment=O(n.opt,n.comment),n.comment&&D(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+i,n.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==i?(S(n,"Malformed comment"),n.comment+="--"+i,n.state=T.COMMENT):n.doctype&&!0!==n.doctype?n.state=T.DOCTYPE_DTD:n.state=T.TEXT;continue;case T.CDATA:"]"===i?n.state=T.CDATA_ENDING:n.cdata+=i;continue;case T.CDATA_ENDING:"]"===i?n.state=T.CDATA_ENDING_2:(n.cdata+="]"+i,n.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===i?(n.cdata&&D(n,"oncdata",n.cdata),D(n,"onclosecdata"),n.cdata="",n.state=T.TEXT):"]"===i?n.cdata+="]":(n.cdata+="]]"+i,n.state=T.CDATA);continue;case T.PROC_INST:"?"===i?n.state=T.PROC_INST_ENDING:g(i)?n.state=T.PROC_INST_BODY:n.procInstName+=i;continue;case T.PROC_INST_BODY:if(!n.procInstBody&&g(i))continue;"?"===i?n.state=T.PROC_INST_ENDING:n.procInstBody+=i;continue;case T.PROC_INST_ENDING:">"===i?(D(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=T.TEXT):(n.procInstBody+="?"+i,n.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:v(h,i)?n.tagName+=i:(N(n),">"===i?I(n):"/"===i?n.state=T.OPEN_TAG_SLASH:(g(i)||S(n,"Invalid character in tag name"),n.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===i?(I(n,!0),P(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=T.ATTRIB);continue;case T.ATTRIB:if(g(i))continue;">"===i?I(n):"/"===i?n.state=T.OPEN_TAG_SLASH:v(d,i)?(n.attribName=i,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===i?n.state=T.ATTRIB_VALUE:">"===i?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),I(n)):g(i)?n.state=T.ATTRIB_NAME_SAW_WHITE:v(h,i)?n.attribName+=i:S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===i)n.state=T.ATTRIB_VALUE;else{if(g(i))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",D(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===i?I(n):v(d,i)?(n.attribName=i,n.state=T.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(g(i))continue;y(i)?(n.q=i,n.state=T.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||R(n,"Unquoted attribute value"),n.state=T.ATTRIB_VALUE_UNQUOTED,n.attribValue=i);continue;case T.ATTRIB_VALUE_QUOTED:if(i!==n.q){"&"===i?n.state=T.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=i;continue}k(n),n.q="",n.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:g(i)?n.state=T.ATTRIB:">"===i?I(n):"/"===i?n.state=T.OPEN_TAG_SLASH:v(d,i)?(S(n,"No whitespace between attributes"),n.attribName=i,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!m(i)){"&"===i?n.state=T.ATTRIB_VALUE_ENTITY_U:n.attribValue+=i;continue}k(n),">"===i?I(n):n.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(n.tagName)">"===i?P(n):v(h,i)?n.tagName+=i:n.script?(n.script+=""===i?P(n):S(n,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var l,w;switch(n.state){case T.TEXT_ENTITY:l=T.TEXT,w="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:l=T.ATTRIB_VALUE_QUOTED,w="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:l=T.ATTRIB_VALUE_UNQUOTED,w="attribValue"}if(";"===i){var E=U(n);n.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(n.entity="",n.state=l,n.write(E)):(n[w]+=E,n.entity="",n.state=l)}else v(n.entity.length?p:f,i)?n.entity+=i:(S(n,"Invalid character in entity name"),n[w]+="&"+n.entity+i,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),a=0,i=0,o=r.length;in)switch(r[i]){case"textNode":x(t);break;case"cdata":D(t,"oncdata",t.cdata),t.cdata="";break;case"script":D(t,"onscript",t.script),t.script="";break;default:R(t,"Max buffer length exceeded: "+r[i])}a=Math.max(a,s)}var u=e.MAX_BUFFER_LENGTH-a;t.bufferCheckPosition=u+t.position}(n),n} -/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;x(e=this),""!==e.cdata&&(D(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(D(e,"onscript",e.script),e.script="")}};try{t=or.Stream}catch(e){t=function(){}}t||(t=function(){});var a=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function i(e,r){if(!(this instanceof i))return new i(e,r);t.apply(this),this._parser=new n(e,r),this.writable=!0,this.readable=!0;var o=this;this._parser.onend=function(){o.emit("end")},this._parser.onerror=function(e){o.emit("error",e),o._parser.error=null},this._decoder=null,a.forEach((function(e){Object.defineProperty(o,"on"+e,{get:function(){return o._parser["on"+e]},set:function(t){if(!t)return o.removeAllListeners(e),o._parser["on"+e]=t,t;o.on(e,t)},enumerable:!0,configurable:!1})}))}i.prototype=Object.create(t.prototype,{constructor:{value:i}}),i.prototype.write=function(e){if("function"==typeof ee.isBuffer&&ee.isBuffer(e)){if(!this._decoder){var t=sr.StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},i.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},i.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===a.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var o="[CDATA[",s="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/2000/xmlns/",l={xml:u,xmlns:c},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function y(e){return'"'===e||"'"===e}function m(e){return">"===e||g(e)}function v(e,t){return e.test(t)}function b(e,t){return!v(e,t)}var w,E,A,T=0;for(var _ in e.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n})),e.STATE)e.STATE[e.STATE[_]]=_;function C(e,t,r){e[t]&&e[t](r)}function D(e,t,r){e.textNode&&x(e),C(e,t,r)}function x(e){e.textNode=O(e.opt,e.textNode),e.textNode&&C(e,"ontext",e.textNode),e.textNode=""}function O(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return x(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,C(e,"onerror",t),e}function F(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&R(e,"Unexpected end"),x(e),e.c="",e.closed=!0,C(e,"onend"),n.call(e,e.strict,e.opt),e}function S(e,t){if("object"!=typeof e||!(e instanceof n))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function N(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,D(e,"onopentagstart",r)}function L(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],a=r[1];return t&&"xmlns"===e&&(n="xmlns",a=""),{prefix:n,local:a}}function k(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=L(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==u)S(e,"xml: prefix must be bound to "+u+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==c)S(e,"xmlns: prefix must be bound to "+c+"\nActual: "+e.attribValue);else{var a=e.tag,i=e.tags[e.tags.length-1]||e;a.ns===i.ns&&(a.ns=Object.create(i.ns)),a.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,D(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function I(e,t){if(e.opt.xmlns){var r=e.tag,n=L(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var a=e.tags[e.tags.length-1]||e;r.ns&&a.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){D(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var i=0,o=e.attribList.length;i",e.tagName="",void(e.state=T.SCRIPT);D(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=T.TEXT);e.tagName=r;for(var a=e.tags.length;a-- >t;){var i=e.tag=e.tags.pop();e.tagName=e.tag.name,D(e,"onclosetag",e.tagName);var o={};for(var s in i.ns)o[s]=i.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&i.ns!==u.ns&&Object.keys(i.ns).forEach((function(t){var r=i.ns[t];D(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function U(e){var t,r=e.entity,n=r.toLowerCase(),a="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),a=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),a=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||a.toLowerCase()!==r?(S(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function j(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function B(e,t){var r="";return t1114111||E(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?r.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,r.push(e,t)),(n+1===a||r.length>16384)&&(i+=w.apply(null,r),r.length=0)}return i},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:A,configurable:!0,writable:!0}):String.fromCodePoint=A)}(Be);var ur,cr,lr=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},dr=lr,hr={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||dr(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}},fr=Be,pr=hr,gr=lr;function yr(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function mr(e,t){var r;if(ur.compact){if(!cr[ur[e+"Key"]]&&(gr(ur.alwaysArray)?-1!==ur.alwaysArray.indexOf(ur[e+"Key"]):ur.alwaysArray)&&(cr[ur[e+"Key"]]=[]),cr[ur[e+"Key"]]&&!gr(cr[ur[e+"Key"]])&&(cr[ur[e+"Key"]]=[cr[ur[e+"Key"]]]),e+"Fn"in ur&&"string"==typeof t&&(t=ur[e+"Fn"](t,cr)),"instruction"===e&&("instructionFn"in ur||"instructionNameFn"in ur))for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in ur)t[r]=ur.instructionFn(t[r],r,cr);else{var n=t[r];delete t[r],t[ur.instructionNameFn(r,n,cr)]=n}gr(cr[ur[e+"Key"]])?cr[ur[e+"Key"]].push(t):cr[ur[e+"Key"]]=t}else{cr[ur.elementsKey]||(cr[ur.elementsKey]=[]);var a={};if(a[ur.typeKey]=e,"instruction"===e){for(r in t)if(t.hasOwnProperty(r))break;a[ur.nameKey]="instructionNameFn"in ur?ur.instructionNameFn(r,t,cr):r,ur.instructionHasAttributes?(a[ur.attributesKey]=t[r][ur.attributesKey],"instructionFn"in ur&&(a[ur.attributesKey]=ur.instructionFn(a[ur.attributesKey],r,cr))):("instructionFn"in ur&&(t[r]=ur.instructionFn(t[r],r,cr)),a[ur.instructionKey]=t[r])}else e+"Fn"in ur&&(t=ur[e+"Fn"](t,cr)),a[ur[e+"Key"]]=t;ur.addParent&&(a[ur.parentKey]=cr),cr[ur.elementsKey].push(a)}}function vr(e){var t;if("attributesFn"in ur&&e&&(e=ur.attributesFn(e,cr)),(ur.trim||"attributeValueFn"in ur||"attributeNameFn"in ur||ur.nativeTypeAttributes)&&e)for(t in e)if(e.hasOwnProperty(t)&&(ur.trim&&(e[t]=e[t].trim()),ur.nativeTypeAttributes&&(e[t]=yr(e[t])),"attributeValueFn"in ur&&(e[t]=ur.attributeValueFn(e[t],t,cr)),"attributeNameFn"in ur)){var r=e[t];delete e[t],e[ur.attributeNameFn(t,e[t],cr)]=r}return e}function br(e){var t={};if(e.body&&("xml"===e.name.toLowerCase()||ur.instructionHasAttributes)){for(var r,n=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(r=n.exec(e.body));)t[r[1]]=r[2]||r[3]||r[4];t=vr(t)}if("xml"===e.name.toLowerCase()){if(ur.ignoreDeclaration)return;cr[ur.declarationKey]={},Object.keys(t).length&&(cr[ur.declarationKey][ur.attributesKey]=t),ur.addParent&&(cr[ur.declarationKey][ur.parentKey]=cr)}else{if(ur.ignoreInstruction)return;ur.trim&&(e.body=e.body.trim());var a={};ur.instructionHasAttributes&&Object.keys(t).length?(a[e.name]={},a[e.name][ur.attributesKey]=t):a[e.name]=e.body,mr("instruction",a)}}function wr(e,t){var r;if("object"==typeof e&&(t=e.attributes,e=e.name),t=vr(t),"elementNameFn"in ur&&(e=ur.elementNameFn(e,cr)),ur.compact){var n;if(r={},!ur.ignoreAttributes&&t&&Object.keys(t).length)for(n in r[ur.attributesKey]={},t)t.hasOwnProperty(n)&&(r[ur.attributesKey][n]=t[n]);!(e in cr)&&(gr(ur.alwaysArray)?-1!==ur.alwaysArray.indexOf(e):ur.alwaysArray)&&(cr[e]=[]),cr[e]&&!gr(cr[e])&&(cr[e]=[cr[e]]),gr(cr[e])?cr[e].push(r):cr[e]=r}else cr[ur.elementsKey]||(cr[ur.elementsKey]=[]),(r={})[ur.typeKey]="element",r[ur.nameKey]=e,!ur.ignoreAttributes&&t&&Object.keys(t).length&&(r[ur.attributesKey]=t),ur.alwaysChildren&&(r[ur.elementsKey]=[]),cr[ur.elementsKey].push(r);r[ur.parentKey]=cr,cr=r}function Er(e){ur.ignoreText||(e.trim()||ur.captureSpacesBetweenElements)&&(ur.trim&&(e=e.trim()),ur.nativeType&&(e=yr(e)),ur.sanitize&&(e=e.replace(/&/g,"&").replace(//g,">")),mr("text",e))}function Ar(e){ur.ignoreComment||(ur.trim&&(e=e.trim()),mr("comment",e))}function Tr(e){var t=cr[ur.parentKey];ur.addParent||delete cr[ur.parentKey],cr=t}function _r(e){ur.ignoreCdata||(ur.trim&&(e=e.trim()),mr("cdata",e))}function Cr(e){ur.ignoreDoctype||(e=e.replace(/^ /,""),ur.trim&&(e=e.trim()),mr("doctype",e))}function Dr(e){e.note=e}var xr=function(e,t){var r=fr.parser(!0,{}),n={};if(cr=n,ur=function(e){return ur=pr.copyOptions(e),pr.ensureFlagExists("ignoreDeclaration",ur),pr.ensureFlagExists("ignoreInstruction",ur),pr.ensureFlagExists("ignoreAttributes",ur),pr.ensureFlagExists("ignoreText",ur),pr.ensureFlagExists("ignoreComment",ur),pr.ensureFlagExists("ignoreCdata",ur),pr.ensureFlagExists("ignoreDoctype",ur),pr.ensureFlagExists("compact",ur),pr.ensureFlagExists("alwaysChildren",ur),pr.ensureFlagExists("addParent",ur),pr.ensureFlagExists("trim",ur),pr.ensureFlagExists("nativeType",ur),pr.ensureFlagExists("nativeTypeAttributes",ur),pr.ensureFlagExists("sanitize",ur),pr.ensureFlagExists("instructionHasAttributes",ur),pr.ensureFlagExists("captureSpacesBetweenElements",ur),pr.ensureAlwaysArrayExists(ur),pr.ensureKeyExists("declaration",ur),pr.ensureKeyExists("instruction",ur),pr.ensureKeyExists("attributes",ur),pr.ensureKeyExists("text",ur),pr.ensureKeyExists("comment",ur),pr.ensureKeyExists("cdata",ur),pr.ensureKeyExists("doctype",ur),pr.ensureKeyExists("type",ur),pr.ensureKeyExists("name",ur),pr.ensureKeyExists("elements",ur),pr.ensureKeyExists("parent",ur),pr.checkFnExists("doctype",ur),pr.checkFnExists("instruction",ur),pr.checkFnExists("cdata",ur),pr.checkFnExists("comment",ur),pr.checkFnExists("text",ur),pr.checkFnExists("instructionName",ur),pr.checkFnExists("elementName",ur),pr.checkFnExists("attributeName",ur),pr.checkFnExists("attributeValue",ur),pr.checkFnExists("attributes",ur),ur}(t),r.opt={strictEntities:!0},r.onopentag=wr,r.ontext=Er,r.oncomment=Ar,r.onclosetag=Tr,r.onerror=Dr,r.oncdata=_r,r.ondoctype=Cr,r.onprocessinginstruction=br,r.write(e).close(),n[ur.elementsKey]){var a=n[ur.elementsKey];delete n[ur.elementsKey],n[ur.elementsKey]=a,delete n.text}return n},Or=hr,Rr=xr;var Fr,Sr,Nr=hr,Lr=lr;function kr(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function Ir(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,Sr,Fr));var n,a,i,o,s=[];for(n in e)e.hasOwnProperty(n)&&null!==e[n]&&void 0!==e[n]&&(o=t.noQuotesForNativeAttributes&&"string"!=typeof e[n]?"":'"',a=(a=""+e[n]).replace(/"/g,"""),i="attributeNameFn"in t?t.attributeNameFn(n,a,Sr,Fr):n,s.push(t.spaces&&t.indentAttributes?kr(t,r+1,!1):" "),s.push(i+"="+o+("attributeValueFn"in t?t.attributeValueFn(a,n,Sr,Fr):a)+o));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&s.push(kr(t,r,!1)),s.join("")}function Pr(e,t,r){return Fr=e,Sr="xml",t.ignoreDeclaration?"":""}function Ur(e,t,r){if(t.ignoreInstruction)return"";var n;for(n in e)if(e.hasOwnProperty(n))break;var a="instructionNameFn"in t?t.instructionNameFn(n,e[n],Sr,Fr):n;if("object"==typeof e[n])return Fr=e,Sr=a,"";var i=e[n]?e[n]:"";return"instructionFn"in t&&(i=t.instructionFn(i,n,Sr,Fr)),""}function jr(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,Sr,Fr):e)+"--\x3e"}function Br(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function Mr(e,t){return t.ignoreDoctype?"":""}function Vr(e,t){return t.ignoreText?"":(e=(e=(e=""+e).replace(/&/g,"&")).replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,Sr,Fr):e)}function $r(e,t,r,n){return e.reduce((function(e,a){var i=kr(t,r,n&&!e);switch(a.type){case"element":return e+i+function(e,t,r){Fr=e,Sr=e.name;var n=[],a="elementNameFn"in t?t.elementNameFn(e.name,e):e.name;n.push("<"+a),e[t.attributesKey]&&n.push(Ir(e[t.attributesKey],t,r));var i=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&"preserve"===e[t.attributesKey]["xml:space"];return i||(i="fullTagEmptyElementFn"in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement),i?(n.push(">"),e[t.elementsKey]&&e[t.elementsKey].length&&(n.push($r(e[t.elementsKey],t,r+1)),Fr=e,Sr=e.name),n.push(t.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r")):n.push("/>"),n.join("")}(a,t,r);case"comment":return e+i+jr(a[t.commentKey],t);case"doctype":return e+i+Mr(a[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?i:"")+Br(a[t.cdataKey],t);case"text":return e+(t.indentText?i:"")+Vr(a[t.textKey],t);case"instruction":var o={};return o[a[t.nameKey]]=a[t.attributesKey]?a:a[t.instructionKey],e+(t.indentInstruction?i:"")+Ur(o,t,r)}}),"")}function Kr(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function Hr(e,t,r,n,a){Fr=e,Sr=t;var i="elementNameFn"in r?r.elementNameFn(t,e):t;if(null==e||""===e)return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+i+">":"<"+i+"/>";var o=[];if(t){if(o.push("<"+i),"object"!=typeof e)return o.push(">"+Vr(e,r)+""),o.join("");e[r.attributesKey]&&o.push(Ir(e[r.attributesKey],r,n));var s=Kr(e,r,!0)||e[r.attributesKey]&&"preserve"===e[r.attributesKey]["xml:space"];if(s||(s="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(t,e):r.fullTagEmptyElement),!s)return o.push("/>"),o.join("");o.push(">")}return o.push(Yr(e,r,n+1,!1)),Fr=e,Sr=t,t&&o.push((a?kr(r,n,!1):"")+""),o.join("")}function Yr(e,t,r,n){var a,i,o,s=[];for(i in e)if(e.hasOwnProperty(i))for(o=Lr(e[i])?e[i]:[e[i]],a=0;a{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},Zr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim();if(Math.abs(r.length-n.length)>1)return!1;const a="/"===r.slice(-1)?r.slice(0,-1):r,i="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(i)||t.includes(a)},Jr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim(),a="/"===r.slice(-1)?r.slice(0,-1):r,i="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(i)||t.includes(a)},en=e=>e.reduce(((e,t)=>({...e,[j[t]]:t})),{}),tn=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),rn=(e,t)=>t?{[e]:t}:{},nn=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var an=Object.freeze({__proto__:null,cleanupFalsy:tn,conditionalParam:rn,excludeHeaders:nn,getDAVAttribute:en,urlContains:Jr,urlEquals:Zr});const on=U("tsdav:request"),sn=async e=>{var t;const{url:r,init:n,convertIncoming:i=!0,parseOutgoing:o=!0}=e,{headers:s={},body:u,namespace:c,method:l,attributes:d}=n,h=i?Qr.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...u,_attributes:d},{compact:!0,spaces:2,elementNameFn:e=>c&&!/^.+:.+/.test(e)?`${c}:${e}`:e}):u,f=await a.fetch(r,{headers:{"Content-Type":"text/xml;charset=UTF-8",...tn(s)},body:h,method:l}),p=await f.text();if(!f.ok||!(null===(t=f.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))||!o)return[{href:f.url,ok:f.ok,status:f.status,statusText:f.statusText,raw:p}];const g=Qr.xml2js(p,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,n=Object.keys(r),a=n[n.length-1],i=r[a];if(i.length>0){i[i.length-1]=Xr(e)}else r[a]=Xr(e)}catch(e){on(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(g.multistatus.response)?g.multistatus.response:[g.multistatus.response]).map((e=>{var t,r;if(!e)return{status:f.status,statusText:f.statusText,ok:f.ok};const n=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:g,href:e.href,status:(null==n?void 0:n.groups)?Number.parseInt(null==n?void 0:n.groups.status,10):f.status,statusText:null!==(r=null===(t=null==n?void 0:n.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:f.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},un=async e=>{const{url:t,props:r,depth:n,headers:a,headersToExclude:i}=e;return sn({url:t,init:{method:"PROPFIND",headers:nn(tn({depth:n,...a}),i),namespace:B.DAV,body:{propfind:{_attributes:en([P.CALDAV,P.CALDAV_APPLE,P.CALENDAR_SERVER,P.CARDDAV,P.DAV]),prop:r}}}})},cn=async e=>{const{url:t,data:r,headers:n,headersToExclude:i}=e;return a.fetch(t,{method:"PUT",body:r,headers:nn(n,i)})},ln=async e=>{const{url:t,data:r,etag:n,headers:i,headersToExclude:o}=e;return a.fetch(t,{method:"PUT",body:r,headers:nn(tn({"If-Match":n,...i}),o)})},dn=async e=>{const{url:t,headers:r,etag:n,headersToExclude:i}=e;return a.fetch(t,{method:"DELETE",headers:nn(tn({"If-Match":n,...r}),i)})};var hn=Object.freeze({__proto__:null,createObject:cn,davRequest:sn,deleteObject:dn,propfind:un,updateObject:ln});function fn(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const pn=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),gn=U("tsdav:collection"),yn=async e=>{const{url:t,body:r,depth:n,defaultNamespace:a=B.DAV,headers:i,headersToExclude:o}=e,s=await sn({url:t,init:{method:"REPORT",headers:nn(tn({depth:n,...i}),o),namespace:a,body:r}});return 1!==s.length||s[0].raw?s:[]},mn=async e=>{const{url:t,props:r,depth:n,headers:a,headersToExclude:i}=e;return sn({url:t,init:{method:"MKCOL",headers:nn(tn({depth:n,...a}),i),namespace:B.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0}})},vn=async e=>{var t,r,n,a,i;const{collection:o,headers:s,headersToExclude:u}=e;return null!==(i=null===(a=null===(n=null===(r=null===(t=(await un({url:o.url,props:{[`${B.DAV}:supported-report-set`]:{}},depth:"0",headers:nn(s,u)}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===n?void 0:n.supportedReport)||void 0===a?void 0:a.map((e=>Object.keys(e.report)[0])))&&void 0!==i?i:[]},bn=async e=>{var t,r,n;const{collection:a,headers:i,headersToExclude:o}=e,s=(await un({url:a.url,props:{[`${B.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:nn(i,o)})).filter((e=>Jr(a.url,e.href)))[0];if(!s)throw new Error("Collection does not exist on server");return{isDirty:`${a.ctag}`!=`${null===(t=s.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(n=null===(r=s.props)||void 0===r?void 0:r.getctag)||void 0===n?void 0:n.toString()}},wn=e=>{const{url:t,props:r,headers:n,syncLevel:a,syncToken:i,headersToExclude:o}=e;return sn({url:t,init:{method:"REPORT",namespace:B.DAV,headers:nn({...n},o),body:{"sync-collection":{_attributes:en([P.CALDAV,P.CARDDAV,P.DAV]),"sync-level":a,"sync-token":i,[`${B.DAV}:prop`]:r}}}})},En=async e=>{var t,r,n,a,i,o,s,u,c,l,d;const{collection:h,method:f,headers:p,headersToExclude:g,account:y,detailedResult:m}=e,v=["accountType","homeUrl"];if(!y||!fn(y,v)){if(!y)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${pn(y,v)} before smartCollectionSync`)}const b=null!=f?f:(null===(t=h.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(gn(`smart collection sync with type ${y.accountType} and method ${b}`),"webdav"===b){const e=await wn({url:h.url,props:{[`${B.DAV}:getetag`]:{},[`${"caldav"===y.accountType?B.CALDAV:B.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{},[`${B.DAV}:displayname`]:{}},syncLevel:1,syncToken:h.syncToken,headers:nn(p,g)}),t=e.filter((e=>{var t;const r="caldav"===y.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),c=t.filter((e=>404!==e.status)).map((e=>e.href)),l=t.filter((e=>404===e.status)).map((e=>e.href)),d=(c.length&&null!==(n=await(null===(r=null==h?void 0:h.objectMultiGet)||void 0===r?void 0:r.call(h,{url:h.url,props:{[`${B.DAV}:getetag`]:{},[`${"caldav"===y.accountType?B.CALDAV:B.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:c,depth:"1",headers:nn(p,g)})))&&void 0!==n?n:[]).map((e=>{var t,r,n,a,i,o,s,u,c,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==y?void 0:y.accountType)?null!==(i=null===(a=null===(n=e.props)||void 0===n?void 0:n.calendarData)||void 0===a?void 0:a._cdata)&&void 0!==i?i:null===(o=e.props)||void 0===o?void 0:o.calendarData:null!==(c=null===(u=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===u?void 0:u._cdata)&&void 0!==c?c:null===(l=e.props)||void 0===l?void 0:l.addressData}})),f=null!==(a=h.objects)&&void 0!==a?a:[],v=d.filter((e=>f.every((t=>!Jr(t.url,e.url))))),b=f.reduce(((e,t)=>{const r=d.find((e=>Jr(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),w=l.map((e=>({url:e,etag:""}))),E=f.filter((e=>d.some((t=>Jr(e.url,t.url)&&t.etag===e.etag))));return{...h,objects:m?{created:v,updated:b,deleted:w}:[...E,...v,...b],syncToken:null!==(u=null===(s=null===(o=null===(i=e[0])||void 0===i?void 0:i.raw)||void 0===o?void 0:o.multistatus)||void 0===s?void 0:s.syncToken)&&void 0!==u?u:h.syncToken}}if("basic"===b){const{isDirty:e,newCtag:t}=await bn({collection:h,headers:nn(p,g)}),r=null!==(c=h.objects)&&void 0!==c?c:[],n=null!==(d=await(null===(l=h.fetchObjects)||void 0===l?void 0:l.call(h,{collection:h,headers:nn(p,g)})))&&void 0!==d?d:[],a=n.filter((e=>r.every((t=>!Jr(t.url,e.url))))),i=r.reduce(((e,t)=>{const r=n.find((e=>Jr(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),o=r.filter((e=>n.every((t=>!Jr(t.url,e.url))))),s=r.filter((e=>n.some((t=>Jr(e.url,t.url)&&t.etag===e.etag))));if(e)return{...h,objects:m?{created:a,updated:i,deleted:o}:[...s,...a,...i],ctag:t}}return m?{...h,objects:{created:[],updated:[],deleted:[]}}:h};var An=Object.freeze({__proto__:null,collectionQuery:yn,isCollectionDirty:bn,makeCollection:mn,smartCollectionSync:En,supportedReportSet:vn,syncCollection:wn});const Tn=U("tsdav:addressBook"),_n=async e=>{const{url:t,props:r,filters:n,depth:a,headers:i,headersToExclude:o}=e;return yn({url:t,body:{"addressbook-query":{_attributes:en([P.CARDDAV,P.DAV]),[`${B.DAV}:prop`]:r,filter:null!=n?n:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:B.CARDDAV,depth:a,headers:nn(i,o)})},Cn=async e=>{const{url:t,props:r,objectUrls:n,depth:a,headers:i}=e;return yn({url:t,body:{"addressbook-multiget":{_attributes:en([P.DAV,P.CARDDAV]),[`${B.DAV}:prop`]:r,[`${B.DAV}:href`]:n}},defaultNamespace:B.CARDDAV,depth:a,headers:i})},Dn=async e=>{const{account:t,headers:r,props:n,headersToExclude:a}=null!=e?e:{},i=["homeUrl","rootUrl"];if(!t||!fn(t,i)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${pn(t,i)} before fetchAddressBooks`)}const o=await un({url:t.homeUrl,props:null!=n?n:{[`${B.DAV}:displayname`]:{},[`${B.CALENDAR_SERVER}:getctag`]:{},[`${B.DAV}:resourcetype`]:{},[`${B.DAV}:sync-token`]:{}},depth:"1",headers:nn(r,a)});return Promise.all(o.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,n,a,i,o,s,u,c,l;const d=null!==(a=null===(n=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===n?void 0:n._cdata)&&void 0!==a?a:null===(i=e.props)||void 0===i?void 0:i.displayname;return Tn(`Found address book named ${"string"==typeof d?d:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(s=t.rootUrl)&&void 0!==s?s:"").href,ctag:null===(u=e.props)||void 0===u?void 0:u.getctag,displayName:"string"==typeof d?d:"",resourcetype:Object.keys(null===(c=e.props)||void 0===c?void 0:c.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}})).map((async e=>({...e,reports:await vn({collection:e,headers:r})}))))},xn=async e=>{const{addressBook:t,headers:r,objectUrls:n,headersToExclude:a,urlFilter:i=e=>e,useMultiGet:o=!0}=e;Tn(`Fetching vcards from ${null==t?void 0:t.url}`);const s=["url"];if(!t||!fn(t,s)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${pn(t,s)} before fetchVCards`)}const u=(null!=n?n:(await _n({url:t.url,props:{[`${B.DAV}:getetag`]:{}},depth:"1",headers:nn(r,a)})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(i).map((e=>new URL(e).pathname));let c=[];return u.length>0&&(c=o?await Cn({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CARDDAV}:address-data`]:{}},objectUrls:u,depth:"1",headers:nn(r,a)}):await _n({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CARDDAV}:address-data`]:{}},depth:"1",headers:nn(r,a)})),c.map((e=>{var r,n,a,i,o,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(n=e.props)||void 0===n?void 0:n.getetag,data:null!==(o=null===(i=null===(a=e.props)||void 0===a?void 0:a.addressData)||void 0===i?void 0:i._cdata)&&void 0!==o?o:null===(s=e.props)||void 0===s?void 0:s.addressData}}))},On=async e=>{const{addressBook:t,vCardString:r,filename:n,headers:a,headersToExclude:i}=e;return cn({url:new URL(n,t.url).href,data:r,headers:nn({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...a},i)})},Rn=async e=>{const{vCard:t,headers:r,headersToExclude:n}=e;return ln({url:t.url,data:t.data,etag:t.etag,headers:nn({"content-type":"text/vcard; charset=utf-8",...r},n)})},Fn=async e=>{const{vCard:t,headers:r,headersToExclude:n}=e;return dn({url:t.url,etag:t.etag,headers:nn(r,n)})};var Sn=Object.freeze({__proto__:null,addressBookMultiGet:Cn,addressBookQuery:_n,createVCard:On,deleteVCard:Fn,fetchAddressBooks:Dn,fetchVCards:xn,updateVCard:Rn});const Nn=U("tsdav:calendar"),Ln=async e=>{const{url:t,props:r,filters:n,timezone:a,depth:i,headers:o,headersToExclude:s}=e;return yn({url:t,body:{"calendar-query":tn({_attributes:en([P.CALDAV,P.CALENDAR_SERVER,P.CALDAV_APPLE,P.DAV]),[`${B.DAV}:prop`]:r,filter:n,timezone:a})},defaultNamespace:B.CALDAV,depth:i,headers:nn(o,s)})},kn=async e=>{const{url:t,props:r,objectUrls:n,filters:a,timezone:i,depth:o,headers:s,headersToExclude:u}=e;return yn({url:t,body:{"calendar-multiget":{_attributes:en([P.DAV,P.CALDAV]),[`${B.DAV}:prop`]:r,[`${B.DAV}:href`]:n,...rn("filter",a),timezone:i}},defaultNamespace:B.CALDAV,depth:o,headers:nn(s,u)})},In=async e=>{const{url:t,props:r,depth:n,headers:a,headersToExclude:i}=e;return sn({url:t,init:{method:"MKCALENDAR",headers:nn(tn({depth:n,...a}),i),namespace:B.DAV,body:{[`${B.CALDAV}:mkcalendar`]:{_attributes:en([P.DAV,P.CALDAV,P.CALDAV_APPLE]),set:{prop:r}}}}})},Pn=async e=>{const{headers:t,account:r,props:n,projectedProps:a,headersToExclude:i}=null!=e?e:{},o=["homeUrl","rootUrl"];if(!r||!fn(r,o)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${pn(r,o)} before fetchCalendars`)}const s=await un({url:r.homeUrl,props:null!=n?n:{[`${B.CALDAV}:calendar-description`]:{},[`${B.CALDAV}:calendar-timezone`]:{},[`${B.DAV}:displayname`]:{},[`${B.CALDAV_APPLE}:calendar-color`]:{},[`${B.CALENDAR_SERVER}:getctag`]:{},[`${B.DAV}:resourcetype`]:{},[`${B.CALDAV}:supported-calendar-component-set`]:{},[`${B.DAV}:sync-token`]:{}},depth:"1",headers:nn(t,i)});return Promise.all(s.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,n,a;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(a=null===(n=e.props)||void 0===n?void 0:n.supportedCalendarComponentSet.comp)||void 0===a?void 0:a._attributes.name]||[]).some((e=>Object.values(M).includes(e)))})).map((e=>{var t,n,i,o,s,u,c,l,d,h,f,p,g,y,m,v;const b=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,w=null===(n=e.props)||void 0===n?void 0:n.calendarTimezone;return{description:"string"==typeof b?b:"",timezone:"string"==typeof w?w:"",url:new URL(null!==(i=e.href)&&void 0!==i?i:"",null!==(o=r.rootUrl)&&void 0!==o?o:"").href,ctag:null===(s=e.props)||void 0===s?void 0:s.getctag,calendarColor:null===(u=e.props)||void 0===u?void 0:u.calendarColor,displayName:null!==(l=null===(c=e.props)||void 0===c?void 0:c.displayname._cdata)&&void 0!==l?l:null===(d=e.props)||void 0===d?void 0:d.displayname,components:Array.isArray(null===(h=e.props)||void 0===h?void 0:h.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(g=null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)||void 0===g?void 0:g._attributes.name],resourcetype:Object.keys(null===(y=e.props)||void 0===y?void 0:y.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...rn("projectedProps",Object.fromEntries(Object.entries(null!==(v=e.props)&&void 0!==v?v:{}).filter((([e])=>null==a?void 0:a[e]))))}})).map((async e=>({...e,reports:await vn({collection:e,headers:nn(t,i)})}))))},Un=async e=>{const{calendar:t,objectUrls:r,filters:n,timeRange:a,headers:i,expand:o,urlFilter:s=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:u=!0,headersToExclude:c}=e;if(a){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(a.start)&&e.test(a.end)||t.test(a.start)&&t.test(a.end)))throw new Error("invalid timeRange format, not in ISO8601")}Nn(`Fetching calendar objects from ${null==t?void 0:t.url}`);const l=["url"];if(!t||!fn(t,l)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${pn(t,l)} before fetchCalendarObjects`)}const d=null!=n?n:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...a?{"time-range":{_attributes:{start:`${new Date(a.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(a.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],h=(null!=r?r:(await Ln({url:t.url,props:{[`${B.DAV}:getetag`]:{...o&&a?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(a.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(a.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:d,depth:"1",headers:nn(i,c)})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(s).map((e=>new URL(e).pathname));let f=[];return h.length>0&&(f=!u||o?await Ln({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CALDAV}:calendar-data`]:{...o&&a?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(a.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(a.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:d,depth:"1",headers:nn(i,c)}):await kn({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CALDAV}:calendar-data`]:{...o&&a?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(a.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(a.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:h,depth:"1",headers:nn(i,c)})),f.map((e=>{var r,n,a,i,o,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(n=e.props)||void 0===n?void 0:n.getetag}`,data:null!==(o=null===(i=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===i?void 0:i._cdata)&&void 0!==o?o:null===(s=e.props)||void 0===s?void 0:s.calendarData}}))},jn=async e=>{const{calendar:t,iCalString:r,filename:n,headers:a,headersToExclude:i}=e;return cn({url:new URL(n,t.url).href,data:r,headers:nn({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...a},i)})},Bn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n}=e;return ln({url:t.url,data:t.data,etag:t.etag,headers:nn({"content-type":"text/calendar; charset=utf-8",...r},n)})},Mn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n}=e;return dn({url:t.url,etag:t.etag,headers:nn(r,n)})},Vn=async e=>{var t;const{oldCalendars:r,account:n,detailedResult:a,headers:i,headersToExclude:o}=e;if(!n)throw new Error("Must have account before syncCalendars");const s=null!==(t=null!=r?r:n.calendars)&&void 0!==t?t:[],u=await Pn({account:n,headers:nn(i,o)}),c=u.filter((e=>s.every((t=>!Jr(t.url,e.url)))));Nn(`new calendars: ${c.map((e=>e.displayName))}`);const l=s.reduce(((e,t)=>{const r=u.find((e=>Jr(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);Nn(`updated calendars: ${l.map((e=>e.displayName))}`);const d=await Promise.all(l.map((async e=>await En({collection:{...e,objectMultiGet:kn},method:"webdav",headers:nn(i,o),account:n})))),h=s.filter((e=>u.every((t=>!Jr(t.url,e.url)))));Nn(`deleted calendars: ${h.map((e=>e.displayName))}`);const f=s.filter((e=>u.some((t=>Jr(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return a?{created:c,updated:l,deleted:h}:[...f,...c,...d]},$n=async e=>{const{url:t,timeRange:r,depth:n,headers:a,headersToExclude:i}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await yn({url:t,body:{"free-busy-query":tn({_attributes:en([P.CALDAV]),[`${B.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:B.CALDAV,depth:n,headers:nn(a,i)}))[0]};var Kn=Object.freeze({__proto__:null,calendarMultiGet:kn,calendarQuery:Ln,createCalendarObject:jn,deleteCalendarObject:Mn,fetchCalendarObjects:Un,fetchCalendars:Pn,freeBusyQuery:$n,makeCalendar:In,syncCalendars:Vn,updateCalendarObject:Bn});const Hn=U("tsdav:account"),Yn=async e=>{var t,r;Hn("Service discovery...");const{account:n,headers:i,headersToExclude:o}=e,s=new URL(n.serverUrl),u=new URL(`/.well-known/${n.accountType}`,s);u.protocol=null!==(t=s.protocol)&&void 0!==t?t:"http";try{const e=await a.fetch(u.href,{headers:nn(i,o),method:"PROPFIND",redirect:"manual"});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){Hn(`Service discovery redirected to ${t}`);const e=new URL(t,s);return e.hostname===u.hostname&&u.port&&!e.port&&(e.port=u.port),e.protocol=null!==(r=s.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){Hn(`Service discovery failed: ${e.stack}`)}return s.href},qn=async e=>{var t,r,n,a,i;const{account:o,headers:s,headersToExclude:u}=e,c=["rootUrl"];if(!fn(o,c))throw new Error(`account must have ${pn(o,c)} before fetchPrincipalUrl`);Hn(`Fetching principal url from path ${o.rootUrl}`);const[l]=await un({url:o.rootUrl,props:{[`${B.DAV}:current-user-principal`]:{}},depth:"0",headers:nn(s,u)});if(!l.ok&&(Hn(`Fetch principal url failed: ${l.statusText}`),401===l.status))throw new Error("Invalid credentials");return Hn(`Fetched principal url ${null===(r=null===(t=l.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(i=null===(a=null===(n=l.props)||void 0===n?void 0:n.currentUserPrincipal)||void 0===a?void 0:a.href)&&void 0!==i?i:"",o.rootUrl).href},zn=async e=>{var t,r;const{account:n,headers:a,headersToExclude:i}=e,o=["principalUrl","rootUrl"];if(!fn(n,o))throw new Error(`account must have ${pn(n,o)} before fetchHomeUrl`);Hn(`Fetch home url from ${n.principalUrl}`);const s=(await un({url:n.principalUrl,props:"caldav"===n.accountType?{[`${B.CALDAV}:calendar-home-set`]:{}}:{[`${B.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:nn(a,i)})).find((e=>Jr(n.principalUrl,e.href)));if(!s||!s.ok)throw new Error("cannot find homeUrl");const u=new URL("caldav"===n.accountType?null===(t=null==s?void 0:s.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==s?void 0:s.props)||void 0===r?void 0:r.addressbookHomeSet.href,n.rootUrl).href;return Hn(`Fetched home url ${u}`),u},Gn=async e=>{const{account:t,headers:r,loadCollections:n=!1,loadObjects:a=!1,headersToExclude:i}=e,o={...t};return o.rootUrl=await Yn({account:t,headers:nn(r,i)}),o.principalUrl=await qn({account:o,headers:nn(r,i)}),o.homeUrl=await zn({account:o,headers:nn(r,i)}),(n||a)&&("caldav"===t.accountType?o.calendars=await Pn({headers:nn(r,i),account:o}):"carddav"===t.accountType&&(o.addressBooks=await Dn({headers:nn(r,i),account:o}))),a&&("caldav"===t.accountType&&o.calendars?o.calendars=await Promise.all(o.calendars.map((async e=>({...e,objects:await Un({calendar:e,headers:nn(r,i)})})))):"carddav"===t.accountType&&o.addressBooks&&(o.addressBooks=await Promise.all(o.addressBooks.map((async e=>({...e,objects:await xn({addressBook:e,headers:nn(r,i)})})))))),o};var Wn,Qn,Xn=Object.freeze({__proto__:null,createAccount:Gn,fetchHomeUrl:zn,fetchPrincipalUrl:qn,serviceDiscovery:Yn}),Zn={exports:{}};Wn=Zn,Qn=Zn.exports,function(t){var r=Qn,n=Wn&&Wn.exports==r&&Wn,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(t=a);var i=function(e){this.message=e};(i.prototype=new Error).name="InvalidCharacterError";var o=function(e){throw new i(e)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,c={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,a,i=e.length%3,u="",c=-1,l=e.length-i;++c>18&63)+s.charAt(a>>12&63)+s.charAt(a>>6&63)+s.charAt(63&a);return 2==i?(t=e.charCodeAt(c)<<8,r=e.charCodeAt(++c),u+=s.charAt((a=t+r)>>10)+s.charAt(a>>4&63)+s.charAt(a<<2&63)+"="):1==i&&(a=e.charCodeAt(c),u+=s.charAt(a>>2)+s.charAt(a<<4&63)+"=="),u},decode:function(e){var t=(e=String(e).replace(u,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,a=0,i="",c=-1;++c>(-2*a&6)));return i},version:"1.0.0"};if(r&&!r.nodeType)if(n)n.exports=c;else for(var l in c)c.hasOwnProperty(l)&&(r[l]=c[l]);else t.base64=c}(e);var Jn=Zn.exports;const ea=U("tsdav:authHelper"),ta=(e,t)=>(...r)=>e({...t,...r[0]}),ra=e=>(ea(`Basic auth token generated: ${Jn.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${Jn.encode(`${e.username}:${e.password}`)}`}),na=async e=>{const t=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!fn(e,t))throw new Error(`Oauth credentials missing: ${pn(e,t)}`);const r=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ea(e.tokenUrl),ea(r.toString());const n=await a.fetch(e.tokenUrl,{method:"POST",body:r.toString(),headers:{"content-length":`${r.toString().length}`,"content-type":"application/x-www-form-urlencoded"}});if(n.ok){return await n.json()}return ea(`Fetch Oauth tokens failed: ${await n.text()}`),{}},aa=async e=>{const t=["refreshToken","clientId","clientSecret","tokenUrl"];if(!fn(e,t))throw new Error(`Oauth credentials missing: ${pn(e,t)}`);const r=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),n=await a.fetch(e.tokenUrl,{method:"POST",body:r.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(n.ok){return await n.json()}return ea(`Refresh access token failed: ${await n.text()}`),{}},ia=async e=>{var t;ea("Fetching oauth headers");let r={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(t=e.expiration)&&void 0!==t?t:0))&&(r=await aa(e)):r=await na(e),ea(`Oauth tokens fetched: ${r.access_token}`),{tokens:r,headers:{authorization:`Bearer ${r.access_token}`}}};var oa=Object.freeze({__proto__:null,defaultParam:ta,fetchOauthTokens:na,getBasicAuthHeaders:ra,getOauthHeaders:ia,refreshAccessToken:aa});const sa=async e=>{var t;const{serverUrl:r,credentials:n,authMethod:a,defaultAccountType:i,authFunction:o}=e;let s={};switch(a){case"Basic":s=ra(n);break;case"Oauth":s=(await ia(n)).headers;break;case"Digest":s={Authorization:`Digest ${n.digestString}`};break;case"Custom":s=null!==(t=await(null==o?void 0:o(n)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const u=i?await Gn({account:{serverUrl:r,credentials:n,accountType:i},headers:s}):void 0,c=ta(cn,{url:r,headers:s}),l=ta(ln,{headers:s,url:r}),d=ta(dn,{headers:s,url:r}),h=ta(un,{headers:s}),f=ta(yn,{headers:s}),p=ta(mn,{headers:s}),g=ta(wn,{headers:s}),y=ta(vn,{headers:s}),m=ta(bn,{headers:s}),v=ta(En,{headers:s,account:u}),b=ta(Ln,{headers:s}),w=ta(kn,{headers:s}),E=ta(In,{headers:s}),A=ta(Pn,{headers:s,account:u}),T=ta(Un,{headers:s}),_=ta(jn,{headers:s}),C=ta(Bn,{headers:s}),D=ta(Mn,{headers:s}),x=ta(Vn,{account:u,headers:s}),O=ta(_n,{headers:s}),R=ta(Cn,{headers:s});return{davRequest:async e=>{const{init:t,...r}=e,{headers:n,...a}=t;return sn({...r,init:{...a,headers:{...s,...n}}})},propfind:h,createAccount:async e=>{const{account:t,headers:a,loadCollections:i,loadObjects:o}=e;return Gn({account:{serverUrl:r,credentials:n,...t},headers:{...s,...a},loadCollections:i,loadObjects:o})},createObject:c,updateObject:l,deleteObject:d,calendarQuery:b,addressBookQuery:O,collectionQuery:f,makeCollection:p,calendarMultiGet:w,makeCalendar:E,syncCollection:g,supportedReportSet:y,isCollectionDirty:m,smartCollectionSync:v,fetchCalendars:A,fetchCalendarObjects:T,createCalendarObject:_,updateCalendarObject:C,deleteCalendarObject:D,syncCalendars:x,fetchAddressBooks:ta(Dn,{account:u,headers:s}),addressBookMultiGet:R,fetchVCards:ta(xn,{headers:s}),createVCard:ta(On,{headers:s}),updateVCard:ta(Rn,{headers:s}),deleteVCard:ta(Fn,{headers:s})}};class ua{constructor(e){var t,r;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=ra(this.credentials);break;case"Oauth":this.authHeaders=(await ia(this.credentials)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await Gn({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:n,...a}=t;return sn({...r,init:{...a,headers:{...this.authHeaders,...n}}})}async createObject(...e){return ta(cn,{url:this.serverUrl,headers:this.authHeaders})(e[0])}async updateObject(...e){return ta(ln,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async deleteObject(...e){return ta(dn,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async propfind(...e){return ta(un,{headers:this.authHeaders})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:n,loadObjects:a}=e;return Gn({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:n,loadObjects:a})}async collectionQuery(...e){return ta(yn,{headers:this.authHeaders})(e[0])}async makeCollection(...e){return ta(mn,{headers:this.authHeaders})(e[0])}async syncCollection(...e){return ta(wn,{headers:this.authHeaders})(e[0])}async supportedReportSet(...e){return ta(vn,{headers:this.authHeaders})(e[0])}async isCollectionDirty(...e){return ta(bn,{headers:this.authHeaders})(e[0])}async smartCollectionSync(...e){return ta(En,{headers:this.authHeaders,account:this.account})(e[0])}async calendarQuery(...e){return ta(Ln,{headers:this.authHeaders})(e[0])}async makeCalendar(...e){return ta(In,{headers:this.authHeaders})(e[0])}async calendarMultiGet(...e){return ta(kn,{headers:this.authHeaders})(e[0])}async fetchCalendars(...e){return ta(Pn,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ta(Un,{headers:this.authHeaders})(e[0])}async createCalendarObject(...e){return ta(jn,{headers:this.authHeaders})(e[0])}async updateCalendarObject(...e){return ta(Bn,{headers:this.authHeaders})(e[0])}async deleteCalendarObject(...e){return ta(Mn,{headers:this.authHeaders})(e[0])}async syncCalendars(...e){return ta(Vn,{headers:this.authHeaders,account:this.account})(e[0])}async addressBookQuery(...e){return ta(_n,{headers:this.authHeaders})(e[0])}async addressBookMultiGet(...e){return ta(Cn,{headers:this.authHeaders})(e[0])}async fetchAddressBooks(...e){return ta(Dn,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchVCards(...e){return ta(xn,{headers:this.authHeaders})(e[0])}async createVCard(...e){return ta(On,{headers:this.authHeaders})(e[0])}async updateVCard(...e){return ta(Rn,{headers:this.authHeaders})(e[0])}async deleteVCard(...e){return ta(Fn,{headers:this.authHeaders})(e[0])}}var ca={DAVNamespace:P,DAVNamespaceShort:B,DAVAttributeMap:j,...Object.freeze({__proto__:null,DAVClient:ua,createDAVClient:sa}),...hn,...An,...Xn,...Sn,...Kn,...oa,...an};export{j as DAVAttributeMap,ua as DAVClient,P as DAVNamespace,B as DAVNamespaceShort,_n as addressBookQuery,kn as calendarMultiGet,Ln as calendarQuery,tn as cleanupFalsy,yn as collectionQuery,Gn as createAccount,jn as createCalendarObject,sa as createDAVClient,cn as createObject,On as createVCard,sn as davRequest,ca as default,Mn as deleteCalendarObject,dn as deleteObject,Fn as deleteVCard,Dn as fetchAddressBooks,Un as fetchCalendarObjects,Pn as fetchCalendars,na as fetchOauthTokens,xn as fetchVCards,$n as freeBusyQuery,ra as getBasicAuthHeaders,en as getDAVAttribute,ia as getOauthHeaders,bn as isCollectionDirty,In as makeCalendar,un as propfind,aa as refreshAccessToken,En as smartCollectionSync,vn as supportedReportSet,Vn as syncCalendars,wn as syncCollection,Bn as updateCalendarObject,ln as updateObject,Rn as updateVCard,Jr as urlContains,Zr as urlEquals}; +var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var n={exports:{}};!function(t,r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e&&e,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=p(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=g(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function A(e,t){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];A.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,n){return new Promise((function(i,a){var c=new w(e,n);if(c.signal&&c.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new A(n,r))}),0)},u.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){a(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof f?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,h(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}_.polyfill=!0,r.fetch||(r.fetch=_,r.Headers=f,r.Request=w,r.Response=A),t.Headers=f,t.Request=w,t.Response=A,t.fetch=_}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(r=o.fetch).default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,t.exports=r}(n,n.exports);var i=n.exports,o="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}var c=a,u=s;function l(e){if(c===setTimeout)return setTimeout(e,0);if((c===a||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}"function"==typeof o.setTimeout&&(c=setTimeout),"function"==typeof o.clearTimeout&&(u=clearTimeout);var h,d=[],f=!1,p=-1;function g(){f&&h&&(f=!1,h.length?d=h.concat(d):p=-1,d.length&&y())}function y(){if(!f){var e=l(g);f=!0;for(var t=d.length;t;){for(h=d,d=[];++p1)for(var r=1;r=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}return F=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(i){var o=Math.abs(i);if(o>=n)return a(i,o,n,"day");if(o>=r)return a(i,o,r,"hour");if(o>=t)return a(i,o,t,"minute");if(o>=e)return a(i,o,e,"second");return i+" ms"}(s):function(i){var o=Math.abs(i);if(o>=n)return Math.round(i/n)+"d";if(o>=r)return Math.round(i/r)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},F}var I=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==N&&"env"in N&&(e=N.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=I(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(L,L.exports);var P,U=t(L.exports);!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(P||(P={}));const j={[P.CALDAV]:"xmlns:c",[P.CARDDAV]:"xmlns:card",[P.CALENDAR_SERVER]:"xmlns:cs",[P.CALDAV_APPLE]:"xmlns:ca",[P.DAV]:"xmlns:d"};var B,M;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(B||(B={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(M||(M={}));var V=[],$=[],K="undefined"!=typeof Uint8Array?Uint8Array:Array,H=!1;function Y(){H=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)V[t]=e[t],$[e.charCodeAt(t)]=t;$["-".charCodeAt(0)]=62,$["_".charCodeAt(0)]=63}function q(e,t,r){for(var n,i,o=[],a=t;a>18&63]+V[i>>12&63]+V[i>>6&63]+V[63&i]);return o.join("")}function z(e){var t;H||Y();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,c=r-n;sc?c:s+a));return 1===n?(t=e[r-1],i+=V[t>>2],i+=V[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=V[t>>10],i+=V[t>>4&63],i+=V[t<<2&63],i+="="),o.push(i),o.join("")}function G(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,l=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)}function W(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*c-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=p,a/=256,u-=8);e[r+f-p]|=128*g}var Q={}.toString,X=Array.isArray||function(e){return"[object Array]"==Q.call(e)};function Z(){return ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function J(e,t){if(Z()=Z())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z().toString(16)+" bytes");return 0|e}function ae(e){return!(null==e||!e._isBuffer)}function se(e,t){if(ae(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ke(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Ie(e).length;default:if(n)return ke(e).length;t=(""+t).toLowerCase(),n=!0}}function ce(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Te(this,t,r);case"utf8":case"utf-8":return be(this,t,r);case"ascii":return Ee(this,t,r);case"latin1":case"binary":return Ae(this,t,r);case"base64":return ve(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function ue(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function le(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=ee.from(t,n)),ae(t))return 0===t.length?-1:he(e,t,r,n,i);if("number"==typeof t)return t&=255,ee.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):he(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function he(e,t,r,n,i){var o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;os&&(r=s-c),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function ve(e,t,r){return 0===t&&r===e.length?z(e):z(e.slice(t,r))}function be(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(e){var t=e.length;if(t<=we)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},ee.prototype.compare=function(e,t,r,n,i){if(!ae(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return de(this,e,t,r);case"utf8":case"utf-8":return fe(this,e,t,r);case"ascii":return pe(this,e,t,r);case"latin1":case"binary":return ge(this,e,t,r);case"base64":return ye(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var we=4096;function Ee(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function Oe(e,t,r,n,i,o){if(!ae(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function De(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function xe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Re(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Fe(e,t,r,n,i){return i||Re(e,0,r,4),W(e,t,r,n,23,4),r+4}function Se(e,t,r,n,i){return i||Re(e,0,r,8),W(e,t,r,n,52,8),r+8}ee.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},ee.prototype.readUInt8=function(e,t){return t||Ce(e,1,this.length),this[e]},ee.prototype.readUInt16LE=function(e,t){return t||Ce(e,2,this.length),this[e]|this[e+1]<<8},ee.prototype.readUInt16BE=function(e,t){return t||Ce(e,2,this.length),this[e]<<8|this[e+1]},ee.prototype.readUInt32LE=function(e,t){return t||Ce(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ee.prototype.readUInt32BE=function(e,t){return t||Ce(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ee.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ce(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},ee.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ce(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},ee.prototype.readInt8=function(e,t){return t||Ce(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ee.prototype.readInt16LE=function(e,t){t||Ce(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},ee.prototype.readInt16BE=function(e,t){t||Ce(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},ee.prototype.readInt32LE=function(e,t){return t||Ce(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ee.prototype.readInt32BE=function(e,t){return t||Ce(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ee.prototype.readFloatLE=function(e,t){return t||Ce(e,4,this.length),G(this,e,!0,23,4)},ee.prototype.readFloatBE=function(e,t){return t||Ce(e,4,this.length),G(this,e,!1,23,4)},ee.prototype.readDoubleLE=function(e,t){return t||Ce(e,8,this.length),G(this,e,!0,52,8)},ee.prototype.readDoubleBE=function(e,t){return t||Ce(e,8,this.length),G(this,e,!1,52,8)},ee.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Oe(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},ee.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,1,255,0),ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ee.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):De(this,e,t,!0),t+2},ee.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):De(this,e,t,!1),t+2},ee.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):xe(this,e,t,!0),t+4},ee.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):xe(this,e,t,!1),t+4},ee.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);Oe(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},ee.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,1,127,-128),ee.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ee.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):De(this,e,t,!0),t+2},ee.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):De(this,e,t,!1),t+2},ee.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,4,2147483647,-2147483648),ee.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):xe(this,e,t,!0),t+4},ee.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ee.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):xe(this,e,t,!1),t+4},ee.prototype.writeFloatLE=function(e,t,r){return Fe(this,e,t,!0,r)},ee.prototype.writeFloatBE=function(e,t,r){return Fe(this,e,t,!1,r)},ee.prototype.writeDoubleLE=function(e,t,r){return Se(this,e,t,!0,r)},ee.prototype.writeDoubleBE=function(e,t,r){return Se(this,e,t,!1,r)},ee.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!ee.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Ie(e){return function(e){var t,r,n,i,o,a;H||Y();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new K(3*s/4-o),n=o>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===o?(i=$[e.charCodeAt(t)]<<2|$[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===o&&(i=$[e.charCodeAt(t)]<<10|$[e.charCodeAt(t+1)]<<4|$[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Ne,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Pe(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Ue(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var je,Be={};function Me(){}function Ve(){Ve.init.call(this)}function $e(e){return void 0===e._maxListeners?Ve.defaultMaxListeners:e._maxListeners}function Ke(e,t,r,n){var i,o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]):(o=e._events=new Me,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=$e(e))&&i>0&&a.length>i){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=r,++e._eventsCount;return e}function He(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function Ye(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function qe(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Me.prototype=Object.create(null),Ve.EventEmitter=Ve,Ve.usingDomains=!1,Ve.prototype.domain=void 0,Ve.prototype._events=void 0,Ve.prototype._maxListeners=void 0,Ve.defaultMaxListeners=10,Ve.init=function(){this.domain=null,Ve.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Me,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ve.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Ve.prototype.getMaxListeners=function(){return $e(this)},Ve.prototype.emit=function(e){var t,r,n,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=qe(e,n),o=0;o0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Me,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,i=e.length;n0?Reflect.ownKeys(this._events):[]},je="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e};var ze=/%[sdj%]/g;function Ge(e){if(!at(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),it(t)?r.showHidden=t:t&&function(e,t){if(!t||!ut(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),st(r.showHidden)&&(r.showHidden=!1),st(r.depth)&&(r.depth=2),st(r.colors)&&(r.colors=!1),st(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Je),tt(r,e,r.depth)}function Je(e,t){var r=Ze.styles[t];return r?"["+Ze.colors[r][0]+"m"+e+"["+Ze.colors[r][1]+"m":e}function et(e,t){return e}function tt(e,t,r){if(e.customInspect&&t&&dt(t.inspect)&&t.inspect!==Ze&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return at(n)||(n=tt(e,n,r)),n}var i=function(e,t){if(st(t))return e.stylize("undefined","undefined");if(at(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"==typeof n)return e.stylize(""+t,"number");var n;if(it(t))return e.stylize(""+t,"boolean");if(ot(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),ht(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return rt(t);if(0===o.length){if(dt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ct(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(lt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(ht(t))return rt(t)}var c,u,l="",h=!1,d=["{","}"];(c=t,Array.isArray(c)&&(h=!0,d=["[","]"]),dt(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]");return ct(t)&&(l=" "+RegExp.prototype.toString.call(t)),lt(t)&&(l=" "+Date.prototype.toUTCString.call(t)),ht(t)&&(l=" "+rt(t)),0!==o.length||h&&0!=t.length?r<0?ct(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=h?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,d)):d[0]+l+d[1]}function rt(e){return"["+Error.prototype.toString.call(e)+"]"}function nt(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),pt(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=ot(r)?tt(e,c.value,null):tt(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),st(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function it(e){return"boolean"==typeof e}function ot(e){return null===e}function at(e){return"string"==typeof e}function st(e){return void 0===e}function ct(e){return ut(e)&&"[object RegExp]"===ft(e)}function ut(e){return"object"==typeof e&&null!==e}function lt(e){return ut(e)&&"[object Date]"===ft(e)}function ht(e){return ut(e)&&("[object Error]"===ft(e)||e instanceof Error)}function dt(e){return"function"==typeof e}function ft(e){return Object.prototype.toString.call(e)}function pt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gt(){this.head=null,this.tail=null,this.length=0}Ze.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ze.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},gt.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},gt.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},gt.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},gt.prototype.clear=function(){this.head=this.tail=null,this.length=0},gt.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},gt.prototype.concat=function(e){if(0===this.length)return ee.alloc(0);if(1===this.length)return this.head.data;for(var t=ee.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var yt=ee.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function mt(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!yt(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=bt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=wt;break;default:return void(this.write=vt)}this.charBuffer=new ee(6),this.charReceived=0,this.charLength=0}function vt(e){return e.toString(this.encoding)}function bt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function wt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}mt.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},mt.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},mt.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t};var Et=Object.freeze({__proto__:null,StringDecoder:mt});_t.ReadableState=Tt;var At=function(e){if(st(Qe)&&(Qe=N.env.NODE_DEBUG||""),e=e.toUpperCase(),!Xe[e])if(new RegExp("\\b"+e+"\\b","i").test(Qe)){Xe[e]=function(){var t=Ge.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Xe[e]=function(){};return Xe[e]}("stream");function Tt(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Zt&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new gt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new mt(e.encoding),this.encoding=e.encoding)}function _t(e){if(!(this instanceof _t))return new _t(e);this._readableState=new Tt(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Ve.call(this)}function Ct(e,t,r,n,i){var o=function(e,t){var r=null;ee.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,xt(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&xt(e))),function(e,t){t.readingMore||(t.readingMore=!0,m(Ft,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=Ot?e=Ot:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function xt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(At("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m(Rt,e):Rt(e))}function Rt(e){At("emit readable"),e.emit("readable"),Lt(e)}function Ft(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=ee.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function It(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,m(Pt,t,e))}function Pt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Ut(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return At("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?It(this):xt(this),null;if(0===(e=Dt(e,t))&&t.ended)return 0===t.length&&It(this),null;var n,i=t.needReadable;return At("need readable",i),(0===t.length||t.length-e0?kt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&It(this)),null!==n&&this.emit("data",n),n},_t.prototype._read=function(e){this.emit("error",new Error("not implemented"))},_t.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,At("pipe count=%d opts=%j",n.pipesCount,t);var i=!t||!1!==t.end?a:u;function o(e){At("onunpipe"),e===r&&u()}function a(){At("onend"),e.end()}n.endEmitted?m(i):r.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;At("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Lt(e))}}(r);e.on("drain",s);var c=!1;function u(){At("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",u),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function h(t){At("ondata"),l=!1,!1!==e.write(t)||l||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Ut(n.pipes,e))&&!c&&(At("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function d(t){var r;At("onerror",t),g(),e.removeListener("error",d),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function f(){e.removeListener("finish",p),g()}function p(){At("onfinish"),e.removeListener("close",f),g()}function g(){At("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",r),n.flowing||(At("pipe resume"),r.resume()),e},_t.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Vt.prototype._write=function(e,t,r){r(new Error("not implemented"))},Vt.prototype._writev=null,Vt.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,zt(e,t),r&&(t.finished?m(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},je(Zt,_t);for(var Wt=Object.keys(Vt.prototype),Qt=0;Qt"===o?(O(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=T.TEXT):y(o)?(n.state=T.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case T.SGML_DECL_QUOTED:o===n.q&&(n.state=T.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case T.DOCTYPE:">"===o?(n.state=T.TEXT,O(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=T.DOCTYPE_DTD:y(o)&&(n.state=T.DOCTYPE_QUOTED,n.q=o));continue;case T.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:"]"===o?(n.doctype+=o,n.state=T.DOCTYPE):"<"===o?(n.state=T.OPEN_WAKA,n.startTagPosition=n.position):y(o)?(n.doctype+=o,n.state=T.DOCTYPE_DTD_QUOTED,n.q=o):n.doctype+=o;continue;case T.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=T.DOCTYPE_DTD,n.q="");continue;case T.COMMENT:"-"===o?n.state=T.COMMENT_ENDING:n.comment+=o;continue;case T.COMMENT_ENDING:"-"===o?(n.state=T.COMMENT_ENDED,n.comment=x(n.opt,n.comment),n.comment&&O(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==o?(S(n,"Malformed comment"),n.comment+="--"+o,n.state=T.COMMENT):n.doctype&&!0!==n.doctype?n.state=T.DOCTYPE_DTD:n.state=T.TEXT;continue;case T.CDATA:"]"===o?n.state=T.CDATA_ENDING:n.cdata+=o;continue;case T.CDATA_ENDING:"]"===o?n.state=T.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===o?(n.cdata&&O(n,"oncdata",n.cdata),O(n,"onclosecdata"),n.cdata="",n.state=T.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=T.CDATA);continue;case T.PROC_INST:"?"===o?n.state=T.PROC_INST_ENDING:g(o)?n.state=T.PROC_INST_BODY:n.procInstName+=o;continue;case T.PROC_INST_BODY:if(!n.procInstBody&&g(o))continue;"?"===o?n.state=T.PROC_INST_ENDING:n.procInstBody+=o;continue;case T.PROC_INST_ENDING:">"===o?(O(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=T.TEXT):(n.procInstBody+="?"+o,n.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:v(d,o)?n.tagName+=o:(N(n),">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:(g(o)||S(n,"Invalid character in tag name"),n.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===o?(I(n,!0),P(n)):(S(n,"Forward-slash in opening tag not followed by >"),n.state=T.ATTRIB);continue;case T.ATTRIB:if(g(o))continue;">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:v(h,o)?(n.attribName=o,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===o?n.state=T.ATTRIB_VALUE:">"===o?(S(n,"Attribute without value"),n.attribValue=n.attribName,k(n),I(n)):g(o)?n.state=T.ATTRIB_NAME_SAW_WHITE:v(d,o)?n.attribName+=o:S(n,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=T.ATTRIB_VALUE;else{if(g(o))continue;S(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",O(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?I(n):v(h,o)?(n.attribName=o,n.state=T.ATTRIB_NAME):(S(n,"Invalid attribute name"),n.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(g(o))continue;y(o)?(n.q=o,n.state=T.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||R(n,"Unquoted attribute value"),n.state=T.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case T.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=T.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}k(n),n.q="",n.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:g(o)?n.state=T.ATTRIB:">"===o?I(n):"/"===o?n.state=T.OPEN_TAG_SLASH:v(h,o)?(S(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=T.ATTRIB_NAME):S(n,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!m(o)){"&"===o?n.state=T.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}k(n),">"===o?I(n):n.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(n.tagName)">"===o?P(n):v(d,o)?n.tagName+=o:n.script?(n.script+=""===o?P(n):S(n,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:var l,w;switch(n.state){case T.TEXT_ENTITY:l=T.TEXT,w="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:l=T.ATTRIB_VALUE_QUOTED,w="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:l=T.ATTRIB_VALUE_UNQUOTED,w="attribValue"}if(";"===o){var E=U(n);n.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(n.entity="",n.state=l,n.write(E)):(n[w]+=E,n.entity="",n.state=l)}else v(n.entity.length?p:f,o)?n.entity+=o:(S(n,"Invalid character in entity name"),n[w]+="&"+n.entity+o,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,o=0,a=r.length;on)switch(r[o]){case"textNode":D(t);break;case"cdata":O(t,"oncdata",t.cdata),t.cdata="";break;case"script":O(t,"onscript",t.script),t.script="";break;default:R(t,"Max buffer length exceeded: "+r[o])}i=Math.max(i,s)}var c=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=c+t.position}(n),n} +/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;D(e=this),""!==e.cdata&&(O(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(O(e,"onscript",e.script),e.script="")}};try{t=ar.Stream}catch(e){t=function(){}}t||(t=function(){});var i=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function o(e,r){if(!(this instanceof o))return new o(e,r);t.apply(this),this._parser=new n(e,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(e){a.emit("error",e),a._parser.error=null},this._decoder=null,i.forEach((function(e){Object.defineProperty(a,"on"+e,{get:function(){return a._parser["on"+e]},set:function(t){if(!t)return a.removeAllListeners(e),a._parser["on"+e]=t,t;a.on(e,t)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(t.prototype,{constructor:{value:o}}),o.prototype.write=function(e){if("function"==typeof ee.isBuffer&&ee.isBuffer(e)){if(!this._decoder){var t=sr.StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var a="[CDATA[",s="DOCTYPE",c="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",l={xml:c,xmlns:u},h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function y(e){return'"'===e||"'"===e}function m(e){return">"===e||g(e)}function v(e,t){return e.test(t)}function b(e,t){return!v(e,t)}var w,E,A,T=0;for(var _ in e.STATE={BEGIN:T++,BEGIN_WHITESPACE:T++,TEXT:T++,TEXT_ENTITY:T++,OPEN_WAKA:T++,SGML_DECL:T++,SGML_DECL_QUOTED:T++,DOCTYPE:T++,DOCTYPE_QUOTED:T++,DOCTYPE_DTD:T++,DOCTYPE_DTD_QUOTED:T++,COMMENT_STARTING:T++,COMMENT:T++,COMMENT_ENDING:T++,COMMENT_ENDED:T++,CDATA:T++,CDATA_ENDING:T++,CDATA_ENDING_2:T++,PROC_INST:T++,PROC_INST_BODY:T++,PROC_INST_ENDING:T++,OPEN_TAG:T++,OPEN_TAG_SLASH:T++,ATTRIB:T++,ATTRIB_NAME:T++,ATTRIB_NAME_SAW_WHITE:T++,ATTRIB_VALUE:T++,ATTRIB_VALUE_QUOTED:T++,ATTRIB_VALUE_CLOSED:T++,ATTRIB_VALUE_UNQUOTED:T++,ATTRIB_VALUE_ENTITY_Q:T++,ATTRIB_VALUE_ENTITY_U:T++,CLOSE_TAG:T++,CLOSE_TAG_SAW_WHITE:T++,SCRIPT:T++,SCRIPT_ENDING:T++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n})),e.STATE)e.STATE[e.STATE[_]]=_;function C(e,t,r){e[t]&&e[t](r)}function O(e,t,r){e.textNode&&D(e),C(e,t,r)}function D(e){e.textNode=x(e.opt,e.textNode),e.textNode&&C(e,"ontext",e.textNode),e.textNode=""}function x(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return D(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,C(e,"onerror",t),e}function F(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&R(e,"Unexpected end"),D(e),e.c="",e.closed=!0,C(e,"onend"),n.call(e,e.strict,e.opt),e}function S(e,t){if("object"!=typeof e||!(e instanceof n))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function N(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,O(e,"onopentagstart",r)}function L(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function k(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=L(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==c)S(e,"xml: prefix must be bound to "+c+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==u)S(e,"xmlns: prefix must be bound to "+u+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,O(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function I(e,t){if(e.opt.xmlns){var r=e.tag,n=L(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(S(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var i=e.tags[e.tags.length-1]||e;r.ns&&i.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){O(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var o=0,a=e.attribList.length;o",e.tagName="",void(e.state=T.SCRIPT);O(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=T.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,O(e,"onclosetag",e.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach((function(t){var r=o.ns[t];O(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function U(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),i=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),i=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==r?(S(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function j(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function B(e,t){var r="";return t1114111||E(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,r.push(e,t)),(n+1===i||r.length>16384)&&(o+=w.apply(null,r),r.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:A,configurable:!0,writable:!0}):String.fromCodePoint=A)}(Be);var cr,ur,lr=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},hr=lr,dr={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||hr(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}},fr=Be,pr=dr,gr=lr;function yr(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function mr(e,t){var r;if(cr.compact){if(!ur[cr[e+"Key"]]&&(gr(cr.alwaysArray)?-1!==cr.alwaysArray.indexOf(cr[e+"Key"]):cr.alwaysArray)&&(ur[cr[e+"Key"]]=[]),ur[cr[e+"Key"]]&&!gr(ur[cr[e+"Key"]])&&(ur[cr[e+"Key"]]=[ur[cr[e+"Key"]]]),e+"Fn"in cr&&"string"==typeof t&&(t=cr[e+"Fn"](t,ur)),"instruction"===e&&("instructionFn"in cr||"instructionNameFn"in cr))for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in cr)t[r]=cr.instructionFn(t[r],r,ur);else{var n=t[r];delete t[r],t[cr.instructionNameFn(r,n,ur)]=n}gr(ur[cr[e+"Key"]])?ur[cr[e+"Key"]].push(t):ur[cr[e+"Key"]]=t}else{ur[cr.elementsKey]||(ur[cr.elementsKey]=[]);var i={};if(i[cr.typeKey]=e,"instruction"===e){for(r in t)if(t.hasOwnProperty(r))break;i[cr.nameKey]="instructionNameFn"in cr?cr.instructionNameFn(r,t,ur):r,cr.instructionHasAttributes?(i[cr.attributesKey]=t[r][cr.attributesKey],"instructionFn"in cr&&(i[cr.attributesKey]=cr.instructionFn(i[cr.attributesKey],r,ur))):("instructionFn"in cr&&(t[r]=cr.instructionFn(t[r],r,ur)),i[cr.instructionKey]=t[r])}else e+"Fn"in cr&&(t=cr[e+"Fn"](t,ur)),i[cr[e+"Key"]]=t;cr.addParent&&(i[cr.parentKey]=ur),ur[cr.elementsKey].push(i)}}function vr(e){var t;if("attributesFn"in cr&&e&&(e=cr.attributesFn(e,ur)),(cr.trim||"attributeValueFn"in cr||"attributeNameFn"in cr||cr.nativeTypeAttributes)&&e)for(t in e)if(e.hasOwnProperty(t)&&(cr.trim&&(e[t]=e[t].trim()),cr.nativeTypeAttributes&&(e[t]=yr(e[t])),"attributeValueFn"in cr&&(e[t]=cr.attributeValueFn(e[t],t,ur)),"attributeNameFn"in cr)){var r=e[t];delete e[t],e[cr.attributeNameFn(t,e[t],ur)]=r}return e}function br(e){var t={};if(e.body&&("xml"===e.name.toLowerCase()||cr.instructionHasAttributes)){for(var r,n=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(r=n.exec(e.body));)t[r[1]]=r[2]||r[3]||r[4];t=vr(t)}if("xml"===e.name.toLowerCase()){if(cr.ignoreDeclaration)return;ur[cr.declarationKey]={},Object.keys(t).length&&(ur[cr.declarationKey][cr.attributesKey]=t),cr.addParent&&(ur[cr.declarationKey][cr.parentKey]=ur)}else{if(cr.ignoreInstruction)return;cr.trim&&(e.body=e.body.trim());var i={};cr.instructionHasAttributes&&Object.keys(t).length?(i[e.name]={},i[e.name][cr.attributesKey]=t):i[e.name]=e.body,mr("instruction",i)}}function wr(e,t){var r;if("object"==typeof e&&(t=e.attributes,e=e.name),t=vr(t),"elementNameFn"in cr&&(e=cr.elementNameFn(e,ur)),cr.compact){var n;if(r={},!cr.ignoreAttributes&&t&&Object.keys(t).length)for(n in r[cr.attributesKey]={},t)t.hasOwnProperty(n)&&(r[cr.attributesKey][n]=t[n]);!(e in ur)&&(gr(cr.alwaysArray)?-1!==cr.alwaysArray.indexOf(e):cr.alwaysArray)&&(ur[e]=[]),ur[e]&&!gr(ur[e])&&(ur[e]=[ur[e]]),gr(ur[e])?ur[e].push(r):ur[e]=r}else ur[cr.elementsKey]||(ur[cr.elementsKey]=[]),(r={})[cr.typeKey]="element",r[cr.nameKey]=e,!cr.ignoreAttributes&&t&&Object.keys(t).length&&(r[cr.attributesKey]=t),cr.alwaysChildren&&(r[cr.elementsKey]=[]),ur[cr.elementsKey].push(r);r[cr.parentKey]=ur,ur=r}function Er(e){cr.ignoreText||(e.trim()||cr.captureSpacesBetweenElements)&&(cr.trim&&(e=e.trim()),cr.nativeType&&(e=yr(e)),cr.sanitize&&(e=e.replace(/&/g,"&").replace(//g,">")),mr("text",e))}function Ar(e){cr.ignoreComment||(cr.trim&&(e=e.trim()),mr("comment",e))}function Tr(e){var t=ur[cr.parentKey];cr.addParent||delete ur[cr.parentKey],ur=t}function _r(e){cr.ignoreCdata||(cr.trim&&(e=e.trim()),mr("cdata",e))}function Cr(e){cr.ignoreDoctype||(e=e.replace(/^ /,""),cr.trim&&(e=e.trim()),mr("doctype",e))}function Or(e){e.note=e}var Dr=function(e,t){var r=fr.parser(!0,{}),n={};if(ur=n,cr=function(e){return cr=pr.copyOptions(e),pr.ensureFlagExists("ignoreDeclaration",cr),pr.ensureFlagExists("ignoreInstruction",cr),pr.ensureFlagExists("ignoreAttributes",cr),pr.ensureFlagExists("ignoreText",cr),pr.ensureFlagExists("ignoreComment",cr),pr.ensureFlagExists("ignoreCdata",cr),pr.ensureFlagExists("ignoreDoctype",cr),pr.ensureFlagExists("compact",cr),pr.ensureFlagExists("alwaysChildren",cr),pr.ensureFlagExists("addParent",cr),pr.ensureFlagExists("trim",cr),pr.ensureFlagExists("nativeType",cr),pr.ensureFlagExists("nativeTypeAttributes",cr),pr.ensureFlagExists("sanitize",cr),pr.ensureFlagExists("instructionHasAttributes",cr),pr.ensureFlagExists("captureSpacesBetweenElements",cr),pr.ensureAlwaysArrayExists(cr),pr.ensureKeyExists("declaration",cr),pr.ensureKeyExists("instruction",cr),pr.ensureKeyExists("attributes",cr),pr.ensureKeyExists("text",cr),pr.ensureKeyExists("comment",cr),pr.ensureKeyExists("cdata",cr),pr.ensureKeyExists("doctype",cr),pr.ensureKeyExists("type",cr),pr.ensureKeyExists("name",cr),pr.ensureKeyExists("elements",cr),pr.ensureKeyExists("parent",cr),pr.checkFnExists("doctype",cr),pr.checkFnExists("instruction",cr),pr.checkFnExists("cdata",cr),pr.checkFnExists("comment",cr),pr.checkFnExists("text",cr),pr.checkFnExists("instructionName",cr),pr.checkFnExists("elementName",cr),pr.checkFnExists("attributeName",cr),pr.checkFnExists("attributeValue",cr),pr.checkFnExists("attributes",cr),cr}(t),r.opt={strictEntities:!0},r.onopentag=wr,r.ontext=Er,r.oncomment=Ar,r.onclosetag=Tr,r.onerror=Or,r.oncdata=_r,r.ondoctype=Cr,r.onprocessinginstruction=br,r.write(e).close(),n[cr.elementsKey]){var i=n[cr.elementsKey];delete n[cr.elementsKey],n[cr.elementsKey]=i,delete n.text}return n},xr=dr,Rr=Dr;var Fr,Sr,Nr=dr,Lr=lr;function kr(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function Ir(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,Sr,Fr));var n,i,o,a,s=[];for(n in e)e.hasOwnProperty(n)&&null!==e[n]&&void 0!==e[n]&&(a=t.noQuotesForNativeAttributes&&"string"!=typeof e[n]?"":'"',i=(i=""+e[n]).replace(/"/g,"""),o="attributeNameFn"in t?t.attributeNameFn(n,i,Sr,Fr):n,s.push(t.spaces&&t.indentAttributes?kr(t,r+1,!1):" "),s.push(o+"="+a+("attributeValueFn"in t?t.attributeValueFn(i,n,Sr,Fr):i)+a));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&s.push(kr(t,r,!1)),s.join("")}function Pr(e,t,r){return Fr=e,Sr="xml",t.ignoreDeclaration?"":""}function Ur(e,t,r){if(t.ignoreInstruction)return"";var n;for(n in e)if(e.hasOwnProperty(n))break;var i="instructionNameFn"in t?t.instructionNameFn(n,e[n],Sr,Fr):n;if("object"==typeof e[n])return Fr=e,Sr=i,"";var o=e[n]?e[n]:"";return"instructionFn"in t&&(o=t.instructionFn(o,n,Sr,Fr)),""}function jr(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,Sr,Fr):e)+"--\x3e"}function Br(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function Mr(e,t){return t.ignoreDoctype?"":""}function Vr(e,t){return t.ignoreText?"":(e=(e=(e=""+e).replace(/&/g,"&")).replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,Sr,Fr):e)}function $r(e,t,r,n){return e.reduce((function(e,i){var o=kr(t,r,n&&!e);switch(i.type){case"element":return e+o+function(e,t,r){Fr=e,Sr=e.name;var n=[],i="elementNameFn"in t?t.elementNameFn(e.name,e):e.name;n.push("<"+i),e[t.attributesKey]&&n.push(Ir(e[t.attributesKey],t,r));var o=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&"preserve"===e[t.attributesKey]["xml:space"];return o||(o="fullTagEmptyElementFn"in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement),o?(n.push(">"),e[t.elementsKey]&&e[t.elementsKey].length&&(n.push($r(e[t.elementsKey],t,r+1)),Fr=e,Sr=e.name),n.push(t.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r")):n.push("/>"),n.join("")}(i,t,r);case"comment":return e+o+jr(i[t.commentKey],t);case"doctype":return e+o+Mr(i[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?o:"")+Br(i[t.cdataKey],t);case"text":return e+(t.indentText?o:"")+Vr(i[t.textKey],t);case"instruction":var a={};return a[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],e+(t.indentInstruction?o:"")+Ur(a,t,r)}}),"")}function Kr(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function Hr(e,t,r,n,i){Fr=e,Sr=t;var o="elementNameFn"in r?r.elementNameFn(t,e):t;if(null==e||""===e)return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+o+">":"<"+o+"/>";var a=[];if(t){if(a.push("<"+o),"object"!=typeof e)return a.push(">"+Vr(e,r)+""),a.join("");e[r.attributesKey]&&a.push(Ir(e[r.attributesKey],r,n));var s=Kr(e,r,!0)||e[r.attributesKey]&&"preserve"===e[r.attributesKey]["xml:space"];if(s||(s="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(t,e):r.fullTagEmptyElement),!s)return a.push("/>"),a.join("");a.push(">")}return a.push(Yr(e,r,n+1,!1)),Fr=e,Sr=t,t&&a.push((i?kr(r,n,!1):"")+""),a.join("")}function Yr(e,t,r,n){var i,o,a,s=[];for(o in e)if(e.hasOwnProperty(o))for(a=Lr(e[o])?e[o]:[e[o]],i=0;i{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},Zr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim();if(Math.abs(r.length-n.length)>1)return!1;const i="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(o)||t.includes(i)},Jr=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),n=t.trim(),i="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===n.slice(-1)?n.slice(0,-1):n;return e.includes(o)||t.includes(i)},en=e=>e.reduce(((e,t)=>({...e,[j[t]]:t})),{}),tn=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),rn=(e,t)=>t?{[e]:t}:{},nn=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var on=Object.freeze({__proto__:null,cleanupFalsy:tn,conditionalParam:rn,excludeHeaders:nn,getDAVAttribute:en,urlContains:Jr,urlEquals:Zr});const an=U("tsdav:request"),sn=async e=>{var t;const{url:r,init:n,convertIncoming:o=!0,parseOutgoing:a=!0,fetchOptions:s={}}=e,{headers:c={},body:u,namespace:l,method:h,attributes:d}=n,f=o?Qr.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...u,_attributes:d},{compact:!0,spaces:2,elementNameFn:e=>l&&!/^.+:.+/.test(e)?`${l}:${e}`:e}):u,p=await i.fetch(r,{headers:{"Content-Type":"text/xml;charset=UTF-8",...tn(c)},body:f,method:h,...s}),g=await p.text();if(!p.ok||!(null===(t=p.headers.get("content-type"))||void 0===t?void 0:t.includes("xml"))||!a)return[{href:p.url,ok:p.ok,status:p.status,statusText:p.statusText,raw:g}];const y=Qr.xml2js(g,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,n=Object.keys(r),i=n[n.length-1],o=r[i];if(o.length>0){o[o.length-1]=Xr(e)}else r[i]=Xr(e)}catch(e){an(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(y.multistatus.response)?y.multistatus.response:[y.multistatus.response]).map((e=>{var t,r;if(!e)return{status:p.status,statusText:p.statusText,ok:p.ok};const n=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:y,href:e.href,status:(null==n?void 0:n.groups)?Number.parseInt(null==n?void 0:n.groups.status,10):p.status,statusText:null!==(r=null===(t=null==n?void 0:n.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:p.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},cn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;return sn({url:t,init:{method:"PROPFIND",headers:nn(tn({depth:n,...i}),o),namespace:B.DAV,body:{propfind:{_attributes:en([P.CALDAV,P.CALDAV_APPLE,P.CALENDAR_SERVER,P.CARDDAV,P.DAV]),prop:r}}},fetchOptions:a})},un=async e=>{const{url:t,data:r,headers:n,headersToExclude:o,fetchOptions:a={}}=e;return i.fetch(t,{method:"PUT",body:r,headers:nn(n,o),...a})},ln=async e=>{const{url:t,data:r,etag:n,headers:o,headersToExclude:a,fetchOptions:s={}}=e;return i.fetch(t,{method:"PUT",body:r,headers:nn(tn({"If-Match":n,...o}),a),...s})},hn=async e=>{const{url:t,headers:r,etag:n,headersToExclude:o,fetchOptions:a={}}=e;return i.fetch(t,{method:"DELETE",headers:nn(tn({"If-Match":n,...r}),o),...a})};var dn=Object.freeze({__proto__:null,createObject:un,davRequest:sn,deleteObject:hn,propfind:cn,updateObject:ln});function fn(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const pn=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),gn=U("tsdav:collection"),yn=async e=>{const{url:t,body:r,depth:n,defaultNamespace:i=B.DAV,headers:o,headersToExclude:a,fetchOptions:s={}}=e,c=await sn({url:t,init:{method:"REPORT",headers:nn(tn({depth:n,...o}),a),namespace:i,body:r},fetchOptions:s});return 1!==c.length||c[0].raw?c:[]},mn=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;return sn({url:t,init:{method:"MKCOL",headers:nn(tn({depth:n,...i}),o),namespace:B.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:a})},vn=async e=>{var t,r,n,i,o;const{collection:a,headers:s,headersToExclude:c,fetchOptions:u={}}=e;return null!==(o=null===(i=null===(n=null===(r=null===(t=(await cn({url:a.url,props:{[`${B.DAV}:supported-report-set`]:{}},depth:"0",headers:nn(s,c),fetchOptions:u}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===n?void 0:n.supportedReport)||void 0===i?void 0:i.map((e=>Object.keys(e.report)[0])))&&void 0!==o?o:[]},bn=async e=>{var t,r,n;const{collection:i,headers:o,headersToExclude:a,fetchOptions:s={}}=e,c=(await cn({url:i.url,props:{[`${B.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:nn(o,a),fetchOptions:s})).filter((e=>Jr(i.url,e.href)))[0];if(!c)throw new Error("Collection does not exist on server");return{isDirty:`${i.ctag}`!=`${null===(t=c.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(n=null===(r=c.props)||void 0===r?void 0:r.getctag)||void 0===n?void 0:n.toString()}},wn=e=>{const{url:t,props:r,headers:n,syncLevel:i,syncToken:o,headersToExclude:a,fetchOptions:s}=e;return sn({url:t,init:{method:"REPORT",namespace:B.DAV,headers:nn({...n},a),body:{"sync-collection":{_attributes:en([P.CALDAV,P.CARDDAV,P.DAV]),"sync-level":i,"sync-token":o,[`${B.DAV}:prop`]:r}}},fetchOptions:s})},En=async e=>{var t,r,n,i,o,a,s,c,u,l,h;const{collection:d,method:f,headers:p,headersToExclude:g,account:y,detailedResult:m,fetchOptions:v={}}=e,b=["accountType","homeUrl"];if(!y||!fn(y,b)){if(!y)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${pn(y,b)} before smartCollectionSync`)}const w=null!=f?f:(null===(t=d.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(gn(`smart collection sync with type ${y.accountType} and method ${w}`),"webdav"===w){const e=await wn({url:d.url,props:{[`${B.DAV}:getetag`]:{},[`${"caldav"===y.accountType?B.CALDAV:B.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{},[`${B.DAV}:displayname`]:{}},syncLevel:1,syncToken:d.syncToken,headers:nn(p,g),fetchOptions:v}),t=e.filter((e=>{var t;const r="caldav"===y.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),u=t.filter((e=>404!==e.status)).map((e=>e.href)),l=t.filter((e=>404===e.status)).map((e=>e.href)),h=(u.length&&null!==(n=await(null===(r=null==d?void 0:d.objectMultiGet)||void 0===r?void 0:r.call(d,{url:d.url,props:{[`${B.DAV}:getetag`]:{},[`${"caldav"===y.accountType?B.CALDAV:B.CARDDAV}:${"caldav"===y.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:u,depth:"1",headers:nn(p,g),fetchOptions:v})))&&void 0!==n?n:[]).map((e=>{var t,r,n,i,o,a,s,c,u,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==y?void 0:y.accountType)?null!==(o=null===(i=null===(n=e.props)||void 0===n?void 0:n.calendarData)||void 0===i?void 0:i._cdata)&&void 0!==o?o:null===(a=e.props)||void 0===a?void 0:a.calendarData:null!==(u=null===(c=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===c?void 0:c._cdata)&&void 0!==u?u:null===(l=e.props)||void 0===l?void 0:l.addressData}})),f=null!==(i=d.objects)&&void 0!==i?i:[],b=h.filter((e=>f.every((t=>!Jr(t.url,e.url))))),w=f.reduce(((e,t)=>{const r=h.find((e=>Jr(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),E=l.map((e=>({url:e,etag:""}))),A=f.filter((e=>h.some((t=>Jr(e.url,t.url)&&t.etag===e.etag))));return{...d,objects:m?{created:b,updated:w,deleted:E}:[...A,...b,...w],syncToken:null!==(c=null===(s=null===(a=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===a?void 0:a.multistatus)||void 0===s?void 0:s.syncToken)&&void 0!==c?c:d.syncToken}}if("basic"===w){const{isDirty:e,newCtag:t}=await bn({collection:d,headers:nn(p,g),fetchOptions:v}),r=null!==(u=d.objects)&&void 0!==u?u:[],n=null!==(h=await(null===(l=d.fetchObjects)||void 0===l?void 0:l.call(d,{collection:d,headers:nn(p,g),fetchOptions:v})))&&void 0!==h?h:[],i=n.filter((e=>r.every((t=>!Jr(t.url,e.url))))),o=r.reduce(((e,t)=>{const r=n.find((e=>Jr(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),a=r.filter((e=>n.every((t=>!Jr(t.url,e.url))))),s=r.filter((e=>n.some((t=>Jr(e.url,t.url)&&t.etag===e.etag))));if(e)return{...d,objects:m?{created:i,updated:o,deleted:a}:[...s,...i,...o],ctag:t}}return m?{...d,objects:{created:[],updated:[],deleted:[]}}:d};var An=Object.freeze({__proto__:null,collectionQuery:yn,isCollectionDirty:bn,makeCollection:mn,smartCollectionSync:En,supportedReportSet:vn,syncCollection:wn});const Tn=U("tsdav:addressBook"),_n=async e=>{const{url:t,props:r,filters:n,depth:i,headers:o,headersToExclude:a,fetchOptions:s={}}=e;return yn({url:t,body:{"addressbook-query":{_attributes:en([P.CARDDAV,P.DAV]),[`${B.DAV}:prop`]:r,filter:null!=n?n:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:B.CARDDAV,depth:i,headers:nn(o,a),fetchOptions:s})},Cn=async e=>{const{url:t,props:r,objectUrls:n,depth:i,headers:o,headersToExclude:a,fetchOptions:s={}}=e;return yn({url:t,body:{"addressbook-multiget":{_attributes:en([P.DAV,P.CARDDAV]),[`${B.DAV}:prop`]:r,[`${B.DAV}:href`]:n}},defaultNamespace:B.CARDDAV,depth:i,headers:nn(o,a),fetchOptions:s})},On=async e=>{const{account:t,headers:r,props:n,headersToExclude:i,fetchOptions:o={}}=null!=e?e:{},a=["homeUrl","rootUrl"];if(!t||!fn(t,a)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${pn(t,a)} before fetchAddressBooks`)}const s=await cn({url:t.homeUrl,props:null!=n?n:{[`${B.DAV}:displayname`]:{},[`${B.CALENDAR_SERVER}:getctag`]:{},[`${B.DAV}:resourcetype`]:{},[`${B.DAV}:sync-token`]:{}},depth:"1",headers:nn(r,i),fetchOptions:o});return Promise.all(s.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,n,i,o,a,s,c,u,l;const h=null!==(i=null===(n=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===n?void 0:n._cdata)&&void 0!==i?i:null===(o=e.props)||void 0===o?void 0:o.displayname;return Tn(`Found address book named ${"string"==typeof h?h:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(a=e.href)&&void 0!==a?a:"",null!==(s=t.rootUrl)&&void 0!==s?s:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,displayName:"string"==typeof h?h:"",resourcetype:Object.keys(null===(u=e.props)||void 0===u?void 0:u.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}})).map((async e=>({...e,reports:await vn({collection:e,headers:nn(r,i),fetchOptions:o})}))))},Dn=async e=>{const{addressBook:t,headers:r,objectUrls:n,headersToExclude:i,urlFilter:o=e=>e,useMultiGet:a=!0,fetchOptions:s={}}=e;Tn(`Fetching vcards from ${null==t?void 0:t.url}`);const c=["url"];if(!t||!fn(t,c)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${pn(t,c)} before fetchVCards`)}const u=(null!=n?n:(await _n({url:t.url,props:{[`${B.DAV}:getetag`]:{}},depth:"1",headers:nn(r,i),fetchOptions:s})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(o).map((e=>new URL(e).pathname));let l=[];return u.length>0&&(l=a?await Cn({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CARDDAV}:address-data`]:{}},objectUrls:u,depth:"1",headers:nn(r,i),fetchOptions:s}):await _n({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CARDDAV}:address-data`]:{}},depth:"1",headers:nn(r,i),fetchOptions:s})),l.map((e=>{var r,n,i,o,a,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(n=e.props)||void 0===n?void 0:n.getetag,data:null!==(a=null===(o=null===(i=e.props)||void 0===i?void 0:i.addressData)||void 0===o?void 0:o._cdata)&&void 0!==a?a:null===(s=e.props)||void 0===s?void 0:s.addressData}}))},xn=async e=>{const{addressBook:t,vCardString:r,filename:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;return un({url:new URL(n,t.url).href,data:r,headers:nn({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...i},o),fetchOptions:a})},Rn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;return ln({url:t.url,data:t.data,etag:t.etag,headers:nn({"content-type":"text/vcard; charset=utf-8",...r},n),fetchOptions:i})},Fn=async e=>{const{vCard:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;return hn({url:t.url,etag:t.etag,headers:nn(r,n),fetchOptions:i})};var Sn=Object.freeze({__proto__:null,addressBookMultiGet:Cn,addressBookQuery:_n,createVCard:xn,deleteVCard:Fn,fetchAddressBooks:On,fetchVCards:Dn,updateVCard:Rn});const Nn=U("tsdav:calendar"),Ln=async e=>{const{url:t,props:r,filters:n,timezone:i,depth:o,headers:a,headersToExclude:s,fetchOptions:c={}}=e;return yn({url:t,body:{"calendar-query":tn({_attributes:en([P.CALDAV,P.CALENDAR_SERVER,P.CALDAV_APPLE,P.DAV]),[`${B.DAV}:prop`]:r,filter:n,timezone:i})},defaultNamespace:B.CALDAV,depth:o,headers:nn(a,s),fetchOptions:c})},kn=async e=>{const{url:t,props:r,objectUrls:n,filters:i,timezone:o,depth:a,headers:s,headersToExclude:c,fetchOptions:u={}}=e;return yn({url:t,body:{"calendar-multiget":{_attributes:en([P.DAV,P.CALDAV]),[`${B.DAV}:prop`]:r,[`${B.DAV}:href`]:n,...rn("filter",i),timezone:o}},defaultNamespace:B.CALDAV,depth:a,headers:nn(s,c),fetchOptions:u})},In=async e=>{const{url:t,props:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;return sn({url:t,init:{method:"MKCALENDAR",headers:nn(tn({depth:n,...i}),o),namespace:B.DAV,body:{[`${B.CALDAV}:mkcalendar`]:{_attributes:en([P.DAV,P.CALDAV,P.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:a})},Pn=async e=>{const{headers:t,account:r,props:n,projectedProps:i,headersToExclude:o,fetchOptions:a={}}=null!=e?e:{},s=["homeUrl","rootUrl"];if(!r||!fn(r,s)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${pn(r,s)} before fetchCalendars`)}const c=await cn({url:r.homeUrl,props:null!=n?n:{[`${B.CALDAV}:calendar-description`]:{},[`${B.CALDAV}:calendar-timezone`]:{},[`${B.DAV}:displayname`]:{},[`${B.CALDAV_APPLE}:calendar-color`]:{},[`${B.CALENDAR_SERVER}:getctag`]:{},[`${B.DAV}:resourcetype`]:{},[`${B.CALDAV}:supported-calendar-component-set`]:{},[`${B.DAV}:sync-token`]:{}},depth:"1",headers:nn(t,o),fetchOptions:a});return Promise.all(c.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,n,i;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(i=null===(n=e.props)||void 0===n?void 0:n.supportedCalendarComponentSet.comp)||void 0===i?void 0:i._attributes.name]).some((e=>Object.values(M).includes(e)))})).map((e=>{var t,n,o,a,s,c,u,l,h,d,f,p,g,y,m,v;const b=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,w=null===(n=e.props)||void 0===n?void 0:n.calendarTimezone;return{description:"string"==typeof b?b:"",timezone:"string"==typeof w?w:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(a=r.rootUrl)&&void 0!==a?a:"").href,ctag:null===(s=e.props)||void 0===s?void 0:s.getctag,calendarColor:null===(c=e.props)||void 0===c?void 0:c.calendarColor,displayName:null!==(l=null===(u=e.props)||void 0===u?void 0:u.displayname._cdata)&&void 0!==l?l:null===(h=e.props)||void 0===h?void 0:h.displayname,components:Array.isArray(null===(d=e.props)||void 0===d?void 0:d.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(g=null===(p=e.props)||void 0===p?void 0:p.supportedCalendarComponentSet.comp)||void 0===g?void 0:g._attributes.name],resourcetype:Object.keys(null===(y=e.props)||void 0===y?void 0:y.resourcetype),syncToken:null===(m=e.props)||void 0===m?void 0:m.syncToken,...rn("projectedProps",Object.fromEntries(Object.entries(null!==(v=e.props)&&void 0!==v?v:{}).filter((([e])=>null==i?void 0:i[e]))))}})).map((async e=>({...e,reports:await vn({collection:e,headers:nn(t,o),fetchOptions:a})}))))},Un=async e=>{const{calendar:t,objectUrls:r,filters:n,timeRange:i,headers:o,expand:a,urlFilter:s=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:c=!0,headersToExclude:u,fetchOptions:l={}}=e;if(i){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(i.start)&&e.test(i.end)||t.test(i.start)&&t.test(i.end)))throw new Error("invalid timeRange format, not in ISO8601")}Nn(`Fetching calendar objects from ${null==t?void 0:t.url}`);const h=["url"];if(!t||!fn(t,h)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${pn(t,h)} before fetchCalendarObjects`)}const d=null!=n?n:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...i?{"time-range":{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],f=(null!=r?r:(await Ln({url:t.url,props:{[`${B.DAV}:getetag`]:{...a&&i?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:d,depth:"1",headers:nn(o,u),fetchOptions:l})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(s).map((e=>new URL(e).pathname));let p=[];return f.length>0&&(p=!c||a?await Ln({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CALDAV}:calendar-data`]:{...a&&i?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:d,depth:"1",headers:nn(o,u),fetchOptions:l}):await kn({url:t.url,props:{[`${B.DAV}:getetag`]:{},[`${B.CALDAV}:calendar-data`]:{...a&&i?{[`${B.CALDAV}:expand`]:{_attributes:{start:`${new Date(i.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(i.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:f,depth:"1",headers:nn(o,u),fetchOptions:l})),p.map((e=>{var r,n,i,o,a,s;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(n=e.props)||void 0===n?void 0:n.getetag}`,data:null!==(a=null===(o=null===(i=e.props)||void 0===i?void 0:i.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==a?a:null===(s=e.props)||void 0===s?void 0:s.calendarData}}))},jn=async e=>{const{calendar:t,iCalString:r,filename:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;return un({url:new URL(n,t.url).href,data:r,headers:nn({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...i},o),fetchOptions:a})},Bn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;return ln({url:t.url,data:t.data,etag:t.etag,headers:nn({"content-type":"text/calendar; charset=utf-8",...r},n),fetchOptions:i})},Mn=async e=>{const{calendarObject:t,headers:r,headersToExclude:n,fetchOptions:i={}}=e;return hn({url:t.url,etag:t.etag,headers:nn(r,n),fetchOptions:i})},Vn=async e=>{var t;const{oldCalendars:r,account:n,detailedResult:i,headers:o,headersToExclude:a,fetchOptions:s={}}=e;if(!n)throw new Error("Must have account before syncCalendars");const c=null!==(t=null!=r?r:n.calendars)&&void 0!==t?t:[],u=await Pn({account:n,headers:nn(o,a),fetchOptions:s}),l=u.filter((e=>c.every((t=>!Jr(t.url,e.url)))));Nn(`new calendars: ${l.map((e=>e.displayName))}`);const h=c.reduce(((e,t)=>{const r=u.find((e=>Jr(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);Nn(`updated calendars: ${h.map((e=>e.displayName))}`);const d=await Promise.all(h.map((async e=>await En({collection:{...e,objectMultiGet:kn},method:"webdav",headers:nn(o,a),account:n,fetchOptions:s})))),f=c.filter((e=>u.every((t=>!Jr(t.url,e.url)))));Nn(`deleted calendars: ${f.map((e=>e.displayName))}`);const p=c.filter((e=>u.some((t=>Jr(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return i?{created:l,updated:h,deleted:f}:[...p,...l,...d]},$n=async e=>{const{url:t,timeRange:r,depth:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await yn({url:t,body:{"free-busy-query":tn({_attributes:en([P.CALDAV]),[`${B.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:B.CALDAV,depth:n,headers:nn(i,o),fetchOptions:a}))[0]};var Kn=Object.freeze({__proto__:null,calendarMultiGet:kn,calendarQuery:Ln,createCalendarObject:jn,deleteCalendarObject:Mn,fetchCalendarObjects:Un,fetchCalendars:Pn,freeBusyQuery:$n,makeCalendar:In,syncCalendars:Vn,updateCalendarObject:Bn});const Hn=U("tsdav:account"),Yn=async e=>{var t,r;Hn("Service discovery...");const{account:n,headers:o,headersToExclude:a,fetchOptions:s={}}=e,c=new URL(n.serverUrl),u=new URL(`/.well-known/${n.accountType}`,c);u.protocol=null!==(t=c.protocol)&&void 0!==t?t:"http";try{const e=await i.fetch(u.href,{headers:nn(o,a),method:"PROPFIND",redirect:"manual",...s});if(e.status>=300&&e.status<400){const t=e.headers.get("Location");if("string"==typeof t&&t.length){Hn(`Service discovery redirected to ${t}`);const e=new URL(t,c);return e.hostname===u.hostname&&u.port&&!e.port&&(e.port=u.port),e.protocol=null!==(r=c.protocol)&&void 0!==r?r:"http",e.href}}}catch(e){Hn(`Service discovery failed: ${e.stack}`)}return c.href},qn=async e=>{var t,r,n,i,o;const{account:a,headers:s,headersToExclude:c,fetchOptions:u={}}=e,l=["rootUrl"];if(!fn(a,l))throw new Error(`account must have ${pn(a,l)} before fetchPrincipalUrl`);Hn(`Fetching principal url from path ${a.rootUrl}`);const[h]=await cn({url:a.rootUrl,props:{[`${B.DAV}:current-user-principal`]:{}},depth:"0",headers:nn(s,c),fetchOptions:u});if(!h.ok&&(Hn(`Fetch principal url failed: ${h.statusText}`),401===h.status))throw new Error("Invalid credentials");return Hn(`Fetched principal url ${null===(r=null===(t=h.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(i=null===(n=h.props)||void 0===n?void 0:n.currentUserPrincipal)||void 0===i?void 0:i.href)&&void 0!==o?o:"",a.rootUrl).href},zn=async e=>{var t,r;const{account:n,headers:i,headersToExclude:o,fetchOptions:a={}}=e,s=["principalUrl","rootUrl"];if(!fn(n,s))throw new Error(`account must have ${pn(n,s)} before fetchHomeUrl`);Hn(`Fetch home url from ${n.principalUrl}`);const c=(await cn({url:n.principalUrl,props:"caldav"===n.accountType?{[`${B.CALDAV}:calendar-home-set`]:{}}:{[`${B.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:nn(i,o),fetchOptions:a})).find((e=>Jr(n.principalUrl,e.href)));if(!c||!c.ok)throw new Error("cannot find homeUrl");const u=new URL("caldav"===n.accountType?null===(t=null==c?void 0:c.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==c?void 0:c.props)||void 0===r?void 0:r.addressbookHomeSet.href,n.rootUrl).href;return Hn(`Fetched home url ${u}`),u},Gn=async e=>{const{account:t,headers:r,loadCollections:n=!1,loadObjects:i=!1,headersToExclude:o,fetchOptions:a={}}=e,s={...t};return s.rootUrl=await Yn({account:t,headers:nn(r,o),fetchOptions:a}),s.principalUrl=await qn({account:s,headers:nn(r,o),fetchOptions:a}),s.homeUrl=await zn({account:s,headers:nn(r,o),fetchOptions:a}),(n||i)&&("caldav"===t.accountType?s.calendars=await Pn({headers:nn(r,o),account:s,fetchOptions:a}):"carddav"===t.accountType&&(s.addressBooks=await On({headers:nn(r,o),account:s,fetchOptions:a}))),i&&("caldav"===t.accountType&&s.calendars?s.calendars=await Promise.all(s.calendars.map((async e=>({...e,objects:await Un({calendar:e,headers:nn(r,o),fetchOptions:a})})))):"carddav"===t.accountType&&s.addressBooks&&(s.addressBooks=await Promise.all(s.addressBooks.map((async e=>({...e,objects:await Dn({addressBook:e,headers:nn(r,o),fetchOptions:a})})))))),s};var Wn,Qn,Xn=Object.freeze({__proto__:null,createAccount:Gn,fetchHomeUrl:zn,fetchPrincipalUrl:qn,serviceDiscovery:Yn}),Zn={exports:{}};Wn=Zn,Qn=Zn.exports,function(t){var r=Qn,n=Wn&&Wn.exports==r&&Wn,i="object"==typeof e&&e;i.global!==i&&i.window!==i||(t=i);var o=function(e){this.message=e};(o.prototype=new Error).name="InvalidCharacterError";var a=function(e){throw new o(e)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,i,o=e.length%3,c="",u=-1,l=e.length-o;++u>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i);return 2==o?(t=e.charCodeAt(u)<<8,r=e.charCodeAt(++u),c+=s.charAt((i=t+r)>>10)+s.charAt(i>>4&63)+s.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(u),c+=s.charAt(i>>2)+s.charAt(i<<4&63)+"=="),c},decode:function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,i=0,o="",u=-1;++u>(-2*i&6)));return o},version:"1.0.0"};if(r&&!r.nodeType)if(n)n.exports=u;else for(var l in u)u.hasOwnProperty(l)&&(r[l]=u[l]);else t.base64=u}(e);var Jn=Zn.exports;const ei=U("tsdav:authHelper"),ti=(e,t)=>(...r)=>e({...t,...r[0]}),ri=e=>(ei(`Basic auth token generated: ${Jn.encode(`${e.username}:${e.password}`)}`),{authorization:`Basic ${Jn.encode(`${e.username}:${e.password}`)}`}),ni=async(e,t)=>{const r=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!fn(e,r))throw new Error(`Oauth credentials missing: ${pn(e,r)}`);const n=new URLSearchParams({grant_type:"authorization_code",code:e.authorizationCode,redirect_uri:e.redirectUrl,client_id:e.clientId,client_secret:e.clientSecret});ei(e.tokenUrl),ei(n.toString());const o=await i.fetch(e.tokenUrl,{method:"POST",body:n.toString(),headers:{"content-length":`${n.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return ei(`Fetch Oauth tokens failed: ${await o.text()}`),{}},ii=async(e,t)=>{const r=["refreshToken","clientId","clientSecret","tokenUrl"];if(!fn(e,r))throw new Error(`Oauth credentials missing: ${pn(e,r)}`);const n=new URLSearchParams({client_id:e.clientId,client_secret:e.clientSecret,refresh_token:e.refreshToken,grant_type:"refresh_token"}),o=await i.fetch(e.tokenUrl,{method:"POST",body:n.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=t?t:{}});if(o.ok){return await o.json()}return ei(`Refresh access token failed: ${await o.text()}`),{}},oi=async(e,t)=>{var r;ei("Fetching oauth headers");let n={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(r=e.expiration)&&void 0!==r?r:0))&&(n=await ii(e,t)):n=await ni(e,t),ei(`Oauth tokens fetched: ${n.access_token}`),{tokens:n,headers:{authorization:`Bearer ${n.access_token}`}}};var ai=Object.freeze({__proto__:null,defaultParam:ti,fetchOauthTokens:ni,getBasicAuthHeaders:ri,getOauthHeaders:oi,refreshAccessToken:ii});const si=async e=>{var t;const{serverUrl:r,credentials:n,authMethod:i,defaultAccountType:o,authFunction:a}=e;let s={};switch(i){case"Basic":s=ri(n);break;case"Oauth":s=(await oi(n)).headers;break;case"Digest":s={Authorization:`Digest ${n.digestString}`};break;case"Custom":s=null!==(t=await(null==a?void 0:a(n)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const c=o?await Gn({account:{serverUrl:r,credentials:n,accountType:o},headers:s}):void 0,u=ti(un,{url:r,headers:s}),l=ti(ln,{headers:s,url:r}),h=ti(hn,{headers:s,url:r}),d=ti(cn,{headers:s}),f=ti(yn,{headers:s}),p=ti(mn,{headers:s}),g=ti(wn,{headers:s}),y=ti(vn,{headers:s}),m=ti(bn,{headers:s}),v=ti(En,{headers:s,account:c}),b=ti(Ln,{headers:s}),w=ti(kn,{headers:s}),E=ti(In,{headers:s}),A=ti(Pn,{headers:s,account:c}),T=ti(Un,{headers:s}),_=ti(jn,{headers:s}),C=ti(Bn,{headers:s}),O=ti(Mn,{headers:s}),D=ti(Vn,{account:c,headers:s}),x=ti(_n,{headers:s}),R=ti(Cn,{headers:s});return{davRequest:async e=>{const{init:t,...r}=e,{headers:n,...i}=t;return sn({...r,init:{...i,headers:{...s,...n}}})},propfind:d,createAccount:async e=>{const{account:t,headers:i,loadCollections:o,loadObjects:a}=e;return Gn({account:{serverUrl:r,credentials:n,...t},headers:{...s,...i},loadCollections:o,loadObjects:a})},createObject:u,updateObject:l,deleteObject:h,calendarQuery:b,addressBookQuery:x,collectionQuery:f,makeCollection:p,calendarMultiGet:w,makeCalendar:E,syncCollection:g,supportedReportSet:y,isCollectionDirty:m,smartCollectionSync:v,fetchCalendars:A,fetchCalendarObjects:T,createCalendarObject:_,updateCalendarObject:C,deleteCalendarObject:O,syncCalendars:D,fetchAddressBooks:ti(On,{account:c,headers:s}),addressBookMultiGet:R,fetchVCards:ti(Dn,{headers:s}),createVCard:ti(xn,{headers:s}),updateVCard:ti(Rn,{headers:s}),deleteVCard:ti(Fn,{headers:s})}};class ci{constructor(e){var t,r,n;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(n=e.fetchOptions)&&void 0!==n?n:{}}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=ri(this.credentials);break;case"Oauth":this.authHeaders=(await oi(this.credentials,this.fetchOptions)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await Gn({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:n,...i}=t;return sn({...r,init:{...i,headers:{...this.authHeaders,...n}},fetchOptions:this.fetchOptions})}async createObject(...e){return ti(un,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateObject(...e){return ti(ln,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteObject(...e){return ti(hn,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async propfind(...e){return ti(cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:n,loadObjects:i,fetchOptions:o}=e;return Gn({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:n,loadObjects:i,fetchOptions:null!=o?o:this.fetchOptions})}async collectionQuery(...e){return ti(yn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCollection(...e){return ti(mn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCollection(...e){return ti(wn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async supportedReportSet(...e){return ti(vn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async isCollectionDirty(...e){return ti(bn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async smartCollectionSync(...e){return ti(En,{headers:this.authHeaders,fetchOptions:this.fetchOptions,account:this.account})(e[0])}async calendarQuery(...e){return ti(Ln,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCalendar(...e){return ti(In,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async calendarMultiGet(...e){return ti(kn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchCalendars(...e){return ti(Pn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ti(Un,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createCalendarObject(...e){return ti(jn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateCalendarObject(...e){return ti(Bn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteCalendarObject(...e){return ti(Mn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCalendars(...e){return ti(Vn,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(e[0])}async addressBookQuery(...e){return ti(_n,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async addressBookMultiGet(...e){return ti(Cn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return ti(On,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchVCards(...e){return ti(Dn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createVCard(...e){return ti(xn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateVCard(...e){return ti(Rn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteVCard(...e){return ti(Fn,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var ui={DAVNamespace:P,DAVNamespaceShort:B,DAVAttributeMap:j,...Object.freeze({__proto__:null,DAVClient:ci,createDAVClient:si}),...dn,...An,...Xn,...Sn,...Kn,...ai,...on};export{j as DAVAttributeMap,ci as DAVClient,P as DAVNamespace,B as DAVNamespaceShort,_n as addressBookQuery,kn as calendarMultiGet,Ln as calendarQuery,tn as cleanupFalsy,yn as collectionQuery,Gn as createAccount,jn as createCalendarObject,si as createDAVClient,un as createObject,xn as createVCard,sn as davRequest,ui as default,Mn as deleteCalendarObject,hn as deleteObject,Fn as deleteVCard,On as fetchAddressBooks,Un as fetchCalendarObjects,Pn as fetchCalendars,ni as fetchOauthTokens,Dn as fetchVCards,$n as freeBusyQuery,ri as getBasicAuthHeaders,en as getDAVAttribute,oi as getOauthHeaders,bn as isCollectionDirty,In as makeCalendar,cn as propfind,ii as refreshAccessToken,En as smartCollectionSync,vn as supportedReportSet,Vn as syncCalendars,wn as syncCollection,Bn as updateCalendarObject,ln as updateObject,Rn as updateVCard,Jr as urlContains,Zr as urlEquals}; diff --git a/dist/tsdav.min.mjs b/dist/tsdav.min.mjs index 9c10b67..94d32de 100644 --- a/dist/tsdav.min.mjs +++ b/dist/tsdav.min.mjs @@ -1 +1 @@ -import{fetch as e}from"cross-fetch";import t from"debug";import r from"xml-js";import{encode as a}from"base-64";var s;!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(s||(s={}));const o={[s.CALDAV]:"xmlns:c",[s.CARDDAV]:"xmlns:card",[s.CALENDAR_SERVER]:"xmlns:cs",[s.CALDAV_APPLE]:"xmlns:ca",[s.DAV]:"xmlns:d"};var n,d;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(n||(n={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(d||(d={}));const l=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},c=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},i=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},u=e=>e.reduce(((e,t)=>({...e,[o[t]]:t})),{}),h=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),p=(e,t)=>t?{[e]:t}:{},v=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var y=Object.freeze({__proto__:null,cleanupFalsy:h,conditionalParam:p,excludeHeaders:v,getDAVAttribute:u,urlContains:i,urlEquals:c});const f=t("tsdav:request"),m=async t=>{var a;const{url:s,init:o,convertIncoming:n=!0,parseOutgoing:d=!0}=t,{headers:c={},body:i,namespace:u,method:p,attributes:v}=o,y=n?r.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...i,_attributes:v},{compact:!0,spaces:2,elementNameFn:e=>u&&!/^.+:.+/.test(e)?`${u}:${e}`:e}):i,m=await e(s,{headers:{"Content-Type":"text/xml;charset=UTF-8",...h(c)},body:y,method:p}),A=await m.text();if(!m.ok||!(null===(a=m.headers.get("content-type"))||void 0===a?void 0:a.includes("xml"))||!d)return[{href:m.url,ok:m.ok,status:m.status,statusText:m.statusText,raw:A}];const g=r.xml2js(A,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=l(e)}else r[s]=l(e)}catch(e){f(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(g.multistatus.response)?g.multistatus.response:[g.multistatus.response]).map((e=>{var t,r;if(!e)return{status:m.status,statusText:m.statusText,ok:m.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:g,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):m.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:m.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},A=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:d}=e;return m({url:t,init:{method:"PROPFIND",headers:v(h({depth:a,...o}),d),namespace:n.DAV,body:{propfind:{_attributes:u([s.CALDAV,s.CALDAV_APPLE,s.CALENDAR_SERVER,s.CARDDAV,s.DAV]),prop:r}}}})},g=async t=>{const{url:r,data:a,headers:s,headersToExclude:o}=t;return e(r,{method:"PUT",body:a,headers:v(s,o)})},D=async t=>{const{url:r,data:a,etag:s,headers:o,headersToExclude:n}=t;return e(r,{method:"PUT",body:a,headers:v(h({"If-Match":s,...o}),n)})},C=async t=>{const{url:r,headers:a,etag:s,headersToExclude:o}=t;return e(r,{method:"DELETE",headers:v(h({"If-Match":s,...a}),o)})};var w=Object.freeze({__proto__:null,createObject:g,davRequest:m,deleteObject:C,propfind:A,updateObject:D});function b(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const V=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),$=t("tsdav:collection"),E=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=n.DAV,headers:o,headersToExclude:d}=e,l=await m({url:t,init:{method:"REPORT",headers:v(h({depth:a,...o}),d),namespace:s,body:r}});return 1!==l.length||l[0].raw?l:[]},T=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o}=e;return m({url:t,init:{method:"MKCOL",headers:v(h({depth:a,...s}),o),namespace:n.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0}})},k=async e=>{var t,r,a,s,o;const{collection:d,headers:l,headersToExclude:c}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await A({url:d.url,props:{[`${n.DAV}:supported-report-set`]:{}},depth:"0",headers:v(l,c)}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map((e=>Object.keys(e.report)[0])))&&void 0!==o?o:[]},_=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:d}=e,l=(await A({url:s.url,props:{[`${n.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:v(o,d)})).filter((e=>i(s.url,e.href)))[0];if(!l)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=l.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=l.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},O=e=>{const{url:t,props:r,headers:a,syncLevel:o,syncToken:d,headersToExclude:l}=e;return m({url:t,init:{method:"REPORT",namespace:n.DAV,headers:v({...a},l),body:{"sync-collection":{_attributes:u([s.CALDAV,s.CARDDAV,s.DAV]),"sync-level":o,"sync-token":d,[`${n.DAV}:prop`]:r}}}})},R=async e=>{var t,r,a,s,o,d,l,c,u,h,p;const{collection:y,method:f,headers:m,headersToExclude:A,account:g,detailedResult:D}=e,C=["accountType","homeUrl"];if(!g||!b(g,C)){if(!g)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${V(g,C)} before smartCollectionSync`)}const w=null!=f?f:(null===(t=y.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if($(`smart collection sync with type ${g.accountType} and method ${w}`),"webdav"===w){const e=await O({url:y.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===g.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{},[`${n.DAV}:displayname`]:{}},syncLevel:1,syncToken:y.syncToken,headers:v(m,A)}),t=e.filter((e=>{var t;const r="caldav"===g.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),u=t.filter((e=>404!==e.status)).map((e=>e.href)),h=t.filter((e=>404===e.status)).map((e=>e.href)),p=(u.length&&null!==(a=await(null===(r=null==y?void 0:y.objectMultiGet)||void 0===r?void 0:r.call(y,{url:y.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===g.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===g.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:u,depth:"1",headers:v(m,A)})))&&void 0!==a?a:[]).map((e=>{var t,r,a,s,o,n,d,l,c,i;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==g?void 0:g.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(n=e.props)||void 0===n?void 0:n.calendarData:null!==(c=null===(l=null===(d=e.props)||void 0===d?void 0:d.addressData)||void 0===l?void 0:l._cdata)&&void 0!==c?c:null===(i=e.props)||void 0===i?void 0:i.addressData}})),f=null!==(s=y.objects)&&void 0!==s?s:[],C=p.filter((e=>f.every((t=>!i(t.url,e.url))))),w=f.reduce(((e,t)=>{const r=p.find((e=>i(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),b=h.map((e=>({url:e,etag:""}))),V=f.filter((e=>p.some((t=>i(e.url,t.url)&&t.etag===e.etag))));return{...y,objects:D?{created:C,updated:w,deleted:b}:[...V,...C,...w],syncToken:null!==(c=null===(l=null===(d=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===d?void 0:d.multistatus)||void 0===l?void 0:l.syncToken)&&void 0!==c?c:y.syncToken}}if("basic"===w){const{isDirty:e,newCtag:t}=await _({collection:y,headers:v(m,A)}),r=null!==(u=y.objects)&&void 0!==u?u:[],a=null!==(p=await(null===(h=y.fetchObjects)||void 0===h?void 0:h.call(y,{collection:y,headers:v(m,A)})))&&void 0!==p?p:[],s=a.filter((e=>r.every((t=>!i(t.url,e.url))))),o=r.reduce(((e,t)=>{const r=a.find((e=>i(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),n=r.filter((e=>a.every((t=>!i(t.url,e.url))))),d=r.filter((e=>a.some((t=>i(e.url,t.url)&&t.etag===e.etag))));if(e)return{...y,objects:D?{created:s,updated:o,deleted:n}:[...d,...s,...o],ctag:t}}return D?{...y,objects:{created:[],updated:[],deleted:[]}}:y};var U=Object.freeze({__proto__:null,collectionQuery:E,isCollectionDirty:_,makeCollection:T,smartCollectionSync:R,supportedReportSet:k,syncCollection:O});const L=t("tsdav:addressBook"),j=async e=>{const{url:t,props:r,filters:a,depth:o,headers:d,headersToExclude:l}=e;return E({url:t,body:{"addressbook-query":{_attributes:u([s.CARDDAV,s.DAV]),[`${n.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:n.CARDDAV,depth:o,headers:v(d,l)})},S=async e=>{const{url:t,props:r,objectUrls:a,depth:o,headers:d}=e;return E({url:t,body:{"addressbook-multiget":{_attributes:u([s.DAV,s.CARDDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a}},defaultNamespace:n.CARDDAV,depth:o,headers:d})},x=async e=>{const{account:t,headers:r,props:a,headersToExclude:s}=null!=e?e:{},o=["homeUrl","rootUrl"];if(!t||!b(t,o)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${V(t,o)} before fetchAddressBooks`)}const d=await A({url:t.homeUrl,props:null!=a?a:{[`${n.DAV}:displayname`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:v(r,s)});return Promise.all(d.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,a,s,o,n,d,l,c,i;const u=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return L(`Found address book named ${"string"==typeof u?u:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(d=t.rootUrl)&&void 0!==d?d:"").href,ctag:null===(l=e.props)||void 0===l?void 0:l.getctag,displayName:"string"==typeof u?u:"",resourcetype:Object.keys(null===(c=e.props)||void 0===c?void 0:c.resourcetype),syncToken:null===(i=e.props)||void 0===i?void 0:i.syncToken}})).map((async e=>({...e,reports:await k({collection:e,headers:r})}))))},N=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:d=!0}=e;L(`Fetching vcards from ${null==t?void 0:t.url}`);const l=["url"];if(!t||!b(t,l)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${V(t,l)} before fetchVCards`)}const c=(null!=a?a:(await j({url:t.url,props:{[`${n.DAV}:getetag`]:{}},depth:"1",headers:v(r,s)})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(o).map((e=>new URL(e).pathname));let i=[];return c.length>0&&(i=d?await S({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},objectUrls:c,depth:"1",headers:v(r,s)}):await j({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},depth:"1",headers:v(r,s)})),i.map((e=>{var r,a,s,o,n,d;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(d=e.props)||void 0===d?void 0:d.addressData}}))},H=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o}=e;return g({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o)})},P=async e=>{const{vCard:t,headers:r,headersToExclude:a}=e;return D({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/vcard; charset=utf-8",...r},a)})},B=async e=>{const{vCard:t,headers:r,headersToExclude:a}=e;return C({url:t.url,etag:t.etag,headers:v(r,a)})};var I=Object.freeze({__proto__:null,addressBookMultiGet:S,addressBookQuery:j,createVCard:H,deleteVCard:B,fetchAddressBooks:x,fetchVCards:N,updateVCard:P});const F=t("tsdav:calendar"),M=async e=>{const{url:t,props:r,filters:a,timezone:o,depth:d,headers:l,headersToExclude:c}=e;return E({url:t,body:{"calendar-query":h({_attributes:u([s.CALDAV,s.CALENDAR_SERVER,s.CALDAV_APPLE,s.DAV]),[`${n.DAV}:prop`]:r,filter:a,timezone:o})},defaultNamespace:n.CALDAV,depth:d,headers:v(l,c)})},z=async e=>{const{url:t,props:r,objectUrls:a,filters:o,timezone:d,depth:l,headers:c,headersToExclude:i}=e;return E({url:t,body:{"calendar-multiget":{_attributes:u([s.DAV,s.CALDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a,...p("filter",o),timezone:d}},defaultNamespace:n.CALDAV,depth:l,headers:v(c,i)})},Z=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:d}=e;return m({url:t,init:{method:"MKCALENDAR",headers:v(h({depth:a,...o}),d),namespace:n.DAV,body:{[`${n.CALDAV}:mkcalendar`]:{_attributes:u([s.DAV,s.CALDAV,s.CALDAV_APPLE]),set:{prop:r}}}}})},G=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o}=null!=e?e:{},l=["homeUrl","rootUrl"];if(!r||!b(r,l)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${V(r,l)} before fetchCalendars`)}const c=await A({url:r.homeUrl,props:null!=a?a:{[`${n.CALDAV}:calendar-description`]:{},[`${n.CALDAV}:calendar-timezone`]:{},[`${n.DAV}:displayname`]:{},[`${n.CALDAV_APPLE}:calendar-color`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.CALDAV}:supported-calendar-component-set`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:v(t,o)});return Promise.all(c.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,a,s;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(s=null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp)||void 0===s?void 0:s._attributes.name]||[]).some((e=>Object.values(d).includes(e)))})).map((e=>{var t,a,o,n,d,l,c,i,u,h,v,y,f,m,A,g;const D=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,C=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof D?D:"",timezone:"string"==typeof C?C:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(n=r.rootUrl)&&void 0!==n?n:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,calendarColor:null===(l=e.props)||void 0===l?void 0:l.calendarColor,displayName:null!==(i=null===(c=e.props)||void 0===c?void 0:c.displayname._cdata)&&void 0!==i?i:null===(u=e.props)||void 0===u?void 0:u.displayname,components:Array.isArray(null===(h=e.props)||void 0===h?void 0:h.supportedCalendarComponentSet.comp)?null===(v=e.props)||void 0===v?void 0:v.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(f=null===(y=e.props)||void 0===y?void 0:y.supportedCalendarComponentSet.comp)||void 0===f?void 0:f._attributes.name],resourcetype:Object.keys(null===(m=e.props)||void 0===m?void 0:m.resourcetype),syncToken:null===(A=e.props)||void 0===A?void 0:A.syncToken,...p("projectedProps",Object.fromEntries(Object.entries(null!==(g=e.props)&&void 0!==g?g:{}).filter((([e])=>null==s?void 0:s[e]))))}})).map((async e=>({...e,reports:await k({collection:e,headers:v(t,o)})}))))},Q=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:d,urlFilter:l=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:c=!0,headersToExclude:i}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}F(`Fetching calendar objects from ${null==t?void 0:t.url}`);const u=["url"];if(!t||!b(t,u)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${V(t,u)} before fetchCalendarObjects`)}const h=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],p=(null!=r?r:(await M({url:t.url,props:{[`${n.DAV}:getetag`]:{...d&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:h,depth:"1",headers:v(o,i)})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(l).map((e=>new URL(e).pathname));let y=[];return p.length>0&&(y=!c||d?await M({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...d&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:h,depth:"1",headers:v(o,i)}):await z({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...d&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:p,depth:"1",headers:v(o,i)})),y.map((e=>{var r,a,s,o,n,d;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(d=e.props)||void 0===d?void 0:d.calendarData}}))},q=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o}=e;return g({url:new URL(a,t.url).href,data:r,headers:v({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o)})},J=async e=>{const{calendarObject:t,headers:r,headersToExclude:a}=e;return D({url:t.url,data:t.data,etag:t.etag,headers:v({"content-type":"text/calendar; charset=utf-8",...r},a)})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a}=e;return C({url:t.url,etag:t.etag,headers:v(r,a)})},W=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:n}=e;if(!a)throw new Error("Must have account before syncCalendars");const d=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],l=await G({account:a,headers:v(o,n)}),c=l.filter((e=>d.every((t=>!i(t.url,e.url)))));F(`new calendars: ${c.map((e=>e.displayName))}`);const u=d.reduce(((e,t)=>{const r=l.find((e=>i(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);F(`updated calendars: ${u.map((e=>e.displayName))}`);const h=await Promise.all(u.map((async e=>await R({collection:{...e,objectMultiGet:z},method:"webdav",headers:v(o,n),account:a})))),p=d.filter((e=>l.every((t=>!i(t.url,e.url)))));F(`deleted calendars: ${p.map((e=>e.displayName))}`);const y=d.filter((e=>l.some((t=>i(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return s?{created:c,updated:u,deleted:p}:[...y,...c,...h]},Y=async e=>{const{url:t,timeRange:r,depth:a,headers:o,headersToExclude:d}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await E({url:t,body:{"free-busy-query":h({_attributes:u([s.CALDAV]),[`${n.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:n.CALDAV,depth:a,headers:v(o,d)}))[0]};var X=Object.freeze({__proto__:null,calendarMultiGet:z,calendarQuery:M,createCalendarObject:q,deleteCalendarObject:K,fetchCalendarObjects:Q,fetchCalendars:G,freeBusyQuery:Y,makeCalendar:Z,syncCalendars:W,updateCalendarObject:J});const ee=t("tsdav:account"),te=async t=>{var r,a;ee("Service discovery...");const{account:s,headers:o,headersToExclude:n}=t,d=new URL(s.serverUrl),l=new URL(`/.well-known/${s.accountType}`,d);l.protocol=null!==(r=d.protocol)&&void 0!==r?r:"http";try{const t=await e(l.href,{headers:v(o,n),method:"PROPFIND",redirect:"manual"});if(t.status>=300&&t.status<400){const e=t.headers.get("Location");if("string"==typeof e&&e.length){ee(`Service discovery redirected to ${e}`);const t=new URL(e,d);return t.hostname===l.hostname&&l.port&&!t.port&&(t.port=l.port),t.protocol=null!==(a=d.protocol)&&void 0!==a?a:"http",t.href}}}catch(e){ee(`Service discovery failed: ${e.stack}`)}return d.href},re=async e=>{var t,r,a,s,o;const{account:d,headers:l,headersToExclude:c}=e,i=["rootUrl"];if(!b(d,i))throw new Error(`account must have ${V(d,i)} before fetchPrincipalUrl`);ee(`Fetching principal url from path ${d.rootUrl}`);const[u]=await A({url:d.rootUrl,props:{[`${n.DAV}:current-user-principal`]:{}},depth:"0",headers:v(l,c)});if(!u.ok&&(ee(`Fetch principal url failed: ${u.statusText}`),401===u.status))throw new Error("Invalid credentials");return ee(`Fetched principal url ${null===(r=null===(t=u.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=u.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",d.rootUrl).href},ae=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o}=e,d=["principalUrl","rootUrl"];if(!b(a,d))throw new Error(`account must have ${V(a,d)} before fetchHomeUrl`);ee(`Fetch home url from ${a.principalUrl}`);const l=(await A({url:a.principalUrl,props:"caldav"===a.accountType?{[`${n.CALDAV}:calendar-home-set`]:{}}:{[`${n.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:v(s,o)})).find((e=>i(a.principalUrl,e.href)));if(!l||!l.ok)throw new Error("cannot find homeUrl");const c=new URL("caldav"===a.accountType?null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==l?void 0:l.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return ee(`Fetched home url ${c}`),c},se=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o}=e,n={...t};return n.rootUrl=await te({account:t,headers:v(r,o)}),n.principalUrl=await re({account:n,headers:v(r,o)}),n.homeUrl=await ae({account:n,headers:v(r,o)}),(a||s)&&("caldav"===t.accountType?n.calendars=await G({headers:v(r,o),account:n}):"carddav"===t.accountType&&(n.addressBooks=await x({headers:v(r,o),account:n}))),s&&("caldav"===t.accountType&&n.calendars?n.calendars=await Promise.all(n.calendars.map((async e=>({...e,objects:await Q({calendar:e,headers:v(r,o)})})))):"carddav"===t.accountType&&n.addressBooks&&(n.addressBooks=await Promise.all(n.addressBooks.map((async e=>({...e,objects:await N({addressBook:e,headers:v(r,o)})})))))),n};var oe=Object.freeze({__proto__:null,createAccount:se,fetchHomeUrl:ae,fetchPrincipalUrl:re,serviceDiscovery:te});const ne=t("tsdav:authHelper"),de=(e,t)=>(...r)=>e({...t,...r[0]}),le=e=>(ne(`Basic auth token generated: ${a(`${e.username}:${e.password}`)}`),{authorization:`Basic ${a(`${e.username}:${e.password}`)}`}),ce=async t=>{const r=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!b(t,r))throw new Error(`Oauth credentials missing: ${V(t,r)}`);const a=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:t.redirectUrl,client_id:t.clientId,client_secret:t.clientSecret});ne(t.tokenUrl),ne(a.toString());const s=await e(t.tokenUrl,{method:"POST",body:a.toString(),headers:{"content-length":`${a.toString().length}`,"content-type":"application/x-www-form-urlencoded"}});if(s.ok){return await s.json()}return ne(`Fetch Oauth tokens failed: ${await s.text()}`),{}},ie=async t=>{const r=["refreshToken","clientId","clientSecret","tokenUrl"];if(!b(t,r))throw new Error(`Oauth credentials missing: ${V(t,r)}`);const a=new URLSearchParams({client_id:t.clientId,client_secret:t.clientSecret,refresh_token:t.refreshToken,grant_type:"refresh_token"}),s=await e(t.tokenUrl,{method:"POST",body:a.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(s.ok){return await s.json()}return ne(`Refresh access token failed: ${await s.text()}`),{}},ue=async e=>{var t;ne("Fetching oauth headers");let r={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(t=e.expiration)&&void 0!==t?t:0))&&(r=await ie(e)):r=await ce(e),ne(`Oauth tokens fetched: ${r.access_token}`),{tokens:r,headers:{authorization:`Bearer ${r.access_token}`}}};var he=Object.freeze({__proto__:null,defaultParam:de,fetchOauthTokens:ce,getBasicAuthHeaders:le,getOauthHeaders:ue,refreshAccessToken:ie});const pe=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:n}=e;let d={};switch(s){case"Basic":d=le(a);break;case"Oauth":d=(await ue(a)).headers;break;case"Digest":d={Authorization:`Digest ${a.digestString}`};break;case"Custom":d=null!==(t=await(null==n?void 0:n(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const l=o?await se({account:{serverUrl:r,credentials:a,accountType:o},headers:d}):void 0,c=de(g,{url:r,headers:d}),i=de(D,{headers:d,url:r}),u=de(C,{headers:d,url:r}),h=de(A,{headers:d}),p=de(E,{headers:d}),v=de(T,{headers:d}),y=de(O,{headers:d}),f=de(k,{headers:d}),w=de(_,{headers:d}),b=de(R,{headers:d,account:l}),V=de(M,{headers:d}),$=de(z,{headers:d}),U=de(Z,{headers:d}),L=de(G,{headers:d,account:l}),I=de(Q,{headers:d}),F=de(q,{headers:d}),Y=de(J,{headers:d}),X=de(K,{headers:d}),ee=de(W,{account:l,headers:d}),te=de(j,{headers:d}),re=de(S,{headers:d});return{davRequest:async e=>{const{init:t,...r}=e,{headers:a,...s}=t;return m({...r,init:{...s,headers:{...d,...a}}})},propfind:h,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:n}=e;return se({account:{serverUrl:r,credentials:a,...t},headers:{...d,...s},loadCollections:o,loadObjects:n})},createObject:c,updateObject:i,deleteObject:u,calendarQuery:V,addressBookQuery:te,collectionQuery:p,makeCollection:v,calendarMultiGet:$,makeCalendar:U,syncCollection:y,supportedReportSet:f,isCollectionDirty:w,smartCollectionSync:b,fetchCalendars:L,fetchCalendarObjects:I,createCalendarObject:F,updateCalendarObject:Y,deleteCalendarObject:X,syncCalendars:ee,fetchAddressBooks:de(x,{account:l,headers:d}),addressBookMultiGet:re,fetchVCards:de(N,{headers:d}),createVCard:de(H,{headers:d}),updateVCard:de(P,{headers:d}),deleteVCard:de(B,{headers:d})}};class ve{constructor(e){var t,r;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=le(this.credentials);break;case"Oauth":this.authHeaders=(await ue(this.credentials)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await se({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:a,...s}=t;return m({...r,init:{...s,headers:{...this.authHeaders,...a}}})}async createObject(...e){return de(g,{url:this.serverUrl,headers:this.authHeaders})(e[0])}async updateObject(...e){return de(D,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async deleteObject(...e){return de(C,{headers:this.authHeaders,url:this.serverUrl})(e[0])}async propfind(...e){return de(A,{headers:this.authHeaders})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s}=e;return se({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s})}async collectionQuery(...e){return de(E,{headers:this.authHeaders})(e[0])}async makeCollection(...e){return de(T,{headers:this.authHeaders})(e[0])}async syncCollection(...e){return de(O,{headers:this.authHeaders})(e[0])}async supportedReportSet(...e){return de(k,{headers:this.authHeaders})(e[0])}async isCollectionDirty(...e){return de(_,{headers:this.authHeaders})(e[0])}async smartCollectionSync(...e){return de(R,{headers:this.authHeaders,account:this.account})(e[0])}async calendarQuery(...e){return de(M,{headers:this.authHeaders})(e[0])}async makeCalendar(...e){return de(Z,{headers:this.authHeaders})(e[0])}async calendarMultiGet(...e){return de(z,{headers:this.authHeaders})(e[0])}async fetchCalendars(...e){return de(G,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return de(Q,{headers:this.authHeaders})(e[0])}async createCalendarObject(...e){return de(q,{headers:this.authHeaders})(e[0])}async updateCalendarObject(...e){return de(J,{headers:this.authHeaders})(e[0])}async deleteCalendarObject(...e){return de(K,{headers:this.authHeaders})(e[0])}async syncCalendars(...e){return de(W,{headers:this.authHeaders,account:this.account})(e[0])}async addressBookQuery(...e){return de(j,{headers:this.authHeaders})(e[0])}async addressBookMultiGet(...e){return de(S,{headers:this.authHeaders})(e[0])}async fetchAddressBooks(...e){return de(x,{headers:this.authHeaders,account:this.account})(null==e?void 0:e[0])}async fetchVCards(...e){return de(N,{headers:this.authHeaders})(e[0])}async createVCard(...e){return de(H,{headers:this.authHeaders})(e[0])}async updateVCard(...e){return de(P,{headers:this.authHeaders})(e[0])}async deleteVCard(...e){return de(B,{headers:this.authHeaders})(e[0])}}var ye={DAVNamespace:s,DAVNamespaceShort:n,DAVAttributeMap:o,...Object.freeze({__proto__:null,DAVClient:ve,createDAVClient:pe}),...w,...U,...oe,...I,...X,...he,...y};export{o as DAVAttributeMap,ve as DAVClient,s as DAVNamespace,n as DAVNamespaceShort,j as addressBookQuery,z as calendarMultiGet,M as calendarQuery,h as cleanupFalsy,E as collectionQuery,se as createAccount,q as createCalendarObject,pe as createDAVClient,g as createObject,H as createVCard,m as davRequest,ye as default,K as deleteCalendarObject,C as deleteObject,B as deleteVCard,x as fetchAddressBooks,Q as fetchCalendarObjects,G as fetchCalendars,ce as fetchOauthTokens,N as fetchVCards,Y as freeBusyQuery,le as getBasicAuthHeaders,u as getDAVAttribute,ue as getOauthHeaders,_ as isCollectionDirty,Z as makeCalendar,A as propfind,ie as refreshAccessToken,R as smartCollectionSync,k as supportedReportSet,W as syncCalendars,O as syncCollection,J as updateCalendarObject,D as updateObject,P as updateVCard,i as urlContains,c as urlEquals}; +import{fetch as e}from"cross-fetch";import t from"debug";import r from"xml-js";import{encode as a}from"base-64";var s;!function(e){e.CALENDAR_SERVER="http://calendarserver.org/ns/",e.CALDAV_APPLE="http://apple.com/ns/ical/",e.CALDAV="urn:ietf:params:xml:ns:caldav",e.CARDDAV="urn:ietf:params:xml:ns:carddav",e.DAV="DAV:"}(s||(s={}));const o={[s.CALDAV]:"xmlns:c",[s.CARDDAV]:"xmlns:card",[s.CALENDAR_SERVER]:"xmlns:cs",[s.CALDAV_APPLE]:"xmlns:ca",[s.DAV]:"xmlns:d"};var n,c;!function(e){e.CALDAV="c",e.CARDDAV="card",e.CALENDAR_SERVER="cs",e.CALDAV_APPLE="ca",e.DAV="d"}(n||(n={})),function(e){e.VEVENT="VEVENT",e.VTODO="VTODO",e.VJOURNAL="VJOURNAL",e.VFREEBUSY="VFREEBUSY",e.VTIMEZONE="VTIMEZONE",e.VALARM="VALARM"}(c||(c={}));const d=e=>{const t=Number(e);if(!Number.isNaN(t))return t;const r=e.toLowerCase();return"true"===r||"false"!==r&&e},i=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim();if(Math.abs(r.length-a.length)>1)return!1;const s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},l=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=e.trim(),a=t.trim(),s="/"===r.slice(-1)?r.slice(0,-1):r,o="/"===a.slice(-1)?a.slice(0,-1):a;return e.includes(o)||t.includes(s)},u=e=>e.reduce(((e,t)=>({...e,[o[t]]:t})),{}),h=e=>Object.entries(e).reduce(((e,[t,r])=>r?{...e,[t]:r}:e),{}),p=(e,t)=>t?{[e]:t}:{},f=(e,t)=>e?t&&0!==t.length?Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e)))):e:{};var v=Object.freeze({__proto__:null,cleanupFalsy:h,conditionalParam:p,excludeHeaders:f,getDAVAttribute:u,urlContains:l,urlEquals:i});const y=t("tsdav:request"),m=async t=>{var a;const{url:s,init:o,convertIncoming:n=!0,parseOutgoing:c=!0,fetchOptions:i={}}=t,{headers:l={},body:u,namespace:p,method:f,attributes:v}=o,m=n?r.js2xml({_declaration:{_attributes:{version:"1.0",encoding:"utf-8"}},...u,_attributes:v},{compact:!0,spaces:2,elementNameFn:e=>p&&!/^.+:.+/.test(e)?`${p}:${e}`:e}):u,O=await e(s,{headers:{"Content-Type":"text/xml;charset=UTF-8",...h(l)},body:m,method:f,...i}),A=await O.text();if(!O.ok||!(null===(a=O.headers.get("content-type"))||void 0===a?void 0:a.includes("xml"))||!c)return[{href:O.url,ok:O.ok,status:O.status,statusText:O.statusText,raw:A}];const g=r.xml2js(A,{compact:!0,trim:!0,textFn:(e,t)=>{try{const r=t._parent,a=Object.keys(r),s=a[a.length-1],o=r[s];if(o.length>0){o[o.length-1]=d(e)}else r[s]=d(e)}catch(e){y(e.stack)}},elementNameFn:e=>e.replace(/^.+:/,"").replace(/([-_]\w)/g,(e=>e[1].toUpperCase())),attributesFn:e=>{const t={...e};return delete t.xmlns,t},ignoreDeclaration:!0});return(Array.isArray(g.multistatus.response)?g.multistatus.response:[g.multistatus.response]).map((e=>{var t,r;if(!e)return{status:O.status,statusText:O.statusText,ok:O.ok};const a=/^\S+\s(?\d+)\s(?.+)$/.exec(e.status);return{raw:g,href:e.href,status:(null==a?void 0:a.groups)?Number.parseInt(null==a?void 0:a.groups.status,10):O.status,statusText:null!==(r=null===(t=null==a?void 0:a.groups)||void 0===t?void 0:t.statusText)&&void 0!==r?r:O.statusText,ok:!e.error,error:e.error,responsedescription:e.responsedescription,props:(Array.isArray(e.propstat)?e.propstat:[e.propstat]).reduce(((e,t)=>({...e,...null==t?void 0:t.prop})),{})}}))},O=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={}}=e;return m({url:t,init:{method:"PROPFIND",headers:f(h({depth:a,...o}),c),namespace:n.DAV,body:{propfind:{_attributes:u([s.CALDAV,s.CALDAV_APPLE,s.CALENDAR_SERVER,s.CARDDAV,s.DAV]),prop:r}}},fetchOptions:d})},A=async t=>{const{url:r,data:a,headers:s,headersToExclude:o,fetchOptions:n={}}=t;return e(r,{method:"PUT",body:a,headers:f(s,o),...n})},g=async t=>{const{url:r,data:a,etag:s,headers:o,headersToExclude:n,fetchOptions:c={}}=t;return e(r,{method:"PUT",body:a,headers:f(h({"If-Match":s,...o}),n),...c})},D=async t=>{const{url:r,headers:a,etag:s,headersToExclude:o,fetchOptions:n={}}=t;return e(r,{method:"DELETE",headers:f(h({"If-Match":s,...a}),o),...n})};var C=Object.freeze({__proto__:null,createObject:A,davRequest:m,deleteObject:D,propfind:O,updateObject:g});function w(e,t){const r=e=>t.every((t=>e[t]));return Array.isArray(e)?e.every((e=>r(e))):r(e)}const b=(e,t)=>t.reduce(((t,r)=>e[r]?t:`${t.length?`${t},`:""}${r.toString()}`),""),V=t("tsdav:collection"),$=async e=>{const{url:t,body:r,depth:a,defaultNamespace:s=n.DAV,headers:o,headersToExclude:c,fetchOptions:d={}}=e,i=await m({url:t,init:{method:"REPORT",headers:f(h({depth:a,...o}),c),namespace:s,body:r},fetchOptions:d});return 1!==i.length||i[0].raw?i:[]},E=async e=>{const{url:t,props:r,depth:a,headers:s,headersToExclude:o,fetchOptions:c={}}=e;return m({url:t,init:{method:"MKCOL",headers:f(h({depth:a,...s}),o),namespace:n.DAV,body:r?{mkcol:{set:{prop:r}}}:void 0},fetchOptions:c})},T=async e=>{var t,r,a,s,o;const{collection:c,headers:d,headersToExclude:i,fetchOptions:l={}}=e;return null!==(o=null===(s=null===(a=null===(r=null===(t=(await O({url:c.url,props:{[`${n.DAV}:supported-report-set`]:{}},depth:"0",headers:f(d,i),fetchOptions:l}))[0])||void 0===t?void 0:t.props)||void 0===r?void 0:r.supportedReportSet)||void 0===a?void 0:a.supportedReport)||void 0===s?void 0:s.map((e=>Object.keys(e.report)[0])))&&void 0!==o?o:[]},k=async e=>{var t,r,a;const{collection:s,headers:o,headersToExclude:c,fetchOptions:d={}}=e,i=(await O({url:s.url,props:{[`${n.CALENDAR_SERVER}:getctag`]:{}},depth:"0",headers:f(o,c),fetchOptions:d})).filter((e=>l(s.url,e.href)))[0];if(!i)throw new Error("Collection does not exist on server");return{isDirty:`${s.ctag}`!=`${null===(t=i.props)||void 0===t?void 0:t.getctag}`,newCtag:null===(a=null===(r=i.props)||void 0===r?void 0:r.getctag)||void 0===a?void 0:a.toString()}},_=e=>{const{url:t,props:r,headers:a,syncLevel:o,syncToken:c,headersToExclude:d,fetchOptions:i}=e;return m({url:t,init:{method:"REPORT",namespace:n.DAV,headers:f({...a},d),body:{"sync-collection":{_attributes:u([s.CALDAV,s.CARDDAV,s.DAV]),"sync-level":o,"sync-token":c,[`${n.DAV}:prop`]:r}}},fetchOptions:i})},R=async e=>{var t,r,a,s,o,c,d,i,u,h,p;const{collection:v,method:y,headers:m,headersToExclude:O,account:A,detailedResult:g,fetchOptions:D={}}=e,C=["accountType","homeUrl"];if(!A||!w(A,C)){if(!A)throw new Error("no account for smartCollectionSync");throw new Error(`account must have ${b(A,C)} before smartCollectionSync`)}const $=null!=y?y:(null===(t=v.reports)||void 0===t?void 0:t.includes("syncCollection"))?"webdav":"basic";if(V(`smart collection sync with type ${A.accountType} and method ${$}`),"webdav"===$){const e=await _({url:v.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===A.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===A.accountType?"calendar-data":"address-data"}`]:{},[`${n.DAV}:displayname`]:{}},syncLevel:1,syncToken:v.syncToken,headers:f(m,O),fetchOptions:D}),t=e.filter((e=>{var t;const r="caldav"===A.accountType?".ics":".vcf";return(null===(t=e.href)||void 0===t?void 0:t.slice(-4))===r})),u=t.filter((e=>404!==e.status)).map((e=>e.href)),h=t.filter((e=>404===e.status)).map((e=>e.href)),p=(u.length&&null!==(a=await(null===(r=null==v?void 0:v.objectMultiGet)||void 0===r?void 0:r.call(v,{url:v.url,props:{[`${n.DAV}:getetag`]:{},[`${"caldav"===A.accountType?n.CALDAV:n.CARDDAV}:${"caldav"===A.accountType?"calendar-data":"address-data"}`]:{}},objectUrls:u,depth:"1",headers:f(m,O),fetchOptions:D})))&&void 0!==a?a:[]).map((e=>{var t,r,a,s,o,n,c,d,i,l;return{url:null!==(t=e.href)&&void 0!==t?t:"",etag:null===(r=e.props)||void 0===r?void 0:r.getetag,data:"caldav"===(null==A?void 0:A.accountType)?null!==(o=null===(s=null===(a=e.props)||void 0===a?void 0:a.calendarData)||void 0===s?void 0:s._cdata)&&void 0!==o?o:null===(n=e.props)||void 0===n?void 0:n.calendarData:null!==(i=null===(d=null===(c=e.props)||void 0===c?void 0:c.addressData)||void 0===d?void 0:d._cdata)&&void 0!==i?i:null===(l=e.props)||void 0===l?void 0:l.addressData}})),y=null!==(s=v.objects)&&void 0!==s?s:[],C=p.filter((e=>y.every((t=>!l(t.url,e.url))))),w=y.reduce(((e,t)=>{const r=p.find((e=>l(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),b=h.map((e=>({url:e,etag:""}))),V=y.filter((e=>p.some((t=>l(e.url,t.url)&&t.etag===e.etag))));return{...v,objects:g?{created:C,updated:w,deleted:b}:[...V,...C,...w],syncToken:null!==(i=null===(d=null===(c=null===(o=e[0])||void 0===o?void 0:o.raw)||void 0===c?void 0:c.multistatus)||void 0===d?void 0:d.syncToken)&&void 0!==i?i:v.syncToken}}if("basic"===$){const{isDirty:e,newCtag:t}=await k({collection:v,headers:f(m,O),fetchOptions:D}),r=null!==(u=v.objects)&&void 0!==u?u:[],a=null!==(p=await(null===(h=v.fetchObjects)||void 0===h?void 0:h.call(v,{collection:v,headers:f(m,O),fetchOptions:D})))&&void 0!==p?p:[],s=a.filter((e=>r.every((t=>!l(t.url,e.url))))),o=r.reduce(((e,t)=>{const r=a.find((e=>l(e.url,t.url)));return r&&r.etag&&r.etag!==t.etag?[...e,r]:e}),[]),n=r.filter((e=>a.every((t=>!l(t.url,e.url))))),c=r.filter((e=>a.some((t=>l(e.url,t.url)&&t.etag===e.etag))));if(e)return{...v,objects:g?{created:s,updated:o,deleted:n}:[...c,...s,...o],ctag:t}}return g?{...v,objects:{created:[],updated:[],deleted:[]}}:v};var U=Object.freeze({__proto__:null,collectionQuery:$,isCollectionDirty:k,makeCollection:E,smartCollectionSync:R,supportedReportSet:T,syncCollection:_});const L=t("tsdav:addressBook"),j=async e=>{const{url:t,props:r,filters:a,depth:o,headers:c,headersToExclude:d,fetchOptions:i={}}=e;return $({url:t,body:{"addressbook-query":{_attributes:u([s.CARDDAV,s.DAV]),[`${n.DAV}:prop`]:r,filter:null!=a?a:{"prop-filter":{_attributes:{name:"FN"}}}}},defaultNamespace:n.CARDDAV,depth:o,headers:f(c,d),fetchOptions:i})},x=async e=>{const{url:t,props:r,objectUrls:a,depth:o,headers:c,headersToExclude:d,fetchOptions:i={}}=e;return $({url:t,body:{"addressbook-multiget":{_attributes:u([s.DAV,s.CARDDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a}},defaultNamespace:n.CARDDAV,depth:o,headers:f(c,d),fetchOptions:i})},S=async e=>{const{account:t,headers:r,props:a,headersToExclude:s,fetchOptions:o={}}=null!=e?e:{},c=["homeUrl","rootUrl"];if(!t||!w(t,c)){if(!t)throw new Error("no account for fetchAddressBooks");throw new Error(`account must have ${b(t,c)} before fetchAddressBooks`)}const d=await O({url:t.homeUrl,props:null!=a?a:{[`${n.DAV}:displayname`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:f(r,s),fetchOptions:o});return Promise.all(d.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("addressbook")})).map((e=>{var r,a,s,o,n,c,d,i,l;const u=null!==(s=null===(a=null===(r=e.props)||void 0===r?void 0:r.displayname)||void 0===a?void 0:a._cdata)&&void 0!==s?s:null===(o=e.props)||void 0===o?void 0:o.displayname;return L(`Found address book named ${"string"==typeof u?u:""},\n props: ${JSON.stringify(e.props)}`),{url:new URL(null!==(n=e.href)&&void 0!==n?n:"",null!==(c=t.rootUrl)&&void 0!==c?c:"").href,ctag:null===(d=e.props)||void 0===d?void 0:d.getctag,displayName:"string"==typeof u?u:"",resourcetype:Object.keys(null===(i=e.props)||void 0===i?void 0:i.resourcetype),syncToken:null===(l=e.props)||void 0===l?void 0:l.syncToken}})).map((async e=>({...e,reports:await T({collection:e,headers:f(r,s),fetchOptions:o})}))))},N=async e=>{const{addressBook:t,headers:r,objectUrls:a,headersToExclude:s,urlFilter:o=e=>e,useMultiGet:c=!0,fetchOptions:d={}}=e;L(`Fetching vcards from ${null==t?void 0:t.url}`);const i=["url"];if(!t||!w(t,i)){if(!t)throw new Error("cannot fetchVCards for undefined addressBook");throw new Error(`addressBook must have ${b(t,i)} before fetchVCards`)}const l=(null!=a?a:(await j({url:t.url,props:{[`${n.DAV}:getetag`]:{}},depth:"1",headers:f(r,s),fetchOptions:d})).map((e=>{var t;return e.ok&&null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(o).map((e=>new URL(e).pathname));let u=[];return l.length>0&&(u=c?await x({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},objectUrls:l,depth:"1",headers:f(r,s),fetchOptions:d}):await j({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CARDDAV}:address-data`]:{}},depth:"1",headers:f(r,s),fetchOptions:d})),u.map((e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:null===(a=e.props)||void 0===a?void 0:a.getetag,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.addressData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.addressData}}))},H=async e=>{const{addressBook:t,vCardString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return A({url:new URL(a,t.url).href,data:r,headers:f({"content-type":"text/vcard; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n})},P=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return g({url:t.url,data:t.data,etag:t.etag,headers:f({"content-type":"text/vcard; charset=utf-8",...r},a),fetchOptions:s})},B=async e=>{const{vCard:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return D({url:t.url,etag:t.etag,headers:f(r,a),fetchOptions:s})};var I=Object.freeze({__proto__:null,addressBookMultiGet:x,addressBookQuery:j,createVCard:H,deleteVCard:B,fetchAddressBooks:S,fetchVCards:N,updateVCard:P});const F=t("tsdav:calendar"),M=async e=>{const{url:t,props:r,filters:a,timezone:o,depth:c,headers:d,headersToExclude:i,fetchOptions:l={}}=e;return $({url:t,body:{"calendar-query":h({_attributes:u([s.CALDAV,s.CALENDAR_SERVER,s.CALDAV_APPLE,s.DAV]),[`${n.DAV}:prop`]:r,filter:a,timezone:o})},defaultNamespace:n.CALDAV,depth:c,headers:f(d,i),fetchOptions:l})},z=async e=>{const{url:t,props:r,objectUrls:a,filters:o,timezone:c,depth:d,headers:i,headersToExclude:l,fetchOptions:h={}}=e;return $({url:t,body:{"calendar-multiget":{_attributes:u([s.DAV,s.CALDAV]),[`${n.DAV}:prop`]:r,[`${n.DAV}:href`]:a,...p("filter",o),timezone:c}},defaultNamespace:n.CALDAV,depth:d,headers:f(i,l),fetchOptions:h})},Z=async e=>{const{url:t,props:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={}}=e;return m({url:t,init:{method:"MKCALENDAR",headers:f(h({depth:a,...o}),c),namespace:n.DAV,body:{[`${n.CALDAV}:mkcalendar`]:{_attributes:u([s.DAV,s.CALDAV,s.CALDAV_APPLE]),set:{prop:r}}}},fetchOptions:d})},G=async e=>{const{headers:t,account:r,props:a,projectedProps:s,headersToExclude:o,fetchOptions:d={}}=null!=e?e:{},i=["homeUrl","rootUrl"];if(!r||!w(r,i)){if(!r)throw new Error("no account for fetchCalendars");throw new Error(`account must have ${b(r,i)} before fetchCalendars`)}const l=await O({url:r.homeUrl,props:null!=a?a:{[`${n.CALDAV}:calendar-description`]:{},[`${n.CALDAV}:calendar-timezone`]:{},[`${n.DAV}:displayname`]:{},[`${n.CALDAV_APPLE}:calendar-color`]:{},[`${n.CALENDAR_SERVER}:getctag`]:{},[`${n.DAV}:resourcetype`]:{},[`${n.CALDAV}:supported-calendar-component-set`]:{},[`${n.DAV}:sync-token`]:{}},depth:"1",headers:f(t,o),fetchOptions:d});return Promise.all(l.filter((e=>{var t,r;return Object.keys(null!==(r=null===(t=e.props)||void 0===t?void 0:t.resourcetype)&&void 0!==r?r:{}).includes("calendar")})).filter((e=>{var t,r,a,s;return(Array.isArray(null===(t=e.props)||void 0===t?void 0:t.supportedCalendarComponentSet.comp)?null===(r=e.props)||void 0===r?void 0:r.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(s=null===(a=e.props)||void 0===a?void 0:a.supportedCalendarComponentSet.comp)||void 0===s?void 0:s._attributes.name]).some((e=>Object.values(c).includes(e)))})).map((e=>{var t,a,o,n,c,d,i,l,u,h,f,v,y,m,O,A;const g=null===(t=e.props)||void 0===t?void 0:t.calendarDescription,D=null===(a=e.props)||void 0===a?void 0:a.calendarTimezone;return{description:"string"==typeof g?g:"",timezone:"string"==typeof D?D:"",url:new URL(null!==(o=e.href)&&void 0!==o?o:"",null!==(n=r.rootUrl)&&void 0!==n?n:"").href,ctag:null===(c=e.props)||void 0===c?void 0:c.getctag,calendarColor:null===(d=e.props)||void 0===d?void 0:d.calendarColor,displayName:null!==(l=null===(i=e.props)||void 0===i?void 0:i.displayname._cdata)&&void 0!==l?l:null===(u=e.props)||void 0===u?void 0:u.displayname,components:Array.isArray(null===(h=e.props)||void 0===h?void 0:h.supportedCalendarComponentSet.comp)?null===(f=e.props)||void 0===f?void 0:f.supportedCalendarComponentSet.comp.map((e=>e._attributes.name)):[null===(y=null===(v=e.props)||void 0===v?void 0:v.supportedCalendarComponentSet.comp)||void 0===y?void 0:y._attributes.name],resourcetype:Object.keys(null===(m=e.props)||void 0===m?void 0:m.resourcetype),syncToken:null===(O=e.props)||void 0===O?void 0:O.syncToken,...p("projectedProps",Object.fromEntries(Object.entries(null!==(A=e.props)&&void 0!==A?A:{}).filter((([e])=>null==s?void 0:s[e]))))}})).map((async e=>({...e,reports:await T({collection:e,headers:f(t,o),fetchOptions:d})}))))},Q=async e=>{const{calendar:t,objectUrls:r,filters:a,timeRange:s,headers:o,expand:c,urlFilter:d=e=>Boolean(null==e?void 0:e.includes(".ics")),useMultiGet:i=!0,headersToExclude:l,fetchOptions:u={}}=e;if(s){const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(s.start)&&e.test(s.end)||t.test(s.start)&&t.test(s.end)))throw new Error("invalid timeRange format, not in ISO8601")}F(`Fetching calendar objects from ${null==t?void 0:t.url}`);const h=["url"];if(!t||!w(t,h)){if(!t)throw new Error("cannot fetchCalendarObjects for undefined calendar");throw new Error(`calendar must have ${b(t,h)} before fetchCalendarObjects`)}const p=null!=a?a:[{"comp-filter":{_attributes:{name:"VCALENDAR"},"comp-filter":{_attributes:{name:"VEVENT"},...s?{"time-range":{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}}}],v=(null!=r?r:(await M({url:t.url,props:{[`${n.DAV}:getetag`]:{...c&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:p,depth:"1",headers:f(o,l),fetchOptions:u})).map((e=>{var t;return null!==(t=e.href)&&void 0!==t?t:""}))).map((e=>e.startsWith("http")||!e?e:new URL(e,t.url).href)).filter(d).map((e=>new URL(e).pathname));let y=[];return v.length>0&&(y=!i||c?await M({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},filters:p,depth:"1",headers:f(o,l),fetchOptions:u}):await z({url:t.url,props:{[`${n.DAV}:getetag`]:{},[`${n.CALDAV}:calendar-data`]:{...c&&s?{[`${n.CALDAV}:expand`]:{_attributes:{start:`${new Date(s.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(s.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}}:{}}},objectUrls:v,depth:"1",headers:f(o,l),fetchOptions:u})),y.map((e=>{var r,a,s,o,n,c;return{url:new URL(null!==(r=e.href)&&void 0!==r?r:"",t.url).href,etag:`${null===(a=e.props)||void 0===a?void 0:a.getetag}`,data:null!==(n=null===(o=null===(s=e.props)||void 0===s?void 0:s.calendarData)||void 0===o?void 0:o._cdata)&&void 0!==n?n:null===(c=e.props)||void 0===c?void 0:c.calendarData}}))},q=async e=>{const{calendar:t,iCalString:r,filename:a,headers:s,headersToExclude:o,fetchOptions:n={}}=e;return A({url:new URL(a,t.url).href,data:r,headers:f({"content-type":"text/calendar; charset=utf-8","If-None-Match":"*",...s},o),fetchOptions:n})},J=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return g({url:t.url,data:t.data,etag:t.etag,headers:f({"content-type":"text/calendar; charset=utf-8",...r},a),fetchOptions:s})},K=async e=>{const{calendarObject:t,headers:r,headersToExclude:a,fetchOptions:s={}}=e;return D({url:t.url,etag:t.etag,headers:f(r,a),fetchOptions:s})},W=async e=>{var t;const{oldCalendars:r,account:a,detailedResult:s,headers:o,headersToExclude:n,fetchOptions:c={}}=e;if(!a)throw new Error("Must have account before syncCalendars");const d=null!==(t=null!=r?r:a.calendars)&&void 0!==t?t:[],i=await G({account:a,headers:f(o,n),fetchOptions:c}),u=i.filter((e=>d.every((t=>!l(t.url,e.url)))));F(`new calendars: ${u.map((e=>e.displayName))}`);const h=d.reduce(((e,t)=>{const r=i.find((e=>l(e.url,t.url)));return r&&(r.syncToken&&`${r.syncToken}`!=`${t.syncToken}`||r.ctag&&`${r.ctag}`!=`${t.ctag}`)?[...e,r]:e}),[]);F(`updated calendars: ${h.map((e=>e.displayName))}`);const p=await Promise.all(h.map((async e=>await R({collection:{...e,objectMultiGet:z},method:"webdav",headers:f(o,n),account:a,fetchOptions:c})))),v=d.filter((e=>i.every((t=>!l(t.url,e.url)))));F(`deleted calendars: ${v.map((e=>e.displayName))}`);const y=d.filter((e=>i.some((t=>l(t.url,e.url)&&(t.syncToken&&`${t.syncToken}`!=`${e.syncToken}`||t.ctag&&`${t.ctag}`!=`${e.ctag}`)))));return s?{created:u,updated:h,deleted:v}:[...y,...u,...p]},Y=async e=>{const{url:t,timeRange:r,depth:a,headers:o,headersToExclude:c,fetchOptions:d={}}=e;if(!r)throw new Error("timeRange is required");{const e=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,t=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i;if(!(e.test(r.start)&&e.test(r.end)||t.test(r.start)&&t.test(r.end)))throw new Error("invalid timeRange format, not in ISO8601")}return(await $({url:t,body:{"free-busy-query":h({_attributes:u([s.CALDAV]),[`${n.CALDAV}:time-range`]:{_attributes:{start:`${new Date(r.start).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`,end:`${new Date(r.end).toISOString().slice(0,19).replace(/[-:.]/g,"")}Z`}}})},defaultNamespace:n.CALDAV,depth:a,headers:f(o,c),fetchOptions:d}))[0]};var X=Object.freeze({__proto__:null,calendarMultiGet:z,calendarQuery:M,createCalendarObject:q,deleteCalendarObject:K,fetchCalendarObjects:Q,fetchCalendars:G,freeBusyQuery:Y,makeCalendar:Z,syncCalendars:W,updateCalendarObject:J});const ee=t("tsdav:account"),te=async t=>{var r,a;ee("Service discovery...");const{account:s,headers:o,headersToExclude:n,fetchOptions:c={}}=t,d=new URL(s.serverUrl),i=new URL(`/.well-known/${s.accountType}`,d);i.protocol=null!==(r=d.protocol)&&void 0!==r?r:"http";try{const t=await e(i.href,{headers:f(o,n),method:"PROPFIND",redirect:"manual",...c});if(t.status>=300&&t.status<400){const e=t.headers.get("Location");if("string"==typeof e&&e.length){ee(`Service discovery redirected to ${e}`);const t=new URL(e,d);return t.hostname===i.hostname&&i.port&&!t.port&&(t.port=i.port),t.protocol=null!==(a=d.protocol)&&void 0!==a?a:"http",t.href}}}catch(e){ee(`Service discovery failed: ${e.stack}`)}return d.href},re=async e=>{var t,r,a,s,o;const{account:c,headers:d,headersToExclude:i,fetchOptions:l={}}=e,u=["rootUrl"];if(!w(c,u))throw new Error(`account must have ${b(c,u)} before fetchPrincipalUrl`);ee(`Fetching principal url from path ${c.rootUrl}`);const[h]=await O({url:c.rootUrl,props:{[`${n.DAV}:current-user-principal`]:{}},depth:"0",headers:f(d,i),fetchOptions:l});if(!h.ok&&(ee(`Fetch principal url failed: ${h.statusText}`),401===h.status))throw new Error("Invalid credentials");return ee(`Fetched principal url ${null===(r=null===(t=h.props)||void 0===t?void 0:t.currentUserPrincipal)||void 0===r?void 0:r.href}`),new URL(null!==(o=null===(s=null===(a=h.props)||void 0===a?void 0:a.currentUserPrincipal)||void 0===s?void 0:s.href)&&void 0!==o?o:"",c.rootUrl).href},ae=async e=>{var t,r;const{account:a,headers:s,headersToExclude:o,fetchOptions:c={}}=e,d=["principalUrl","rootUrl"];if(!w(a,d))throw new Error(`account must have ${b(a,d)} before fetchHomeUrl`);ee(`Fetch home url from ${a.principalUrl}`);const i=(await O({url:a.principalUrl,props:"caldav"===a.accountType?{[`${n.CALDAV}:calendar-home-set`]:{}}:{[`${n.CARDDAV}:addressbook-home-set`]:{}},depth:"0",headers:f(s,o),fetchOptions:c})).find((e=>l(a.principalUrl,e.href)));if(!i||!i.ok)throw new Error("cannot find homeUrl");const u=new URL("caldav"===a.accountType?null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.calendarHomeSet.href:null===(r=null==i?void 0:i.props)||void 0===r?void 0:r.addressbookHomeSet.href,a.rootUrl).href;return ee(`Fetched home url ${u}`),u},se=async e=>{const{account:t,headers:r,loadCollections:a=!1,loadObjects:s=!1,headersToExclude:o,fetchOptions:n={}}=e,c={...t};return c.rootUrl=await te({account:t,headers:f(r,o),fetchOptions:n}),c.principalUrl=await re({account:c,headers:f(r,o),fetchOptions:n}),c.homeUrl=await ae({account:c,headers:f(r,o),fetchOptions:n}),(a||s)&&("caldav"===t.accountType?c.calendars=await G({headers:f(r,o),account:c,fetchOptions:n}):"carddav"===t.accountType&&(c.addressBooks=await S({headers:f(r,o),account:c,fetchOptions:n}))),s&&("caldav"===t.accountType&&c.calendars?c.calendars=await Promise.all(c.calendars.map((async e=>({...e,objects:await Q({calendar:e,headers:f(r,o),fetchOptions:n})})))):"carddav"===t.accountType&&c.addressBooks&&(c.addressBooks=await Promise.all(c.addressBooks.map((async e=>({...e,objects:await N({addressBook:e,headers:f(r,o),fetchOptions:n})})))))),c};var oe=Object.freeze({__proto__:null,createAccount:se,fetchHomeUrl:ae,fetchPrincipalUrl:re,serviceDiscovery:te});const ne=t("tsdav:authHelper"),ce=(e,t)=>(...r)=>e({...t,...r[0]}),de=e=>(ne(`Basic auth token generated: ${a(`${e.username}:${e.password}`)}`),{authorization:`Basic ${a(`${e.username}:${e.password}`)}`}),ie=async(t,r)=>{const a=["authorizationCode","redirectUrl","clientId","clientSecret","tokenUrl"];if(!w(t,a))throw new Error(`Oauth credentials missing: ${b(t,a)}`);const s=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:t.redirectUrl,client_id:t.clientId,client_secret:t.clientSecret});ne(t.tokenUrl),ne(s.toString());const o=await e(t.tokenUrl,{method:"POST",body:s.toString(),headers:{"content-length":`${s.toString().length}`,"content-type":"application/x-www-form-urlencoded"},...null!=r?r:{}});if(o.ok){return await o.json()}return ne(`Fetch Oauth tokens failed: ${await o.text()}`),{}},le=async(t,r)=>{const a=["refreshToken","clientId","clientSecret","tokenUrl"];if(!w(t,a))throw new Error(`Oauth credentials missing: ${b(t,a)}`);const s=new URLSearchParams({client_id:t.clientId,client_secret:t.clientSecret,refresh_token:t.refreshToken,grant_type:"refresh_token"}),o=await e(t.tokenUrl,{method:"POST",body:s.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},...null!=r?r:{}});if(o.ok){return await o.json()}return ne(`Refresh access token failed: ${await o.text()}`),{}},ue=async(e,t)=>{var r;ne("Fetching oauth headers");let a={};return e.refreshToken?(e.refreshToken&&!e.accessToken||Date.now()>(null!==(r=e.expiration)&&void 0!==r?r:0))&&(a=await le(e,t)):a=await ie(e,t),ne(`Oauth tokens fetched: ${a.access_token}`),{tokens:a,headers:{authorization:`Bearer ${a.access_token}`}}};var he=Object.freeze({__proto__:null,defaultParam:ce,fetchOauthTokens:ie,getBasicAuthHeaders:de,getOauthHeaders:ue,refreshAccessToken:le});const pe=async e=>{var t;const{serverUrl:r,credentials:a,authMethod:s,defaultAccountType:o,authFunction:n}=e;let c={};switch(s){case"Basic":c=de(a);break;case"Oauth":c=(await ue(a)).headers;break;case"Digest":c={Authorization:`Digest ${a.digestString}`};break;case"Custom":c=null!==(t=await(null==n?void 0:n(a)))&&void 0!==t?t:{};break;default:throw new Error("Invalid auth method")}const d=o?await se({account:{serverUrl:r,credentials:a,accountType:o},headers:c}):void 0,i=ce(A,{url:r,headers:c}),l=ce(g,{headers:c,url:r}),u=ce(D,{headers:c,url:r}),h=ce(O,{headers:c}),p=ce($,{headers:c}),f=ce(E,{headers:c}),v=ce(_,{headers:c}),y=ce(T,{headers:c}),C=ce(k,{headers:c}),w=ce(R,{headers:c,account:d}),b=ce(M,{headers:c}),V=ce(z,{headers:c}),U=ce(Z,{headers:c}),L=ce(G,{headers:c,account:d}),I=ce(Q,{headers:c}),F=ce(q,{headers:c}),Y=ce(J,{headers:c}),X=ce(K,{headers:c}),ee=ce(W,{account:d,headers:c}),te=ce(j,{headers:c}),re=ce(x,{headers:c});return{davRequest:async e=>{const{init:t,...r}=e,{headers:a,...s}=t;return m({...r,init:{...s,headers:{...c,...a}}})},propfind:h,createAccount:async e=>{const{account:t,headers:s,loadCollections:o,loadObjects:n}=e;return se({account:{serverUrl:r,credentials:a,...t},headers:{...c,...s},loadCollections:o,loadObjects:n})},createObject:i,updateObject:l,deleteObject:u,calendarQuery:b,addressBookQuery:te,collectionQuery:p,makeCollection:f,calendarMultiGet:V,makeCalendar:U,syncCollection:v,supportedReportSet:y,isCollectionDirty:C,smartCollectionSync:w,fetchCalendars:L,fetchCalendarObjects:I,createCalendarObject:F,updateCalendarObject:Y,deleteCalendarObject:X,syncCalendars:ee,fetchAddressBooks:ce(S,{account:d,headers:c}),addressBookMultiGet:re,fetchVCards:ce(N,{headers:c}),createVCard:ce(H,{headers:c}),updateVCard:ce(P,{headers:c}),deleteVCard:ce(B,{headers:c})}};class fe{constructor(e){var t,r,a;this.serverUrl=e.serverUrl,this.credentials=e.credentials,this.authMethod=null!==(t=e.authMethod)&&void 0!==t?t:"Basic",this.accountType=null!==(r=e.defaultAccountType)&&void 0!==r?r:"caldav",this.authFunction=e.authFunction,this.fetchOptions=null!==(a=e.fetchOptions)&&void 0!==a?a:{}}async login(){var e;switch(this.authMethod){case"Basic":this.authHeaders=de(this.credentials);break;case"Oauth":this.authHeaders=(await ue(this.credentials,this.fetchOptions)).headers;break;case"Digest":this.authHeaders={Authorization:`Digest ${this.credentials.digestString}`};break;case"Custom":this.authHeaders=await(null===(e=this.authFunction)||void 0===e?void 0:e.call(this,this.credentials));break;default:throw new Error("Invalid auth method")}this.account=this.accountType?await se({account:{serverUrl:this.serverUrl,credentials:this.credentials,accountType:this.accountType},headers:this.authHeaders,fetchOptions:this.fetchOptions}):void 0}async davRequest(e){const{init:t,...r}=e,{headers:a,...s}=t;return m({...r,init:{...s,headers:{...this.authHeaders,...a}},fetchOptions:this.fetchOptions})}async createObject(...e){return ce(A,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateObject(...e){return ce(g,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteObject(...e){return ce(D,{url:this.serverUrl,headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async propfind(...e){return ce(O,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createAccount(e){const{account:t,headers:r,loadCollections:a,loadObjects:s,fetchOptions:o}=e;return se({account:{serverUrl:this.serverUrl,credentials:this.credentials,...t},headers:{...this.authHeaders,...r},loadCollections:a,loadObjects:s,fetchOptions:null!=o?o:this.fetchOptions})}async collectionQuery(...e){return ce($,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCollection(...e){return ce(E,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCollection(...e){return ce(_,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async supportedReportSet(...e){return ce(T,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async isCollectionDirty(...e){return ce(k,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async smartCollectionSync(...e){return ce(R,{headers:this.authHeaders,fetchOptions:this.fetchOptions,account:this.account})(e[0])}async calendarQuery(...e){return ce(M,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async makeCalendar(...e){return ce(Z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async calendarMultiGet(...e){return ce(z,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchCalendars(...e){return ce(G,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchCalendarObjects(...e){return ce(Q,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createCalendarObject(...e){return ce(q,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateCalendarObject(...e){return ce(J,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteCalendarObject(...e){return ce(K,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async syncCalendars(...e){return ce(W,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(e[0])}async addressBookQuery(...e){return ce(j,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async addressBookMultiGet(...e){return ce(x,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async fetchAddressBooks(...e){return ce(S,{headers:this.authHeaders,account:this.account,fetchOptions:this.fetchOptions})(null==e?void 0:e[0])}async fetchVCards(...e){return ce(N,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async createVCard(...e){return ce(H,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async updateVCard(...e){return ce(P,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}async deleteVCard(...e){return ce(B,{headers:this.authHeaders,fetchOptions:this.fetchOptions})(e[0])}}var ve={DAVNamespace:s,DAVNamespaceShort:n,DAVAttributeMap:o,...Object.freeze({__proto__:null,DAVClient:fe,createDAVClient:pe}),...C,...U,...oe,...I,...X,...he,...v};export{o as DAVAttributeMap,fe as DAVClient,s as DAVNamespace,n as DAVNamespaceShort,j as addressBookQuery,z as calendarMultiGet,M as calendarQuery,h as cleanupFalsy,$ as collectionQuery,se as createAccount,q as createCalendarObject,pe as createDAVClient,A as createObject,H as createVCard,m as davRequest,ve as default,K as deleteCalendarObject,D as deleteObject,B as deleteVCard,S as fetchAddressBooks,Q as fetchCalendarObjects,G as fetchCalendars,ie as fetchOauthTokens,N as fetchVCards,Y as freeBusyQuery,de as getBasicAuthHeaders,u as getDAVAttribute,ue as getOauthHeaders,k as isCollectionDirty,Z as makeCalendar,O as propfind,le as refreshAccessToken,R as smartCollectionSync,T as supportedReportSet,W as syncCalendars,_ as syncCollection,J as updateCalendarObject,g as updateObject,P as updateVCard,l as urlContains,i as urlEquals}; diff --git a/dist/tsdav.mjs b/dist/tsdav.mjs index 7e9d608..bc823cc 100644 --- a/dist/tsdav.mjs +++ b/dist/tsdav.mjs @@ -119,7 +119,7 @@ var requestHelpers = /*#__PURE__*/Object.freeze({ const debug$5 = getLogger('tsdav:request'); const davRequest = async (params) => { var _a; - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml({ @@ -158,6 +158,7 @@ const davRequest = async (params) => { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); // filter out invalid responses @@ -246,7 +247,7 @@ const davRequest = async (params) => { }); }; const propfind = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -266,29 +267,33 @@ const propfind = async (params) => { }, }, }, + fetchOptions, }); }; const createObject = async (params) => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; const updateObject = async (params) => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; const deleteObject = async (params) => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; @@ -313,7 +318,7 @@ const findMissingFieldNames = (obj, fields) => fields.reduce((prev, curr) => (ob /* eslint-disable no-underscore-dangle */ const debug$4 = getLogger('tsdav:collection'); const collectionQuery = async (params) => { - const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, } = params; + const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, fetchOptions = {} } = params; const queryResults = await davRequest({ url, init: { @@ -322,6 +327,7 @@ const collectionQuery = async (params) => { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result if (queryResults.length === 1 && !queryResults[0].raw) { @@ -330,7 +336,7 @@ const collectionQuery = async (params) => { return queryResults; }; const makeCollection = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -347,11 +353,12 @@ const makeCollection = async (params) => { } : undefined, }, + fetchOptions }); }; const supportedReportSet = async (params) => { var _a, _b, _c, _d, _e; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -359,12 +366,13 @@ const supportedReportSet = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ((_e = (_d = (_c = (_b = (_a = res[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.supportedReportSet) === null || _c === void 0 ? void 0 : _c.supportedReport) === null || _d === void 0 ? void 0 : _d.map((sr) => Object.keys(sr.report)[0])) !== null && _e !== void 0 ? _e : []); }; const isCollectionDirty = async (params) => { var _a, _b, _c; - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -372,6 +380,7 @@ const isCollectionDirty = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -386,7 +395,7 @@ const isCollectionDirty = async (params) => { * This is for webdav sync-collection only */ const syncCollection = (params) => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -406,12 +415,13 @@ const syncCollection = (params) => { }, }, }, + fetchOptions }); }; /** remote collection to local */ const smartCollectionSync = async (params) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -432,6 +442,7 @@ const smartCollectionSync = async (params) => { syncLevel: 1, syncToken: collection.syncToken, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const objectResponses = result.filter((r) => { var _a; @@ -452,6 +463,7 @@ const smartCollectionSync = async (params) => { objectUrls: changedObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _c !== void 0 ? _c : []) : []; const remoteObjects = multiGetObjectResponse.map((res) => { @@ -496,11 +508,13 @@ const smartCollectionSync = async (params) => { const { isDirty, newCtag } = await isCollectionDirty({ collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const localObjects = (_j = collection.objects) !== null && _j !== void 0 ? _j : []; const remoteObjects = (_l = (await ((_k = collection.fetchObjects) === null || _k === void 0 ? void 0 : _k.call(collection, { collection, headers: excludeHeaders(headers, headersToExclude), + fetchOptions })))) !== null && _l !== void 0 ? _l : []; // no existing url const created = remoteObjects.filter((ro) => localObjects.every((lo) => !urlContains(lo.url, ro.url))); @@ -553,7 +567,7 @@ var collection = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$3 = getLogger('tsdav:addressBook'); const addressBookQuery = async (params) => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -572,10 +586,11 @@ const addressBookQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; const addressBookMultiGet = async (params) => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -587,11 +602,12 @@ const addressBookMultiGet = async (params) => { }, defaultNamespace: DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const fetchAddressBooks = async (params) => { - const { account, headers, props: customProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -609,6 +625,7 @@ const fetchAddressBooks = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('addressbook'); }) @@ -627,11 +644,11 @@ const fetchAddressBooks = async (params) => { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), }))); }; const fetchVCards = async (params) => { - const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, } = params; + const { addressBook, headers, objectUrls, headersToExclude, urlFilter = (url) => url, useMultiGet = true, fetchOptions = {} } = params; debug$3(`Fetching vcards from ${addressBook === null || addressBook === void 0 ? void 0 : addressBook.url}`); const requiredFields = ['url']; if (!addressBook || !hasFields(addressBook, requiredFields)) { @@ -647,6 +664,7 @@ const fetchVCards = async (params) => { props: { [`${DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, })).map((res) => { var _a; return (res.ok ? (_a = res.href) !== null && _a !== void 0 ? _a : '' : ''); })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, addressBook.url).href)) .filter(urlFilter) @@ -663,6 +681,7 @@ const fetchVCards = async (params) => { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -674,6 +693,7 @@ const fetchVCards = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -687,7 +707,7 @@ const fetchVCards = async (params) => { }); }; const createVCard = async (params) => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -696,10 +716,11 @@ const createVCard = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -708,14 +729,16 @@ const updateVCard = async (params) => { 'content-type': 'text/vcard; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions, }); }; const deleteVCard = async (params) => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -733,7 +756,7 @@ var addressBook = /*#__PURE__*/Object.freeze({ /* eslint-disable no-underscore-dangle */ const debug$2 = getLogger('tsdav:calendar'); const calendarQuery = async (params) => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -752,10 +775,11 @@ const calendarQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const calendarMultiGet = async (params) => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -770,10 +794,11 @@ const calendarMultiGet = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; const makeCalendar = async (params) => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -793,10 +818,11 @@ const makeCalendar = async (params) => { }, }, }, + fetchOptions }); }; const fetchCalendars = async (params) => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params !== null && params !== void 0 ? params : {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params !== null && params !== void 0 ? params : {}; const requiredFields = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -818,6 +844,7 @@ const fetchCalendars = async (params) => { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all(res .filter((r) => { var _a, _b; return Object.keys((_b = (_a = r.props) === null || _a === void 0 ? void 0 : _a.resourcetype) !== null && _b !== void 0 ? _b : {}).includes('calendar'); }) @@ -826,7 +853,7 @@ const fetchCalendars = async (params) => { // filter out none iCal format calendars. const components = Array.isArray((_a = rc.props) === null || _a === void 0 ? void 0 : _a.supportedCalendarComponentSet.comp) ? (_b = rc.props) === null || _b === void 0 ? void 0 : _b.supportedCalendarComponentSet.comp.map((sc) => sc._attributes.name) - : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name] || []; + : [(_d = (_c = rc.props) === null || _c === void 0 ? void 0 : _c.supportedCalendarComponentSet.comp) === null || _d === void 0 ? void 0 : _d._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -854,11 +881,12 @@ const fetchCalendars = async (params) => { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); }; const fetchCalendarObjects = async (params) => { - const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, } = params; + const { calendar, objectUrls, filters: customFilters, timeRange, headers, expand, urlFilter = (url) => Boolean(url === null || url === void 0 ? void 0 : url.includes('.ics')), useMultiGet = true, headersToExclude, fetchOptions = {}, } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -934,6 +962,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions })).map((res) => { var _a; return (_a = res.href) !== null && _a !== void 0 ? _a : ''; })) .map((url) => (url.startsWith('http') || !url ? url : new URL(url, calendar.url).href)) // patch up to full url if url is not full .filter(urlFilter) // custom filter function on calendar objects @@ -967,6 +996,7 @@ const fetchCalendarObjects = async (params) => { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { @@ -996,6 +1026,7 @@ const fetchCalendarObjects = async (params) => { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -1009,7 +1040,7 @@ const fetchCalendarObjects = async (params) => { }); }; const createCalendarObject = async (params) => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, data: iCalString, @@ -1018,10 +1049,11 @@ const createCalendarObject = async (params) => { 'If-None-Match': '*', ...headers, }, headersToExclude), + fetchOptions }); }; const updateCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -1030,14 +1062,16 @@ const updateCalendarObject = async (params) => { 'content-type': 'text/calendar; charset=utf-8', ...headers, }, headersToExclude), + fetchOptions }); }; const deleteCalendarObject = async (params) => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; /** @@ -1045,7 +1079,7 @@ const deleteCalendarObject = async (params) => { */ const syncCalendars = async (params) => { var _a; - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -1053,6 +1087,7 @@ const syncCalendars = async (params) => { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url const created = remoteCalendars.filter((rc) => localCalendars.every((lc) => !urlContains(lc.url, rc.url))); @@ -1074,6 +1109,7 @@ const syncCalendars = async (params) => { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; })); @@ -1093,7 +1129,7 @@ const syncCalendars = async (params) => { : [...unchanged, ...created, ...updatedWithObjects]; }; const freeBusyQuery = async (params) => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange const ISO_8601 = /^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i; @@ -1122,6 +1158,7 @@ const freeBusyQuery = async (params) => { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; @@ -1144,7 +1181,7 @@ const debug$1 = getLogger('tsdav:account'); const serviceDiscovery = async (params) => { var _a, _b; debug$1('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); uri.protocol = (_a = endpoint.protocol) !== null && _a !== void 0 ? _a : 'http'; @@ -1153,6 +1190,7 @@ const serviceDiscovery = async (params) => { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { // http redirect. @@ -1175,7 +1213,7 @@ const serviceDiscovery = async (params) => { }; const fetchPrincipalUrl = async (params) => { var _a, _b, _c, _d, _e; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchPrincipalUrl`); @@ -1188,6 +1226,7 @@ const fetchPrincipalUrl = async (params) => { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug$1(`Fetch principal url failed: ${response.statusText}`); @@ -1200,7 +1239,7 @@ const fetchPrincipalUrl = async (params) => { }; const fetchHomeUrl = async (params) => { var _a, _b; - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error(`account must have ${findMissingFieldNames(account, requiredFields)} before fetchHomeUrl`); @@ -1213,6 +1252,7 @@ const fetchHomeUrl = async (params) => { : { [`${DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); if (!matched || !matched.ok) { @@ -1225,19 +1265,22 @@ const fetchHomeUrl = async (params) => { return result; }; const createAccount = async (params) => { - const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, } = params; + const { account, headers, loadCollections = false, loadObjects = false, headersToExclude, fetchOptions = {}, } = params; const newAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -1245,12 +1288,14 @@ const createAccount = async (params) => { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -1261,6 +1306,7 @@ const createAccount = async (params) => { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1270,6 +1316,7 @@ const createAccount = async (params) => { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), }))); } @@ -1301,7 +1348,7 @@ const getBasicAuthHeaders = (credentials) => { authorization: `Basic ${encode(`${credentials.username}:${credentials.password}`)}`, }; }; -const fetchOauthTokens = async (credentials) => { +const fetchOauthTokens = async (credentials, fetchOptions) => { const requireFields = [ 'authorizationCode', 'redirectUrl', @@ -1328,6 +1375,7 @@ const fetchOauthTokens = async (credentials) => { 'content-length': `${param.toString().length}`, 'content-type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1336,7 +1384,7 @@ const fetchOauthTokens = async (credentials) => { debug(`Fetch Oauth tokens failed: ${await response.text()}`); return {}; }; -const refreshAccessToken = async (credentials) => { +const refreshAccessToken = async (credentials, fetchOptions) => { const requireFields = [ 'refreshToken', 'clientId', @@ -1358,6 +1406,7 @@ const refreshAccessToken = async (credentials) => { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, + ...(fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : {}), }); if (response.ok) { const tokens = await response.json(); @@ -1366,19 +1415,19 @@ const refreshAccessToken = async (credentials) => { debug(`Refresh access token failed: ${await response.text()}`); return {}; }; -const getOauthHeaders = async (credentials) => { +const getOauthHeaders = async (credentials, fetchOptions) => { var _a; debug('Fetching oauth headers'); let tokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ((credentials.refreshToken && !credentials.accessToken) || Date.now() > ((_a = credentials.expiration) !== null && _a !== void 0 ? _a : 0)) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`); @@ -1541,12 +1590,13 @@ const createDAVClient = async (params) => { }; class DAVClient { constructor(params) { - var _a, _b; + var _a, _b, _c; this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = (_a = params.authMethod) !== null && _a !== void 0 ? _a : 'Basic'; this.accountType = (_b = params.defaultAccountType) !== null && _b !== void 0 ? _b : 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = (_c = params.fetchOptions) !== null && _c !== void 0 ? _c : {}; } async login() { var _a; @@ -1555,7 +1605,7 @@ class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -1576,6 +1626,7 @@ class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -1591,103 +1642,116 @@ class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } async createObject(...params) { return defaultParam(createObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params) { - return defaultParam(updateObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(updateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async deleteObject(...params) { - return defaultParam(deleteObject, { headers: this.authHeaders, url: this.serverUrl })(params[0]); + return defaultParam(deleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })(params[0]); } async propfind(...params) { - return defaultParam(propfind, { headers: this.authHeaders })(params[0]); + return defaultParam(propfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0) { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return createAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions !== null && fetchOptions !== void 0 ? fetchOptions : this.fetchOptions, }); } async collectionQuery(...params) { - return defaultParam(collectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(collectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params) { - return defaultParam(makeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params) { - return defaultParam(syncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(syncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params) { - return defaultParam(supportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(supportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params) { - return defaultParam(isCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(isCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(...params) { return defaultParam(smartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, })(params[0]); } async calendarQuery(...params) { - return defaultParam(calendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params) { - return defaultParam(makeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(makeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet(...params) { - return defaultParam(calendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(calendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params) { - return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchCalendarObjects(...params) { - return defaultParam(fetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject(...params) { - return defaultParam(createCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(createCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject(...params) { - return defaultParam(updateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(updateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject(...params) { - return defaultParam(deleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params) { return defaultParam(syncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions })(params[0]); } async addressBookQuery(...params) { - return defaultParam(addressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet(...params) { - return defaultParam(addressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(addressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks(...params) { - return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account })(params === null || params === void 0 ? void 0 : params[0]); + return defaultParam(fetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })(params === null || params === void 0 ? void 0 : params[0]); } async fetchVCards(...params) { - return defaultParam(fetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(fetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params) { - return defaultParam(createVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(createVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params) { - return defaultParam(updateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(updateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params) { - return defaultParam(deleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(deleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/docs/docs/caldav/calendarMultiGet.md b/docs/docs/caldav/calendarMultiGet.md index d9f9ef8..3f0933f 100644 --- a/docs/docs/caldav/calendarMultiGet.md +++ b/docs/docs/caldav/calendarMultiGet.md @@ -37,6 +37,7 @@ const calendarObjects = await calendarMultiGet({ - `timezone` timezone of the calendar - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/calendarQuery.md b/docs/docs/caldav/calendarQuery.md index bab2443..82af9f7 100644 --- a/docs/docs/caldav/calendarQuery.md +++ b/docs/docs/caldav/calendarQuery.md @@ -40,6 +40,7 @@ const results = await calendarQuery({ - `timezone` iana timezone name, like `America/Los_Angeles` - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/createCalendarObject.md b/docs/docs/caldav/createCalendarObject.md index 05ea607..fce990d 100644 --- a/docs/docs/caldav/createCalendarObject.md +++ b/docs/docs/caldav/createCalendarObject.md @@ -24,6 +24,7 @@ const result = await createCalendarObject({ - `iCalString` **required**, calendar file data - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/deleteCalendarObject.md b/docs/docs/caldav/deleteCalendarObject.md index 62d89f4..18ee939 100644 --- a/docs/docs/caldav/deleteCalendarObject.md +++ b/docs/docs/caldav/deleteCalendarObject.md @@ -23,6 +23,7 @@ const result = await deleteCalendarObject({ - `calendarObject` **required**, [DAVCalendarObject](../types/DAVCalendarObject.md) to delete - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/fetchCalendarObjects.md b/docs/docs/caldav/fetchCalendarObjects.md index e7c6764..7aa52fb 100644 --- a/docs/docs/caldav/fetchCalendarObjects.md +++ b/docs/docs/caldav/fetchCalendarObjects.md @@ -25,6 +25,7 @@ const objects = await fetchCalendarObjects({ - `end` end time in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), format that's not in ISO 8601 will cause an error be thrown. - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function :::info some calendar providers may return their objects with different suffix than .ics such as `http://api.xx/97ec5f81-5ecc-4505-9621-08806f6796a3` or `http://api.xx/calobj1.abc` in this case, you need to pass in your own calendar object name filter so that you can have results you need. diff --git a/docs/docs/caldav/fetchCalendars.md b/docs/docs/caldav/fetchCalendars.md index 3301780..0149395 100644 --- a/docs/docs/caldav/fetchCalendars.md +++ b/docs/docs/caldav/fetchCalendars.md @@ -20,6 +20,7 @@ const calendars = await fetchCalendars({ - `account` [DAVAccount](../types/DAVAccount.md) - `header` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function - `props` [CALDAV prop element](https://datatracker.ietf.org/doc/html/rfc4791#section-9.6.4) in [ElementCompact](../types/ElementCompact.md) form, overriding default props to fetch - `projectedProps` custom props projection object, used as a map to map fetched custom props to values :::caution diff --git a/docs/docs/caldav/freeBusyQuery.md b/docs/docs/caldav/freeBusyQuery.md index 5bc42ff..1492408 100644 --- a/docs/docs/caldav/freeBusyQuery.md +++ b/docs/docs/caldav/freeBusyQuery.md @@ -34,6 +34,7 @@ const freeBusyQuery = await freeBusyQuery({ - `depth` [DAVDepth](../types/DAVDepth.md) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/makeCalendar.md b/docs/docs/caldav/makeCalendar.md index 71e832d..ccb4914 100644 --- a/docs/docs/caldav/makeCalendar.md +++ b/docs/docs/caldav/makeCalendar.md @@ -26,6 +26,7 @@ const result = await makeCalendar({ - `depth` [DAVDepth](../types/DAVDepth.md) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/caldav/syncCalendars.md b/docs/docs/caldav/syncCalendars.md index 8a506eb..eb59657 100644 --- a/docs/docs/caldav/syncCalendars.md +++ b/docs/docs/caldav/syncCalendars.md @@ -38,6 +38,7 @@ const { created, updated, deleted } = await syncCalendars({ - `detailedResult` if falsy, the result would be latest version of the calendars of this account, otherwise they would be separated into three groups of `created`, `updated`, and `deleted`. - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function :::info `objects` inside `oldCalendars` are not needed when `detailedResult` is `true`. diff --git a/docs/docs/caldav/updateCalendarObject.md b/docs/docs/caldav/updateCalendarObject.md index a596f97..1c519ad 100644 --- a/docs/docs/caldav/updateCalendarObject.md +++ b/docs/docs/caldav/updateCalendarObject.md @@ -24,6 +24,7 @@ const result = updateCalendarObject({ - `calendarObject` **required**, [DAVCalendarObject](../types/DAVCalendarObject.md) to update - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/carddav/addressBookMultiGet.md b/docs/docs/carddav/addressBookMultiGet.md index 33a92b5..e06ce82 100644 --- a/docs/docs/carddav/addressBookMultiGet.md +++ b/docs/docs/carddav/addressBookMultiGet.md @@ -37,6 +37,7 @@ const vcards = await addressBookMultiGet({ - `depth` **required**, [DAVDepth](../types/DAVDepth.md) of the request - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/carddav/addressBookQuery.md b/docs/docs/carddav/addressBookQuery.md index 80db776..ce3601e 100644 --- a/docs/docs/carddav/addressBookQuery.md +++ b/docs/docs/carddav/addressBookQuery.md @@ -34,6 +34,7 @@ const addressbooks = await addressBookQuery({ - `depth` [DAVDepth](../types/DAVDepth.md) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/carddav/createVCard.md b/docs/docs/carddav/createVCard.md index 221e451..21a64dc 100644 --- a/docs/docs/carddav/createVCard.md +++ b/docs/docs/carddav/createVCard.md @@ -24,6 +24,7 @@ const result = await createVCard({ - `vCardString` **required**, vcard file data - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/carddav/deleteVCard.md b/docs/docs/carddav/deleteVCard.md index 1b3fa66..4ac27d8 100644 --- a/docs/docs/carddav/deleteVCard.md +++ b/docs/docs/carddav/deleteVCard.md @@ -23,6 +23,7 @@ const result = await deleteCalendarObject({ - `vCard` **required**, [DAVVCard](../types/DAVVCard.md) to delete - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/carddav/fetchAddressBooks.md b/docs/docs/carddav/fetchAddressBooks.md index 2eafa8f..67a7f9c 100644 --- a/docs/docs/carddav/fetchAddressBooks.md +++ b/docs/docs/carddav/fetchAddressBooks.md @@ -21,6 +21,7 @@ const addressBooks = await fetchAddressBooks({ - `props` [CARDDAV prop element](https://datatracker.ietf.org/doc/html/rfc6352#section-10.4.2) in [ElementCompact](../types/ElementCompact.md) form, overriding default props to fetch. - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function :::caution when overriding props, resourcetype is required diff --git a/docs/docs/carddav/fetchVCards.md b/docs/docs/carddav/fetchVCards.md index 4ed11b7..650a9b2 100644 --- a/docs/docs/carddav/fetchVCards.md +++ b/docs/docs/carddav/fetchVCards.md @@ -21,6 +21,7 @@ const vcards = await fetchVCards({ - `objectUrls` vcard urls to fetch - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function :::info some providers may return their objects with different suffixes such as `http://api.xx/97ec5f81-5ecc-4505-9621-08806f6796a3` or `http://api.xx/calobj1.abc` in this case, you can pass in your own object name filter diff --git a/docs/docs/carddav/updateVCard.md b/docs/docs/carddav/updateVCard.md index 0f6f431..2386953 100644 --- a/docs/docs/carddav/updateVCard.md +++ b/docs/docs/carddav/updateVCard.md @@ -24,6 +24,7 @@ const result = updateVCard({ - `vCard` **required**, [DAVVCard](../types/DAVVCard.md) to update - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/types/DAVRequest.md b/docs/docs/types/DAVRequest.md index b4daadc..1ded8f8 100644 --- a/docs/docs/types/DAVRequest.md +++ b/docs/docs/types/DAVRequest.md @@ -12,6 +12,7 @@ export type DAVRequest = { - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function - `method` request method - `body` request body - `namespace` default namespace for all xml nodes diff --git a/docs/docs/webdav/account/createAccount.md b/docs/docs/webdav/account/createAccount.md index 0160492..fa35682 100644 --- a/docs/docs/webdav/account/createAccount.md +++ b/docs/docs/webdav/account/createAccount.md @@ -23,6 +23,7 @@ const account = await createAccount({ - `account` **required**, account with `serverUrl` and `accountType` - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function - `loadCollections` defaults to false, whether to load all collections of the account - `loadObjects` defaults to false, whether to load all objects of collections as well, must be used with `loadCollections` set to `true` diff --git a/docs/docs/webdav/account/fetchHomeUrl.md b/docs/docs/webdav/account/fetchHomeUrl.md index 0128da5..d6e90c7 100644 --- a/docs/docs/webdav/account/fetchHomeUrl.md +++ b/docs/docs/webdav/account/fetchHomeUrl.md @@ -25,6 +25,7 @@ const url = await fetchHomeUrl({ - `account` **required**, account with `principalUrl` and `accountType` - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/account/fetchPrincipalUrl.md b/docs/docs/webdav/account/fetchPrincipalUrl.md index ddcdd21..b8b92af 100644 --- a/docs/docs/webdav/account/fetchPrincipalUrl.md +++ b/docs/docs/webdav/account/fetchPrincipalUrl.md @@ -24,6 +24,7 @@ const url = await fetchPrincipalUrl({ - `account` **required**, account with `rootUrl` and `accountType` - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/account/serviceDiscovery.md b/docs/docs/webdav/account/serviceDiscovery.md index 4be3251..e0e1053 100644 --- a/docs/docs/webdav/account/serviceDiscovery.md +++ b/docs/docs/webdav/account/serviceDiscovery.md @@ -20,6 +20,7 @@ const url = await serviceDiscovery({ - `account` **required**, account with `serverUrl` and `accountType` - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/collection/collectionQuery.md b/docs/docs/webdav/collection/collectionQuery.md index c51b0db..3cabff2 100644 --- a/docs/docs/webdav/collection/collectionQuery.md +++ b/docs/docs/webdav/collection/collectionQuery.md @@ -38,6 +38,7 @@ const result = await collectionQuery({ - `defaultNamespace` defaults to `DAVNamespaceShort.DAV`, default namespace for the the request body - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/collection/isCollectionDirty.md b/docs/docs/webdav/collection/isCollectionDirty.md index c7d8545..9631ae5 100644 --- a/docs/docs/webdav/collection/isCollectionDirty.md +++ b/docs/docs/webdav/collection/isCollectionDirty.md @@ -20,6 +20,7 @@ const { isDirty, newCtag } = await isCollectionDirty({ - `collection` **required**, [DAVCollection](../../types/DAVCollection.md) to detect - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/collection/makeCollection.md b/docs/docs/webdav/collection/makeCollection.md index 6d379ee..2d1a296 100644 --- a/docs/docs/webdav/collection/makeCollection.md +++ b/docs/docs/webdav/collection/makeCollection.md @@ -26,6 +26,7 @@ const response = await makeCollection({ - `depth` [DAVDepth](../../types/DAVDepth.md) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/collection/smartCollectionSync.md b/docs/docs/webdav/collection/smartCollectionSync.md index fa5bb9c..540e8d6 100644 --- a/docs/docs/webdav/collection/smartCollectionSync.md +++ b/docs/docs/webdav/collection/smartCollectionSync.md @@ -44,6 +44,7 @@ const { created, updated, deleted } = ( - `detailedResult` boolean indicate whether the return value should be detailed or not - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function :::info `objects` inside `collection` are not needed when `detailedResult` is `true`. diff --git a/docs/docs/webdav/collection/supportedReportSet.md b/docs/docs/webdav/collection/supportedReportSet.md index 30e9072..96f57f0 100644 --- a/docs/docs/webdav/collection/supportedReportSet.md +++ b/docs/docs/webdav/collection/supportedReportSet.md @@ -20,6 +20,7 @@ const reports = await supportedReportSet({ - `collection` **required**, [DAVCollection](../../types/DAVCollection.md) to query on - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/collection/syncCollection.md b/docs/docs/webdav/collection/syncCollection.md index bccdeea..5dc4500 100644 --- a/docs/docs/webdav/collection/syncCollection.md +++ b/docs/docs/webdav/collection/syncCollection.md @@ -30,6 +30,7 @@ const result = await syncCollection({ - `syncToken` [The synchronization token provided by the server and returned by the client](https://datatracker.ietf.org/doc/html/rfc6578#section-6.2) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/createObject.md b/docs/docs/webdav/createObject.md index ddc8668..56f4afa 100644 --- a/docs/docs/webdav/createObject.md +++ b/docs/docs/webdav/createObject.md @@ -23,6 +23,7 @@ const response = await createObject({ - `data` **required**, object data - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/davRequest.md b/docs/docs/webdav/davRequest.md index cfcf156..a29369e 100644 --- a/docs/docs/webdav/davRequest.md +++ b/docs/docs/webdav/davRequest.md @@ -35,6 +35,7 @@ const [result] = await davRequest({ - `init` **required**, [DAVRequest](davRequest.md) Object - `convertIncoming` defaults to `true`, whether to convert the passed in init object request body, if `false`, davRequest would expect `init->body` is `xml` string, and would send it directly to target `url` without processing. - `parseOutgoing` defaults to `true`, whether to parse the return value in response body, if `false`, the response `raw` would be raw `xml` string returned from server. +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/deleteObject.md b/docs/docs/webdav/deleteObject.md index a738e79..e962ab5 100644 --- a/docs/docs/webdav/deleteObject.md +++ b/docs/docs/webdav/deleteObject.md @@ -22,6 +22,7 @@ const response = await deleteObject({ - `etag` the version string of content, if [etag](https://tools.ietf.org/id/draft-reschke-http-etag-on-write-08.html) changed, `data` must have been changed. - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/propfind.md b/docs/docs/webdav/propfind.md index 4a5c20a..8862920 100644 --- a/docs/docs/webdav/propfind.md +++ b/docs/docs/webdav/propfind.md @@ -23,6 +23,7 @@ const [result] = await propfind({ - `depth` [DAVDepth](../types/DAVDepth.md) - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docs/webdav/updateObject.md b/docs/docs/webdav/updateObject.md index d709f18..6fed9b1 100644 --- a/docs/docs/webdav/updateObject.md +++ b/docs/docs/webdav/updateObject.md @@ -25,6 +25,7 @@ const response = await updateObject({ - `etag` the version string of content, if [etag](https://tools.ietf.org/id/draft-reschke-http-etag-on-write-08.html) changed, `data` must have been changed. - `headers` request headers - `headersToExclude` array of keys of the headers you want to exclude +- `fetchOptions` options to pass to underlying fetch function ### Return Value diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 7bdad6e..9cbb48c 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -59,7 +59,7 @@ module.exports = { lastVersion: 'current', versions: { current: { - label: '2.1.1', + label: '2.1.2', }, '1.1.6': { label: '1.1.6', diff --git a/package.json b/package.json index 3ceffe3..3b73c77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.1.1", + "version": "2.1.2", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", @@ -48,41 +48,41 @@ "dependencies": { "base-64": "1.0.0", "cross-fetch": "4.0.0", - "debug": "4.3.5", + "debug": "4.3.7", "xml-js": "1.6.11" }, "devDependencies": { - "@rollup/plugin-commonjs": "25.0.7", + "@rollup/plugin-commonjs": "26.0.1", "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-terser": "0.4.4", "@rollup/plugin-typescript": "11.1.6", "@types/base-64": "1.0.2", "@types/debug": "4.1.12", "@types/jest": "29.5.12", - "@types/node": "20.14.10", - "@typescript-eslint/eslint-plugin": "7.16.1", - "@typescript-eslint/parser": "7.16.1", + "@types/node": "22.5.4", + "@typescript-eslint/eslint-plugin": "8.5.0", + "@typescript-eslint/parser": "8.5.0", "copyfiles": "2.4.1", "cross-env": "7.0.3", "dotenv": "16.4.5", - "eslint": "9.7.0", + "eslint": "9.10.0", "eslint-config-airbnb": "19.0.4", "eslint-config-airbnb-typescript": "18.0.0", "eslint-config-prettier": "9.1.0", - "eslint-module-utils": "2.8.1", - "eslint-plugin-import": "2.29.1", + "eslint-module-utils": "2.11.0", + "eslint-plugin-import": "2.30.0", "eslint-plugin-prettier": "5.1.3", "jest": "29.7.0", "prettier": "3.3.3", - "rimraf": "5.0.7", - "rollup": "4.18.1", + "rimraf": "6.0.1", + "rollup": "4.21.2", "rollup-plugin-dts": "6.1.1", "rollup-plugin-node-builtins": "2.1.2", "rollup-plugin-polyfill-node": "0.13.0", - "sort-package-json": "2.10.0", - "ts-jest": "29.2.2", - "tslib": "2.6.3", - "typescript": "5.5.3" + "sort-package-json": "2.10.1", + "ts-jest": "29.2.5", + "tslib": "2.7.0", + "typescript": "5.6.2" }, "engines": { "node": ">=10" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22b0993..024dbb2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,144 +1,2886 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - base-64: - specifier: 1.0.0 - version: 1.0.0 - cross-fetch: - specifier: 4.0.0 - version: 4.0.0 - debug: - specifier: 4.3.5 - version: 4.3.5 - xml-js: - specifier: 1.6.11 - version: 1.6.11 - -devDependencies: - '@rollup/plugin-commonjs': - specifier: 25.0.7 - version: 25.0.7(rollup@4.18.1) - '@rollup/plugin-node-resolve': - specifier: 15.2.3 - version: 15.2.3(rollup@4.18.1) - '@rollup/plugin-terser': - specifier: 0.4.4 - version: 0.4.4(rollup@4.18.1) - '@rollup/plugin-typescript': - specifier: 11.1.6 - version: 11.1.6(rollup@4.18.1)(tslib@2.6.3)(typescript@5.5.3) - '@types/base-64': - specifier: 1.0.2 - version: 1.0.2 - '@types/debug': - specifier: 4.1.12 - version: 4.1.12 - '@types/jest': - specifier: 29.5.12 - version: 29.5.12 - '@types/node': - specifier: 20.14.10 - version: 20.14.10 - '@typescript-eslint/eslint-plugin': - specifier: 7.16.1 - version: 7.16.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0)(typescript@5.5.3) - '@typescript-eslint/parser': - specifier: 7.16.1 - version: 7.16.1(eslint@9.7.0)(typescript@5.5.3) - copyfiles: - specifier: 2.4.1 - version: 2.4.1 - cross-env: - specifier: 7.0.3 - version: 7.0.3 - dotenv: - specifier: 16.4.5 - version: 16.4.5 - eslint: - specifier: 9.7.0 - version: 9.7.0 - eslint-config-airbnb: - specifier: 19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.35.0)(eslint@9.7.0) - eslint-config-airbnb-typescript: - specifier: 18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.16.1)(@typescript-eslint/parser@7.16.1)(eslint-plugin-import@2.29.1)(eslint@9.7.0) - eslint-config-prettier: - specifier: 9.1.0 - version: 9.1.0(eslint@9.7.0) - eslint-module-utils: - specifier: 2.8.1 - version: 2.8.1(@typescript-eslint/parser@7.16.1)(eslint-import-resolver-node@0.3.9)(eslint@9.7.0) - eslint-plugin-import: - specifier: 2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0) - eslint-plugin-prettier: - specifier: 5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@9.7.0)(prettier@3.3.3) - jest: - specifier: 29.7.0 - version: 29.7.0(@types/node@20.14.10) - prettier: - specifier: 3.3.3 - version: 3.3.3 - rimraf: - specifier: 5.0.7 - version: 5.0.7 - rollup: - specifier: 4.18.1 - version: 4.18.1 - rollup-plugin-dts: - specifier: 6.1.1 - version: 6.1.1(rollup@4.18.1)(typescript@5.5.3) - rollup-plugin-node-builtins: - specifier: 2.1.2 - version: 2.1.2 - rollup-plugin-polyfill-node: - specifier: 0.13.0 - version: 0.13.0(rollup@4.18.1) - sort-package-json: - specifier: 2.10.0 - version: 2.10.0 - ts-jest: - specifier: 29.2.2 - version: 29.2.2(@babel/core@7.25.2)(jest@29.7.0)(typescript@5.5.3) - tslib: - specifier: 2.6.3 - version: 2.6.3 - typescript: - specifier: 5.5.3 - version: 5.5.3 +importers: + + .: + dependencies: + base-64: + specifier: 1.0.0 + version: 1.0.0 + cross-fetch: + specifier: 4.0.0 + version: 4.0.0 + debug: + specifier: 4.3.7 + version: 4.3.7 + xml-js: + specifier: 1.6.11 + version: 1.6.11 + devDependencies: + '@rollup/plugin-commonjs': + specifier: 26.0.1 + version: 26.0.1(rollup@4.21.2) + '@rollup/plugin-node-resolve': + specifier: 15.2.3 + version: 15.2.3(rollup@4.21.2) + '@rollup/plugin-terser': + specifier: 0.4.4 + version: 0.4.4(rollup@4.21.2) + '@rollup/plugin-typescript': + specifier: 11.1.6 + version: 11.1.6(rollup@4.21.2)(tslib@2.7.0)(typescript@5.6.2) + '@types/base-64': + specifier: 1.0.2 + version: 1.0.2 + '@types/debug': + specifier: 4.1.12 + version: 4.1.12 + '@types/jest': + specifier: 29.5.12 + version: 29.5.12 + '@types/node': + specifier: 22.5.4 + version: 22.5.4 + '@typescript-eslint/eslint-plugin': + specifier: 8.5.0 + version: 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/parser': + specifier: 8.5.0 + version: 8.5.0(eslint@9.10.0)(typescript@5.6.2) + copyfiles: + specifier: 2.4.1 + version: 2.4.1 + cross-env: + specifier: 7.0.3 + version: 7.0.3 + dotenv: + specifier: 16.4.5 + version: 16.4.5 + eslint: + specifier: 9.10.0 + version: 9.10.0 + eslint-config-airbnb: + specifier: 19.0.4 + version: 19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.10.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.10.0))(eslint-plugin-react@7.35.0(eslint@9.10.0))(eslint@9.10.0) + eslint-config-airbnb-typescript: + specifier: 18.0.0 + version: 18.0.0(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint@9.10.0) + eslint-config-prettier: + specifier: 9.1.0 + version: 9.1.0(eslint@9.10.0) + eslint-module-utils: + specifier: 2.11.0 + version: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0) + eslint-plugin-import: + specifier: 2.30.0 + version: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0) + eslint-plugin-prettier: + specifier: 5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0(eslint@9.10.0))(eslint@9.10.0)(prettier@3.3.3) + jest: + specifier: 29.7.0 + version: 29.7.0(@types/node@22.5.4) + prettier: + specifier: 3.3.3 + version: 3.3.3 + rimraf: + specifier: 6.0.1 + version: 6.0.1 + rollup: + specifier: 4.21.2 + version: 4.21.2 + rollup-plugin-dts: + specifier: 6.1.1 + version: 6.1.1(rollup@4.21.2)(typescript@5.6.2) + rollup-plugin-node-builtins: + specifier: 2.1.2 + version: 2.1.2 + rollup-plugin-polyfill-node: + specifier: 0.13.0 + version: 0.13.0(rollup@4.21.2) + sort-package-json: + specifier: 2.10.1 + version: 2.10.1 + ts-jest: + specifier: 29.2.5 + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.5.4))(typescript@5.6.2) + tslib: + specifier: 2.7.0 + version: 2.7.0 + typescript: + specifier: 5.6.2 + version: 5.6.2 + +packages: + + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.25.2': + resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.25.2': + resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.25.0': + resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.25.2': + resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.24.7': + resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.25.2': + resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.24.8': + resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-simple-access@7.24.7': + resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.24.8': + resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.25.0': + resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.25.3': + resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.24.7': + resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.24.7': + resolution: {integrity: sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.25.0': + resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.25.3': + resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.25.2': + resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + + '@eslint-community/eslint-utils@4.4.0': + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.10.0': + resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.1.0': + resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.3': + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + + '@jest/console@29.7.0': + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/core@29.7.0': + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/environment@29.7.0': + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect-utils@29.7.0': + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/expect@29.7.0': + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/fake-timers@29.7.0': + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/globals@29.7.0': + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/reporters@29.7.0': + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/source-map@29.6.3': + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-result@29.7.0': + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/test-sequencer@29.7.0': + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/transform@29.7.0': + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jest/types@29.6.3': + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + + '@rollup/plugin-commonjs@26.0.1': + resolution: {integrity: sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-inject@5.0.5': + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-node-resolve@15.2.3': + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-terser@0.4.4': + resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-typescript@11.1.6': + resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + + '@rollup/pluginutils@5.1.0': + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.21.2': + resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.21.2': + resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.21.2': + resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.21.2': + resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.21.2': + resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.21.2': + resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.21.2': + resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.21.2': + resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.21.2': + resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.21.2': + resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.21.2': + resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.21.2': + resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.21.2': + resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.21.2': + resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + cpu: [x64] + os: [win32] + + '@rtsao/scc@1.1.0': + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.6.8': + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.20.6': + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + + '@types/base-64@1.0.2': + resolution: {integrity: sha512-uPgKMmM9fmn7I+Zi6YBqctOye4SlJsHKcisjHIMWpb2YKZRc36GpKyNuQ03JcT+oNXg1m7Uv4wU94EVltn8/cw==} + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + + '@types/estree@1.0.5': + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@29.5.12': + resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + + '@types/json5@0.0.29': + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + + '@types/ms@0.7.34': + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + + '@types/node@22.5.4': + resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.32': + resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + + '@typescript-eslint/eslint-plugin@8.5.0': + resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@8.5.0': + resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@8.5.0': + resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.5.0': + resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@8.5.0': + resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.5.0': + resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@8.5.0': + resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + + '@typescript-eslint/visitor-keys@8.5.0': + resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + abstract-leveldown@0.12.4: + resolution: {integrity: sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + aria-query@5.1.3: + resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + + array.prototype.findlast@1.2.5: + resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} + engines: {node: '>= 0.4'} + + array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + engines: {node: '>= 0.4'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + + array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + + asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + + ast-types-flow@0.0.8: + resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} + + async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + axe-core@4.10.0: + resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} + engines: {node: '>=4'} + + axobject-query@3.1.1: + resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} + + babel-jest@29.7.0: + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + + babel-plugin-istanbul@6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} + + babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + babel-preset-current-node-syntax@1.0.1: + resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} + peerDependencies: + '@babel/core': ^7.0.0 + + babel-preset-jest@29.6.3: + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base-64@1.0.0: + resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==} + + bl@0.8.2: + resolution: {integrity: sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw==} + + bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + + browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + + browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + + browserify-fs@1.0.0: + resolution: {integrity: sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg==} + + browserify-rsa@4.1.0: + resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + + browserify-sign@4.2.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + + browserslist@4.23.2: + resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-es6@4.9.3: + resolution: {integrity: sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + + builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + caniuse-lite@1.0.30001646: + resolution: {integrity: sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + + cjs-module-lexer@1.3.1: + resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone@0.1.19: + resolution: {integrity: sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + concat-stream@1.6.2: + resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} + engines: {'0': node >= 0.8} + + confusing-browser-globals@1.0.11: + resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + copyfiles@2.4.1: + resolution: {integrity: sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==} + hasBin: true + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + + create-jest@29.7.0: + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + + cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + + damerau-levenshtein@1.0.8: + resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} + + data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} + + data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + dedent@1.5.3: + resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + + deep-equal@2.2.3: + resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} + engines: {node: '>= 0.4'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + deferred-leveldown@0.2.0: + resolution: {integrity: sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + + detect-indent@7.0.1: + resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} + engines: {node: '>=12.20'} + + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + detect-newline@4.0.1: + resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-to-chromium@1.5.4: + resolution: {integrity: sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==} + + elliptic@6.5.6: + resolution: {integrity: sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + errno@0.1.8: + resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} + hasBin: true + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-get-iterator@1.1.3: + resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} + + es-iterator-helpers@1.0.19: + resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-config-airbnb-base@15.0.0: + resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} + engines: {node: ^10.12.0 || >=12.0.0} + peerDependencies: + eslint: ^7.32.0 || ^8.2.0 + eslint-plugin-import: ^2.25.2 + + eslint-config-airbnb-typescript@18.0.0: + resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^7.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + + eslint-config-airbnb@19.0.4: + resolution: {integrity: sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==} + engines: {node: ^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.32.0 || ^8.2.0 + eslint-plugin-import: ^2.25.3 + eslint-plugin-jsx-a11y: ^6.5.1 + eslint-plugin-react: ^7.28.0 + eslint-plugin-react-hooks: ^4.3.0 + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-module-utils@2.11.0: + resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + + eslint-plugin-import@2.30.0: + resolution: {integrity: sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + + eslint-plugin-jsx-a11y@6.9.0: + resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + + eslint-plugin-prettier@5.1.3: + resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-plugin-react-hooks@4.6.2: + resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + + eslint-plugin-react@7.35.0: + resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.10.0: + resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + + expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + foreach@2.0.6: + resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} + + foreground-child@3.2.1: + resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} + engines: {node: '>=14'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + fwd-stream@1.0.4: + resolution: {integrity: sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + + get-stdin@9.0.0: + resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} + engines: {node: '>=12'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + + git-hooks-list@3.1.0: + resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + + globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hash-base@3.0.4: + resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} + engines: {node: '>=4'} + + hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + idb-wrapper@1.7.2: + resolution: {integrity: sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==} + + ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indexof@0.0.1: + resolution: {integrity: sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + + is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.15.0: + resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} + + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} + engines: {node: '>= 0.4'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-object@0.1.2: + resolution: {integrity: sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ==} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-weakset@2.0.3: + resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} + engines: {node: '>= 0.4'} + + is@0.2.7: + resolution: {integrity: sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ==} + + isarray@0.0.1: + resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isbuffer@0.0.0: + resolution: {integrity: sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} + + iterator.prototype@1.1.2: + resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jackspeak@4.0.1: + resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + engines: {node: 20 || >=22} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + engines: {node: '>=10'} + hasBin: true + + jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-cli@29.7.0: + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@29.7.0: + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + + jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-pnp-resolver@1.2.3: + resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true + + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + jest@29.7.0: + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsesc@2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} + engines: {node: '>=4.0'} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + + language-subtag-registry@0.3.23: + resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} + + language-tags@1.0.9: + resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} + engines: {node: '>=0.10'} + + level-blobs@0.1.7: + resolution: {integrity: sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg==} + + level-filesystem@1.2.0: + resolution: {integrity: sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g==} + + level-fix-range@1.0.2: + resolution: {integrity: sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ==} + + level-fix-range@2.0.0: + resolution: {integrity: sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA==} + + level-hooks@4.5.0: + resolution: {integrity: sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA==} + + level-js@2.2.4: + resolution: {integrity: sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ==} + + level-peek@1.0.6: + resolution: {integrity: sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ==} + + level-sublevel@5.2.3: + resolution: {integrity: sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA==} + + levelup@0.18.6: + resolution: {integrity: sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q==} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + ltgt@2.2.1: + resolution: {integrity: sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==} + + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + makeerror@1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + engines: {node: '>=8.6'} + + miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + + noms@0.0.0: + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + + object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + + object-keys@0.2.0: + resolution: {integrity: sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA==} + deprecated: Please update to the latest object-keys + + object-keys@0.4.0: + resolution: {integrity: sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + object.entries@1.1.8: + resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} + + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + + octal@1.0.0: + resolution: {integrity: sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + process-es6@0.11.6: + resolution: {integrity: sha512-GYBRQtL4v3wgigq10Pv58jmTbFXlIiTbSfgnNqZLY0ldUPqy1rRxDI5fCjoCpnM6TqmHQI8ydzTBXW86OYc0gA==} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + + prop-types@15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + + prr@0.0.0: + resolution: {integrity: sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==} + + prr@1.0.1: + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + + public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + readable-stream@1.0.34: + resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} + + readable-stream@1.1.14: + resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + reflect.getprototypeof@1.0.6: + resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + engines: {node: '>= 0.4'} + + regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve.exports@2.0.2: + resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} + engines: {node: '>=10'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + + rollup-plugin-dts@6.1.1: + resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} + engines: {node: '>=16'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 + + rollup-plugin-node-builtins@2.1.2: + resolution: {integrity: sha512-bxdnJw8jIivr2yEyt8IZSGqZkygIJOGAWypXvHXnwKAbUcN4Q/dGTx7K0oAJryC/m6aq6tKutltSeXtuogU6sw==} + + rollup-plugin-polyfill-node@0.13.0: + resolution: {integrity: sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + + rollup@4.21.2: + resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + + semver@2.3.2: + resolution: {integrity: sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + + smob@1.5.0: + resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} + + sort-object-keys@1.1.3: + resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} + + sort-package-json@2.10.1: + resolution: {integrity: sha512-d76wfhgUuGypKqY72Unm5LFnMpACbdxXsLPcL27pOsSrmVqH3PztFp1uq+Z22suk15h7vXmTesuh2aEjdCqb5w==} + hasBin: true + + source-map-support@0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + stop-iteration-iterator@1.0.0: + resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} + engines: {node: '>= 0.4'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + string-range@1.2.2: + resolution: {integrity: sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string.prototype.includes@2.0.0: + resolution: {integrity: sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==} + + string.prototype.matchall@4.0.11: + resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} + engines: {node: '>= 0.4'} + + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + + string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + + string_decoder@0.10.31: + resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} + engines: {node: ^14.18.0 || >=16.0.0} + + terser@5.31.3: + resolution: {integrity: sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==} + engines: {node: '>=10'} + hasBin: true + + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + through2@2.0.5: + resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} + + tmpl@1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + + to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-jest@29.2.5: + resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true -packages: + tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - /@ampproject/remapping@2.3.0: - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.6: + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} + + typedarray-to-buffer@1.0.4: + resolution: {integrity: sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==} + + typedarray@0.0.6: + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + engines: {node: '>=14.17'} + hasBin: true + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + untildify@4.0.0: + resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} + engines: {node: '>=8'} + + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + walker@1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-builtin-type@1.1.4: + resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + xml-js@1.6.11: + resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} + hasBin: true + + xtend@2.0.6: + resolution: {integrity: sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg==} + engines: {node: '>=0.4'} + + xtend@2.1.2: + resolution: {integrity: sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==} + engines: {node: '>=0.4'} + + xtend@2.2.0: + resolution: {integrity: sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw==} + engines: {node: '>=0.4'} + + xtend@3.0.0: + resolution: {integrity: sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==} + engines: {node: '>=0.4'} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@ampproject/remapping@2.3.0': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - dev: true - /@babel/code-frame@7.24.7: - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} - engines: {node: '>=6.9.0'} + '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 picocolors: 1.0.1 - dev: true - /@babel/compat-data@7.25.2: - resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/compat-data@7.25.2': {} - /@babel/core@7.25.2: - resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} - engines: {node: '>=6.9.0'} + '@babel/core@7.25.2': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.7 @@ -151,50 +2893,36 @@ packages: '@babel/traverse': 7.25.3 '@babel/types': 7.25.2 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.3.7 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - dev: true - /@babel/generator@7.25.0: - resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==} - engines: {node: '>=6.9.0'} + '@babel/generator@7.25.0': dependencies: '@babel/types': 7.25.2 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - dev: true - /@babel/helper-compilation-targets@7.25.2: - resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} - engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.25.2': dependencies: '@babel/compat-data': 7.25.2 '@babel/helper-validator-option': 7.24.8 browserslist: 4.23.2 lru-cache: 5.1.1 semver: 6.3.1 - dev: true - /@babel/helper-module-imports@7.24.7: - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} - engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.24.7': dependencies: '@babel/traverse': 7.25.3 '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - dev: true - /@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 + '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 @@ -203,263 +2931,153 @@ packages: '@babel/traverse': 7.25.3 transitivePeerDependencies: - supports-color - dev: true - /@babel/helper-plugin-utils@7.24.8: - resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/helper-plugin-utils@7.24.8': {} - /@babel/helper-simple-access@7.24.7: - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} - engines: {node: '>=6.9.0'} + '@babel/helper-simple-access@7.24.7': dependencies: '@babel/traverse': 7.25.3 '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color - dev: true - /@babel/helper-string-parser@7.24.8: - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/helper-string-parser@7.24.8': {} - /@babel/helper-validator-identifier@7.24.7: - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/helper-validator-identifier@7.24.7': {} - /@babel/helper-validator-option@7.24.8: - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/helper-validator-option@7.24.8': {} - /@babel/helpers@7.25.0: - resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} - engines: {node: '>=6.9.0'} + '@babel/helpers@7.25.0': dependencies: '@babel/template': 7.25.0 '@babel/types': 7.25.2 - dev: true - /@babel/highlight@7.24.7: - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} - engines: {node: '>=6.9.0'} - requiresBuild: true + '@babel/highlight@7.24.7': dependencies: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.1 - dev: true - /@babel/parser@7.25.3: - resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} - engines: {node: '>=6.0.0'} - hasBin: true + '@babel/parser@7.25.3': dependencies: '@babel/types': 7.25.2 - dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-plugin-utils': 7.24.8 - dev: true - /@babel/template@7.25.0: - resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} - engines: {node: '>=6.9.0'} + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 '@babel/parser': 7.25.3 '@babel/types': 7.25.2 - dev: true - /@babel/traverse@7.25.3: - resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==} - engines: {node: '>=6.9.0'} + '@babel/traverse@7.25.3': dependencies: '@babel/code-frame': 7.24.7 '@babel/generator': 7.25.0 '@babel/parser': 7.25.3 '@babel/template': 7.25.0 '@babel/types': 7.25.2 - debug: 4.3.5 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - dev: true - /@babel/types@7.25.2: - resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} - engines: {node: '>=6.9.0'} + '@babel/types@7.25.2': dependencies: '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - dev: true - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true + '@bcoe/v8-coverage@0.2.3': {} - /@eslint-community/eslint-utils@4.4.0(eslint@9.7.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0)': dependencies: - eslint: 9.7.0 + eslint: 9.10.0 eslint-visitor-keys: 3.4.3 - dev: true - /@eslint-community/regexpp@4.11.0: - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true + '@eslint-community/regexpp@4.11.0': {} - /@eslint/config-array@0.17.1: - resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.5 + debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true - /@eslint/eslintrc@3.1.0: - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.7 espree: 10.1.0 globals: 14.0.0 ignore: 5.3.1 @@ -469,90 +3087,62 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - dev: true - /@eslint/js@9.7.0: - resolution: {integrity: sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dev: true + '@eslint/js@9.10.0': {} - /@eslint/object-schema@2.1.4: - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dev: true + '@eslint/object-schema@2.1.4': {} - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: true + '@eslint/plugin-kit@0.1.0': + dependencies: + levn: 0.4.1 - /@humanwhocodes/retry@0.3.0: - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} - engines: {node: '>=18.18'} - dev: true + '@humanwhocodes/module-importer@1.0.1': {} - /@isaacs/cliui@8.0.2: - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} + '@humanwhocodes/retry@0.3.0': {} + + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 - string-width-cjs: /string-width@4.2.3 + string-width-cjs: string-width@4.2.3 strip-ansi: 7.1.0 - strip-ansi-cjs: /strip-ansi@6.0.1 + strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 - wrap-ansi-cjs: /wrap-ansi@7.0.0 - dev: true + wrap-ansi-cjs: wrap-ansi@7.0.0 - /@istanbuljs/load-nyc-config@1.1.0: - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 find-up: 4.1.0 get-package-type: 0.1.0 js-yaml: 3.14.1 resolve-from: 5.0.0 - dev: true - /@istanbuljs/schema@0.1.3: - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - dev: true + '@istanbuljs/schema@0.1.3': {} - /@jest/console@29.7.0: - resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - dev: true - /@jest/core@29.7.0: - resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true + '@jest/core@29.7.0': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.10) + jest-config: 29.7.0(@types/node@22.5.4) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -572,50 +3162,35 @@ packages: - babel-plugin-macros - supports-color - ts-node - dev: true - /@jest/environment@29.7.0: - resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 jest-mock: 29.7.0 - dev: true - /@jest/expect-utils@29.7.0: - resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/expect-utils@29.7.0': dependencies: jest-get-type: 29.6.3 - dev: true - /@jest/expect@29.7.0: - resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/expect@29.7.0': dependencies: expect: 29.7.0 jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color - dev: true - /@jest/fake-timers@29.7.0: - resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/fake-timers@29.7.0': dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.14.10 + '@types/node': 22.5.4 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 - dev: true - /@jest/globals@29.7.0: - resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/globals@29.7.0': dependencies: '@jest/environment': 29.7.0 '@jest/expect': 29.7.0 @@ -623,16 +3198,8 @@ packages: jest-mock: 29.7.0 transitivePeerDependencies: - supports-color - dev: true - /@jest/reporters@29.7.0: - resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true + '@jest/reporters@29.7.0': dependencies: '@bcoe/v8-coverage': 0.2.3 '@jest/console': 29.7.0 @@ -640,7 +3207,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -660,47 +3227,32 @@ packages: v8-to-istanbul: 9.3.0 transitivePeerDependencies: - supports-color - dev: true - /@jest/schemas@29.6.3: - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/schemas@29.6.3': dependencies: '@sinclair/typebox': 0.27.8 - dev: true - /@jest/source-map@29.6.3: - resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/source-map@29.6.3': dependencies: '@jridgewell/trace-mapping': 0.3.25 callsites: 3.1.0 graceful-fs: 4.2.11 - dev: true - /@jest/test-result@29.7.0: - resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/test-result@29.7.0': dependencies: '@jest/console': 29.7.0 '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 collect-v8-coverage: 1.0.2 - dev: true - /@jest/test-sequencer@29.7.0: - resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/test-sequencer@29.7.0': dependencies: '@jest/test-result': 29.7.0 graceful-fs: 4.2.11 jest-haste-map: 29.7.0 slash: 3.0.0 - dev: true - /@jest/transform@29.7.0: - resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/transform@29.7.0': dependencies: '@babel/core': 7.25.2 '@jest/types': 29.6.3 @@ -719,672 +3271,375 @@ packages: write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color - dev: true - /@jest/types@29.6.3: - resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/types@29.6.3': dependencies: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.14.10 + '@types/node': 22.5.4 '@types/yargs': 17.0.32 chalk: 4.1.2 - dev: true - /@jridgewell/gen-mapping@0.3.5: - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - dev: true - /@jridgewell/resolve-uri@3.1.2: - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - dev: true + '@jridgewell/resolve-uri@3.1.2': {} - /@jridgewell/set-array@1.2.1: - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - dev: true + '@jridgewell/set-array@1.2.1': {} - /@jridgewell/source-map@0.3.6: - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + '@jridgewell/source-map@0.3.6': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - dev: true - /@jridgewell/sourcemap-codec@1.5.0: - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - dev: true + '@jridgewell/sourcemap-codec@1.5.0': {} - /@jridgewell/trace-mapping@0.3.25: - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - dev: true - /@nodelib/fs.scandir@2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 - dev: true - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: true + '@nodelib/fs.stat@2.0.5': {} - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} + '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - dev: true - /@pkgjs/parseargs@0.11.0: - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - requiresBuild: true - dev: true + '@pkgjs/parseargs@0.11.0': optional: true - /@pkgr/core@0.1.1: - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dev: true + '@pkgr/core@0.1.1': {} - /@rollup/plugin-commonjs@25.0.7(rollup@4.18.1): - resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@rollup/plugin-commonjs@26.0.1(rollup@4.21.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.21.2) commondir: 1.0.1 estree-walker: 2.0.2 - glob: 8.1.0 + glob: 10.4.5 is-reference: 1.2.1 magic-string: 0.30.11 - rollup: 4.18.1 - dev: true + optionalDependencies: + rollup: 4.21.2 - /@rollup/plugin-inject@5.0.5(rollup@4.18.1): - resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@rollup/plugin-inject@5.0.5(rollup@4.21.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.21.2) estree-walker: 2.0.2 magic-string: 0.30.11 - rollup: 4.18.1 - dev: true + optionalDependencies: + rollup: 4.21.2 - /@rollup/plugin-node-resolve@15.2.3(rollup@4.18.1): - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@rollup/plugin-node-resolve@15.2.3(rollup@4.21.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.21.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.18.1 - dev: true + optionalDependencies: + rollup: 4.21.2 - /@rollup/plugin-terser@0.4.4(rollup@4.18.1): - resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@rollup/plugin-terser@0.4.4(rollup@4.21.2)': dependencies: - rollup: 4.18.1 serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.31.3 - dev: true + optionalDependencies: + rollup: 4.21.2 - /@rollup/plugin-typescript@11.1.6(rollup@4.18.1)(tslib@2.6.3)(typescript@5.5.3): - resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.14.0||^3.0.0||^4.0.0 - tslib: '*' - typescript: '>=3.7.0' - peerDependenciesMeta: - rollup: - optional: true - tslib: - optional: true + '@rollup/plugin-typescript@11.1.6(rollup@4.21.2)(tslib@2.7.0)(typescript@5.6.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.21.2) resolve: 1.22.8 - rollup: 4.18.1 - tslib: 2.6.3 - typescript: 5.5.3 - dev: true + typescript: 5.6.2 + optionalDependencies: + rollup: 4.21.2 + tslib: 2.7.0 - /@rollup/pluginutils@5.1.0(rollup@4.18.1): - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@rollup/pluginutils@5.1.0(rollup@4.21.2)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.18.1 - dev: true + optionalDependencies: + rollup: 4.21.2 - /@rollup/rollup-android-arm-eabi@4.18.1: - resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true + '@rollup/rollup-android-arm-eabi@4.21.2': optional: true - /@rollup/rollup-android-arm64@4.18.1: - resolution: {integrity: sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true + '@rollup/rollup-android-arm64@4.21.2': optional: true - /@rollup/rollup-darwin-arm64@4.18.1: - resolution: {integrity: sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true + '@rollup/rollup-darwin-arm64@4.21.2': optional: true - /@rollup/rollup-darwin-x64@4.18.1: - resolution: {integrity: sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true + '@rollup/rollup-darwin-x64@4.21.2': optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.18.1: - resolution: {integrity: sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': optional: true - /@rollup/rollup-linux-arm-musleabihf@4.18.1: - resolution: {integrity: sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-arm-musleabihf@4.21.2': optional: true - /@rollup/rollup-linux-arm64-gnu@4.18.1: - resolution: {integrity: sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-arm64-gnu@4.21.2': optional: true - /@rollup/rollup-linux-arm64-musl@4.18.1: - resolution: {integrity: sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-arm64-musl@4.21.2': optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.18.1: - resolution: {integrity: sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': optional: true - /@rollup/rollup-linux-riscv64-gnu@4.18.1: - resolution: {integrity: sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-riscv64-gnu@4.21.2': optional: true - /@rollup/rollup-linux-s390x-gnu@4.18.1: - resolution: {integrity: sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-s390x-gnu@4.21.2': optional: true - /@rollup/rollup-linux-x64-gnu@4.18.1: - resolution: {integrity: sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-x64-gnu@4.21.2': optional: true - /@rollup/rollup-linux-x64-musl@4.18.1: - resolution: {integrity: sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + '@rollup/rollup-linux-x64-musl@4.21.2': optional: true - /@rollup/rollup-win32-arm64-msvc@4.18.1: - resolution: {integrity: sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true + '@rollup/rollup-win32-arm64-msvc@4.21.2': optional: true - /@rollup/rollup-win32-ia32-msvc@4.18.1: - resolution: {integrity: sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true + '@rollup/rollup-win32-ia32-msvc@4.21.2': optional: true - /@rollup/rollup-win32-x64-msvc@4.18.1: - resolution: {integrity: sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true + '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true - /@sinclair/typebox@0.27.8: - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true + '@rtsao/scc@1.1.0': {} - /@sinonjs/commons@3.0.1: - resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + '@sinclair/typebox@0.27.8': {} + + '@sinonjs/commons@3.0.1': dependencies: type-detect: 4.0.8 - dev: true - /@sinonjs/fake-timers@10.3.0: - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@sinonjs/fake-timers@10.3.0': dependencies: '@sinonjs/commons': 3.0.1 - dev: true - /@types/babel__core@7.20.5: - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.25.3 '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 - dev: true - /@types/babel__generator@7.6.8: - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + '@types/babel__generator@7.6.8': dependencies: '@babel/types': 7.25.2 - dev: true - /@types/babel__template@7.4.4: - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.25.3 '@babel/types': 7.25.2 - dev: true - /@types/babel__traverse@7.20.6: - resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/babel__traverse@7.20.6': dependencies: '@babel/types': 7.25.2 - dev: true - /@types/base-64@1.0.2: - resolution: {integrity: sha512-uPgKMmM9fmn7I+Zi6YBqctOye4SlJsHKcisjHIMWpb2YKZRc36GpKyNuQ03JcT+oNXg1m7Uv4wU94EVltn8/cw==} - dev: true + '@types/base-64@1.0.2': {} - /@types/debug@4.1.12: - resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 - dev: true - /@types/estree@1.0.5: - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true + '@types/estree@1.0.5': {} - /@types/graceful-fs@4.1.9: - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.14.10 - dev: true + '@types/node': 22.5.4 - /@types/istanbul-lib-coverage@2.0.6: - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - dev: true + '@types/istanbul-lib-coverage@2.0.6': {} - /@types/istanbul-lib-report@3.0.3: - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + '@types/istanbul-lib-report@3.0.3': dependencies: '@types/istanbul-lib-coverage': 2.0.6 - dev: true - /@types/istanbul-reports@3.0.4: - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + '@types/istanbul-reports@3.0.4': dependencies: '@types/istanbul-lib-report': 3.0.3 - dev: true - /@types/jest@29.5.12: - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + '@types/jest@29.5.12': dependencies: expect: 29.7.0 pretty-format: 29.7.0 - dev: true - /@types/json5@0.0.29: - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - dev: true + '@types/json5@0.0.29': {} - /@types/ms@0.7.34: - resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - dev: true + '@types/ms@0.7.34': {} - /@types/node@20.14.10: - resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==} + '@types/node@22.5.4': dependencies: - undici-types: 5.26.5 - dev: true + undici-types: 6.19.8 - /@types/resolve@1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - dev: true + '@types/resolve@1.20.2': {} - /@types/stack-utils@2.0.3: - resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - dev: true + '@types/stack-utils@2.0.3': {} - /@types/yargs-parser@21.0.3: - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - dev: true + '@types/yargs-parser@21.0.3': {} - /@types/yargs@17.0.32: - resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + '@types/yargs@17.0.32': dependencies: '@types/yargs-parser': 21.0.3 - dev: true - /@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0)(typescript@5.5.3): - resolution: {integrity: sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.3) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/type-utils': 7.16.1(eslint@9.7.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.16.1 - eslint: 9.7.0 + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + eslint: 9.10.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.3) - typescript: 5.5.3 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/parser@7.16.1(eslint@9.7.0)(typescript@5.5.3): - resolution: {integrity: sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.16.1 - debug: 4.3.5 - eslint: 9.7.0 - typescript: 5.5.3 + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 + eslint: 9.10.0 + optionalDependencies: + typescript: 5.6.2 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/scope-manager@7.16.1: - resolution: {integrity: sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.5.0': dependencies: - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/visitor-keys': 7.16.1 - dev: true + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 - /@typescript-eslint/type-utils@7.16.1(eslint@9.7.0)(typescript@5.5.3): - resolution: {integrity: sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.1(eslint@9.7.0)(typescript@5.5.3) - debug: 4.3.5 - eslint: 9.7.0 - ts-api-utils: 1.3.0(typescript@5.5.3) - typescript: 5.5.3 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + debug: 4.3.7 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 transitivePeerDependencies: + - eslint - supports-color - dev: true - /@typescript-eslint/types@7.16.1: - resolution: {integrity: sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==} - engines: {node: ^18.18.0 || >=20.0.0} - dev: true + '@typescript-eslint/types@8.5.0': {} - /@typescript-eslint/typescript-estree@7.16.1(typescript@5.5.3): - resolution: {integrity: sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/visitor-keys': 7.16.1 - debug: 4.3.5 - globby: 11.1.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 + debug: 4.3.7 + fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.3) - typescript: 5.5.3 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/utils@7.16.1(eslint@9.7.0)(typescript@5.5.3): - resolution: {integrity: sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 + '@typescript-eslint/utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.7.0) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.5.3) - eslint: 9.7.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + eslint: 9.10.0 transitivePeerDependencies: - supports-color - typescript - dev: true - /@typescript-eslint/visitor-keys@7.16.1: - resolution: {integrity: sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.5.0': dependencies: - '@typescript-eslint/types': 7.16.1 + '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 - dev: true - /abstract-leveldown@0.12.4: - resolution: {integrity: sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==} + abstract-leveldown@0.12.4: dependencies: xtend: 3.0.0 - dev: true - /acorn-jsx@5.3.2(acorn@8.12.1): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: acorn: 8.12.1 - dev: true - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true + acorn@8.12.1: {} - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 - dev: true - /ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 - dev: true - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true + ansi-regex@5.0.1: {} - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true + ansi-regex@6.0.1: {} - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - requiresBuild: true + ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 - dev: true - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - dev: true - /ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - dev: true + ansi-styles@5.2.0: {} - /ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - dev: true + ansi-styles@6.2.1: {} - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: true - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 - dev: true - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true + argparse@2.0.1: {} - /aria-query@5.1.3: - resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} + aria-query@5.1.3: dependencies: deep-equal: 2.2.3 - dev: true - /array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} + array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 is-array-buffer: 3.0.4 - dev: true - /array-includes@3.1.8: - resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} - engines: {node: '>= 0.4'} + array-includes@3.1.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -1392,16 +3647,8 @@ packages: es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 is-string: 1.0.7 - dev: true - /array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - dev: true - - /array.prototype.findlast@1.2.5: - resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} - engines: {node: '>= 0.4'} + array.prototype.findlast@1.2.5: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -1409,11 +3656,8 @@ packages: es-errors: 1.3.0 es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 - dev: true - /array.prototype.findlastindex@1.2.5: - resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} - engines: {node: '>= 0.4'} + array.prototype.findlastindex@1.2.5: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -1421,42 +3665,30 @@ packages: es-errors: 1.3.0 es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 - dev: true - /array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} + array.prototype.flat@1.3.2: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 - dev: true - /array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} - engines: {node: '>= 0.4'} + array.prototype.flatmap@1.3.2: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 - dev: true - /array.prototype.tosorted@1.1.4: - resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} - engines: {node: '>= 0.4'} + array.prototype.tosorted@1.1.4: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 es-errors: 1.3.0 es-shim-unscopables: 1.0.2 - dev: true - /arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} - engines: {node: '>= 0.4'} + arraybuffer.prototype.slice@1.0.3: dependencies: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 @@ -1466,47 +3698,28 @@ packages: get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 - dev: true - /asn1.js@4.10.1: - resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + asn1.js@4.10.1: dependencies: bn.js: 4.12.0 inherits: 2.0.4 minimalistic-assert: 1.0.1 - dev: true - /ast-types-flow@0.0.8: - resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} - dev: true + ast-types-flow@0.0.8: {} - /async@3.2.5: - resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} - dev: true + async@3.2.5: {} - /available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 - dev: true - /axe-core@4.10.0: - resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} - engines: {node: '>=4'} - dev: true + axe-core@4.10.0: {} - /axobject-query@3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} + axobject-query@3.1.1: dependencies: deep-equal: 2.2.3 - dev: true - /babel-jest@29.7.0(@babel/core@7.25.2): - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.8.0 + babel-jest@29.7.0(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 '@jest/transform': 29.7.0 @@ -1518,11 +3731,8 @@ packages: slash: 3.0.0 transitivePeerDependencies: - supports-color - dev: true - /babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} + babel-plugin-istanbul@6.1.1: dependencies: '@babel/helper-plugin-utils': 7.24.8 '@istanbuljs/load-nyc-config': 1.1.0 @@ -1531,22 +3741,15 @@ packages: test-exclude: 6.0.0 transitivePeerDependencies: - supports-color - dev: true - /babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + babel-plugin-jest-hoist@29.6.3: dependencies: '@babel/template': 7.25.0 '@babel/types': 7.25.2 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 - dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.25.2): - resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} - peerDependencies: - '@babel/core': ^7.0.0 + babel-preset-current-node-syntax@1.0.1(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) @@ -1561,67 +3764,41 @@ packages: '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) - dev: true - /babel-preset-jest@29.6.3(@babel/core@7.25.2): - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.0.0 + babel-preset-jest@29.6.3(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.25.2) - dev: true - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true + balanced-match@1.0.2: {} - /base-64@1.0.0: - resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==} - dev: false + base-64@1.0.0: {} - /bl@0.8.2: - resolution: {integrity: sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw==} + bl@0.8.2: dependencies: readable-stream: 1.0.34 - dev: true - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - dev: true + bn.js@4.12.0: {} - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: true + bn.js@5.2.1: {} - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - dev: true - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 - dev: true - /braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} + braces@3.0.3: dependencies: fill-range: 7.1.1 - dev: true - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - dev: true + brorand@1.1.0: {} - /browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + browserify-aes@1.2.0: dependencies: buffer-xor: 1.0.3 cipher-base: 1.0.4 @@ -1629,43 +3806,32 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /browserify-cipher@1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + browserify-cipher@1.0.1: dependencies: browserify-aes: 1.2.0 browserify-des: 1.0.2 evp_bytestokey: 1.0.3 - dev: true - /browserify-des@1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + browserify-des@1.0.2: dependencies: cipher-base: 1.0.4 des.js: 1.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /browserify-fs@1.0.0: - resolution: {integrity: sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg==} + browserify-fs@1.0.0: dependencies: level-filesystem: 1.2.0 level-js: 2.2.4 levelup: 0.18.6 - dev: true - /browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + browserify-rsa@4.1.0: dependencies: bn.js: 5.2.1 randombytes: 2.1.0 - dev: true - /browserify-sign@4.2.3: - resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} - engines: {node: '>= 0.12'} + browserify-sign@4.2.3: dependencies: bn.js: 5.2.1 browserify-rsa: 4.1.0 @@ -1677,204 +3843,116 @@ packages: parse-asn1: 5.1.7 readable-stream: 2.3.8 safe-buffer: 5.2.1 - dev: true - /browserslist@4.23.2: - resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true + browserslist@4.23.2: dependencies: caniuse-lite: 1.0.30001646 electron-to-chromium: 1.5.4 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.2) - dev: true - /bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} + bs-logger@0.2.6: dependencies: fast-json-stable-stringify: 2.1.0 - dev: true - /bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + bser@2.1.1: dependencies: node-int64: 0.4.0 - dev: true - /buffer-es6@4.9.3: - resolution: {integrity: sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw==} - dev: true + buffer-es6@4.9.3: {} - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true + buffer-from@1.1.2: {} - /buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true + buffer-xor@1.0.3: {} - /builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - dev: true + builtin-modules@3.3.0: {} - /call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 - dev: true - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true + callsites@3.1.0: {} - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true + camelcase@5.3.1: {} - /camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true + camelcase@6.3.0: {} - /caniuse-lite@1.0.30001646: - resolution: {integrity: sha512-dRg00gudiBDDTmUhClSdv3hqRfpbOnU28IpI1T6PBTLWa+kOj0681C8uML3PifYfREuBrVjDGhL3adYpBT6spw==} - dev: true + caniuse-lite@1.0.30001646: {} - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - requiresBuild: true + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 - dev: true - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true - /char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} - dev: true + char-regex@1.0.2: {} - /ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - dev: true + ci-info@3.9.0: {} - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cipher-base@1.0.4: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /cjs-module-lexer@1.3.1: - resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==} - dev: true + cjs-module-lexer@1.3.1: {} - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@7.0.4: dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + cliui@8.0.1: dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true - /clone@0.1.19: - resolution: {integrity: sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==} - dev: true + clone@0.1.19: {} - /co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: true + co@4.6.0: {} - /collect-v8-coverage@1.0.2: - resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} - dev: true + collect-v8-coverage@1.0.2: {} - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - requiresBuild: true + color-convert@1.9.3: dependencies: color-name: 1.1.3 - dev: true - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} + color-convert@2.0.1: dependencies: color-name: 1.1.4 - dev: true - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - requiresBuild: true - dev: true + color-name@1.1.3: {} - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + color-name@1.1.4: {} - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true + commander@2.20.3: {} - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: true + commondir@1.0.1: {} - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true + concat-map@0.0.1: {} - /concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} + concat-stream@1.6.2: dependencies: buffer-from: 1.1.2 inherits: 2.0.4 readable-stream: 2.3.8 typedarray: 0.0.6 - dev: true - /confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - dev: true + confusing-browser-globals@1.0.11: {} - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: true + convert-source-map@2.0.0: {} - /copyfiles@2.4.1: - resolution: {integrity: sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==} - hasBin: true + copyfiles@2.4.1: dependencies: glob: 7.2.3 minimatch: 3.1.2 @@ -1883,31 +3961,23 @@ packages: through2: 2.0.5 untildify: 4.0.0 yargs: 16.2.0 - dev: true - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - dev: true + core-util-is@1.0.3: {} - /create-ecdh@4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + create-ecdh@4.0.4: dependencies: bn.js: 4.12.0 elliptic: 6.5.6 - dev: true - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + create-hash@1.2.0: dependencies: cipher-base: 1.0.4 inherits: 2.0.4 md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: true - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-hmac@1.1.7: dependencies: cipher-base: 1.0.4 create-hash: 1.2.0 @@ -1915,18 +3985,14 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /create-jest@29.7.0(@types/node@20.14.10): - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true + create-jest@29.7.0(@types/node@22.5.4): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.10) + jest-config: 29.7.0(@types/node@22.5.4) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -1934,35 +4000,24 @@ packages: - babel-plugin-macros - supports-color - ts-node - dev: true - /cross-env@7.0.3: - resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} - engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} - hasBin: true + cross-env@7.0.3: dependencies: cross-spawn: 7.0.3 - dev: true - /cross-fetch@4.0.0: - resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + cross-fetch@4.0.0: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - dev: false - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true - /crypto-browserify@3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + crypto-browserify@3.12.0: dependencies: browserify-cipher: 1.0.1 browserify-sign: 4.2.3 @@ -1975,73 +4030,38 @@ packages: public-encrypt: 4.0.3 randombytes: 2.1.0 randomfill: 1.0.4 - dev: true - /damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - dev: true + damerau-levenshtein@1.0.8: {} - /data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} - engines: {node: '>= 0.4'} + data-view-buffer@1.0.1: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 - dev: true - /data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} - engines: {node: '>= 0.4'} + data-view-byte-length@1.0.1: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 - dev: true - /data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} - engines: {node: '>= 0.4'} + data-view-byte-offset@1.0.0: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 is-data-view: 1.0.1 - dev: true - /debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + debug@3.2.7: dependencies: ms: 2.1.3 - dev: true - /debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + debug@4.3.7: dependencies: - ms: 2.1.2 + ms: 2.1.3 - /dedent@1.5.3: - resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - dev: true + dedent@1.5.3: {} - /deep-equal@2.2.3: - resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} - engines: {node: '>= 0.4'} + deep-equal@2.2.3: dependencies: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 @@ -2061,113 +4081,65 @@ packages: which-boxed-primitive: 1.0.2 which-collection: 1.0.2 which-typed-array: 1.1.15 - dev: true - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true + deep-is@0.1.4: {} - /deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - dev: true + deepmerge@4.3.1: {} - /deferred-leveldown@0.2.0: - resolution: {integrity: sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng==} + deferred-leveldown@0.2.0: dependencies: abstract-leveldown: 0.12.4 - dev: true - /define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} + define-data-property@1.1.4: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 - dev: true - /define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} + define-properties@1.2.1: dependencies: define-data-property: 1.1.4 has-property-descriptors: 1.0.2 object-keys: 1.1.1 - dev: true - /des.js@1.1.0: - resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + des.js@1.1.0: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 - dev: true - /detect-indent@7.0.1: - resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} - engines: {node: '>=12.20'} - dev: true + detect-indent@7.0.1: {} - /detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - dev: true + detect-newline@3.1.0: {} - /detect-newline@4.0.1: - resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true + detect-newline@4.0.1: {} - /diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true + diff-sequences@29.6.3: {} - /diffie-hellman@5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + diffie-hellman@5.0.3: dependencies: bn.js: 4.12.0 miller-rabin: 4.0.1 randombytes: 2.1.0 - dev: true - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 - dev: true - /doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} + doctrine@2.1.0: dependencies: esutils: 2.0.3 - dev: true - /dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} - engines: {node: '>=12'} - dev: true + dotenv@16.4.5: {} - /eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: true + eastasianwidth@0.2.0: {} - /ejs@3.1.10: - resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} - engines: {node: '>=0.10.0'} - hasBin: true + ejs@3.1.10: dependencies: jake: 10.9.2 - dev: true - /electron-to-chromium@1.5.4: - resolution: {integrity: sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==} - dev: true + electron-to-chromium@1.5.4: {} - /elliptic@6.5.6: - resolution: {integrity: sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==} + elliptic@6.5.6: dependencies: bn.js: 4.12.0 brorand: 1.1.0 @@ -2176,37 +4148,22 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - dev: true - /emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} - dev: true + emittery@0.13.1: {} - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true + emoji-regex@8.0.0: {} - /emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true + emoji-regex@9.2.2: {} - /errno@0.1.8: - resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} - hasBin: true + errno@0.1.8: dependencies: prr: 1.0.1 - dev: true - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 - dev: true - /es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} - engines: {node: '>= 0.4'} + es-abstract@1.23.3: dependencies: array-buffer-byte-length: 1.0.1 arraybuffer.prototype.slice: 1.0.3 @@ -2254,22 +4211,14 @@ packages: typed-array-length: 1.0.6 unbox-primitive: 1.0.2 which-typed-array: 1.1.15 - dev: true - /es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} + es-define-property@1.0.0: dependencies: get-intrinsic: 1.2.4 - dev: true - /es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - dev: true + es-errors@1.3.0: {} - /es-get-iterator@1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} + es-get-iterator@1.1.3: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 @@ -2280,11 +4229,8 @@ packages: is-string: 1.0.7 isarray: 2.0.5 stop-iteration-iterator: 1.0.0 - dev: true - /es-iterator-helpers@1.0.19: - resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} - engines: {node: '>= 0.4'} + es-iterator-helpers@1.0.19: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -2300,180 +4246,100 @@ packages: internal-slot: 1.0.7 iterator.prototype: 1.1.2 safe-array-concat: 1.1.2 - dev: true - /es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 - dev: true - /es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} + es-set-tostringtag@2.0.3: dependencies: get-intrinsic: 1.2.4 has-tostringtag: 1.0.2 hasown: 2.0.2 - dev: true - /es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + es-shim-unscopables@1.0.2: dependencies: hasown: 2.0.2 - dev: true - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + es-to-primitive@1.2.1: dependencies: is-callable: 1.2.7 is-date-object: 1.0.5 is-symbol: 1.0.4 - dev: true - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} - engines: {node: '>=6'} - dev: true + escalade@3.1.2: {} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - requiresBuild: true - dev: true + escape-string-regexp@1.0.5: {} - /escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true + escape-string-regexp@2.0.0: {} - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true + escape-string-regexp@4.0.0: {} - /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1)(eslint@9.7.0): - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint@9.10.0): dependencies: confusing-browser-globals: 1.0.11 - eslint: 9.7.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0) + eslint: 9.10.0 + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 - dev: true - /eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.16.1)(@typescript-eslint/parser@7.16.1)(eslint-plugin-import@2.29.1)(eslint@9.7.0): - resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^7.0.0 - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2))(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint@9.10.0): dependencies: - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.3) - eslint: 9.7.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1)(eslint@9.7.0) + '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + eslint: 9.10.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint@9.10.0) transitivePeerDependencies: - eslint-plugin-import - dev: true - /eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1)(eslint-plugin-jsx-a11y@6.9.0)(eslint-plugin-react-hooks@4.6.2)(eslint-plugin-react@7.35.0)(eslint@9.7.0): - resolution: {integrity: sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==} - engines: {node: ^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.3 - eslint-plugin-jsx-a11y: ^6.5.1 - eslint-plugin-react: ^7.28.0 - eslint-plugin-react-hooks: ^4.3.0 + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@9.10.0))(eslint-plugin-react-hooks@4.6.2(eslint@9.10.0))(eslint-plugin-react@7.35.0(eslint@9.10.0))(eslint@9.10.0): dependencies: - eslint: 9.7.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1)(eslint@9.7.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0) - eslint-plugin-jsx-a11y: 6.9.0(eslint@9.7.0) - eslint-plugin-react: 7.35.0(eslint@9.7.0) - eslint-plugin-react-hooks: 4.6.2(eslint@9.7.0) + eslint: 9.10.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0))(eslint@9.10.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0) + eslint-plugin-jsx-a11y: 6.9.0(eslint@9.10.0) + eslint-plugin-react: 7.35.0(eslint@9.10.0) + eslint-plugin-react-hooks: 4.6.2(eslint@9.10.0) object.assign: 4.1.5 object.entries: 1.1.8 - dev: true - /eslint-config-prettier@9.1.0(eslint@9.7.0): - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' + eslint-config-prettier@9.1.0(eslint@9.10.0): dependencies: - eslint: 9.7.0 - dev: true + eslint: 9.10.0 - /eslint-import-resolver-node@0.3.9: - resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.15.0 + is-core-module: 2.15.1 resolve: 1.22.8 transitivePeerDependencies: - supports-color - dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.1)(eslint-import-resolver-node@0.3.9)(eslint@9.7.0): - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0): dependencies: - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.3) debug: 3.2.7 - eslint: 9.7.0 + optionalDependencies: + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + eslint: 9.10.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1)(eslint@9.7.0): - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0): dependencies: - '@typescript-eslint/parser': 7.16.1(eslint@9.7.0)(typescript@5.5.3) + '@rtsao/scc': 1.1.0 array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.7.0 + eslint: 9.10.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1)(eslint-import-resolver-node@0.3.9)(eslint@9.7.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0) hasown: 2.0.2 - is-core-module: 2.15.0 + is-core-module: 2.15.1 is-glob: 4.0.3 minimatch: 3.1.2 object.fromentries: 2.0.8 @@ -2481,17 +4347,14 @@ packages: object.values: 1.2.0 semver: 6.3.1 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - dev: true - /eslint-plugin-jsx-a11y@6.9.0(eslint@9.7.0): - resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint-plugin-jsx-a11y@6.9.0(eslint@9.10.0): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -2502,7 +4365,7 @@ packages: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 9.7.0 + eslint: 9.10.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -2510,43 +4373,21 @@ packages: object.fromentries: 2.0.8 safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - dev: true - /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@9.7.0)(prettier@3.3.3): - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@9.10.0))(eslint@9.10.0)(prettier@3.3.3): dependencies: - eslint: 9.7.0 - eslint-config-prettier: 9.1.0(eslint@9.7.0) + eslint: 9.10.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 - dev: true + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@9.10.0) - /eslint-plugin-react-hooks@4.6.2(eslint@9.7.0): - resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint-plugin-react-hooks@4.6.2(eslint@9.10.0): dependencies: - eslint: 9.7.0 - dev: true + eslint: 9.10.0 - /eslint-plugin-react@7.35.0(eslint@9.7.0): - resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-plugin-react@7.35.0(eslint@9.10.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -2554,7 +4395,7 @@ packages: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.7.0 + eslint: 9.10.0 estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -2567,43 +4408,31 @@ packages: semver: 6.3.1 string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - dev: true - /eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - dev: true - /eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + eslint-visitor-keys@3.4.3: {} - /eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dev: true + eslint-visitor-keys@4.0.0: {} - /eslint@9.7.0: - resolution: {integrity: sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true + eslint@9.10.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.7.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/config-array': 0.17.1 + '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.7.0 + '@eslint/js': 9.10.0 + '@eslint/plugin-kit': 0.1.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.7 escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 @@ -2619,7 +4448,6 @@ packages: is-glob: 4.0.3 is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 @@ -2628,61 +4456,35 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color - dev: true - /espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@10.1.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 - dev: true - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true + esprima@4.0.1: {} - /esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} + esquery@1.6.0: dependencies: estraverse: 5.3.0 - dev: true - /esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 - dev: true - /estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true + estraverse@5.3.0: {} - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true + estree-walker@2.0.2: {} - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true + esutils@2.0.3: {} - /evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + evp_bytestokey@1.0.3: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 - dev: true - /execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} + execa@5.1.1: dependencies: cross-spawn: 7.0.3 get-stream: 6.0.1 @@ -2693,231 +4495,136 @@ packages: onetime: 5.1.2 signal-exit: 3.0.7 strip-final-newline: 2.0.0 - dev: true - /exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - dev: true + exit@0.1.2: {} - /expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + expect@29.7.0: dependencies: '@jest/expect-utils': 29.7.0 jest-get-type: 29.6.3 jest-matcher-utils: 29.7.0 jest-message-util: 29.7.0 jest-util: 29.7.0 - dev: true - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true + fast-deep-equal@3.1.3: {} - /fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - dev: true + fast-diff@1.3.0: {} - /fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.7 - dev: true - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true + fast-json-stable-stringify@2.1.0: {} - /fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true + fast-levenshtein@2.0.6: {} - /fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fastq@1.17.1: dependencies: reusify: 1.0.4 - dev: true - /fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fb-watchman@2.0.2: dependencies: bser: 2.1.1 - dev: true - /file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 - dev: true - /filelist@1.0.4: - resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + filelist@1.0.4: dependencies: minimatch: 5.1.6 - dev: true - /fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 - dev: true - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + find-up@4.1.0: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: true - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} + find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - dev: true - /flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - dev: true - /flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - dev: true + flatted@3.3.1: {} - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.3: dependencies: is-callable: 1.2.7 - dev: true - /foreach@2.0.6: - resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} - dev: true + foreach@2.0.6: {} - /foreground-child@3.2.1: - resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} - engines: {node: '>=14'} + foreground-child@3.2.1: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 - dev: true - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true + fs.realpath@1.0.0: {} - /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true + fsevents@2.3.3: optional: true - /function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true + function-bind@1.1.2: {} - /function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} + function.prototype.name@1.1.6: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 functions-have-names: 1.2.3 - dev: true - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: true + functions-have-names@1.2.3: {} - /fwd-stream@1.0.4: - resolution: {integrity: sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg==} + fwd-stream@1.0.4: dependencies: readable-stream: 1.0.34 - dev: true - /gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: true + gensync@1.0.0-beta.2: {} - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true + get-caller-file@2.0.5: {} - /get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} + get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 - dev: true - /get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - dev: true + get-package-type@0.1.0: {} - /get-stdin@9.0.0: - resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} - engines: {node: '>=12'} - dev: true + get-stdin@9.0.0: {} - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - dev: true + get-stream@6.0.1: {} - /get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} - engines: {node: '>= 0.4'} + get-symbol-description@1.0.2: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 - dev: true - /git-hooks-list@3.1.0: - resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} - dev: true + git-hooks-list@3.1.0: {} - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - dev: true - /glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 - dev: true - /glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true + glob@10.4.5: dependencies: foreground-child: 3.2.1 jackspeak: 3.4.3 @@ -2925,481 +4632,267 @@ packages: minipass: 7.1.2 package-json-from-dist: 1.0.0 path-scurry: 1.11.1 - dev: true - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + glob@11.0.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true + foreground-child: 3.2.1 + jackspeak: 4.0.1 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported + glob@7.2.3: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 5.1.6 + minimatch: 3.1.2 once: 1.4.0 - dev: true + path-is-absolute: 1.0.1 - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true + globals@11.12.0: {} - /globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - dev: true + globals@14.0.0: {} - /globalthis@1.0.4: - resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} - engines: {node: '>= 0.4'} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 gopd: 1.0.1 - dev: true - - /globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - /globby@13.2.2: - resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + globby@13.2.2: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 ignore: 5.3.1 merge2: 1.4.1 slash: 4.0.0 - dev: true - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 - dev: true - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true + graceful-fs@4.2.11: {} - /graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: true + graphemer@1.4.0: {} - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true + has-bigints@1.0.2: {} - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - requiresBuild: true - dev: true + has-flag@3.0.0: {} - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true + has-flag@4.0.0: {} - /has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + has-property-descriptors@1.0.2: dependencies: es-define-property: 1.0.0 - dev: true - /has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - dev: true + has-proto@1.0.3: {} - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: true + has-symbols@1.0.3: {} - /has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: dependencies: has-symbols: 1.0.3 - dev: true - /hash-base@3.0.4: - resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} - engines: {node: '>=4'} + hash-base@3.0.4: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} + hash-base@3.1.0: dependencies: inherits: 2.0.4 readable-stream: 3.6.2 safe-buffer: 5.2.1 - dev: true - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hash.js@1.1.7: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 - dev: true - /hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} + hasown@2.0.2: dependencies: function-bind: 1.1.2 - dev: true - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - dev: true - /html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - dev: true + html-escaper@2.0.2: {} - /human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - dev: true + human-signals@2.1.0: {} - /idb-wrapper@1.7.2: - resolution: {integrity: sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==} - dev: true + idb-wrapper@1.7.2: {} - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - dev: true + ignore@5.3.1: {} - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: true - /import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true + import-local@3.2.0: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 - dev: true - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true + imurmurhash@0.1.4: {} - /indexof@0.0.1: - resolution: {integrity: sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==} - dev: true + indexof@0.0.1: {} - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inflight@1.0.6: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true + inherits@2.0.4: {} - /internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} + internal-slot@1.0.7: dependencies: es-errors: 1.3.0 hasown: 2.0.2 side-channel: 1.0.6 - dev: true - /is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} + is-arguments@1.1.1: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 - dev: true - /is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 - dev: true - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true + is-arrayish@0.2.1: {} - /is-async-function@2.0.0: - resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} - engines: {node: '>= 0.4'} + is-async-function@2.0.0: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-bigint@1.0.4: dependencies: has-bigints: 1.0.2 - dev: true - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} + is-boolean-object@1.1.2: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 - dev: true - /is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} + is-builtin-module@3.2.1: dependencies: builtin-modules: 3.3.0 - dev: true - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: true + is-callable@1.2.7: {} - /is-core-module@2.15.0: - resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} - engines: {node: '>= 0.4'} + is-core-module@2.15.0: dependencies: hasown: 2.0.2 - dev: true - /is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} - engines: {node: '>= 0.4'} + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-data-view@1.0.1: dependencies: is-typed-array: 1.1.13 - dev: true - /is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + is-date-object@1.0.5: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true + is-extglob@2.1.1: {} - /is-finalizationregistry@1.0.2: - resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + is-finalizationregistry@1.0.2: dependencies: call-bind: 1.0.7 - dev: true - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true + is-fullwidth-code-point@3.0.0: {} - /is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - dev: true + is-generator-fn@2.1.0: {} - /is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} - engines: {node: '>= 0.4'} + is-generator-function@1.0.10: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 - dev: true - /is-map@2.0.3: - resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} - engines: {node: '>= 0.4'} - dev: true + is-map@2.0.3: {} - /is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - dev: true + is-module@1.0.0: {} - /is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} - dev: true + is-negative-zero@2.0.3: {} - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true + is-number@7.0.0: {} - /is-object@0.1.2: - resolution: {integrity: sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ==} - dev: true + is-object@0.1.2: {} - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true + is-path-inside@3.0.3: {} - /is-plain-obj@4.1.0: - resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} - engines: {node: '>=12'} - dev: true + is-plain-obj@4.1.0: {} - /is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + is-reference@1.2.1: dependencies: '@types/estree': 1.0.5 - dev: true - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} + is-regex@1.1.4: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 - dev: true - /is-set@2.0.3: - resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} - engines: {node: '>= 0.4'} - dev: true + is-set@2.0.3: {} - /is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} + is-shared-array-buffer@1.0.3: dependencies: call-bind: 1.0.7 - dev: true - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - dev: true + is-stream@2.0.1: {} - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} + is-symbol@1.0.4: dependencies: has-symbols: 1.0.3 - dev: true - /is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} - engines: {node: '>= 0.4'} + is-typed-array@1.1.13: dependencies: which-typed-array: 1.1.15 - dev: true - /is-weakmap@2.0.2: - resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} - engines: {node: '>= 0.4'} - dev: true + is-weakmap@2.0.2: {} - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakref@1.0.2: dependencies: call-bind: 1.0.7 - dev: true - /is-weakset@2.0.3: - resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} - engines: {node: '>= 0.4'} + is-weakset@2.0.3: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 - dev: true - /is@0.2.7: - resolution: {integrity: sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ==} - dev: true + is@0.2.7: {} - /isarray@0.0.1: - resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} - dev: true + isarray@0.0.1: {} - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - dev: true + isarray@1.0.0: {} - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true + isarray@2.0.5: {} - /isbuffer@0.0.0: - resolution: {integrity: sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==} - dev: true + isbuffer@0.0.0: {} - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true + isexe@2.0.0: {} - /istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} - dev: true + istanbul-lib-coverage@3.2.2: {} - /istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} + istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.25.2 '@babel/parser': 7.25.3 @@ -3408,11 +4901,8 @@ packages: semver: 6.3.1 transitivePeerDependencies: - supports-color - dev: true - /istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} + istanbul-lib-instrument@6.0.3: dependencies: '@babel/core': 7.25.2 '@babel/parser': 7.25.3 @@ -3421,83 +4911,66 @@ packages: semver: 7.6.3 transitivePeerDependencies: - supports-color - dev: true - /istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} + istanbul-lib-report@3.0.1: dependencies: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 supports-color: 7.2.0 - dev: true - /istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} + istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.5 + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: - supports-color - dev: true - /istanbul-reports@3.1.7: - resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} - engines: {node: '>=8'} + istanbul-reports@3.1.7: dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 - dev: true - /iterator.prototype@1.1.2: - resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + iterator.prototype@1.1.2: dependencies: define-properties: 1.2.1 get-intrinsic: 1.2.4 has-symbols: 1.0.3 reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 - dev: true - /jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 - dev: true - /jake@10.9.2: - resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} - engines: {node: '>=10'} - hasBin: true + jackspeak@4.0.1: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jake@10.9.2: dependencies: async: 3.2.5 chalk: 4.1.2 filelist: 1.0.4 minimatch: 3.1.2 - dev: true - /jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-changed-files@29.7.0: dependencies: execa: 5.1.1 jest-util: 29.7.0 p-limit: 3.1.0 - dev: true - /jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-circus@29.7.0: dependencies: '@jest/environment': 29.7.0 '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -3516,26 +4989,17 @@ packages: transitivePeerDependencies: - babel-plugin-macros - supports-color - dev: true - - /jest-cli@29.7.0(@types/node@20.14.10): - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true + + jest-cli@29.7.0(@types/node@22.5.4): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.14.10) + create-jest: 29.7.0(@types/node@22.5.4) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.14.10) + jest-config: 29.7.0(@types/node@22.5.4) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -3544,24 +5008,12 @@ packages: - babel-plugin-macros - supports-color - ts-node - dev: true - /jest-config@29.7.0(@types/node@20.14.10): - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true + jest-config@29.7.0(@types/node@22.5.4): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 babel-jest: 29.7.0(@babel/core@7.25.2) chalk: 4.1.2 ci-info: 3.9.0 @@ -3581,63 +5033,47 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 22.5.4 transitivePeerDependencies: - babel-plugin-macros - supports-color - dev: true - /jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-diff@29.7.0: dependencies: chalk: 4.1.2 diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.7.0 - dev: true - /jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-docblock@29.7.0: dependencies: detect-newline: 3.1.0 - dev: true - /jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-each@29.7.0: dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 jest-get-type: 29.6.3 jest-util: 29.7.0 pretty-format: 29.7.0 - dev: true - /jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-environment-node@29.7.0: dependencies: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 jest-mock: 29.7.0 jest-util: 29.7.0 - dev: true - /jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true + jest-get-type@29.6.3: {} - /jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-haste-map@29.7.0: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.14.10 + '@types/node': 22.5.4 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -3648,29 +5084,20 @@ packages: walker: 1.0.8 optionalDependencies: fsevents: 2.3.3 - dev: true - /jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-leak-detector@29.7.0: dependencies: jest-get-type: 29.6.3 pretty-format: 29.7.0 - dev: true - /jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-matcher-utils@29.7.0: dependencies: chalk: 4.1.2 jest-diff: 29.7.0 jest-get-type: 29.6.3 pretty-format: 29.7.0 - dev: true - /jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-message-util@29.7.0: dependencies: '@babel/code-frame': 7.24.7 '@jest/types': 29.6.3 @@ -3681,47 +5108,27 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 - dev: true - /jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 jest-util: 29.7.0 - dev: true - /jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true - dependencies: + jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): + optionalDependencies: jest-resolve: 29.7.0 - dev: true - /jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true + jest-regex-util@29.6.3: {} - /jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-resolve-dependencies@29.7.0: dependencies: jest-regex-util: 29.6.3 jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color - dev: true - /jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-resolve@29.7.0: dependencies: chalk: 4.1.2 graceful-fs: 4.2.11 @@ -3732,18 +5139,15 @@ packages: resolve: 1.22.8 resolve.exports: 2.0.2 slash: 3.0.0 - dev: true - /jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-runner@29.7.0: dependencies: '@jest/console': 29.7.0 '@jest/environment': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -3761,11 +5165,8 @@ packages: source-map-support: 0.5.13 transitivePeerDependencies: - supports-color - dev: true - /jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-runtime@29.7.0: dependencies: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 @@ -3774,7 +5175,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -3791,11 +5192,8 @@ packages: strip-bom: 4.0.0 transitivePeerDependencies: - supports-color - dev: true - /jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-snapshot@29.7.0: dependencies: '@babel/core': 7.25.2 '@babel/generator': 7.25.0 @@ -3819,23 +5217,17 @@ packages: semver: 7.6.3 transitivePeerDependencies: - supports-color - dev: true - /jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 picomatch: 2.3.1 - dev: true - /jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-validate@29.7.0: dependencies: '@jest/types': 29.6.3 camelcase: 6.3.0 @@ -3843,149 +5235,90 @@ packages: jest-get-type: 29.6.3 leven: 3.1.0 pretty-format: 29.7.0 - dev: true - /jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-watcher@29.7.0: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.14.10 + '@types/node': 22.5.4 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 jest-util: 29.7.0 string-length: 4.0.2 - dev: true - /jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-worker@29.7.0: dependencies: - '@types/node': 20.14.10 + '@types/node': 22.5.4 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - dev: true - /jest@29.7.0(@types/node@20.14.10): - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true + jest@29.7.0(@types/node@22.5.4): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.14.10) + jest-cli: 29.7.0(@types/node@22.5.4) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - dev: true - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true + js-tokens@4.0.0: {} - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true + js-yaml@3.14.1: dependencies: argparse: 1.0.10 esprima: 4.0.1 - dev: true - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true + js-yaml@4.1.0: dependencies: argparse: 2.0.1 - dev: true - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - dev: true + jsesc@2.5.2: {} - /json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - dev: true + json-buffer@3.0.1: {} - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true + json-parse-even-better-errors@2.3.1: {} - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true + json-schema-traverse@0.4.1: {} - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true + json-stable-stringify-without-jsonify@1.0.1: {} - /json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true + json5@1.0.2: dependencies: minimist: 1.2.8 - dev: true - /json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - dev: true + json5@2.2.3: {} - /jsx-ast-utils@3.3.5: - resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} - engines: {node: '>=4.0'} + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 array.prototype.flat: 1.3.2 object.assign: 4.1.5 object.values: 1.2.0 - dev: true - /keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 - dev: true - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true + kleur@3.0.3: {} - /language-subtag-registry@0.3.23: - resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} - dev: true + language-subtag-registry@0.3.23: {} - /language-tags@1.0.9: - resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} - engines: {node: '>=0.10'} + language-tags@1.0.9: dependencies: language-subtag-registry: 0.3.23 - dev: true - /level-blobs@0.1.7: - resolution: {integrity: sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg==} + level-blobs@0.1.7: dependencies: level-peek: 1.0.6 once: 1.4.0 readable-stream: 1.1.14 - dev: true - /level-filesystem@1.2.0: - resolution: {integrity: sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g==} + level-filesystem@1.2.0: dependencies: concat-stream: 1.6.2 errno: 0.1.8 @@ -3996,26 +5329,18 @@ packages: octal: 1.0.0 once: 1.4.0 xtend: 2.2.0 - dev: true - /level-fix-range@1.0.2: - resolution: {integrity: sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ==} - dev: true + level-fix-range@1.0.2: {} - /level-fix-range@2.0.0: - resolution: {integrity: sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA==} + level-fix-range@2.0.0: dependencies: clone: 0.1.19 - dev: true - /level-hooks@4.5.0: - resolution: {integrity: sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA==} + level-hooks@4.5.0: dependencies: string-range: 1.2.2 - dev: true - /level-js@2.2.4: - resolution: {integrity: sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ==} + level-js@2.2.4: dependencies: abstract-leveldown: 0.12.4 idb-wrapper: 1.7.2 @@ -4023,25 +5348,19 @@ packages: ltgt: 2.2.1 typedarray-to-buffer: 1.0.4 xtend: 2.1.2 - dev: true - /level-peek@1.0.6: - resolution: {integrity: sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ==} + level-peek@1.0.6: dependencies: level-fix-range: 1.0.2 - dev: true - /level-sublevel@5.2.3: - resolution: {integrity: sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA==} + level-sublevel@5.2.3: dependencies: level-fix-range: 2.0.0 level-hooks: 4.5.0 string-range: 1.2.2 xtend: 2.0.6 - dev: true - /levelup@0.18.6: - resolution: {integrity: sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q==} + levelup@0.18.6: dependencies: bl: 0.8.2 deferred-leveldown: 0.2.0 @@ -4050,325 +5369,189 @@ packages: readable-stream: 1.0.34 semver: 2.3.2 xtend: 3.0.0 - dev: true - /leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - dev: true + leven@3.1.0: {} - /levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true + lines-and-columns@1.2.4: {} - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 - dev: true - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + locate-path@6.0.0: dependencies: p-locate: 5.0.0 - dev: true - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true + lodash.memoize@4.1.2: {} - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true + lodash.merge@4.6.2: {} - /loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true + loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 - dev: true - /lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - dev: true + lru-cache@10.4.3: {} - /lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@11.0.1: {} + + lru-cache@5.1.1: dependencies: yallist: 3.1.1 - dev: true - /ltgt@2.2.1: - resolution: {integrity: sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==} - dev: true + ltgt@2.2.1: {} - /magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - dev: true - /make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} + make-dir@4.0.0: dependencies: semver: 7.6.3 - dev: true - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true + make-error@1.3.6: {} - /makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + makeerror@1.0.12: dependencies: tmpl: 1.0.5 - dev: true - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + md5.js@1.3.5: dependencies: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - dev: true + merge-stream@2.0.0: {} - /merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - dev: true + merge2@1.4.1: {} - /micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} - engines: {node: '>=8.6'} + micromatch@4.0.7: dependencies: braces: 3.0.3 picomatch: 2.3.1 - dev: true - /miller-rabin@4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true + miller-rabin@4.0.1: dependencies: bn.js: 4.12.0 brorand: 1.1.0 - dev: true - /mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - dev: true + mimic-fn@2.1.0: {} - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: true + minimalistic-assert@1.0.1: {} - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - dev: true + minimalistic-crypto-utils@1.0.1: {} - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - dev: true - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} + minimatch@5.1.6: dependencies: brace-expansion: 2.0.1 - dev: true - /minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true - /minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} - dev: true + minimist@1.2.8: {} - /mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: true + minipass@7.1.2: {} - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + mkdirp@1.0.4: {} - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true + ms@2.1.3: {} - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true + natural-compare@1.4.0: {} - /node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 - dev: false - /node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - dev: true + node-int64@0.4.0: {} - /node-releases@2.0.18: - resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} - dev: true + node-releases@2.0.18: {} - /noms@0.0.0: - resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} + noms@0.0.0: dependencies: inherits: 2.0.4 readable-stream: 1.0.34 - dev: true - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true + normalize-path@3.0.0: {} - /npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} + npm-run-path@4.0.1: dependencies: path-key: 3.1.1 - dev: true - /object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: true + object-assign@4.1.1: {} - /object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - dev: true + object-inspect@1.13.2: {} - /object-is@1.1.6: - resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} - engines: {node: '>= 0.4'} + object-is@1.1.6: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - dev: true - /object-keys@0.2.0: - resolution: {integrity: sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA==} - deprecated: Please update to the latest object-keys + object-keys@0.2.0: dependencies: foreach: 2.0.6 indexof: 0.0.1 is: 0.2.7 - dev: true - /object-keys@0.4.0: - resolution: {integrity: sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==} - dev: true + object-keys@0.4.0: {} - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true + object-keys@1.1.1: {} - /object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} + object.assign@4.1.5: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 - dev: true - /object.entries@1.1.8: - resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} - engines: {node: '>= 0.4'} + object.entries@1.1.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 - dev: true - /object.fromentries@2.0.8: - resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} - engines: {node: '>= 0.4'} + object.fromentries@2.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 es-object-atoms: 1.0.0 - dev: true - /object.groupby@1.0.3: - resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} - engines: {node: '>= 0.4'} + object.groupby@1.0.3: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 - dev: true - /object.values@1.2.0: - resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} - engines: {node: '>= 0.4'} + object.values@1.2.0: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 - dev: true - /octal@1.0.0: - resolution: {integrity: sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ==} - dev: true + octal@1.0.0: {} - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + once@1.4.0: dependencies: wrappy: 1.0.2 - dev: true - /onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} + onetime@5.1.2: dependencies: mimic-fn: 2.1.0 - dev: true - /optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} + optionator@0.9.4: dependencies: deep-is: 0.1.4 fast-levenshtein: 2.0.6 @@ -4376,55 +5559,32 @@ packages: prelude-ls: 1.2.1 type-check: 0.4.0 word-wrap: 1.2.5 - dev: true - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} + p-limit@2.3.0: dependencies: p-try: 2.2.0 - dev: true - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 - dev: true - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} + p-locate@4.1.0: dependencies: p-limit: 2.3.0 - dev: true - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + p-locate@5.0.0: dependencies: p-limit: 3.1.0 - dev: true - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true + p-try@2.2.0: {} - /package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} - dev: true + package-json-from-dist@1.0.0: {} - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + parent-module@1.0.1: dependencies: callsites: 3.1.0 - dev: true - /parse-asn1@5.1.7: - resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} - engines: {node: '>= 0.10'} + parse-asn1@5.1.7: dependencies: asn1.js: 4.10.1 browserify-aes: 1.2.0 @@ -4432,148 +5592,88 @@ packages: hash-base: 3.0.4 pbkdf2: 3.1.2 safe-buffer: 5.2.1 - dev: true - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} + parse-json@5.2.0: dependencies: '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - dev: true - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true + path-exists@4.0.0: {} - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true + path-is-absolute@1.0.1: {} - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true + path-key@3.1.1: {} - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true + path-parse@1.0.7: {} - /path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} + path-scurry@1.11.1: dependencies: lru-cache: 10.4.3 minipass: 7.1.2 - dev: true - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - dev: true + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} + path-type@4.0.0: {} + + pbkdf2@3.1.2: dependencies: create-hash: 1.2.0 create-hmac: 1.1.7 ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} - dev: true + picocolors@1.0.1: {} - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true + picomatch@2.3.1: {} - /pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - dev: true + pirates@4.0.6: {} - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + pkg-dir@4.2.0: dependencies: find-up: 4.1.0 - dev: true - /possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - dev: true + possible-typed-array-names@1.0.0: {} - /prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true + prelude-ls@1.2.1: {} - /prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} + prettier-linter-helpers@1.0.0: dependencies: fast-diff: 1.3.0 - dev: true - /prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - dev: true + prettier@3.3.3: {} - /pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.3.1 - dev: true - /process-es6@0.11.6: - resolution: {integrity: sha512-GYBRQtL4v3wgigq10Pv58jmTbFXlIiTbSfgnNqZLY0ldUPqy1rRxDI5fCjoCpnM6TqmHQI8ydzTBXW86OYc0gA==} - dev: true + process-es6@0.11.6: {} - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: true + process-nextick-args@2.0.1: {} - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} + prompts@2.4.2: dependencies: kleur: 3.0.3 sisteransi: 1.0.5 - dev: true - /prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 react-is: 16.13.1 - dev: true - /prr@0.0.0: - resolution: {integrity: sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==} - dev: true + prr@0.0.0: {} - /prr@1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - dev: true + prr@1.0.1: {} - /public-encrypt@4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + public-encrypt@4.0.3: dependencies: bn.js: 4.12.0 browserify-rsa: 4.1.0 @@ -4581,62 +5681,41 @@ packages: parse-asn1: 5.1.7 randombytes: 2.1.0 safe-buffer: 5.2.1 - dev: true - /punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - dev: true + punycode@2.3.1: {} - /pure-rand@6.1.0: - resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - dev: true + pure-rand@6.1.0: {} - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true + queue-microtask@1.2.3: {} - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 - dev: true - /randomfill@1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + randomfill@1.0.4: dependencies: randombytes: 2.1.0 safe-buffer: 5.2.1 - dev: true - /react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: true + react-is@16.13.1: {} - /react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - dev: true + react-is@18.3.1: {} - /readable-stream@1.0.34: - resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} + readable-stream@1.0.34: dependencies: core-util-is: 1.0.3 inherits: 2.0.4 isarray: 0.0.1 string_decoder: 0.10.31 - dev: true - /readable-stream@1.1.14: - resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} + readable-stream@1.1.14: dependencies: core-util-is: 1.0.3 inherits: 2.0.4 isarray: 0.0.1 string_decoder: 0.10.31 - dev: true - /readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -4645,20 +5724,14 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 - dev: true - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} + readable-stream@3.6.2: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true - /reflect.getprototypeof@1.0.6: - resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} - engines: {node: '>= 0.4'} + reflect.getprototypeof@1.0.6: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -4667,203 +5740,126 @@ packages: get-intrinsic: 1.2.4 globalthis: 1.0.4 which-builtin-type: 1.1.4 - dev: true - /regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} - engines: {node: '>= 0.4'} + regexp.prototype.flags@1.5.2: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-errors: 1.3.0 set-function-name: 2.0.2 - dev: true - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true + require-directory@2.1.1: {} - /resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} + resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 - dev: true - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true + resolve-from@4.0.0: {} - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true + resolve-from@5.0.0: {} - /resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} - engines: {node: '>=10'} - dev: true + resolve.exports@2.0.2: {} - /resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true + resolve@1.22.8: dependencies: is-core-module: 2.15.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true - /resolve@2.0.0-next.5: - resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} - hasBin: true + resolve@2.0.0-next.5: dependencies: is-core-module: 2.15.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true - /reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true + reusify@1.0.4: {} - /rimraf@5.0.7: - resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} - engines: {node: '>=14.18'} - hasBin: true + rimraf@6.0.1: dependencies: - glob: 10.4.5 - dev: true + glob: 11.0.0 + package-json-from-dist: 1.0.0 - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + ripemd160@2.0.2: dependencies: hash-base: 3.1.0 inherits: 2.0.4 - dev: true - /rollup-plugin-dts@6.1.1(rollup@4.18.1)(typescript@5.5.3): - resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} - engines: {node: '>=16'} - peerDependencies: - rollup: ^3.29.4 || ^4 - typescript: ^4.5 || ^5.0 + rollup-plugin-dts@6.1.1(rollup@4.21.2)(typescript@5.6.2): dependencies: magic-string: 0.30.11 - rollup: 4.18.1 - typescript: 5.5.3 + rollup: 4.21.2 + typescript: 5.6.2 optionalDependencies: '@babel/code-frame': 7.24.7 - dev: true - /rollup-plugin-node-builtins@2.1.2: - resolution: {integrity: sha512-bxdnJw8jIivr2yEyt8IZSGqZkygIJOGAWypXvHXnwKAbUcN4Q/dGTx7K0oAJryC/m6aq6tKutltSeXtuogU6sw==} + rollup-plugin-node-builtins@2.1.2: dependencies: browserify-fs: 1.0.0 buffer-es6: 4.9.3 crypto-browserify: 3.12.0 process-es6: 0.11.6 - dev: true - /rollup-plugin-polyfill-node@0.13.0(rollup@4.18.1): - resolution: {integrity: sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + rollup-plugin-polyfill-node@0.13.0(rollup@4.21.2): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.18.1) - rollup: 4.18.1 - dev: true + '@rollup/plugin-inject': 5.0.5(rollup@4.21.2) + rollup: 4.21.2 - /rollup@4.18.1: - resolution: {integrity: sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true + rollup@4.21.2: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.18.1 - '@rollup/rollup-android-arm64': 4.18.1 - '@rollup/rollup-darwin-arm64': 4.18.1 - '@rollup/rollup-darwin-x64': 4.18.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.18.1 - '@rollup/rollup-linux-arm-musleabihf': 4.18.1 - '@rollup/rollup-linux-arm64-gnu': 4.18.1 - '@rollup/rollup-linux-arm64-musl': 4.18.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.18.1 - '@rollup/rollup-linux-riscv64-gnu': 4.18.1 - '@rollup/rollup-linux-s390x-gnu': 4.18.1 - '@rollup/rollup-linux-x64-gnu': 4.18.1 - '@rollup/rollup-linux-x64-musl': 4.18.1 - '@rollup/rollup-win32-arm64-msvc': 4.18.1 - '@rollup/rollup-win32-ia32-msvc': 4.18.1 - '@rollup/rollup-win32-x64-msvc': 4.18.1 + '@rollup/rollup-android-arm-eabi': 4.21.2 + '@rollup/rollup-android-arm64': 4.21.2 + '@rollup/rollup-darwin-arm64': 4.21.2 + '@rollup/rollup-darwin-x64': 4.21.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 + '@rollup/rollup-linux-arm-musleabihf': 4.21.2 + '@rollup/rollup-linux-arm64-gnu': 4.21.2 + '@rollup/rollup-linux-arm64-musl': 4.21.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 + '@rollup/rollup-linux-riscv64-gnu': 4.21.2 + '@rollup/rollup-linux-s390x-gnu': 4.21.2 + '@rollup/rollup-linux-x64-gnu': 4.21.2 + '@rollup/rollup-linux-x64-musl': 4.21.2 + '@rollup/rollup-win32-arm64-msvc': 4.21.2 + '@rollup/rollup-win32-ia32-msvc': 4.21.2 + '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 - dev: true - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 - dev: true - /safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} - engines: {node: '>=0.4'} + safe-array-concat@1.1.2: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 has-symbols: 1.0.3 isarray: 2.0.5 - dev: true - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true + safe-buffer@5.1.2: {} - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true + safe-buffer@5.2.1: {} - /safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} - engines: {node: '>= 0.4'} + safe-regex-test@1.0.3: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 is-regex: 1.1.4 - dev: true - /sax@1.4.1: - resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - dev: false + sax@1.4.1: {} - /semver@2.3.2: - resolution: {integrity: sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA==} - hasBin: true - dev: true + semver@2.3.2: {} - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: true + semver@6.3.1: {} - /semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - dev: true + semver@7.6.3: {} - /serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 - dev: true - /set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -4871,82 +5867,47 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 - dev: true - /set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} + set-function-name@2.0.2: dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 - dev: true - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true + sha.js@2.4.11: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - dev: true - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true + shebang-regex@3.0.0: {} - /side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} + side-channel@1.0.6: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.2 - dev: true - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true + signal-exit@3.0.7: {} - /signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - dev: true + signal-exit@4.1.0: {} - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: true + sisteransi@1.0.5: {} - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true + slash@3.0.0: {} - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: true + slash@4.0.0: {} - /smob@1.5.0: - resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} - dev: true + smob@1.5.0: {} - /sort-object-keys@1.1.3: - resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} - dev: true + sort-object-keys@1.1.3: {} - /sort-package-json@2.10.0: - resolution: {integrity: sha512-MYecfvObMwJjjJskhxYfuOADkXp1ZMMnCFC8yhp+9HDsk7HhR336hd7eiBs96lTXfiqmUNI+WQCeCMRBhl251g==} - hasBin: true + sort-package-json@2.10.1: dependencies: detect-indent: 7.0.1 detect-newline: 4.0.1 @@ -4956,85 +5917,54 @@ packages: is-plain-obj: 4.1.0 semver: 7.6.3 sort-object-keys: 1.1.3 - dev: true - /source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + source-map-support@0.5.13: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - dev: true - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - dev: true - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true + source-map@0.6.1: {} - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true + sprintf-js@1.0.3: {} - /stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} + stack-utils@2.0.6: dependencies: escape-string-regexp: 2.0.0 - dev: true - /stop-iteration-iterator@1.0.0: - resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} - engines: {node: '>= 0.4'} + stop-iteration-iterator@1.0.0: dependencies: internal-slot: 1.0.7 - dev: true - /string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} + string-length@4.0.2: dependencies: char-regex: 1.0.2 strip-ansi: 6.0.1 - dev: true - /string-range@1.2.2: - resolution: {integrity: sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==} - dev: true + string-range@1.2.2: {} - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true - /string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} + string-width@5.1.2: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 strip-ansi: 7.1.0 - dev: true - /string.prototype.includes@2.0.0: - resolution: {integrity: sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==} + string.prototype.includes@2.0.0: dependencies: define-properties: 1.2.1 es-abstract: 1.23.3 - dev: true - /string.prototype.matchall@4.0.11: - resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} - engines: {node: '>= 0.4'} + string.prototype.matchall@4.0.11: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -5048,278 +5978,161 @@ packages: regexp.prototype.flags: 1.5.2 set-function-name: 2.0.2 side-channel: 1.0.6 - dev: true - /string.prototype.repeat@1.0.0: - resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + string.prototype.repeat@1.0.0: dependencies: define-properties: 1.2.1 es-abstract: 1.23.3 - dev: true - /string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} - engines: {node: '>= 0.4'} + string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.3 es-object-atoms: 1.0.0 - dev: true - /string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + string.prototype.trimend@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 - dev: true - /string.prototype.trimstart@1.0.8: - resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} - engines: {node: '>= 0.4'} + string.prototype.trimstart@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 es-object-atoms: 1.0.0 - dev: true - /string_decoder@0.10.31: - resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} - dev: true + string_decoder@0.10.31: {} - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 - dev: true - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 - dev: true - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 - dev: true - /strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} + strip-ansi@7.1.0: dependencies: ansi-regex: 6.0.1 - dev: true - /strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - dev: true + strip-bom@3.0.0: {} - /strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - dev: true + strip-bom@4.0.0: {} - /strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - dev: true + strip-final-newline@2.0.0: {} - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true + strip-json-comments@3.1.1: {} - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - requiresBuild: true + supports-color@5.5.0: dependencies: has-flag: 3.0.0 - dev: true - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 - dev: true - /supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} + supports-color@8.1.1: dependencies: has-flag: 4.0.0 - dev: true - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true + supports-preserve-symlinks-flag@1.0.0: {} - /synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} + synckit@0.8.8: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.6.3 - dev: true + tslib: 2.7.0 - /terser@5.31.3: - resolution: {integrity: sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==} - engines: {node: '>=10'} - hasBin: true + terser@5.31.3: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 - dev: true - /test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} + test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.3 minimatch: 3.1.2 - dev: true - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true + text-table@0.2.0: {} - /through2@2.0.5: - resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} + through2@2.0.5: dependencies: readable-stream: 2.3.8 xtend: 4.0.2 - dev: true - /tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - dev: true + tmpl@1.0.5: {} - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - dev: true + to-fast-properties@2.0.0: {} - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - dev: true - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false + tr46@0.0.3: {} - /ts-api-utils@1.3.0(typescript@5.5.3): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: - typescript: 5.5.3 - dev: true + typescript: 5.6.2 - /ts-jest@29.2.2(@babel/core@7.25.2)(jest@29.7.0)(typescript@5.5.3): - resolution: {integrity: sha512-sSW7OooaKT34AAngP6k1VS669a0HdLxkQZnlC7T76sckGCokXFnvJ3yRlQZGRTAoV5K19HfSgCiSwWOSIfcYlg==} - engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/transform': ^29.0.0 - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/transform': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.5.4))(typescript@5.6.2): dependencies: - '@babel/core': 7.25.2 bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.10) + jest: 29.7.0(@types/node@22.5.4) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.3 - typescript: 5.5.3 + typescript: 5.6.2 yargs-parser: 21.1.1 - dev: true + optionalDependencies: + '@babel/core': 7.25.2 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.25.2) - /tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29 json5: 1.0.2 minimist: 1.2.8 strip-bom: 3.0.0 - dev: true - /tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - dev: true + tslib@2.7.0: {} - /type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 - dev: true - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true + type-detect@4.0.8: {} - /type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - dev: true + type-fest@0.21.3: {} - /typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} + typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 is-typed-array: 1.1.13 - dev: true - /typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} + typed-array-byte-length@1.0.1: dependencies: call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 - dev: true - /typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} - engines: {node: '>= 0.4'} + typed-array-byte-offset@1.0.2: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 @@ -5327,11 +6140,8 @@ packages: gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 - dev: true - /typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} - engines: {node: '>= 0.4'} + typed-array-length@1.0.6: dependencies: call-bind: 1.0.7 for-each: 0.3.3 @@ -5339,100 +6149,62 @@ packages: has-proto: 1.0.3 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - dev: true - /typedarray-to-buffer@1.0.4: - resolution: {integrity: sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==} - dev: true + typedarray-to-buffer@1.0.4: {} - /typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - dev: true + typedarray@0.0.6: {} - /typescript@5.5.3: - resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} - engines: {node: '>=14.17'} - hasBin: true - dev: true + typescript@5.6.2: {} - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - dev: true - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true + undici-types@6.19.8: {} - /untildify@4.0.0: - resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} - engines: {node: '>=8'} - dev: true + untildify@4.0.0: {} - /update-browserslist-db@1.1.0(browserslist@4.23.2): - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' + update-browserslist-db@1.1.0(browserslist@4.23.2): dependencies: browserslist: 4.23.2 escalade: 3.1.2 picocolors: 1.0.1 - dev: true - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + uri-js@4.4.1: dependencies: punycode: 2.3.1 - dev: true - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true + util-deprecate@1.0.2: {} - /v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 - dev: true - /walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + walker@1.0.8: dependencies: makeerror: 1.0.12 - dev: true - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false + webidl-conversions@3.0.1: {} - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: false - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 is-boolean-object: 1.1.2 is-number-object: 1.0.7 is-string: 1.0.7 is-symbol: 1.0.4 - dev: true - /which-builtin-type@1.1.4: - resolution: {integrity: sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==} - engines: {node: '>= 0.4'} + which-builtin-type@1.1.4: dependencies: function.prototype.name: 1.1.6 has-tostringtag: 1.0.2 @@ -5446,131 +6218,75 @@ packages: which-boxed-primitive: 1.0.2 which-collection: 1.0.2 which-typed-array: 1.1.15 - dev: true - /which-collection@1.0.2: - resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} - engines: {node: '>= 0.4'} + which-collection@1.0.2: dependencies: is-map: 2.0.3 is-set: 2.0.3 is-weakmap: 2.0.2 is-weakset: 2.0.3 - dev: true - /which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} - engines: {node: '>= 0.4'} + which-typed-array@1.1.15: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.2 - dev: true - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + which@2.0.2: dependencies: isexe: 2.0.0 - dev: true - /word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - dev: true + word-wrap@1.2.5: {} - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true - /wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} + wrap-ansi@8.1.0: dependencies: ansi-styles: 6.2.1 string-width: 5.1.2 strip-ansi: 7.1.0 - dev: true - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true + wrappy@1.0.2: {} - /write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + write-file-atomic@4.0.2: dependencies: imurmurhash: 0.1.4 signal-exit: 3.0.7 - dev: true - /xml-js@1.6.11: - resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} - hasBin: true + xml-js@1.6.11: dependencies: sax: 1.4.1 - dev: false - /xtend@2.0.6: - resolution: {integrity: sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg==} - engines: {node: '>=0.4'} + xtend@2.0.6: dependencies: is-object: 0.1.2 object-keys: 0.2.0 - dev: true - /xtend@2.1.2: - resolution: {integrity: sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==} - engines: {node: '>=0.4'} + xtend@2.1.2: dependencies: object-keys: 0.4.0 - dev: true - /xtend@2.2.0: - resolution: {integrity: sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw==} - engines: {node: '>=0.4'} - dev: true + xtend@2.2.0: {} - /xtend@3.0.0: - resolution: {integrity: sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==} - engines: {node: '>=0.4'} - dev: true + xtend@3.0.0: {} - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: true + xtend@4.0.2: {} - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true + y18n@5.0.8: {} - /yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: true + yallist@3.1.1: {} - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true + yargs-parser@20.2.9: {} - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true + yargs-parser@21.1.1: {} - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} + yargs@16.2.0: dependencies: cliui: 7.0.4 escalade: 3.1.2 @@ -5579,11 +6295,8 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.9 - dev: true - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + yargs@17.7.2: dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -5592,9 +6305,5 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: true - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true + yocto-queue@0.1.0: {} diff --git a/src/account.ts b/src/account.ts index e1a82d0..76690e4 100644 --- a/src/account.ts +++ b/src/account.ts @@ -15,9 +15,10 @@ export const serviceDiscovery = async (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { debug('Service discovery...'); - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const endpoint = new URL(account.serverUrl); const uri = new URL(`/.well-known/${account.accountType}`, endpoint); @@ -28,6 +29,7 @@ export const serviceDiscovery = async (params: { headers: excludeHeaders(headers, headersToExclude), method: 'PROPFIND', redirect: 'manual', + ...fetchOptions, }); if (response.status >= 300 && response.status < 400) { @@ -56,8 +58,9 @@ export const fetchPrincipalUrl = async (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields: Array<'rootUrl'> = ['rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error( @@ -75,6 +78,7 @@ export const fetchPrincipalUrl = async (params: { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); if (!response.ok) { debug(`Fetch principal url failed: ${response.statusText}`); @@ -90,8 +94,9 @@ export const fetchHomeUrl = async (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { account, headers, headersToExclude } = params; + const { account, headers, headersToExclude, fetchOptions = {} } = params; const requiredFields: Array<'principalUrl' | 'rootUrl'> = ['principalUrl', 'rootUrl']; if (!hasFields(account, requiredFields)) { throw new Error( @@ -108,6 +113,7 @@ export const fetchHomeUrl = async (params: { : { [`${DAVNamespaceShort.CARDDAV}:addressbook-home-set`]: {} }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); const matched = responses.find((r) => urlContains(account.principalUrl, r.href)); @@ -131,6 +137,7 @@ export const createAccount = async (params: { headersToExclude?: string[]; loadCollections?: boolean; loadObjects?: boolean; + fetchOptions?: RequestInit; }): Promise => { const { account, @@ -138,19 +145,23 @@ export const createAccount = async (params: { loadCollections = false, loadObjects = false, headersToExclude, + fetchOptions = {}, } = params; const newAccount: DAVAccount = { ...account }; newAccount.rootUrl = await serviceDiscovery({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.principalUrl = await fetchPrincipalUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); newAccount.homeUrl = await fetchHomeUrl({ account: newAccount, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); // to load objects you must first load collections if (loadCollections || loadObjects) { @@ -158,11 +169,13 @@ export const createAccount = async (params: { newAccount.calendars = await fetchCalendars({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } else if (account.accountType === 'carddav') { newAccount.addressBooks = await fetchAddressBooks({ headers: excludeHeaders(headers, headersToExclude), account: newAccount, + fetchOptions, }); } } @@ -174,6 +187,7 @@ export const createAccount = async (params: { objects: await fetchCalendarObjects({ calendar: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), })), ); @@ -184,6 +198,7 @@ export const createAccount = async (params: { objects: await fetchVCards({ addressBook: addr, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), })), ); diff --git a/src/addressBook.ts b/src/addressBook.ts index d7a911e..f1bcf24 100644 --- a/src/addressBook.ts +++ b/src/addressBook.ts @@ -19,8 +19,9 @@ export const addressBookQuery = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, filters, depth, headers, headersToExclude } = params; + const { url, props, filters, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -39,6 +40,7 @@ export const addressBookQuery = async (params: { defaultNamespace: DAVNamespaceShort.CARDDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -48,8 +50,10 @@ export const addressBookMultiGet = async (params: { objectUrls: string[]; depth: DAVDepth; headers?: Record; + headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, objectUrls, depth, headers } = params; + const { url, props, objectUrls, depth, headers, headersToExclude, fetchOptions = {}, } = params; return collectionQuery({ url, body: { @@ -61,7 +65,8 @@ export const addressBookMultiGet = async (params: { }, defaultNamespace: DAVNamespaceShort.CARDDAV, depth, - headers, + headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; @@ -70,8 +75,9 @@ export const fetchAddressBooks = async (params?: { props?: ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { account, headers, props: customProps, headersToExclude } = params ?? {}; + const { account, headers, props: customProps, headersToExclude, fetchOptions = {} } = params ?? {}; const requiredFields: Array = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -94,6 +100,7 @@ export const fetchAddressBooks = async (params?: { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all( res @@ -112,7 +119,7 @@ export const fetchAddressBooks = async (params?: { }) .map(async (addr) => ({ ...addr, - reports: await supportedReportSet({ collection: addr, headers }), + reports: await supportedReportSet({ collection: addr, headers: excludeHeaders(headers, headersToExclude), fetchOptions }), })), ); }; @@ -124,6 +131,7 @@ export const fetchVCards = async (params: { urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { const { addressBook, @@ -132,6 +140,7 @@ export const fetchVCards = async (params: { headersToExclude, urlFilter = (url) => url, useMultiGet = true, + fetchOptions = {} } = params; debug(`Fetching vcards from ${addressBook?.url}`); const requiredFields: Array<'url'> = ['url']; @@ -156,6 +165,7 @@ export const fetchVCards = async (params: { props: { [`${DAVNamespaceShort.DAV}:getetag`]: {} }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }) ).map((res) => (res.ok ? res.href ?? '' : '')) ) @@ -175,6 +185,7 @@ export const fetchVCards = async (params: { objectUrls: vcardUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { vCardResults = await addressBookQuery({ @@ -185,6 +196,7 @@ export const fetchVCards = async (params: { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -202,8 +214,9 @@ export const createVCard = async (params: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { addressBook, vCardString, filename, headers, headersToExclude } = params; + const { addressBook, vCardString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, addressBook.url).href, data: vCardString, @@ -215,6 +228,7 @@ export const createVCard = async (params: { }, headersToExclude, ), + fetchOptions }); }; @@ -222,8 +236,9 @@ export const updateVCard = async (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: vCard.url, data: vCard.data, @@ -235,6 +250,7 @@ export const updateVCard = async (params: { }, headersToExclude, ), + fetchOptions, }); }; @@ -242,11 +258,13 @@ export const deleteVCard = async (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { vCard, headers, headersToExclude } = params; + const { vCard, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: vCard.url, etag: vCard.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; diff --git a/src/calendar.ts b/src/calendar.ts index da12c94..b8dd2d3 100644 --- a/src/calendar.ts +++ b/src/calendar.ts @@ -27,8 +27,9 @@ export const calendarQuery = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -47,6 +48,7 @@ export const calendarQuery = async (params: { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; @@ -59,8 +61,9 @@ export const calendarMultiGet = async (params: { filters?: ElementCompact; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude } = params; + const { url, props, objectUrls, filters, timezone, depth, headers, headersToExclude, fetchOptions = {} } = params; return collectionQuery({ url, body: { @@ -75,6 +78,7 @@ export const calendarMultiGet = async (params: { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); }; @@ -84,8 +88,9 @@ export const makeCalendar = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -105,6 +110,7 @@ export const makeCalendar = async (params: { }, }, }, + fetchOptions }); }; @@ -114,8 +120,9 @@ export const fetchCalendars = async (params?: { projectedProps?: Record; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { headers, account, props: customProps, projectedProps, headersToExclude } = params ?? {}; + const { headers, account, props: customProps, projectedProps, headersToExclude, fetchOptions = {} } = params ?? {}; const requiredFields: Array<'homeUrl' | 'rootUrl'> = ['homeUrl', 'rootUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -140,6 +147,7 @@ export const fetchCalendars = async (params?: { }, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }); return Promise.all( @@ -151,7 +159,7 @@ export const fetchCalendars = async (params?: { rc.props?.supportedCalendarComponentSet.comp, ) ? rc.props?.supportedCalendarComponentSet.comp.map((sc: any) => sc._attributes.name) - : [rc.props?.supportedCalendarComponentSet.comp?._attributes.name] || []; + : [rc.props?.supportedCalendarComponentSet.comp?._attributes.name]; return components.some((c) => Object.values(ICALObjects).includes(c)); }) .map((rs) => { @@ -183,6 +191,7 @@ export const fetchCalendars = async (params?: { reports: await supportedReportSet({ collection: cal, headers: excludeHeaders(headers, headersToExclude), + fetchOptions, }), })), ); @@ -198,6 +207,7 @@ export const fetchCalendarObjects = async (params: { headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; + fetchOptions?: RequestInit; }): Promise => { const { calendar, @@ -209,6 +219,7 @@ export const fetchCalendarObjects = async (params: { urlFilter = (url: string) => Boolean(url?.includes('.ics')), useMultiGet = true, headersToExclude, + fetchOptions = {}, } = params; if (timeRange) { @@ -297,6 +308,7 @@ export const fetchCalendarObjects = async (params: { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }) ).map((res) => res.href ?? '') ) @@ -334,6 +346,7 @@ export const fetchCalendarObjects = async (params: { filters, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } else { calendarObjectResults = await calendarMultiGet({ @@ -362,6 +375,7 @@ export const fetchCalendarObjects = async (params: { objectUrls: calendarObjectUrls, depth: '1', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); } } @@ -379,8 +393,9 @@ export const createCalendarObject = async (params: { filename: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { calendar, iCalString, filename, headers, headersToExclude } = params; + const { calendar, iCalString, filename, headers, headersToExclude, fetchOptions = {} } = params; return createObject({ url: new URL(filename, calendar.url).href, @@ -393,6 +408,7 @@ export const createCalendarObject = async (params: { }, headersToExclude, ), + fetchOptions }); }; @@ -400,8 +416,9 @@ export const updateCalendarObject = async (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return updateObject({ url: calendarObject.url, data: calendarObject.data, @@ -413,6 +430,7 @@ export const updateCalendarObject = async (params: { }, headersToExclude, ), + fetchOptions }); }; @@ -420,12 +438,14 @@ export const deleteCalendarObject = async (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { calendarObject, headers, headersToExclude } = params; + const { calendarObject, headers, headersToExclude, fetchOptions = {} } = params; return deleteObject({ url: calendarObject.url, etag: calendarObject.etag, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); }; @@ -438,8 +458,9 @@ export const syncCalendars: SyncCalendars = async (params: { headersToExclude?: string[]; account?: DAVAccount; detailedResult?: boolean; + fetchOptions?: RequestInit; }): Promise => { - const { oldCalendars, account, detailedResult, headers, headersToExclude } = params; + const { oldCalendars, account, detailedResult, headers, headersToExclude, fetchOptions = {} } = params; if (!account) { throw new Error('Must have account before syncCalendars'); } @@ -448,6 +469,7 @@ export const syncCalendars: SyncCalendars = async (params: { const remoteCalendars = await fetchCalendars({ account, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); // no existing url @@ -477,6 +499,7 @@ export const syncCalendars: SyncCalendars = async (params: { method: 'webdav', headers: excludeHeaders(headers, headersToExclude), account, + fetchOptions, }); return result; }), @@ -512,8 +535,9 @@ export const freeBusyQuery = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, timeRange, depth, headers, headersToExclude } = params; + const { url, timeRange, depth, headers, headersToExclude, fetchOptions = {} } = params; if (timeRange) { // validate timeRange @@ -545,6 +569,7 @@ export const freeBusyQuery = async (params: { defaultNamespace: DAVNamespaceShort.CALDAV, depth, headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return result[0]; }; diff --git a/src/client.ts b/src/client.ts index ab0fab0..b3167b9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -238,6 +238,8 @@ export class DAVClient { account?: DAVAccount; + fetchOptions?: RequestInit; + authFunction?: (credentials: DAVCredentials) => Promise>; constructor(params: { @@ -246,12 +248,14 @@ export class DAVClient { authMethod?: 'Basic' | 'Oauth' | 'Digest' | 'Custom'; authFunction?: (credentials: DAVCredentials) => Promise>; defaultAccountType?: DAVAccount['accountType'] | undefined; + fetchOptions?: RequestInit; }) { this.serverUrl = params.serverUrl; this.credentials = params.credentials; this.authMethod = params.authMethod ?? 'Basic'; this.accountType = params.defaultAccountType ?? 'caldav'; this.authFunction = params.authFunction; + this.fetchOptions = params.fetchOptions ?? {}; } async login(): Promise { @@ -260,7 +264,7 @@ export class DAVClient { this.authHeaders = getBasicAuthHeaders(this.credentials); break; case 'Oauth': - this.authHeaders = (await getOauthHeaders(this.credentials)).headers; + this.authHeaders = (await getOauthHeaders(this.credentials, this.fetchOptions)).headers; break; case 'Digest': this.authHeaders = { @@ -282,6 +286,7 @@ export class DAVClient { accountType: this.accountType, }, headers: this.authHeaders, + fetchOptions: this.fetchOptions, }) : undefined; } @@ -291,6 +296,7 @@ export class DAVClient { init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; + fetchOptions?: RequestInit; }): Promise { const { init, ...rest } = params0; const { headers, ...restInit } = init; @@ -303,6 +309,7 @@ export class DAVClient { ...headers, }, }, + fetchOptions: this.fetchOptions, }); } @@ -310,23 +317,32 @@ export class DAVClient { return defaultParam(rawCreateObject, { url: this.serverUrl, headers: this.authHeaders, + fetchOptions: this.fetchOptions, })(params[0]); } async updateObject(...params: Parameters): Promise { - return defaultParam(rawUpdateObject, { headers: this.authHeaders, url: this.serverUrl })( + return defaultParam(rawUpdateObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })( params[0], ); } async deleteObject(...params: Parameters): Promise { - return defaultParam(rawDeleteObject, { headers: this.authHeaders, url: this.serverUrl })( + return defaultParam(rawDeleteObject, { + url: this.serverUrl, + headers: this.authHeaders, + fetchOptions: this.fetchOptions, + })( params[0], ); } async propfind(...params: Parameters): Promise { - return defaultParam(rawPropfind, { headers: this.authHeaders })(params[0]); + return defaultParam(rawPropfind, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createAccount(params0: { @@ -334,43 +350,46 @@ export class DAVClient { headers?: Record; loadCollections?: boolean; loadObjects?: boolean; + fetchOptions?: RequestInit; }): Promise { - const { account, headers, loadCollections, loadObjects } = params0; + const { account, headers, loadCollections, loadObjects, fetchOptions } = params0; return rawCreateAccount({ account: { serverUrl: this.serverUrl, credentials: this.credentials, ...account }, headers: { ...this.authHeaders, ...headers }, loadCollections, loadObjects, + fetchOptions: fetchOptions ?? this.fetchOptions, }); } async collectionQuery(...params: Parameters): Promise { - return defaultParam(rawCollectionQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(rawCollectionQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCollection(...params: Parameters): Promise { - return defaultParam(rawMakeCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(rawMakeCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCollection(...params: Parameters): Promise { - return defaultParam(rawSyncCollection, { headers: this.authHeaders })(params[0]); + return defaultParam(rawSyncCollection, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async supportedReportSet(...params: Parameters): Promise { - return defaultParam(rawSupportedReportSet, { headers: this.authHeaders })(params[0]); + return defaultParam(rawSupportedReportSet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async isCollectionDirty(...params: Parameters): Promise<{ isDirty: boolean; newCtag: string; }> { - return defaultParam(rawIsCollectionDirty, { headers: this.authHeaders })(params[0]); + return defaultParam(rawIsCollectionDirty, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async smartCollectionSync(param: { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; @@ -378,6 +397,7 @@ export class DAVClient { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise< @@ -393,27 +413,28 @@ export class DAVClient { return ( defaultParam(rawSmartCollectionSync, { headers: this.authHeaders, + fetchOptions: this.fetchOptions, account: this.account, }) as SmartCollectionSync )(params[0]); } async calendarQuery(...params: Parameters): Promise { - return defaultParam(rawCalendarQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(rawCalendarQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async makeCalendar(...params: Parameters): Promise { - return defaultParam(rawMakeCalendar, { headers: this.authHeaders })(params[0]); + return defaultParam(rawMakeCalendar, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async calendarMultiGet( ...params: Parameters ): Promise { - return defaultParam(rawCalendarMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(rawCalendarMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchCalendars(...params: Parameters): Promise { - return defaultParam(rawFetchCalendars, { headers: this.authHeaders, account: this.account })( + return defaultParam(rawFetchCalendars, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })( params?.[0], ); } @@ -421,25 +442,25 @@ export class DAVClient { async fetchCalendarObjects( ...params: Parameters ): Promise { - return defaultParam(rawFetchCalendarObjects, { headers: this.authHeaders })(params[0]); + return defaultParam(rawFetchCalendarObjects, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createCalendarObject( ...params: Parameters ): Promise { - return defaultParam(rawCreateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(rawCreateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateCalendarObject( ...params: Parameters ): Promise { - return defaultParam(rawUpdateCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(rawUpdateCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteCalendarObject( ...params: Parameters ): Promise { - return defaultParam(rawDeleteCalendarObject, { headers: this.authHeaders })(params[0]); + return defaultParam(rawDeleteCalendarObject, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async syncCalendars(...params: Parameters): Promise> { @@ -447,6 +468,7 @@ export class DAVClient { defaultParam(rawSyncCalendars, { headers: this.authHeaders, account: this.account, + fetchOptions: this.fetchOptions }) as SyncCalendars )(params[0]); } @@ -454,36 +476,36 @@ export class DAVClient { async addressBookQuery( ...params: Parameters ): Promise { - return defaultParam(rawAddressBookQuery, { headers: this.authHeaders })(params[0]); + return defaultParam(rawAddressBookQuery, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async addressBookMultiGet( ...params: Parameters ): Promise { - return defaultParam(rawAddressBookMultiGet, { headers: this.authHeaders })(params[0]); + return defaultParam(rawAddressBookMultiGet, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async fetchAddressBooks( ...params: Parameters ): Promise { - return defaultParam(rawFetchAddressBooks, { headers: this.authHeaders, account: this.account })( + return defaultParam(rawFetchAddressBooks, { headers: this.authHeaders, account: this.account, fetchOptions: this.fetchOptions })( params?.[0], ); } async fetchVCards(...params: Parameters): Promise { - return defaultParam(rawFetchVCards, { headers: this.authHeaders })(params[0]); + return defaultParam(rawFetchVCards, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async createVCard(...params: Parameters): Promise { - return defaultParam(rawCreateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(rawCreateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async updateVCard(...params: Parameters): Promise { - return defaultParam(rawUpdateVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(rawUpdateVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } async deleteVCard(...params: Parameters): Promise { - return defaultParam(rawDeleteVCard, { headers: this.authHeaders })(params[0]); + return defaultParam(rawDeleteVCard, { headers: this.authHeaders, fetchOptions: this.fetchOptions })(params[0]); } } diff --git a/src/collection.ts b/src/collection.ts index 2e5cbea..2594313 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -19,6 +19,7 @@ export const collectionQuery = async (params: { defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { const { url, @@ -27,6 +28,7 @@ export const collectionQuery = async (params: { defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, + fetchOptions = {} } = params; const queryResults = await davRequest({ url, @@ -36,6 +38,7 @@ export const collectionQuery = async (params: { namespace: defaultNamespace, body, }, + fetchOptions, }); // empty query result @@ -52,8 +55,9 @@ export const makeCollection = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -70,6 +74,7 @@ export const makeCollection = async (params: { } : undefined, }, + fetchOptions }); }; @@ -77,8 +82,9 @@ export const supportedReportSet = async (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const res = await propfind({ url: collection.url, props: { @@ -86,6 +92,7 @@ export const supportedReportSet = async (params: { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); return ( res[0]?.props?.supportedReportSet?.supportedReport?.map( @@ -98,11 +105,12 @@ export const isCollectionDirty = async (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise<{ isDirty: boolean; newCtag: string; }> => { - const { collection, headers, headersToExclude } = params; + const { collection, headers, headersToExclude, fetchOptions = {} } = params; const responses = await propfind({ url: collection.url, props: { @@ -110,6 +118,7 @@ export const isCollectionDirty = async (params: { }, depth: '0', headers: excludeHeaders(headers, headersToExclude), + fetchOptions }); const res = responses.filter((r) => urlContains(collection.url, r.href))[0]; if (!res) { @@ -131,8 +140,9 @@ export const syncCollection = (params: { headersToExclude?: string[]; syncLevel?: number; syncToken?: string; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, headers, syncLevel, syncToken, headersToExclude } = params; + const { url, props, headers, syncLevel, syncToken, headersToExclude, fetchOptions } = params; return davRequest({ url, init: { @@ -152,6 +162,7 @@ export const syncCollection = (params: { }, }, }, + fetchOptions }); }; @@ -163,8 +174,9 @@ export const smartCollectionSync: SmartCollectionSync = async => { - const { collection, method, headers, headersToExclude, account, detailedResult } = params; + const { collection, method, headers, headersToExclude, account, detailedResult, fetchOptions = {} } = params; const requiredFields: Array<'accountType' | 'homeUrl'> = ['accountType', 'homeUrl']; if (!account || !hasFields(account, requiredFields)) { if (!account) { @@ -195,6 +207,7 @@ export const smartCollectionSync: SmartCollectionSync = async => { @@ -220,6 +233,7 @@ export const smartCollectionSync: SmartCollectionSync = async => { - const { url, init, convertIncoming = true, parseOutgoing = true } = params; + const { url, init, convertIncoming = true, parseOutgoing = true, fetchOptions = {} } = params; const { headers = {}, body, namespace, method, attributes } = init; const xmlBody = convertIncoming ? convert.js2xml( @@ -70,6 +71,7 @@ export const davRequest = async (params: { }, body: xmlBody, method, + ...fetchOptions, }); const resText = await davResponse.text(); @@ -171,8 +173,9 @@ export const propfind = async (params: { depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, props, depth, headers, headersToExclude } = params; + const { url, props, depth, headers, headersToExclude, fetchOptions = {} } = params; return davRequest({ url, init: { @@ -192,6 +195,7 @@ export const propfind = async (params: { }, }, }, + fetchOptions, }); }; @@ -200,12 +204,14 @@ export const createObject = async (params: { data: BodyInit; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, data, headers, headersToExclude } = params; + const { url, data, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(headers, headersToExclude), + ...fetchOptions, }); }; @@ -215,12 +221,14 @@ export const updateObject = async (params: { etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, data, etag, headers, headersToExclude } = params; + const { url, data, etag, headers, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'PUT', body: data, headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions, }); }; @@ -229,10 +237,12 @@ export const deleteObject = async (params: { etag?: string; headers?: Record; headersToExclude?: string[]; + fetchOptions?: RequestInit; }): Promise => { - const { url, headers, etag, headersToExclude } = params; + const { url, headers, etag, headersToExclude, fetchOptions = {} } = params; return fetch(url, { method: 'DELETE', headers: excludeHeaders(cleanupFalsy({ 'If-Match': etag, ...headers }), headersToExclude), + ...fetchOptions }); }; diff --git a/src/types/functionsOverloads.ts b/src/types/functionsOverloads.ts index cd9b289..0585496 100644 --- a/src/types/functionsOverloads.ts +++ b/src/types/functionsOverloads.ts @@ -5,6 +5,7 @@ export interface SmartCollectionSync { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise< @@ -20,6 +21,7 @@ export interface SmartCollectionSync { collection: T; method?: 'basic' | 'webdav'; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; @@ -29,6 +31,7 @@ export interface SyncCalendars { (params: { oldCalendars: DAVCalendar[]; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise<{ @@ -39,6 +42,7 @@ export interface SyncCalendars { (params: { oldCalendars: DAVCalendar[]; headers?: Record; + fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; diff --git a/src/types/models.ts b/src/types/models.ts index d1392dc..4e2de74 100644 --- a/src/types/models.ts +++ b/src/types/models.ts @@ -11,15 +11,18 @@ export type DAVCollection = { resourcetype?: any; syncToken?: string; url: string; + fetchOptions?: RequestInit; // should only be used for smartCollectionSync fetchObjects?: | ((params?: { collection: DAVCalendar; headers?: Record; + fetchOptions?: RequestInit; }) => Promise) | ((params?: { collection: DAVAddressBook; headers?: Record; + fetchOptions?: RequestInit; }) => Promise); objectMultiGet?: (params: { url: string; @@ -28,6 +31,7 @@ export type DAVCollection = { filters?: ElementCompact; timezone?: string; depth: DAVDepth; + fetchOptions?: RequestInit; headers?: Record; }) => Promise; }; diff --git a/src/util/authHelpers.ts b/src/util/authHelpers.ts index 4746e4f..666ee5f 100644 --- a/src/util/authHelpers.ts +++ b/src/util/authHelpers.ts @@ -27,7 +27,7 @@ export const getBasicAuthHeaders = (credentials: DAVCredentials): { authorizatio }; }; -export const fetchOauthTokens = async (credentials: DAVCredentials): Promise => { +export const fetchOauthTokens = async (credentials: DAVCredentials, fetchOptions?: RequestInit): Promise => { const requireFields: Array = [ 'authorizationCode', 'redirectUrl', @@ -59,6 +59,7 @@ export const fetchOauthTokens = async (credentials: DAVCredentials): Promise => { debug('Fetching oauth headers'); let tokens: DAVTokens = {}; if (!credentials.refreshToken) { // No refresh token, fetch new tokens - tokens = await fetchOauthTokens(credentials); + tokens = await fetchOauthTokens(credentials, fetchOptions); } else if ( (credentials.refreshToken && !credentials.accessToken) || Date.now() > (credentials.expiration ?? 0) ) { // have refresh token, but no accessToken, fetch access token only // or have both, but accessToken was expired - tokens = await refreshAccessToken(credentials); + tokens = await refreshAccessToken(credentials, fetchOptions); } // now we should have valid access token debug(`Oauth tokens fetched: ${tokens.access_token}`);