@pol-studios/db 1.0.54 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/auth/context.js +4 -4
  2. package/dist/auth/hooks.js +5 -5
  3. package/dist/auth/index.js +5 -5
  4. package/dist/{chunk-FIAXWEBK.js → chunk-7YGDT46S.js} +4 -4
  5. package/dist/{chunk-BZSAPFFB.js → chunk-AA3VUWTP.js} +112 -16
  6. package/dist/chunk-AA3VUWTP.js.map +1 -0
  7. package/dist/{chunk-3Q74DK5K.js → chunk-AKCNWHXV.js} +2 -2
  8. package/dist/{chunk-UJWETW36.js → chunk-AKIRHA4Q.js} +527 -418
  9. package/dist/chunk-AKIRHA4Q.js.map +1 -0
  10. package/dist/{chunk-FMYXG4VN.js → chunk-BRFFTGVJ.js} +2 -2
  11. package/dist/{chunk-YA6MUTA7.js → chunk-FI6JAD5G.js} +3 -3
  12. package/dist/chunk-JOULSXOI.js +415 -0
  13. package/dist/chunk-JOULSXOI.js.map +1 -0
  14. package/dist/{chunk-OKYHI6JG.js → chunk-LF3V3ERS.js} +3 -3
  15. package/dist/{chunk-2XS2PM62.js → chunk-OC6S4XFL.js} +7 -7
  16. package/dist/{chunk-DP3YEVSX.js → chunk-WILXD5X3.js} +3 -3
  17. package/dist/{chunk-ZGQ7Q4ZU.js → chunk-WM25QE7E.js} +2 -2
  18. package/dist/{chunk-WQLIGVQR.js → chunk-WSKBZIEI.js} +4 -1
  19. package/dist/chunk-WSKBZIEI.js.map +1 -0
  20. package/dist/chunk-YUX6RGLZ.js +1858 -0
  21. package/dist/chunk-YUX6RGLZ.js.map +1 -0
  22. package/dist/{chunk-Z3EJX3VG.js → chunk-Z456IHCB.js} +3 -3
  23. package/dist/hooks/index.js +2 -2
  24. package/dist/index.js +13 -13
  25. package/dist/index.native.d.ts +56 -2
  26. package/dist/index.native.js +13 -13
  27. package/dist/index.web.js +13 -13
  28. package/dist/mutation/index.js +3 -3
  29. package/dist/parser/index.js +3 -3
  30. package/dist/query/index.js +4 -4
  31. package/dist/realtime/index.js +3 -3
  32. package/dist/types/index.js +4 -4
  33. package/dist/with-auth/index.js +7 -7
  34. package/package.json +5 -3
  35. package/dist/chunk-BZSAPFFB.js.map +0 -1
  36. package/dist/chunk-CTRY7JDP.js +0 -4112
  37. package/dist/chunk-CTRY7JDP.js.map +0 -1
  38. package/dist/chunk-INEUG6MC.js +0 -521
  39. package/dist/chunk-INEUG6MC.js.map +0 -1
  40. package/dist/chunk-UJWETW36.js.map +0 -1
  41. package/dist/chunk-WQLIGVQR.js.map +0 -1
  42. /package/dist/{chunk-FIAXWEBK.js.map → chunk-7YGDT46S.js.map} +0 -0
  43. /package/dist/{chunk-3Q74DK5K.js.map → chunk-AKCNWHXV.js.map} +0 -0
  44. /package/dist/{chunk-FMYXG4VN.js.map → chunk-BRFFTGVJ.js.map} +0 -0
  45. /package/dist/{chunk-YA6MUTA7.js.map → chunk-FI6JAD5G.js.map} +0 -0
  46. /package/dist/{chunk-OKYHI6JG.js.map → chunk-LF3V3ERS.js.map} +0 -0
  47. /package/dist/{chunk-2XS2PM62.js.map → chunk-OC6S4XFL.js.map} +0 -0
  48. /package/dist/{chunk-DP3YEVSX.js.map → chunk-WILXD5X3.js.map} +0 -0
  49. /package/dist/{chunk-ZGQ7Q4ZU.js.map → chunk-WM25QE7E.js.map} +0 -0
  50. /package/dist/{chunk-Z3EJX3VG.js.map → chunk-Z456IHCB.js.map} +0 -0
@@ -1,15 +1,11 @@
1
- import {
2
- deepEqual,
3
- flatten
4
- } from "./chunk-INEUG6MC.js";
5
1
  import {
6
2
  __commonJS,
7
3
  __toESM
8
4
  } from "./chunk-7D4SUZUM.js";
9
5
 
10
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/categories.js
6
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/categories.js
11
7
  var require_categories = __commonJS({
12
- "../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/categories.js"(exports, module) {
8
+ "../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/categories.js"(exports, module) {
13
9
  module.exports = [
14
10
  {
15
11
  "name": "C",
@@ -231,9 +227,9 @@ var require_categories = __commonJS({
231
227
  }
232
228
  });
233
229
 
234
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/properties.js
230
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/properties.js
235
231
  var require_properties = __commonJS({
236
- "../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/properties.js"(exports, module) {
232
+ "../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/properties.js"(exports, module) {
237
233
  module.exports = [
238
234
  {
239
235
  "name": "ASCII",
@@ -278,9 +274,9 @@ var require_properties = __commonJS({
278
274
  }
279
275
  });
280
276
 
281
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/scripts.js
277
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/scripts.js
282
278
  var require_scripts = __commonJS({
283
- "../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/scripts.js"(exports, module) {
279
+ "../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/tools/output/scripts.js"(exports, module) {
284
280
  module.exports = [
285
281
  {
286
282
  "name": "Adlam",
@@ -946,90 +942,15 @@ var require_scripts = __commonJS({
946
942
  }
947
943
  });
948
944
 
949
- // src/parser/lib/sort-search-param.ts
950
- var sortSearchParams = (params) => new URLSearchParams(Array.from(params.entries()).sort((a, b) => {
951
- const x = `${a[0]}${a[1]}`;
952
- const y = `${b[0]}${b[1]}`;
953
- return x > y ? 1 : -1;
954
- }));
955
-
956
- // src/parser/lib/encode-object.ts
957
- var encodeObject = (obj) => {
958
- const sortedEntries = Object.entries(flatten(obj)).sort(([a], [b]) => a.length - b.length);
959
- const bodyParams = new URLSearchParams();
960
- sortedEntries.forEach(([key, value]) => {
961
- bodyParams.append(key, String(value));
962
- });
963
- return sortSearchParams(bodyParams).toString();
964
- };
965
-
966
- // src/parser/lib/is-object.ts
967
- var isObject = (v) => typeof v === "object" && !Array.isArray(v) && v !== null;
968
-
969
- // src/parser/lib/find-last-index.ts
970
- function findLastIndex(array, predicate) {
971
- let l = array.length;
972
- while (l--) {
973
- if (predicate(array[l], l, array)) return l;
974
- }
975
- return -1;
976
- }
977
-
978
- // src/parser/lib/is-not-null.ts
979
- var isNotNull = (i) => i !== null;
980
-
981
- // src/parser/lib/operators.ts
982
- var buildLikeRegex = (search) => new RegExp(`^${search.replace(/%/g, ".*")}$`);
983
- var textSearch = (c, v) => {
984
- const regExp = `^${v.split("&").map((v2) => v2.trim().toLowerCase()).join("|").replace(/:\*/g, ".*")}$`;
985
- const tokens2 = c.match(/'(.*?)'/g).map((t) => t.replace(/'/g, "").toLowerCase());
986
- return tokens2.some((t) => new RegExp(regExp).test(t));
987
- };
988
- var ifDateGetTime = (v) => v instanceof Date ? v.getTime() : v;
989
- var enclose = (v, char) => {
990
- if (!v.startsWith(char)) v = `${char}${v}`;
991
- if (!v.endsWith(char)) v = `${v}${char}`;
992
- return v;
993
- };
994
- var OPERATOR_MAP = {
995
- eq: (c, v) => ifDateGetTime(c) === ifDateGetTime(v),
996
- neq: (c, v) => ifDateGetTime(c) !== ifDateGetTime(v),
997
- gt: (c, v) => c > v,
998
- gte: (c, v) => c >= v,
999
- lt: (c, v) => c < v,
1000
- lte: (c, v) => c <= v,
1001
- like: (c, v) => buildLikeRegex(v).test(c.toString()),
1002
- ilike: (c, v) => buildLikeRegex(v.toLowerCase()).test(c.toString().toLowerCase()),
1003
- is: (c, v) => c === v,
1004
- in: (c, v) => {
1005
- const parsedValue = v.slice(1, -1).split(",");
1006
- return parsedValue.some((i) => i === c);
1007
- },
1008
- // contains
1009
- cs: (c, v) => {
1010
- if (!Array.isArray(c)) return false;
1011
- if (!Array.isArray(v)) v = v.slice(1, -1).split(",");
1012
- return v.every((i) => c.some((colVal) => deepEqual(colVal, i)));
1013
- },
1014
- // containedBy
1015
- cd: (c, v) => {
1016
- if (!Array.isArray(c)) return false;
1017
- if (!Array.isArray(v)) v = v.slice(1, -1).split(",");
1018
- return c.every((i) => v.some((cmpVal) => deepEqual(cmpVal, i)));
1019
- },
1020
- fts: textSearch,
1021
- plfts: (c, v) => buildLikeRegex(enclose(v.toLowerCase(), "%")).test(c.toString().toLowerCase())
1022
- };
1023
-
1024
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/xregexp.js
945
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/xregexp.js
1025
946
  var REGEX_DATA = "xregexp";
1026
947
  var features = {
1027
948
  astral: false,
1028
949
  namespacing: true
1029
950
  };
1030
951
  var fixed = {};
1031
- var regexCache = /* @__PURE__ */ Object.create(null);
1032
- var patternCache = /* @__PURE__ */ Object.create(null);
952
+ var regexCache = {};
953
+ var patternCache = {};
1033
954
  var tokens = [];
1034
955
  var defaultScope = "default";
1035
956
  var classScope = "class";
@@ -1335,7 +1256,7 @@ function XRegExp(pattern, flags) {
1335
1256
  );
1336
1257
  }
1337
1258
  XRegExp.prototype = new RegExp();
1338
- XRegExp.version = "5.1.2";
1259
+ XRegExp.version = "5.1.1";
1339
1260
  XRegExp._clipDuplicates = clipDuplicates;
1340
1261
  XRegExp._hasNativeFlag = hasNativeFlag;
1341
1262
  XRegExp._dec = dec;
@@ -1375,9 +1296,9 @@ XRegExp.cache = (pattern, flags) => {
1375
1296
  };
1376
1297
  XRegExp.cache.flush = (cacheName) => {
1377
1298
  if (cacheName === "patterns") {
1378
- patternCache = /* @__PURE__ */ Object.create(null);
1299
+ patternCache = {};
1379
1300
  } else {
1380
- regexCache = /* @__PURE__ */ Object.create(null);
1301
+ regexCache = {};
1381
1302
  }
1382
1303
  };
1383
1304
  XRegExp.escape = (str) => String(nullThrows(str)).replace(/[\\\[\]{}()*+?.^$|]/g, "\\$&").replace(/[\s#\-,]/g, (match) => `\\u${pad4(hex(match.charCodeAt(0)))}`);
@@ -1830,7 +1751,7 @@ XRegExp.addToken(
1830
1751
  );
1831
1752
  var xregexp_default = XRegExp;
1832
1753
 
1833
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/build.js
1754
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/build.js
1834
1755
  var build_default = (XRegExp2) => {
1835
1756
  const REGEX_DATA2 = "xregexp";
1836
1757
  const subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
@@ -1954,7 +1875,7 @@ var build_default = (XRegExp2) => {
1954
1875
  };
1955
1876
  };
1956
1877
 
1957
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/matchrecursive.js
1878
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/matchrecursive.js
1958
1879
  var matchrecursive_default = (XRegExp2) => {
1959
1880
  function row(name, value, start, end) {
1960
1881
  return {
@@ -2084,7 +2005,7 @@ var matchrecursive_default = (XRegExp2) => {
2084
2005
  };
2085
2006
  };
2086
2007
 
2087
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-base.js
2008
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/unicode-base.js
2088
2009
  var unicode_base_default = (XRegExp2) => {
2089
2010
  const unicode = {};
2090
2011
  const unicodeTypes = {};
@@ -2236,7 +2157,7 @@ var unicode_base_default = (XRegExp2) => {
2236
2157
  };
2237
2158
  };
2238
2159
 
2239
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-categories.js
2160
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/unicode-categories.js
2240
2161
  var import_categories = __toESM(require_categories());
2241
2162
  var unicode_categories_default = (XRegExp2) => {
2242
2163
  if (!XRegExp2.addUnicodeData) {
@@ -2245,7 +2166,7 @@ var unicode_categories_default = (XRegExp2) => {
2245
2166
  XRegExp2.addUnicodeData(import_categories.default);
2246
2167
  };
2247
2168
 
2248
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-properties.js
2169
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/unicode-properties.js
2249
2170
  var import_properties = __toESM(require_properties());
2250
2171
  var unicode_properties_default = (XRegExp2) => {
2251
2172
  if (!XRegExp2.addUnicodeData) {
@@ -2261,7 +2182,7 @@ var unicode_properties_default = (XRegExp2) => {
2261
2182
  XRegExp2.addUnicodeData(unicodeData);
2262
2183
  };
2263
2184
 
2264
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-scripts.js
2185
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/addons/unicode-scripts.js
2265
2186
  var import_scripts = __toESM(require_scripts());
2266
2187
  var unicode_scripts_default = (XRegExp2) => {
2267
2188
  if (!XRegExp2.addUnicodeData) {
@@ -2270,7 +2191,7 @@ var unicode_scripts_default = (XRegExp2) => {
2270
2191
  XRegExp2.addUnicodeData(import_scripts.default, "Script");
2271
2192
  };
2272
2193
 
2273
- // ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/index.js
2194
+ // ../../../node_modules/.pnpm/xregexp@5.1.1/node_modules/xregexp/src/index.js
2274
2195
  build_default(xregexp_default);
2275
2196
  matchrecursive_default(xregexp_default);
2276
2197
  unicode_base_default(xregexp_default);
@@ -2279,372 +2200,560 @@ unicode_properties_default(xregexp_default);
2279
2200
  unicode_scripts_default(xregexp_default);
2280
2201
  var src_default = xregexp_default;
2281
2202
 
2282
- // src/parser/lib/parse-select-param.ts
2283
- var parseSelectParam = (s, currentPath) => {
2284
- s = s.replace(/\s/g, "");
2285
- const foreignTables = src_default.matchRecursive(`,${s}`, ",[^,]*\\(", "\\)", "g", {
2286
- valueNames: {
2287
- "0": null,
2288
- "1": "tableName",
2289
- "2": "selectedColumns",
2290
- "3": null
2291
- }
2292
- }).reduce((prev, curr, idx, matches) => {
2293
- if (curr.name === "selectedColumns") {
2294
- const name = matches[idx - 1].value.slice(1, -1);
2295
- prev = {
2296
- ...prev,
2297
- [name]: curr.value
2298
- };
2203
+ // ../../../node_modules/.pnpm/flat@6.0.1/node_modules/flat/index.js
2204
+ function isBuffer(obj) {
2205
+ return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
2206
+ }
2207
+ function keyIdentity(key) {
2208
+ return key;
2209
+ }
2210
+ function flatten(target, opts) {
2211
+ opts = opts || {};
2212
+ const delimiter = opts.delimiter || ".";
2213
+ const maxDepth = opts.maxDepth;
2214
+ const transformKey = opts.transformKey || keyIdentity;
2215
+ const output = {};
2216
+ function step(object, prev, currentDepth) {
2217
+ currentDepth = currentDepth || 1;
2218
+ Object.keys(object).forEach(function(key) {
2219
+ const value = object[key];
2220
+ const isarray = opts.safe && Array.isArray(value);
2221
+ const type = Object.prototype.toString.call(value);
2222
+ const isbuffer = isBuffer(value);
2223
+ const isobject = type === "[object Object]" || type === "[object Array]";
2224
+ const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
2225
+ if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) {
2226
+ return step(value, newKey, currentDepth + 1);
2227
+ }
2228
+ output[newKey] = value;
2229
+ });
2230
+ }
2231
+ step(target);
2232
+ return output;
2233
+ }
2234
+ function unflatten(target, opts) {
2235
+ opts = opts || {};
2236
+ const delimiter = opts.delimiter || ".";
2237
+ const overwrite = opts.overwrite || false;
2238
+ const transformKey = opts.transformKey || keyIdentity;
2239
+ const result = {};
2240
+ const isbuffer = isBuffer(target);
2241
+ if (isbuffer || Object.prototype.toString.call(target) !== "[object Object]") {
2242
+ return target;
2243
+ }
2244
+ function getkey(key) {
2245
+ const parsedKey = Number(key);
2246
+ return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
2247
+ }
2248
+ function addKeys(keyPrefix, recipient, target2) {
2249
+ return Object.keys(target2).reduce(function(result2, key) {
2250
+ result2[keyPrefix + delimiter + key] = target2[key];
2251
+ return result2;
2252
+ }, recipient);
2253
+ }
2254
+ function isEmpty(val) {
2255
+ const type = Object.prototype.toString.call(val);
2256
+ const isArray2 = type === "[object Array]";
2257
+ const isObject = type === "[object Object]";
2258
+ if (!val) {
2259
+ return true;
2260
+ } else if (isArray2) {
2261
+ return !val.length;
2262
+ } else if (isObject) {
2263
+ return !Object.keys(val).length;
2264
+ }
2265
+ }
2266
+ target = Object.keys(target).reduce(function(result2, key) {
2267
+ const type = Object.prototype.toString.call(target[key]);
2268
+ const isObject = type === "[object Object]" || type === "[object Array]";
2269
+ if (!isObject || isEmpty(target[key])) {
2270
+ result2[key] = target[key];
2271
+ return result2;
2272
+ } else {
2273
+ return addKeys(
2274
+ key,
2275
+ result2,
2276
+ flatten(target[key], opts)
2277
+ );
2299
2278
  }
2300
- return prev;
2301
2279
  }, {});
2302
- const columns = s.replace(new RegExp(`${Object.entries(foreignTables).map(([table, selectedColumns]) => `${table}(${selectedColumns})`.replace(/\(/g, "\\(").replace(/\)/g, "\\)")).join("|")}`, "g"), "").replace(/(,)\1+/g, ",").split(",").filter((c) => c.length > 0).map((c) => {
2303
- const split = c.split(":");
2304
- const hasAlias = split.length > 1;
2305
- return {
2306
- declaration: [currentPath?.declaration, c].filter(Boolean).join("."),
2307
- alias: hasAlias || currentPath?.alias ? [currentPath?.alias ?? currentPath?.path, split[0]].filter(Boolean).join(".") : void 0,
2308
- path: [currentPath?.path, split[hasAlias ? 1 : 0]].filter(Boolean).join(".")
2309
- };
2280
+ Object.keys(target).forEach(function(key) {
2281
+ const split = key.split(delimiter).map(transformKey);
2282
+ let key1 = getkey(split.shift());
2283
+ let key2 = getkey(split[0]);
2284
+ let recipient = result;
2285
+ while (key2 !== void 0) {
2286
+ if (key1 === "__proto__") {
2287
+ return;
2288
+ }
2289
+ const type = Object.prototype.toString.call(recipient[key1]);
2290
+ const isobject = type === "[object Object]" || type === "[object Array]";
2291
+ if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") {
2292
+ return;
2293
+ }
2294
+ if (overwrite && !isobject || !overwrite && recipient[key1] == null) {
2295
+ recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
2296
+ }
2297
+ recipient = recipient[key1];
2298
+ if (split.length > 0) {
2299
+ key1 = getkey(split.shift());
2300
+ key2 = getkey(split[0]);
2301
+ }
2302
+ }
2303
+ recipient[key1] = unflatten(target[key], opts);
2310
2304
  });
2311
- return [...columns, ...Object.entries(foreignTables).flatMap(([currentDeclaration, selectedColumns]) => {
2312
- const aliasSplit = currentDeclaration.split(":");
2313
- const currentAliasElem = aliasSplit.length > 1 ? aliasSplit[0] : void 0;
2314
- const currentPathDeclaration = aliasSplit[aliasSplit.length - 1];
2315
- const currentPathElem = currentPathDeclaration.split("!")[0];
2316
- const path = [currentPath?.path, currentPathElem].filter(Boolean).join(".");
2317
- const alias = [currentPath?.alias ?? currentPath?.path, currentAliasElem ?? currentPathElem].filter(Boolean).join(".");
2318
- const declaration = [currentPath?.declaration, currentDeclaration].filter(Boolean).join(".");
2319
- return parseSelectParam(`${selectedColumns}`, {
2320
- path,
2321
- alias: currentPath?.alias || currentAliasElem ? alias : void 0,
2322
- declaration
2323
- });
2324
- })];
2325
- };
2326
-
2327
- // src/parser/lib/is-iso-date-string.ts
2328
- var isISODateString = (v) => typeof v === "string" && /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/.test(v);
2329
-
2330
- // src/parser/lib/parse-value.ts
2331
- var parseValue = (v) => {
2332
- if (isISODateString(v)) return new Date(v);
2333
- try {
2334
- return JSON.parse(v);
2335
- } catch {
2336
- return v;
2337
- }
2338
- };
2305
+ return result;
2306
+ }
2339
2307
 
2340
- // src/parser/postgrest-query-parser.ts
2341
- var SUPPORTED_OPERATORS = ["or", ...Object.keys(OPERATOR_MAP)];
2342
- var PostgrestQueryParser = class {
2343
- constructor(query, opts) {
2344
- this.opts = opts;
2345
- this._params = new URLSearchParams(query);
2346
- }
2347
- _params;
2348
- _filters;
2349
- _paths;
2350
- /**
2351
- * Getter that returns the paths and their aliases that the query selects. Will do the computation only once.
2352
- *
2353
- * ```js
2354
- * const p = new PostgrestParser(
2355
- * supabaseClient.from("test")
2356
- * .select(
2357
- * `name,
2358
- * city:cities (
2359
- * test:name
2360
- * ),
2361
- * countries (
2362
- * capital,
2363
- * population,
2364
- * some_ref (
2365
- * test:first,
2366
- * second
2367
- * )
2368
- * )`
2369
- * );
2370
- * console.log(p.paths);
2371
- * // [
2372
- * // { alias: undefined, path: "name" },
2373
- * // { alias: "city.test", path: "cities.name" },
2374
- * // { alias: undefined, path: "countries.capital" },
2375
- * // { alias: undefined, path: "countries.population" },
2376
- * // {
2377
- * // alias: "countries.some_ref.test",
2378
- * // path: "countries.some_ref.first",
2379
- * // },
2380
- * // { alias: undefined, path: "countries.some_ref.second" },
2381
- * // ];
2382
- * ```
2383
- *
2384
- * @returns an array of paths that the query selects, containing the columns and aliases
2385
- */
2386
- get paths() {
2387
- if (!this._paths) {
2388
- const select = this._params.get("select");
2389
- this._paths = select ? parseSelectParam(select) : [];
2390
- }
2391
- return this._paths;
2392
- }
2393
- /**
2394
- * Getter that returns the filters that this query applies in a json object.
2395
- *
2396
- * ```js
2397
- * const p = new PostgrestParser(
2398
- * supabaseClient.from("test").select('*')
2399
- * .or("full_name.eq.20,test.neq.true,and(full_name.eq.Test Name,email.eq.test@mail.com)")
2400
- * .eq("id", "123")
2401
- * .contains("id", "456")
2402
- * );
2403
- *
2404
- * console.log(p.filters);
2405
- *
2406
- * // [
2407
- * // {
2408
- * // or: [
2409
- * // {
2410
- * // path: "full_name",
2411
- * // negate: false,
2412
- * // operator: "eq",
2413
- * // value: 20,
2414
- * // },
2415
- * // {
2416
- * // path: "test",
2417
- * // negate: false,
2418
- * // operator: "neq",
2419
- * // value: true,
2420
- * // },
2421
- * // {
2422
- * // and: [
2423
- * // {
2424
- * // path: "full_name",
2425
- * // negate: false,
2426
- * // operator: "eq",
2427
- * // value: "Test Name",
2428
- * // },
2429
- * // {
2430
- * // path: "email",
2431
- * // negate: false,
2432
- * // operator: "eq",
2433
- * // value: "test@mail.com",
2434
- * // },
2435
- * // ],
2436
- * // },
2437
- * // ],
2438
- * // },
2439
- * // {
2440
- * // path: "id",
2441
- * // negate: false,
2442
- * // operator: "eq",
2443
- * // value: 123,
2444
- * // },
2445
- * // {
2446
- * // path: "id",
2447
- * // negate: false,
2448
- * // operator: "cs",
2449
- * // value: 456,
2450
- * // },
2451
- * // ];
2452
- * ```
2453
- *
2454
- * @returns a FilterDefinitions object
2455
- */
2456
- get filters() {
2457
- if (!this._filters) {
2458
- const filters = [];
2459
- this._params.forEach((value, key) => {
2460
- if (SUPPORTED_OPERATORS.some((f) => key === f || value.split(".").includes(f))) {
2461
- const filter = this.parseFilterString(`${key}.${value}`, void 0);
2462
- if (filter !== null) filters.push(filter);
2463
- }
2464
- });
2465
- this._filters = filters;
2308
+ // ../../../node_modules/.pnpm/fast-equals@5.2.2/node_modules/fast-equals/dist/esm/index.mjs
2309
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
2310
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2311
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2312
+ function combineComparators(comparatorA, comparatorB) {
2313
+ return function isEqual(a, b, state) {
2314
+ return comparatorA(a, b, state) && comparatorB(a, b, state);
2315
+ };
2316
+ }
2317
+ function createIsCircular(areItemsEqual) {
2318
+ return function isCircular(a, b, state) {
2319
+ if (!a || !b || typeof a !== "object" || typeof b !== "object") {
2320
+ return areItemsEqual(a, b, state);
2321
+ }
2322
+ var cache = state.cache;
2323
+ var cachedA = cache.get(a);
2324
+ var cachedB = cache.get(b);
2325
+ if (cachedA && cachedB) {
2326
+ return cachedA === b && cachedB === a;
2327
+ }
2328
+ cache.set(a, b);
2329
+ cache.set(b, a);
2330
+ var result = areItemsEqual(a, b, state);
2331
+ cache.delete(a);
2332
+ cache.delete(b);
2333
+ return result;
2334
+ };
2335
+ }
2336
+ function getStrictProperties(object) {
2337
+ return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
2338
+ }
2339
+ var hasOwn = Object.hasOwn || (function(object, property) {
2340
+ return hasOwnProperty.call(object, property);
2341
+ });
2342
+ function sameValueZeroEqual(a, b) {
2343
+ return a === b || !a && !b && a !== a && b !== b;
2344
+ }
2345
+ var PREACT_VNODE = "__v";
2346
+ var PREACT_OWNER = "__o";
2347
+ var REACT_OWNER = "_owner";
2348
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2349
+ var keys = Object.keys;
2350
+ function areArraysEqual(a, b, state) {
2351
+ var index = a.length;
2352
+ if (b.length !== index) {
2353
+ return false;
2354
+ }
2355
+ while (index-- > 0) {
2356
+ if (!state.equals(a[index], b[index], index, index, a, b, state)) {
2357
+ return false;
2466
2358
  }
2467
- return this._filters;
2468
2359
  }
2469
- parseFilterString(filter, prefix) {
2470
- if (filter.startsWith("and(") && filter.endsWith(")")) {
2471
- const andFilters = filter.slice(4, -1).split(",").map((s) => this.parseFilterString(s, prefix)).filter(isNotNull);
2472
- if (andFilters.length === 0) return null;
2473
- else return {
2474
- and: andFilters
2475
- };
2360
+ return true;
2361
+ }
2362
+ function areDatesEqual(a, b) {
2363
+ return sameValueZeroEqual(a.getTime(), b.getTime());
2364
+ }
2365
+ function areErrorsEqual(a, b) {
2366
+ return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;
2367
+ }
2368
+ function areFunctionsEqual(a, b) {
2369
+ return a === b;
2370
+ }
2371
+ function areMapsEqual(a, b, state) {
2372
+ var size = a.size;
2373
+ if (size !== b.size) {
2374
+ return false;
2375
+ }
2376
+ if (!size) {
2377
+ return true;
2378
+ }
2379
+ var matchedIndices = new Array(size);
2380
+ var aIterable = a.entries();
2381
+ var aResult;
2382
+ var bResult;
2383
+ var index = 0;
2384
+ while (aResult = aIterable.next()) {
2385
+ if (aResult.done) {
2386
+ break;
2476
2387
  }
2477
- const split = filter.split(".");
2478
- if ([split[0], split[1]].includes("or")) {
2479
- let foreignTable;
2480
- if (split[1] === "or") {
2481
- foreignTable = split[0];
2388
+ var bIterable = b.entries();
2389
+ var hasMatch = false;
2390
+ var matchIndex = 0;
2391
+ while (bResult = bIterable.next()) {
2392
+ if (bResult.done) {
2393
+ break;
2482
2394
  }
2483
- const orFilters = filter.slice(4 + (foreignTable ? foreignTable.length + 1 : 0), -1).split(",").reduce((prev, curr, idx, filters) => {
2484
- if (curr.startsWith("and(")) {
2485
- prev = [...prev, [curr, filters[idx + 1]].join()];
2486
- } else if (!curr.endsWith(")")) {
2487
- prev = [...prev, curr];
2488
- }
2489
- return prev;
2490
- }, []).map((s) => this.parseFilterString(s, foreignTable)).filter(isNotNull);
2491
- if (orFilters.length === 0) return null;
2492
- else return {
2493
- or: orFilters
2494
- };
2395
+ if (matchedIndices[matchIndex]) {
2396
+ matchIndex++;
2397
+ continue;
2398
+ }
2399
+ var aEntry = aResult.value;
2400
+ var bEntry = bResult.value;
2401
+ if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
2402
+ hasMatch = matchedIndices[matchIndex] = true;
2403
+ break;
2404
+ }
2405
+ matchIndex++;
2406
+ }
2407
+ if (!hasMatch) {
2408
+ return false;
2409
+ }
2410
+ index++;
2411
+ }
2412
+ return true;
2413
+ }
2414
+ var areNumbersEqual = sameValueZeroEqual;
2415
+ function areObjectsEqual(a, b, state) {
2416
+ var properties2 = keys(a);
2417
+ var index = properties2.length;
2418
+ if (keys(b).length !== index) {
2419
+ return false;
2420
+ }
2421
+ while (index-- > 0) {
2422
+ if (!isPropertyEqual(a, b, state, properties2[index])) {
2423
+ return false;
2495
2424
  }
2496
- const operatorIdx = findLastIndex(split, (s) => SUPPORTED_OPERATORS.includes(s));
2497
- if (operatorIdx === -1) throw new Error(`Could not find a valid operator in ${split.join(".")}. Supported are ${SUPPORTED_OPERATORS.join(",")}.`);
2498
- const negate = split[operatorIdx - 1] === "not";
2499
- const pathOrAlias = [prefix, ...split.slice(0, negate ? operatorIdx - 1 : operatorIdx)].filter(Boolean).join(".").replace(/\s/g, "");
2500
- let path = pathOrAlias;
2501
- let alias;
2502
- for (const p of this.paths) {
2503
- if (p.path === pathOrAlias) {
2504
- alias = p.alias;
2425
+ }
2426
+ return true;
2427
+ }
2428
+ function areObjectsEqualStrict(a, b, state) {
2429
+ var properties2 = getStrictProperties(a);
2430
+ var index = properties2.length;
2431
+ if (getStrictProperties(b).length !== index) {
2432
+ return false;
2433
+ }
2434
+ var property;
2435
+ var descriptorA;
2436
+ var descriptorB;
2437
+ while (index-- > 0) {
2438
+ property = properties2[index];
2439
+ if (!isPropertyEqual(a, b, state, property)) {
2440
+ return false;
2441
+ }
2442
+ descriptorA = getOwnPropertyDescriptor(a, property);
2443
+ descriptorB = getOwnPropertyDescriptor(b, property);
2444
+ if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) {
2445
+ return false;
2446
+ }
2447
+ }
2448
+ return true;
2449
+ }
2450
+ function arePrimitiveWrappersEqual(a, b) {
2451
+ return sameValueZeroEqual(a.valueOf(), b.valueOf());
2452
+ }
2453
+ function areRegExpsEqual(a, b) {
2454
+ return a.source === b.source && a.flags === b.flags;
2455
+ }
2456
+ function areSetsEqual(a, b, state) {
2457
+ var size = a.size;
2458
+ if (size !== b.size) {
2459
+ return false;
2460
+ }
2461
+ if (!size) {
2462
+ return true;
2463
+ }
2464
+ var matchedIndices = new Array(size);
2465
+ var aIterable = a.values();
2466
+ var aResult;
2467
+ var bResult;
2468
+ while (aResult = aIterable.next()) {
2469
+ if (aResult.done) {
2470
+ break;
2471
+ }
2472
+ var bIterable = b.values();
2473
+ var hasMatch = false;
2474
+ var matchIndex = 0;
2475
+ while (bResult = bIterable.next()) {
2476
+ if (bResult.done) {
2505
2477
  break;
2506
2478
  }
2507
- if (p.alias === pathOrAlias) {
2508
- path = p.path;
2509
- alias = p.alias;
2479
+ if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
2480
+ hasMatch = matchedIndices[matchIndex] = true;
2510
2481
  break;
2511
2482
  }
2483
+ matchIndex++;
2512
2484
  }
2513
- if (this.opts && Array.isArray(this.opts.exclusivePaths) && !this.opts.exclusivePaths.includes(path)) {
2514
- return null;
2485
+ if (!hasMatch) {
2486
+ return false;
2515
2487
  }
2516
- const operator = split[operatorIdx];
2517
- const value = split.slice(operatorIdx + 1).join(".");
2518
- return {
2519
- path,
2520
- alias,
2521
- negate,
2522
- operator,
2523
- value: parseValue(value)
2524
- };
2525
2488
  }
2526
- };
2527
-
2528
- // src/parser/PostgrestParser.ts
2529
- var PostgrestParser = class extends PostgrestQueryParser {
2530
- constructor(fb, opts) {
2531
- super(new URL(fb["url"]).searchParams.toString(), opts);
2532
- this.opts = opts;
2533
- this._url = new URL(fb["url"]);
2534
- const headers = fb["headers"];
2535
- this._headers = Object.fromEntries(headers.entries());
2536
- this._body = isObject(fb["body"]) ? {
2537
- ...fb["body"]
2538
- } : void 0;
2539
- this.method = fb["method"];
2540
- this.searchParams = this._url.searchParams;
2541
- this.queryKey = sortSearchParams(this._url.searchParams).toString();
2542
- this.select = this._url.searchParams.get("select")?.toString() ?? "*";
2543
- this.table = this._url.toString().split("/rest/v1/").pop().split("?").shift();
2544
- if (this._body) {
2545
- this.bodyKey = encodeObject(this._body);
2546
- }
2547
- const preferHeaders = (this._headers["Prefer"] ?? "").split(",").reduce((prev, curr) => {
2548
- const s = curr.split("=");
2549
- return {
2550
- ...prev,
2551
- [s[0]]: s[1]
2552
- };
2553
- }, {});
2554
- this.count = preferHeaders["count"] ?? null;
2555
- this.schema = fb["schema"];
2556
- this.isHead = this.method === "HEAD";
2557
- const limit = this._url.searchParams.get("limit");
2558
- this.limit = limit ? Number(limit) : void 0;
2559
- const offset = this._url.searchParams.get("offset");
2560
- this.offset = offset ? Number(offset) : void 0;
2561
- this._url.searchParams.forEach((value, key) => {
2562
- const split = key.split(".");
2563
- if (split[split.length === 2 ? 1 : 0] === "order") {
2564
- const orderByDefs = value.split(",");
2565
- orderByDefs.forEach((def) => {
2566
- const [column, ascending, nullsFirst] = def.split(".");
2567
- this.orderBy.push({
2568
- ascending: ascending === "asc",
2569
- column,
2570
- nullsFirst: nullsFirst === "nullsfirst",
2571
- foreignTable: split.length === 2 ? split[0] : void 0
2572
- });
2573
- });
2489
+ return true;
2490
+ }
2491
+ function areTypedArraysEqual(a, b) {
2492
+ var index = a.length;
2493
+ if (b.length !== index) {
2494
+ return false;
2495
+ }
2496
+ while (index-- > 0) {
2497
+ if (a[index] !== b[index]) {
2498
+ return false;
2499
+ }
2500
+ }
2501
+ return true;
2502
+ }
2503
+ function areUrlsEqual(a, b) {
2504
+ return a.hostname === b.hostname && a.pathname === b.pathname && a.protocol === b.protocol && a.port === b.port && a.hash === b.hash && a.username === b.username && a.password === b.password;
2505
+ }
2506
+ function isPropertyEqual(a, b, state, property) {
2507
+ if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) {
2508
+ return true;
2509
+ }
2510
+ return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
2511
+ }
2512
+ var ARGUMENTS_TAG = "[object Arguments]";
2513
+ var BOOLEAN_TAG = "[object Boolean]";
2514
+ var DATE_TAG = "[object Date]";
2515
+ var ERROR_TAG = "[object Error]";
2516
+ var MAP_TAG = "[object Map]";
2517
+ var NUMBER_TAG = "[object Number]";
2518
+ var OBJECT_TAG = "[object Object]";
2519
+ var REG_EXP_TAG = "[object RegExp]";
2520
+ var SET_TAG = "[object Set]";
2521
+ var STRING_TAG = "[object String]";
2522
+ var URL_TAG = "[object URL]";
2523
+ var isArray = Array.isArray;
2524
+ var isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null;
2525
+ var assign = Object.assign;
2526
+ var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
2527
+ function createEqualityComparator(_a) {
2528
+ var areArraysEqual2 = _a.areArraysEqual, areDatesEqual2 = _a.areDatesEqual, areErrorsEqual2 = _a.areErrorsEqual, areFunctionsEqual2 = _a.areFunctionsEqual, areMapsEqual2 = _a.areMapsEqual, areNumbersEqual2 = _a.areNumbersEqual, areObjectsEqual2 = _a.areObjectsEqual, arePrimitiveWrappersEqual2 = _a.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a.areRegExpsEqual, areSetsEqual2 = _a.areSetsEqual, areTypedArraysEqual2 = _a.areTypedArraysEqual, areUrlsEqual2 = _a.areUrlsEqual;
2529
+ return function comparator(a, b, state) {
2530
+ if (a === b) {
2531
+ return true;
2532
+ }
2533
+ if (a == null || b == null) {
2534
+ return false;
2535
+ }
2536
+ var type = typeof a;
2537
+ if (type !== typeof b) {
2538
+ return false;
2539
+ }
2540
+ if (type !== "object") {
2541
+ if (type === "number") {
2542
+ return areNumbersEqual2(a, b, state);
2543
+ }
2544
+ if (type === "function") {
2545
+ return areFunctionsEqual2(a, b, state);
2574
2546
  }
2547
+ return false;
2548
+ }
2549
+ var constructor = a.constructor;
2550
+ if (constructor !== b.constructor) {
2551
+ return false;
2552
+ }
2553
+ if (constructor === Object) {
2554
+ return areObjectsEqual2(a, b, state);
2555
+ }
2556
+ if (isArray(a)) {
2557
+ return areArraysEqual2(a, b, state);
2558
+ }
2559
+ if (isTypedArray != null && isTypedArray(a)) {
2560
+ return areTypedArraysEqual2(a, b, state);
2561
+ }
2562
+ if (constructor === Date) {
2563
+ return areDatesEqual2(a, b, state);
2564
+ }
2565
+ if (constructor === RegExp) {
2566
+ return areRegExpsEqual2(a, b, state);
2567
+ }
2568
+ if (constructor === Map) {
2569
+ return areMapsEqual2(a, b, state);
2570
+ }
2571
+ if (constructor === Set) {
2572
+ return areSetsEqual2(a, b, state);
2573
+ }
2574
+ var tag = getTag(a);
2575
+ if (tag === DATE_TAG) {
2576
+ return areDatesEqual2(a, b, state);
2577
+ }
2578
+ if (tag === REG_EXP_TAG) {
2579
+ return areRegExpsEqual2(a, b, state);
2580
+ }
2581
+ if (tag === MAP_TAG) {
2582
+ return areMapsEqual2(a, b, state);
2583
+ }
2584
+ if (tag === SET_TAG) {
2585
+ return areSetsEqual2(a, b, state);
2586
+ }
2587
+ if (tag === OBJECT_TAG) {
2588
+ return typeof a.then !== "function" && typeof b.then !== "function" && areObjectsEqual2(a, b, state);
2589
+ }
2590
+ if (tag === URL_TAG) {
2591
+ return areUrlsEqual2(a, b, state);
2592
+ }
2593
+ if (tag === ERROR_TAG) {
2594
+ return areErrorsEqual2(a, b, state);
2595
+ }
2596
+ if (tag === ARGUMENTS_TAG) {
2597
+ return areObjectsEqual2(a, b, state);
2598
+ }
2599
+ if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
2600
+ return arePrimitiveWrappersEqual2(a, b, state);
2601
+ }
2602
+ return false;
2603
+ };
2604
+ }
2605
+ function createEqualityComparatorConfig(_a) {
2606
+ var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;
2607
+ var config = {
2608
+ areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
2609
+ areDatesEqual,
2610
+ areErrorsEqual,
2611
+ areFunctionsEqual,
2612
+ areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
2613
+ areNumbersEqual,
2614
+ areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
2615
+ arePrimitiveWrappersEqual,
2616
+ areRegExpsEqual,
2617
+ areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
2618
+ areTypedArraysEqual: strict ? areObjectsEqualStrict : areTypedArraysEqual,
2619
+ areUrlsEqual
2620
+ };
2621
+ if (createCustomConfig) {
2622
+ config = assign({}, config, createCustomConfig(config));
2623
+ }
2624
+ if (circular) {
2625
+ var areArraysEqual$1 = createIsCircular(config.areArraysEqual);
2626
+ var areMapsEqual$1 = createIsCircular(config.areMapsEqual);
2627
+ var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);
2628
+ var areSetsEqual$1 = createIsCircular(config.areSetsEqual);
2629
+ config = assign({}, config, {
2630
+ areArraysEqual: areArraysEqual$1,
2631
+ areMapsEqual: areMapsEqual$1,
2632
+ areObjectsEqual: areObjectsEqual$1,
2633
+ areSetsEqual: areSetsEqual$1
2575
2634
  });
2576
- this.orderByKey = this.orderBy.map(({
2577
- column,
2578
- ascending,
2579
- nullsFirst,
2580
- foreignTable
2581
- }) => `${foreignTable ? `${foreignTable}.` : ""}${column}:${ascending ? "asc" : "desc"}.${nullsFirst ? "nullsFirst" : "nullsLast"}`).join("|");
2582
- }
2583
- _url;
2584
- _headers;
2585
- _body;
2586
- method;
2587
- select;
2588
- queryKey;
2589
- bodyKey;
2590
- count;
2591
- schema;
2592
- table;
2593
- isHead;
2594
- limit;
2595
- offset;
2596
- orderBy = [];
2597
- orderByKey;
2598
- searchParams;
2599
- };
2635
+ }
2636
+ return config;
2637
+ }
2638
+ function createInternalEqualityComparator(compare) {
2639
+ return function(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {
2640
+ return compare(a, b, state);
2641
+ };
2642
+ }
2643
+ function createIsEqual(_a) {
2644
+ var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;
2645
+ if (createState) {
2646
+ return function isEqual(a, b) {
2647
+ var _a2 = createState(), _b = _a2.cache, cache = _b === void 0 ? circular ? /* @__PURE__ */ new WeakMap() : void 0 : _b, meta = _a2.meta;
2648
+ return comparator(a, b, {
2649
+ cache,
2650
+ equals,
2651
+ meta,
2652
+ strict
2653
+ });
2654
+ };
2655
+ }
2656
+ if (circular) {
2657
+ return function isEqual(a, b) {
2658
+ return comparator(a, b, {
2659
+ cache: /* @__PURE__ */ new WeakMap(),
2660
+ equals,
2661
+ meta: void 0,
2662
+ strict
2663
+ });
2664
+ };
2665
+ }
2666
+ var state = {
2667
+ cache: void 0,
2668
+ equals,
2669
+ meta: void 0,
2670
+ strict
2671
+ };
2672
+ return function isEqual(a, b) {
2673
+ return comparator(a, b, state);
2674
+ };
2675
+ }
2676
+ var deepEqual = createCustomEqual();
2677
+ var strictDeepEqual = createCustomEqual({ strict: true });
2678
+ var circularDeepEqual = createCustomEqual({ circular: true });
2679
+ var strictCircularDeepEqual = createCustomEqual({
2680
+ circular: true,
2681
+ strict: true
2682
+ });
2683
+ var shallowEqual = createCustomEqual({
2684
+ createInternalComparator: function() {
2685
+ return sameValueZeroEqual;
2686
+ }
2687
+ });
2688
+ var strictShallowEqual = createCustomEqual({
2689
+ strict: true,
2690
+ createInternalComparator: function() {
2691
+ return sameValueZeroEqual;
2692
+ }
2693
+ });
2694
+ var circularShallowEqual = createCustomEqual({
2695
+ circular: true,
2696
+ createInternalComparator: function() {
2697
+ return sameValueZeroEqual;
2698
+ }
2699
+ });
2700
+ var strictCircularShallowEqual = createCustomEqual({
2701
+ circular: true,
2702
+ createInternalComparator: function() {
2703
+ return sameValueZeroEqual;
2704
+ },
2705
+ strict: true
2706
+ });
2707
+ function createCustomEqual(options) {
2708
+ if (options === void 0) {
2709
+ options = {};
2710
+ }
2711
+ var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;
2712
+ var config = createEqualityComparatorConfig(options);
2713
+ var comparator = createEqualityComparator(config);
2714
+ var equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
2715
+ return createIsEqual({ circular, comparator, createState, equals, strict });
2716
+ }
2600
2717
 
2601
2718
  export {
2602
- sortSearchParams,
2603
- encodeObject,
2604
- isObject,
2605
- findLastIndex,
2606
- isNotNull,
2607
- OPERATOR_MAP,
2608
- parseSelectParam,
2609
- isISODateString,
2610
- parseValue,
2611
- SUPPORTED_OPERATORS,
2612
- PostgrestQueryParser,
2613
- PostgrestParser
2719
+ src_default,
2720
+ flatten,
2721
+ unflatten,
2722
+ deepEqual
2614
2723
  };
2615
2724
  /*! Bundled license information:
2616
2725
 
2617
2726
  xregexp/src/xregexp.js:
2618
2727
  (*!
2619
- * XRegExp 5.1.2
2728
+ * XRegExp 5.1.1
2620
2729
  * <xregexp.com>
2621
2730
  * Steven Levithan (c) 2007-present MIT License
2622
2731
  *)
2623
2732
 
2624
2733
  xregexp/src/addons/build.js:
2625
2734
  (*!
2626
- * XRegExp.build 5.1.2
2735
+ * XRegExp.build 5.1.1
2627
2736
  * <xregexp.com>
2628
2737
  * Steven Levithan (c) 2012-present MIT License
2629
2738
  *)
2630
2739
 
2631
2740
  xregexp/src/addons/matchrecursive.js:
2632
2741
  (*!
2633
- * XRegExp.matchRecursive 5.1.2
2742
+ * XRegExp.matchRecursive 5.1.1
2634
2743
  * <xregexp.com>
2635
2744
  * Steven Levithan (c) 2009-present MIT License
2636
2745
  *)
2637
2746
 
2638
2747
  xregexp/src/addons/unicode-base.js:
2639
2748
  (*!
2640
- * XRegExp Unicode Base 5.1.2
2749
+ * XRegExp Unicode Base 5.1.1
2641
2750
  * <xregexp.com>
2642
2751
  * Steven Levithan (c) 2008-present MIT License
2643
2752
  *)
2644
2753
 
2645
2754
  xregexp/src/addons/unicode-categories.js:
2646
2755
  (*!
2647
- * XRegExp Unicode Categories 5.1.2
2756
+ * XRegExp Unicode Categories 5.1.1
2648
2757
  * <xregexp.com>
2649
2758
  * Steven Levithan (c) 2010-present MIT License
2650
2759
  * Unicode data by Mathias Bynens <mathiasbynens.be>
@@ -2652,7 +2761,7 @@ xregexp/src/addons/unicode-categories.js:
2652
2761
 
2653
2762
  xregexp/src/addons/unicode-properties.js:
2654
2763
  (*!
2655
- * XRegExp Unicode Properties 5.1.2
2764
+ * XRegExp Unicode Properties 5.1.1
2656
2765
  * <xregexp.com>
2657
2766
  * Steven Levithan (c) 2012-present MIT License
2658
2767
  * Unicode data by Mathias Bynens <mathiasbynens.be>
@@ -2660,10 +2769,10 @@ xregexp/src/addons/unicode-properties.js:
2660
2769
 
2661
2770
  xregexp/src/addons/unicode-scripts.js:
2662
2771
  (*!
2663
- * XRegExp Unicode Scripts 5.1.2
2772
+ * XRegExp Unicode Scripts 5.1.1
2664
2773
  * <xregexp.com>
2665
2774
  * Steven Levithan (c) 2010-present MIT License
2666
2775
  * Unicode data by Mathias Bynens <mathiasbynens.be>
2667
2776
  *)
2668
2777
  */
2669
- //# sourceMappingURL=chunk-UJWETW36.js.map
2778
+ //# sourceMappingURL=chunk-AKIRHA4Q.js.map