@biltme/backend 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,47 +3,68 @@ var __getProtoOf = Object.getPrototypeOf;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ function __accessProp(key) {
7
+ return this[key];
8
+ }
6
9
  var __reExport = (target, mod, secondTarget) => {
7
- for (let key of __getOwnPropNames(mod))
10
+ var keys = mod && typeof mod === "object" || typeof mod === "function" ? __getOwnPropNames(mod) : [];
11
+ for (let key of keys)
8
12
  if (!__hasOwnProp.call(target, key) && key !== "default")
9
13
  __defProp(target, key, {
10
- get: () => mod[key],
14
+ get: __accessProp.bind(mod, key),
11
15
  enumerable: true
12
16
  });
13
17
  if (secondTarget) {
14
- for (let key of __getOwnPropNames(mod))
18
+ for (let key of keys)
15
19
  if (!__hasOwnProp.call(secondTarget, key) && key !== "default")
16
20
  __defProp(secondTarget, key, {
17
- get: () => mod[key],
21
+ get: __accessProp.bind(mod, key),
18
22
  enumerable: true
19
23
  });
20
24
  return secondTarget;
21
25
  }
22
26
  };
27
+ var __toESMCache_node;
28
+ var __toESMCache_esm;
23
29
  var __toESM = (mod, isNodeMode, target) => {
30
+ var canCache = mod != null && typeof mod === "object";
31
+ if (canCache) {
32
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
33
+ var cached = cache.get(mod);
34
+ if (cached)
35
+ return cached;
36
+ }
24
37
  target = mod != null ? __create(__getProtoOf(mod)) : {};
25
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
26
- for (let key of __getOwnPropNames(mod))
27
- if (!__hasOwnProp.call(to, key))
28
- __defProp(to, key, {
29
- get: () => mod[key],
30
- enumerable: true
31
- });
38
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
39
+ if (mod && typeof mod === "object" || typeof mod === "function") {
40
+ for (let key of __getOwnPropNames(mod))
41
+ if (!__hasOwnProp.call(to, key))
42
+ __defProp(to, key, {
43
+ get: __accessProp.bind(mod, key),
44
+ enumerable: true
45
+ });
46
+ }
47
+ if (canCache)
48
+ cache.set(mod, to);
32
49
  return to;
33
50
  };
34
51
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
52
+ var __returnValue = (v) => v;
53
+ function __exportSetter(name, newValue) {
54
+ this[name] = __returnValue.bind(null, newValue);
55
+ }
35
56
  var __export = (target, all) => {
36
57
  for (var name in all)
37
58
  __defProp(target, name, {
38
59
  get: all[name],
39
60
  enumerable: true,
40
61
  configurable: true,
41
- set: (newValue) => all[name] = () => newValue
62
+ set: __exportSetter.bind(all, name)
42
63
  });
43
64
  };
44
65
 
45
66
  // node_modules/tslib/tslib.js
46
- var require_tslib = __commonJS((exports, module) => {
67
+ var require_tslib = __commonJS(function(exports, module) {
47
68
  var __extends;
48
69
  var __assign;
49
70
  var __rest;
@@ -472,8 +493,8 @@ var require_tslib = __commonJS((exports, module) => {
472
493
  };
473
494
  }
474
495
  function settle(resolve, reject, d, v) {
475
- Promise.resolve(v).then(function(v2) {
476
- resolve({ value: v2, done: d });
496
+ Promise.resolve(v).then(function(v) {
497
+ resolve({ value: v, done: d });
477
498
  }, reject);
478
499
  }
479
500
  };
@@ -491,10 +512,10 @@ var require_tslib = __commonJS((exports, module) => {
491
512
  o["default"] = v;
492
513
  };
493
514
  var ownKeys = function(o) {
494
- ownKeys = Object.getOwnPropertyNames || function(o2) {
515
+ ownKeys = Object.getOwnPropertyNames || function(o) {
495
516
  var ar = [];
496
- for (var k in o2)
497
- if (Object.prototype.hasOwnProperty.call(o2, k))
517
+ for (var k in o)
518
+ if (Object.prototype.hasOwnProperty.call(o, k))
498
519
  ar[ar.length] = k;
499
520
  return ar;
500
521
  };
@@ -648,7 +669,7 @@ var require_tslib = __commonJS((exports, module) => {
648
669
  });
649
670
 
650
671
  // node_modules/@supabase/functions-js/dist/main/helper.js
651
- var require_helper = __commonJS((exports) => {
672
+ var require_helper = __commonJS(function(exports) {
652
673
  Object.defineProperty(exports, "__esModule", { value: true });
653
674
  exports.resolveFetch = undefined;
654
675
  var resolveFetch = (customFetch) => {
@@ -661,7 +682,7 @@ var require_helper = __commonJS((exports) => {
661
682
  });
662
683
 
663
684
  // node_modules/@supabase/functions-js/dist/main/types.js
664
- var require_types = __commonJS((exports) => {
685
+ var require_types = __commonJS(function(exports) {
665
686
  Object.defineProperty(exports, "__esModule", { value: true });
666
687
  exports.FunctionRegion = exports.FunctionsHttpError = exports.FunctionsRelayError = exports.FunctionsFetchError = exports.FunctionsError = undefined;
667
688
 
@@ -702,27 +723,27 @@ var require_types = __commonJS((exports) => {
702
723
  }
703
724
  exports.FunctionsHttpError = FunctionsHttpError;
704
725
  var FunctionRegion;
705
- (function(FunctionRegion2) {
706
- FunctionRegion2["Any"] = "any";
707
- FunctionRegion2["ApNortheast1"] = "ap-northeast-1";
708
- FunctionRegion2["ApNortheast2"] = "ap-northeast-2";
709
- FunctionRegion2["ApSouth1"] = "ap-south-1";
710
- FunctionRegion2["ApSoutheast1"] = "ap-southeast-1";
711
- FunctionRegion2["ApSoutheast2"] = "ap-southeast-2";
712
- FunctionRegion2["CaCentral1"] = "ca-central-1";
713
- FunctionRegion2["EuCentral1"] = "eu-central-1";
714
- FunctionRegion2["EuWest1"] = "eu-west-1";
715
- FunctionRegion2["EuWest2"] = "eu-west-2";
716
- FunctionRegion2["EuWest3"] = "eu-west-3";
717
- FunctionRegion2["SaEast1"] = "sa-east-1";
718
- FunctionRegion2["UsEast1"] = "us-east-1";
719
- FunctionRegion2["UsWest1"] = "us-west-1";
720
- FunctionRegion2["UsWest2"] = "us-west-2";
726
+ (function(FunctionRegion) {
727
+ FunctionRegion["Any"] = "any";
728
+ FunctionRegion["ApNortheast1"] = "ap-northeast-1";
729
+ FunctionRegion["ApNortheast2"] = "ap-northeast-2";
730
+ FunctionRegion["ApSouth1"] = "ap-south-1";
731
+ FunctionRegion["ApSoutheast1"] = "ap-southeast-1";
732
+ FunctionRegion["ApSoutheast2"] = "ap-southeast-2";
733
+ FunctionRegion["CaCentral1"] = "ca-central-1";
734
+ FunctionRegion["EuCentral1"] = "eu-central-1";
735
+ FunctionRegion["EuWest1"] = "eu-west-1";
736
+ FunctionRegion["EuWest2"] = "eu-west-2";
737
+ FunctionRegion["EuWest3"] = "eu-west-3";
738
+ FunctionRegion["SaEast1"] = "sa-east-1";
739
+ FunctionRegion["UsEast1"] = "us-east-1";
740
+ FunctionRegion["UsWest1"] = "us-west-1";
741
+ FunctionRegion["UsWest2"] = "us-west-2";
721
742
  })(FunctionRegion || (exports.FunctionRegion = FunctionRegion = {}));
722
743
  });
723
744
 
724
745
  // node_modules/@supabase/functions-js/dist/main/FunctionsClient.js
725
- var require_FunctionsClient = __commonJS((exports) => {
746
+ var require_FunctionsClient = __commonJS(function(exports) {
726
747
  Object.defineProperty(exports, "__esModule", { value: true });
727
748
  exports.FunctionsClient = undefined;
728
749
  var tslib_1 = require_tslib();
@@ -836,7 +857,7 @@ var require_FunctionsClient = __commonJS((exports) => {
836
857
  });
837
858
 
838
859
  // node_modules/@supabase/functions-js/dist/main/index.js
839
- var require_main = __commonJS((exports) => {
860
+ var require_main = __commonJS(function(exports) {
840
861
  Object.defineProperty(exports, "__esModule", { value: true });
841
862
  exports.FunctionRegion = exports.FunctionsRelayError = exports.FunctionsHttpError = exports.FunctionsFetchError = exports.FunctionsError = exports.FunctionsClient = undefined;
842
863
  var FunctionsClient_1 = require_FunctionsClient();
@@ -862,7 +883,7 @@ var require_main = __commonJS((exports) => {
862
883
  });
863
884
 
864
885
  // node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js
865
- var require_websocket_factory = __commonJS((exports) => {
886
+ var require_websocket_factory = __commonJS(function(exports) {
866
887
  Object.defineProperty(exports, "__esModule", { value: true });
867
888
  exports.WebSocketFactory = undefined;
868
889
 
@@ -939,14 +960,14 @@ Suggested solution: ${env.workaround}`;
939
960
  });
940
961
 
941
962
  // node_modules/@supabase/realtime-js/dist/main/lib/version.js
942
- var require_version = __commonJS((exports) => {
963
+ var require_version = __commonJS(function(exports) {
943
964
  Object.defineProperty(exports, "__esModule", { value: true });
944
965
  exports.version = undefined;
945
966
  exports.version = "2.110.7";
946
967
  });
947
968
 
948
969
  // node_modules/@supabase/realtime-js/dist/main/lib/constants.js
949
- var require_constants = __commonJS((exports) => {
970
+ var require_constants = __commonJS(function(exports) {
950
971
  Object.defineProperty(exports, "__esModule", { value: true });
951
972
  exports.CONNECTION_STATE = exports.TRANSPORTS = exports.CHANNEL_EVENTS = exports.CHANNEL_STATES = exports.SOCKET_STATES = exports.MAX_PUSH_BUFFER_SIZE = exports.WS_CLOSE_NORMAL = exports.DEFAULT_TIMEOUT = exports.VERSION = exports.DEFAULT_VSN = exports.VSN_2_0_0 = exports.VSN_1_0_0 = exports.DEFAULT_VERSION = undefined;
952
973
  var version_1 = require_version();
@@ -991,7 +1012,7 @@ var require_constants = __commonJS((exports) => {
991
1012
  });
992
1013
 
993
1014
  // node_modules/@supabase/realtime-js/dist/main/lib/serializer.js
994
- var require_serializer = __commonJS((exports) => {
1015
+ var require_serializer = __commonJS(function(exports) {
995
1016
  Object.defineProperty(exports, "__esModule", { value: true });
996
1017
 
997
1018
  class Serializer {
@@ -1143,35 +1164,35 @@ var require_serializer = __commonJS((exports) => {
1143
1164
  });
1144
1165
 
1145
1166
  // node_modules/@supabase/realtime-js/dist/main/lib/transformers.js
1146
- var require_transformers = __commonJS((exports) => {
1167
+ var require_transformers = __commonJS(function(exports) {
1147
1168
  Object.defineProperty(exports, "__esModule", { value: true });
1148
1169
  exports.httpEndpointURL = exports.toTimestampString = exports.toArray = exports.toJson = exports.toNumber = exports.toBoolean = exports.convertCell = exports.convertColumn = exports.convertChangeData = exports.PostgresTypes = undefined;
1149
1170
  var PostgresTypes;
1150
- (function(PostgresTypes2) {
1151
- PostgresTypes2["abstime"] = "abstime";
1152
- PostgresTypes2["bool"] = "bool";
1153
- PostgresTypes2["date"] = "date";
1154
- PostgresTypes2["daterange"] = "daterange";
1155
- PostgresTypes2["float4"] = "float4";
1156
- PostgresTypes2["float8"] = "float8";
1157
- PostgresTypes2["int2"] = "int2";
1158
- PostgresTypes2["int4"] = "int4";
1159
- PostgresTypes2["int4range"] = "int4range";
1160
- PostgresTypes2["int8"] = "int8";
1161
- PostgresTypes2["int8range"] = "int8range";
1162
- PostgresTypes2["json"] = "json";
1163
- PostgresTypes2["jsonb"] = "jsonb";
1164
- PostgresTypes2["money"] = "money";
1165
- PostgresTypes2["numeric"] = "numeric";
1166
- PostgresTypes2["oid"] = "oid";
1167
- PostgresTypes2["reltime"] = "reltime";
1168
- PostgresTypes2["text"] = "text";
1169
- PostgresTypes2["time"] = "time";
1170
- PostgresTypes2["timestamp"] = "timestamp";
1171
- PostgresTypes2["timestamptz"] = "timestamptz";
1172
- PostgresTypes2["timetz"] = "timetz";
1173
- PostgresTypes2["tsrange"] = "tsrange";
1174
- PostgresTypes2["tstzrange"] = "tstzrange";
1171
+ (function(PostgresTypes) {
1172
+ PostgresTypes["abstime"] = "abstime";
1173
+ PostgresTypes["bool"] = "bool";
1174
+ PostgresTypes["date"] = "date";
1175
+ PostgresTypes["daterange"] = "daterange";
1176
+ PostgresTypes["float4"] = "float4";
1177
+ PostgresTypes["float8"] = "float8";
1178
+ PostgresTypes["int2"] = "int2";
1179
+ PostgresTypes["int4"] = "int4";
1180
+ PostgresTypes["int4range"] = "int4range";
1181
+ PostgresTypes["int8"] = "int8";
1182
+ PostgresTypes["int8range"] = "int8range";
1183
+ PostgresTypes["json"] = "json";
1184
+ PostgresTypes["jsonb"] = "jsonb";
1185
+ PostgresTypes["money"] = "money";
1186
+ PostgresTypes["numeric"] = "numeric";
1187
+ PostgresTypes["oid"] = "oid";
1188
+ PostgresTypes["reltime"] = "reltime";
1189
+ PostgresTypes["text"] = "text";
1190
+ PostgresTypes["time"] = "time";
1191
+ PostgresTypes["timestamp"] = "timestamp";
1192
+ PostgresTypes["timestamptz"] = "timestamptz";
1193
+ PostgresTypes["timetz"] = "timetz";
1194
+ PostgresTypes["tsrange"] = "tsrange";
1195
+ PostgresTypes["tstzrange"] = "tstzrange";
1175
1196
  })(PostgresTypes || (exports.PostgresTypes = PostgresTypes = {}));
1176
1197
  var convertChangeData = (columns, record, options = {}) => {
1177
1198
  var _a;
@@ -1312,26 +1333,26 @@ var require_transformers = __commonJS((exports) => {
1312
1333
  });
1313
1334
 
1314
1335
  // node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js
1315
- var require_phoenix_cjs = __commonJS((exports, module) => {
1316
- var __defProp2 = Object.defineProperty;
1336
+ var require_phoenix_cjs = __commonJS(function(exports, module) {
1337
+ var __defProp = Object.defineProperty;
1317
1338
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1318
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
1319
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1320
- var __export2 = (target, all) => {
1339
+ var __getOwnPropNames = Object.getOwnPropertyNames;
1340
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
1341
+ var __export = (target, all) => {
1321
1342
  for (var name in all)
1322
- __defProp2(target, name, { get: all[name], enumerable: true });
1343
+ __defProp(target, name, { get: all[name], enumerable: true });
1323
1344
  };
1324
1345
  var __copyProps = (to, from, except, desc) => {
1325
1346
  if (from && typeof from === "object" || typeof from === "function") {
1326
- for (let key of __getOwnPropNames2(from))
1327
- if (!__hasOwnProp2.call(to, key) && key !== except)
1328
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
1347
+ for (let key of __getOwnPropNames(from))
1348
+ if (!__hasOwnProp.call(to, key) && key !== except)
1349
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
1329
1350
  }
1330
1351
  return to;
1331
1352
  };
1332
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
1353
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1333
1354
  var phoenix_exports = {};
1334
- __export2(phoenix_exports, {
1355
+ __export(phoenix_exports, {
1335
1356
  Channel: () => Channel,
1336
1357
  LongPoll: () => LongPoll,
1337
1358
  Presence: () => Presence,
@@ -2728,7 +2749,7 @@ var require_phoenix_cjs = __commonJS((exports, module) => {
2728
2749
  });
2729
2750
 
2730
2751
  // node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js
2731
- var require_presenceAdapter = __commonJS((exports) => {
2752
+ var require_presenceAdapter = __commonJS(function(exports) {
2732
2753
  Object.defineProperty(exports, "__esModule", { value: true });
2733
2754
  var phoenix_1 = require_phoenix_cjs();
2734
2755
 
@@ -2801,16 +2822,16 @@ var require_presenceAdapter = __commonJS((exports) => {
2801
2822
  });
2802
2823
 
2803
2824
  // node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js
2804
- var require_RealtimePresence = __commonJS((exports) => {
2825
+ var require_RealtimePresence = __commonJS(function(exports) {
2805
2826
  Object.defineProperty(exports, "__esModule", { value: true });
2806
2827
  exports.REALTIME_PRESENCE_LISTEN_EVENTS = undefined;
2807
2828
  var tslib_1 = require_tslib();
2808
2829
  var presenceAdapter_1 = tslib_1.__importDefault(require_presenceAdapter());
2809
2830
  var REALTIME_PRESENCE_LISTEN_EVENTS;
2810
- (function(REALTIME_PRESENCE_LISTEN_EVENTS2) {
2811
- REALTIME_PRESENCE_LISTEN_EVENTS2["SYNC"] = "sync";
2812
- REALTIME_PRESENCE_LISTEN_EVENTS2["JOIN"] = "join";
2813
- REALTIME_PRESENCE_LISTEN_EVENTS2["LEAVE"] = "leave";
2831
+ (function(REALTIME_PRESENCE_LISTEN_EVENTS) {
2832
+ REALTIME_PRESENCE_LISTEN_EVENTS["SYNC"] = "sync";
2833
+ REALTIME_PRESENCE_LISTEN_EVENTS["JOIN"] = "join";
2834
+ REALTIME_PRESENCE_LISTEN_EVENTS["LEAVE"] = "leave";
2814
2835
  })(REALTIME_PRESENCE_LISTEN_EVENTS || (exports.REALTIME_PRESENCE_LISTEN_EVENTS = REALTIME_PRESENCE_LISTEN_EVENTS = {}));
2815
2836
 
2816
2837
  class RealtimePresence {
@@ -2826,7 +2847,7 @@ var require_RealtimePresence = __commonJS((exports) => {
2826
2847
  });
2827
2848
 
2828
2849
  // node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js
2829
- var require_normalizeChannelError = __commonJS((exports) => {
2850
+ var require_normalizeChannelError = __commonJS(function(exports) {
2830
2851
  Object.defineProperty(exports, "__esModule", { value: true });
2831
2852
  exports.normalizeChannelError = normalizeChannelError;
2832
2853
  function normalizeChannelError(reason) {
@@ -2849,7 +2870,7 @@ var require_normalizeChannelError = __commonJS((exports) => {
2849
2870
  });
2850
2871
 
2851
2872
  // node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js
2852
- var require_channelAdapter = __commonJS((exports) => {
2873
+ var require_channelAdapter = __commonJS(function(exports) {
2853
2874
  Object.defineProperty(exports, "__esModule", { value: true });
2854
2875
  var constants_1 = require_constants();
2855
2876
 
@@ -2951,11 +2972,11 @@ var require_channelAdapter = __commonJS((exports) => {
2951
2972
  });
2952
2973
 
2953
2974
  // node_modules/@supabase/realtime-js/dist/main/RealtimePostgresFilterBuilder.js
2954
- var require_RealtimePostgresFilterBuilder = __commonJS((exports) => {
2975
+ var require_RealtimePostgresFilterBuilder = __commonJS(function(exports) {
2955
2976
  Object.defineProperty(exports, "__esModule", { value: true });
2956
2977
  exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = undefined;
2957
- var PostgrestReservedCharsRegexp2 = /[,()"\\]/;
2958
- var needsQuoting = (value) => PostgrestReservedCharsRegexp2.test(value) || value !== value.trim();
2978
+ var PostgrestReservedCharsRegexp = /[,()"\\]/;
2979
+ var needsQuoting = (value) => PostgrestReservedCharsRegexp.test(value) || value !== value.trim();
2959
2980
  var quote = (value) => `"${value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
2960
2981
  var serializeScalar = (value) => {
2961
2982
  const serialized = value === null ? "null" : String(value);
@@ -3041,7 +3062,7 @@ var require_RealtimePostgresFilterBuilder = __commonJS((exports) => {
3041
3062
  });
3042
3063
 
3043
3064
  // node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js
3044
- var require_RealtimeChannel = __commonJS((exports) => {
3065
+ var require_RealtimeChannel = __commonJS(function(exports) {
3045
3066
  Object.defineProperty(exports, "__esModule", { value: true });
3046
3067
  exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_LISTEN_TYPES = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = undefined;
3047
3068
  var tslib_1 = require_tslib();
@@ -3060,25 +3081,25 @@ var require_RealtimeChannel = __commonJS((exports) => {
3060
3081
  return RealtimePostgresFilterBuilder_2.postgresChangesFilter;
3061
3082
  } });
3062
3083
  var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
3063
- (function(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2) {
3064
- REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2["ALL"] = "*";
3065
- REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2["INSERT"] = "INSERT";
3066
- REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2["UPDATE"] = "UPDATE";
3067
- REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2["DELETE"] = "DELETE";
3084
+ (function(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT) {
3085
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["ALL"] = "*";
3086
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["INSERT"] = "INSERT";
3087
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["UPDATE"] = "UPDATE";
3088
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["DELETE"] = "DELETE";
3068
3089
  })(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT || (exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = {}));
3069
3090
  var REALTIME_LISTEN_TYPES;
3070
- (function(REALTIME_LISTEN_TYPES2) {
3071
- REALTIME_LISTEN_TYPES2["BROADCAST"] = "broadcast";
3072
- REALTIME_LISTEN_TYPES2["PRESENCE"] = "presence";
3073
- REALTIME_LISTEN_TYPES2["POSTGRES_CHANGES"] = "postgres_changes";
3074
- REALTIME_LISTEN_TYPES2["SYSTEM"] = "system";
3091
+ (function(REALTIME_LISTEN_TYPES) {
3092
+ REALTIME_LISTEN_TYPES["BROADCAST"] = "broadcast";
3093
+ REALTIME_LISTEN_TYPES["PRESENCE"] = "presence";
3094
+ REALTIME_LISTEN_TYPES["POSTGRES_CHANGES"] = "postgres_changes";
3095
+ REALTIME_LISTEN_TYPES["SYSTEM"] = "system";
3075
3096
  })(REALTIME_LISTEN_TYPES || (exports.REALTIME_LISTEN_TYPES = REALTIME_LISTEN_TYPES = {}));
3076
3097
  var REALTIME_SUBSCRIBE_STATES;
3077
- (function(REALTIME_SUBSCRIBE_STATES2) {
3078
- REALTIME_SUBSCRIBE_STATES2["SUBSCRIBED"] = "SUBSCRIBED";
3079
- REALTIME_SUBSCRIBE_STATES2["TIMED_OUT"] = "TIMED_OUT";
3080
- REALTIME_SUBSCRIBE_STATES2["CLOSED"] = "CLOSED";
3081
- REALTIME_SUBSCRIBE_STATES2["CHANNEL_ERROR"] = "CHANNEL_ERROR";
3098
+ (function(REALTIME_SUBSCRIBE_STATES) {
3099
+ REALTIME_SUBSCRIBE_STATES["SUBSCRIBED"] = "SUBSCRIBED";
3100
+ REALTIME_SUBSCRIBE_STATES["TIMED_OUT"] = "TIMED_OUT";
3101
+ REALTIME_SUBSCRIBE_STATES["CLOSED"] = "CLOSED";
3102
+ REALTIME_SUBSCRIBE_STATES["CHANNEL_ERROR"] = "CHANNEL_ERROR";
3082
3103
  })(REALTIME_SUBSCRIBE_STATES || (exports.REALTIME_SUBSCRIBE_STATES = REALTIME_SUBSCRIBE_STATES = {}));
3083
3104
  exports.REALTIME_CHANNEL_STATES = constants_1.CHANNEL_STATES;
3084
3105
 
@@ -3150,15 +3171,15 @@ var require_RealtimeChannel = __commonJS((exports) => {
3150
3171
  this._onClose(() => callback === null || callback === undefined ? undefined : callback(REALTIME_SUBSCRIBE_STATES.CLOSED));
3151
3172
  this.updateJoinPayload(Object.assign({ config }, accessTokenPayload));
3152
3173
  this._updateFilterMessage();
3153
- this.channelAdapter.subscribe(timeout).receive("ok", async ({ postgres_changes: postgres_changes2 }) => {
3174
+ this.channelAdapter.subscribe(timeout).receive("ok", async ({ postgres_changes }) => {
3154
3175
  if (!this.socket._isManualToken()) {
3155
3176
  this.socket.setAuth();
3156
3177
  }
3157
- if (postgres_changes2 === undefined) {
3178
+ if (postgres_changes === undefined) {
3158
3179
  callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
3159
3180
  return;
3160
3181
  }
3161
- this._updatePostgresBindings(postgres_changes2, callback);
3182
+ this._updatePostgresBindings(postgres_changes, callback);
3162
3183
  }).receive("error", (error) => {
3163
3184
  this.state = constants_1.CHANNEL_STATES.errored;
3164
3185
  const message = Object.values(error).join(", ") || "error";
@@ -3293,9 +3314,9 @@ var require_RealtimeChannel = __commonJS((exports) => {
3293
3314
  }
3294
3315
  } else {
3295
3316
  return new Promise((resolve) => {
3296
- var _a2, _b2, _c;
3317
+ var _a, _b, _c;
3297
3318
  const push = this.channelAdapter.push(args.type, args, opts.timeout || this.timeout);
3298
- if (args.type === "broadcast" && !((_c = (_b2 = (_a2 = this.params) === null || _a2 === undefined ? undefined : _a2.config) === null || _b2 === undefined ? undefined : _b2.broadcast) === null || _c === undefined ? undefined : _c.ack)) {
3319
+ if (args.type === "broadcast" && !((_c = (_b = (_a = this.params) === null || _a === undefined ? undefined : _a.config) === null || _b === undefined ? undefined : _b.broadcast) === null || _c === undefined ? undefined : _c.ack)) {
3299
3320
  resolve("ok");
3300
3321
  }
3301
3322
  push.receive("ok", () => resolve("ok"));
@@ -3356,7 +3377,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
3356
3377
  if (this._notThisChannelEvent(typeLower, ref)) {
3357
3378
  return false;
3358
3379
  }
3359
- const bind = (_a = this.bindings[typeLower]) === null || _a === undefined ? undefined : _a.find((bind2) => bind2.ref === binding.ref);
3380
+ const bind = (_a = this.bindings[typeLower]) === null || _a === undefined ? undefined : _a.find((bind) => bind.ref === binding.ref);
3360
3381
  if (!bind) {
3361
3382
  return true;
3362
3383
  }
@@ -3431,7 +3452,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
3431
3452
  });
3432
3453
 
3433
3454
  // node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js
3434
- var require_socketAdapter = __commonJS((exports) => {
3455
+ var require_socketAdapter = __commonJS(function(exports) {
3435
3456
  Object.defineProperty(exports, "__esModule", { value: true });
3436
3457
  var phoenix_1 = require_phoenix_cjs();
3437
3458
  var constants_1 = require_constants();
@@ -3544,7 +3565,7 @@ var require_socketAdapter = __commonJS((exports) => {
3544
3565
  });
3545
3566
 
3546
3567
  // node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js
3547
- var require_RealtimeClient = __commonJS((exports) => {
3568
+ var require_RealtimeClient = __commonJS(function(exports) {
3548
3569
  Object.defineProperty(exports, "__esModule", { value: true });
3549
3570
  var tslib_1 = require_tslib();
3550
3571
  var websocket_factory_1 = tslib_1.__importDefault(require_websocket_factory());
@@ -3721,9 +3742,9 @@ var require_RealtimeClient = __commonJS((exports) => {
3721
3742
  }
3722
3743
  async removeAllChannels() {
3723
3744
  const promises = this.channels.map(async (channel) => {
3724
- const result2 = await channel.unsubscribe();
3745
+ const result = await channel.unsubscribe();
3725
3746
  channel.teardown();
3726
- return result2;
3747
+ return result;
3727
3748
  });
3728
3749
  const result = await Promise.all(promises);
3729
3750
  await this.disconnect();
@@ -3997,7 +4018,7 @@ var require_RealtimeClient = __commonJS((exports) => {
3997
4018
  });
3998
4019
 
3999
4020
  // node_modules/@supabase/realtime-js/dist/main/index.js
4000
- var require_main2 = __commonJS((exports) => {
4021
+ var require_main2 = __commonJS(function(exports) {
4001
4022
  Object.defineProperty(exports, "__esModule", { value: true });
4002
4023
  exports.WebSocketFactory = exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_PRESENCE_LISTEN_EVENTS = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.REALTIME_LISTEN_TYPES = exports.postgresChangesFilter = exports.RealtimePostgresFilterBuilder = exports.RealtimeClient = exports.RealtimeChannel = exports.RealtimePresence = undefined;
4003
4024
  var tslib_1 = require_tslib();
@@ -4033,14 +4054,14 @@ var require_main2 = __commonJS((exports) => {
4033
4054
  });
4034
4055
 
4035
4056
  // node_modules/@supabase/auth-js/dist/main/lib/version.js
4036
- var require_version2 = __commonJS((exports) => {
4057
+ var require_version2 = __commonJS(function(exports) {
4037
4058
  Object.defineProperty(exports, "__esModule", { value: true });
4038
4059
  exports.version = undefined;
4039
4060
  exports.version = "2.110.7";
4040
4061
  });
4041
4062
 
4042
4063
  // node_modules/@supabase/auth-js/dist/main/lib/constants.js
4043
- var require_constants2 = __commonJS((exports) => {
4064
+ var require_constants2 = __commonJS(function(exports) {
4044
4065
  Object.defineProperty(exports, "__esModule", { value: true });
4045
4066
  exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.REFRESH_FAILURE_COOLDOWN_MS = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = undefined;
4046
4067
  var version_1 = require_version2();
@@ -4068,7 +4089,7 @@ var require_constants2 = __commonJS((exports) => {
4068
4089
  });
4069
4090
 
4070
4091
  // node_modules/@supabase/auth-js/dist/main/lib/errors.js
4071
- var require_errors = __commonJS((exports) => {
4092
+ var require_errors = __commonJS(function(exports) {
4072
4093
  Object.defineProperty(exports, "__esModule", { value: true });
4073
4094
  exports.AuthInvalidJwtError = exports.AuthWeakPasswordError = exports.AuthRefreshDiscardedError = exports.AuthRetryableFetchError = exports.AuthPKCECodeVerifierMissingError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.AuthApiError = exports.AuthError = undefined;
4074
4095
  exports.isAuthError = isAuthError;
@@ -4237,7 +4258,7 @@ var require_errors = __commonJS((exports) => {
4237
4258
  });
4238
4259
 
4239
4260
  // node_modules/@supabase/auth-js/dist/main/lib/base64url.js
4240
- var require_base64url = __commonJS((exports) => {
4261
+ var require_base64url = __commonJS(function(exports) {
4241
4262
  Object.defineProperty(exports, "__esModule", { value: true });
4242
4263
  exports.byteToBase64URL = byteToBase64URL;
4243
4264
  exports.byteFromBase64URL = byteFromBase64URL;
@@ -4425,14 +4446,14 @@ var require_base64url = __commonJS((exports) => {
4425
4446
  });
4426
4447
 
4427
4448
  // node_modules/@supabase/auth-js/dist/main/lib/helpers.js
4428
- var require_helpers = __commonJS((exports) => {
4449
+ var require_helpers = __commonJS(function(exports) {
4429
4450
  Object.defineProperty(exports, "__esModule", { value: true });
4430
4451
  exports.Deferred = exports.removeItemAsync = exports.getItemAsync = exports.setItemAsync = exports.looksLikeFetchResponse = exports.resolveFetch = exports.supportsLocalStorage = exports.isBrowser = undefined;
4431
4452
  exports.expiresAt = expiresAt;
4432
4453
  exports.generateCallbackId = generateCallbackId;
4433
4454
  exports.parseParametersFromURL = parseParametersFromURL;
4434
4455
  exports.decodeJWT = decodeJWT;
4435
- exports.sleep = sleep2;
4456
+ exports.sleep = sleep;
4436
4457
  exports.retryable = retryable;
4437
4458
  exports.generatePKCEVerifier = generatePKCEVerifier;
4438
4459
  exports.generatePKCEChallenge = generatePKCEChallenge;
@@ -4504,13 +4525,13 @@ var require_helpers = __commonJS((exports) => {
4504
4525
  });
4505
4526
  return result;
4506
4527
  }
4507
- var resolveFetch2 = (customFetch) => {
4528
+ var resolveFetch = (customFetch) => {
4508
4529
  if (customFetch) {
4509
4530
  return (...args) => customFetch(...args);
4510
4531
  }
4511
4532
  return (...args) => fetch(...args);
4512
4533
  };
4513
- exports.resolveFetch = resolveFetch2;
4534
+ exports.resolveFetch = resolveFetch;
4514
4535
  var looksLikeFetchResponse = (maybeResponse) => {
4515
4536
  return typeof maybeResponse === "object" && maybeResponse !== null && "status" in maybeResponse && "ok" in maybeResponse && "json" in maybeResponse && typeof maybeResponse.json === "function";
4516
4537
  };
@@ -4567,7 +4588,7 @@ var require_helpers = __commonJS((exports) => {
4567
4588
  };
4568
4589
  return data;
4569
4590
  }
4570
- async function sleep2(time) {
4591
+ async function sleep(time) {
4571
4592
  return await new Promise((accept) => {
4572
4593
  setTimeout(() => accept(null), time);
4573
4594
  });
@@ -4740,9 +4761,9 @@ var require_helpers = __commonJS((exports) => {
4740
4761
  });
4741
4762
 
4742
4763
  // node_modules/@supabase/auth-js/dist/main/lib/fetch.js
4743
- var require_fetch = __commonJS((exports) => {
4764
+ var require_fetch = __commonJS(function(exports) {
4744
4765
  Object.defineProperty(exports, "__esModule", { value: true });
4745
- exports.handleError = handleError2;
4766
+ exports.handleError = handleError;
4746
4767
  exports._request = _request;
4747
4768
  exports._sessionResponse = _sessionResponse;
4748
4769
  exports._sessionResponsePassword = _sessionResponsePassword;
@@ -4754,7 +4775,7 @@ var require_fetch = __commonJS((exports) => {
4754
4775
  var constants_1 = require_constants2();
4755
4776
  var helpers_1 = require_helpers();
4756
4777
  var errors_1 = require_errors();
4757
- var _getErrorMessage2 = (err) => {
4778
+ var _getErrorMessage = (err) => {
4758
4779
  if (typeof err === "object" && err !== null) {
4759
4780
  const e = err;
4760
4781
  if (typeof e.msg === "string")
@@ -4786,19 +4807,19 @@ var require_fetch = __commonJS((exports) => {
4786
4807
  529,
4787
4808
  530
4788
4809
  ];
4789
- async function handleError2(error) {
4810
+ async function handleError(error) {
4790
4811
  var _a;
4791
4812
  if (!(0, helpers_1.looksLikeFetchResponse)(error)) {
4792
- throw new errors_1.AuthRetryableFetchError(_getErrorMessage2(error), 0);
4813
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), 0);
4793
4814
  }
4794
4815
  if (NETWORK_ERROR_CODES.includes(error.status)) {
4795
- throw new errors_1.AuthRetryableFetchError(_getErrorMessage2(error), error.status);
4816
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), error.status);
4796
4817
  }
4797
4818
  let data;
4798
4819
  try {
4799
4820
  data = await error.json();
4800
4821
  } catch (e) {
4801
- throw new errors_1.AuthUnknownError(_getErrorMessage2(e), e);
4822
+ throw new errors_1.AuthUnknownError(_getErrorMessage(e), e);
4802
4823
  }
4803
4824
  let errorCode = undefined;
4804
4825
  const responseAPIVersion = (0, helpers_1.parseResponseAPIVersion)(error);
@@ -4809,16 +4830,16 @@ var require_fetch = __commonJS((exports) => {
4809
4830
  }
4810
4831
  if (!errorCode) {
4811
4832
  if (typeof data === "object" && data && typeof data.weak_password === "object" && data.weak_password && Array.isArray(data.weak_password.reasons) && data.weak_password.reasons.length && data.weak_password.reasons.reduce((a, i) => a && typeof i === "string", true)) {
4812
- throw new errors_1.AuthWeakPasswordError(_getErrorMessage2(data), error.status, data.weak_password.reasons);
4833
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, data.weak_password.reasons);
4813
4834
  }
4814
4835
  } else if (errorCode === "weak_password") {
4815
- throw new errors_1.AuthWeakPasswordError(_getErrorMessage2(data), error.status, ((_a = data.weak_password) === null || _a === undefined ? undefined : _a.reasons) || []);
4836
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, ((_a = data.weak_password) === null || _a === undefined ? undefined : _a.reasons) || []);
4816
4837
  } else if (errorCode === "session_not_found") {
4817
4838
  throw new errors_1.AuthSessionMissingError;
4818
4839
  }
4819
- throw new errors_1.AuthApiError(_getErrorMessage2(data), error.status || 500, errorCode);
4840
+ throw new errors_1.AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
4820
4841
  }
4821
- var _getRequestParams2 = (method, options, parameters, body) => {
4842
+ var _getRequestParams = (method, options, parameters, body) => {
4822
4843
  const params = { method, headers: (options === null || options === undefined ? undefined : options.headers) || {} };
4823
4844
  if (method === "GET") {
4824
4845
  return params;
@@ -4841,23 +4862,23 @@ var require_fetch = __commonJS((exports) => {
4841
4862
  qs["redirect_to"] = options.redirectTo;
4842
4863
  }
4843
4864
  const queryString = Object.keys(qs).length ? "?" + new URLSearchParams(qs).toString() : "";
4844
- const data = await _handleRequest2(fetcher, method, url + queryString, {
4865
+ const data = await _handleRequest(fetcher, method, url + queryString, {
4845
4866
  headers,
4846
4867
  noResolveJson: options === null || options === undefined ? undefined : options.noResolveJson
4847
4868
  }, {}, options === null || options === undefined ? undefined : options.body);
4848
4869
  return (options === null || options === undefined ? undefined : options.xform) ? options === null || options === undefined ? undefined : options.xform(data) : { data: Object.assign({}, data), error: null };
4849
4870
  }
4850
- async function _handleRequest2(fetcher, method, url, options, parameters, body) {
4851
- const requestParams = _getRequestParams2(method, options, parameters, body);
4871
+ async function _handleRequest(fetcher, method, url, options, parameters, body) {
4872
+ const requestParams = _getRequestParams(method, options, parameters, body);
4852
4873
  let result;
4853
4874
  try {
4854
4875
  result = await fetcher(url, Object.assign({}, requestParams));
4855
4876
  } catch (e) {
4856
4877
  console.error(e);
4857
- throw new errors_1.AuthRetryableFetchError(_getErrorMessage2(e), 0);
4878
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(e), 0);
4858
4879
  }
4859
4880
  if (!result.ok) {
4860
- await handleError2(result);
4881
+ await handleError(result);
4861
4882
  }
4862
4883
  if (options === null || options === undefined ? undefined : options.noResolveJson) {
4863
4884
  return result;
@@ -4865,7 +4886,7 @@ var require_fetch = __commonJS((exports) => {
4865
4886
  try {
4866
4887
  return await result.json();
4867
4888
  } catch (e) {
4868
- await handleError2(e);
4889
+ await handleError(e);
4869
4890
  }
4870
4891
  }
4871
4892
  function _sessionResponse(data) {
@@ -4922,14 +4943,14 @@ var require_fetch = __commonJS((exports) => {
4922
4943
  });
4923
4944
 
4924
4945
  // node_modules/@supabase/auth-js/dist/main/lib/types.js
4925
- var require_types2 = __commonJS((exports) => {
4946
+ var require_types2 = __commonJS(function(exports) {
4926
4947
  Object.defineProperty(exports, "__esModule", { value: true });
4927
4948
  exports.SIGN_OUT_SCOPES = undefined;
4928
4949
  exports.SIGN_OUT_SCOPES = ["global", "local", "others"];
4929
4950
  });
4930
4951
 
4931
4952
  // node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
4932
- var require_GoTrueAdminApi = __commonJS((exports) => {
4953
+ var require_GoTrueAdminApi = __commonJS(function(exports) {
4933
4954
  Object.defineProperty(exports, "__esModule", { value: true });
4934
4955
  var tslib_1 = require_tslib();
4935
4956
  var fetch_1 = require_fetch();
@@ -5376,7 +5397,7 @@ var require_GoTrueAdminApi = __commonJS((exports) => {
5376
5397
  });
5377
5398
 
5378
5399
  // node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
5379
- var require_local_storage = __commonJS((exports) => {
5400
+ var require_local_storage = __commonJS(function(exports) {
5380
5401
  Object.defineProperty(exports, "__esModule", { value: true });
5381
5402
  exports.memoryLocalStorageAdapter = memoryLocalStorageAdapter;
5382
5403
  function memoryLocalStorageAdapter(store = {}) {
@@ -5395,7 +5416,7 @@ var require_local_storage = __commonJS((exports) => {
5395
5416
  });
5396
5417
 
5397
5418
  // node_modules/@supabase/auth-js/dist/main/lib/locks.js
5398
- var require_locks = __commonJS((exports) => {
5419
+ var require_locks = __commonJS(function(exports) {
5399
5420
  Object.defineProperty(exports, "__esModule", { value: true });
5400
5421
  exports.ProcessLockAcquireTimeoutError = exports.NavigatorLockAcquireTimeoutError = exports.LockAcquireTimeoutError = exports.internals = undefined;
5401
5422
  exports.navigatorLock = navigatorLock;
@@ -5569,7 +5590,7 @@ var require_locks = __commonJS((exports) => {
5569
5590
  });
5570
5591
 
5571
5592
  // node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
5572
- var require_polyfills = __commonJS((exports) => {
5593
+ var require_polyfills = __commonJS(function(exports) {
5573
5594
  Object.defineProperty(exports, "__esModule", { value: true });
5574
5595
  exports.polyfillGlobalThis = polyfillGlobalThis;
5575
5596
  function polyfillGlobalThis() {
@@ -5593,7 +5614,7 @@ var require_polyfills = __commonJS((exports) => {
5593
5614
  });
5594
5615
 
5595
5616
  // node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js
5596
- var require_ethereum = __commonJS((exports) => {
5617
+ var require_ethereum = __commonJS(function(exports) {
5597
5618
  Object.defineProperty(exports, "__esModule", { value: true });
5598
5619
  exports.getAddress = getAddress;
5599
5620
  exports.fromHex = fromHex;
@@ -5615,7 +5636,7 @@ var require_ethereum = __commonJS((exports) => {
5615
5636
  }
5616
5637
  function createSiweMessage(parameters) {
5617
5638
  var _a;
5618
- const { chainId, domain, expirationTime, issuedAt = new Date, nonce, notBefore, requestId, resources, scheme, uri, version: version2 } = parameters;
5639
+ const { chainId, domain, expirationTime, issuedAt = new Date, nonce, notBefore, requestId, resources, scheme, uri, version } = parameters;
5619
5640
  {
5620
5641
  if (!Number.isInteger(chainId))
5621
5642
  throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${chainId}`);
@@ -5625,8 +5646,8 @@ var require_ethereum = __commonJS((exports) => {
5625
5646
  throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${nonce}`);
5626
5647
  if (!uri)
5627
5648
  throw new Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);
5628
- if (version2 !== "1")
5629
- throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${version2}`);
5649
+ if (version !== "1")
5650
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${version}`);
5630
5651
  if ((_a = parameters.statement) === null || _a === undefined ? undefined : _a.includes(`
5631
5652
  `))
5632
5653
  throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${parameters.statement}`);
@@ -5640,7 +5661,7 @@ ${address}
5640
5661
 
5641
5662
  ${statement}`;
5642
5663
  let suffix = `URI: ${uri}
5643
- Version: ${version2}
5664
+ Version: ${version}
5644
5665
  Chain ID: ${chainId}${nonce ? `
5645
5666
  Nonce: ${nonce}` : ""}
5646
5667
  Issued At: ${issuedAt.toISOString()}`;
@@ -5670,7 +5691,7 @@ ${suffix}`;
5670
5691
  });
5671
5692
 
5672
5693
  // node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js
5673
- var require_webauthn_errors = __commonJS((exports) => {
5694
+ var require_webauthn_errors = __commonJS(function(exports) {
5674
5695
  Object.defineProperty(exports, "__esModule", { value: true });
5675
5696
  exports.WebAuthnUnknownError = exports.WebAuthnError = undefined;
5676
5697
  exports.isWebAuthnError = isWebAuthnError;
@@ -5857,7 +5878,7 @@ var require_webauthn_errors = __commonJS((exports) => {
5857
5878
  });
5858
5879
 
5859
5880
  // node_modules/@supabase/auth-js/dist/main/lib/webauthn.js
5860
- var require_webauthn = __commonJS((exports) => {
5881
+ var require_webauthn = __commonJS(function(exports) {
5861
5882
  Object.defineProperty(exports, "__esModule", { value: true });
5862
5883
  exports.WebAuthnApi = exports.DEFAULT_REQUEST_OPTIONS = exports.DEFAULT_CREATION_OPTIONS = exports.webAuthnAbortService = exports.WebAuthnAbortService = exports.identifyAuthenticationError = exports.identifyRegistrationError = exports.isWebAuthnError = exports.WebAuthnError = undefined;
5863
5884
  exports.deserializeCredentialCreationOptions = deserializeCredentialCreationOptions;
@@ -6272,7 +6293,7 @@ var require_webauthn = __commonJS((exports) => {
6272
6293
  await this.client.mfa.listFactors().then((factors) => {
6273
6294
  var _a;
6274
6295
  return (_a = factors.data) === null || _a === undefined ? undefined : _a.all.find((v) => v.factor_type === "webauthn" && v.friendly_name === friendlyName && v.status !== "unverified");
6275
- }).then((factor2) => factor2 ? this.client.mfa.unenroll({ factorId: factor2 === null || factor2 === undefined ? undefined : factor2.id }) : undefined);
6296
+ }).then((factor) => factor ? this.client.mfa.unenroll({ factorId: factor === null || factor === undefined ? undefined : factor.id }) : undefined);
6276
6297
  return { data: null, error: enrollError };
6277
6298
  }
6278
6299
  const { data: challengeResponse, error: challengeError } = await this._challenge({
@@ -6311,7 +6332,7 @@ var require_webauthn = __commonJS((exports) => {
6311
6332
  });
6312
6333
 
6313
6334
  // node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
6314
- var require_GoTrueClient = __commonJS((exports) => {
6335
+ var require_GoTrueClient = __commonJS(function(exports) {
6315
6336
  Object.defineProperty(exports, "__esModule", { value: true });
6316
6337
  var tslib_1 = require_tslib();
6317
6338
  var GoTrueAdminApi_1 = tslib_1.__importDefault(require_GoTrueAdminApi());
@@ -7493,9 +7514,9 @@ var require_GoTrueClient = __commonJS((exports) => {
7493
7514
  return await this._useSession(async (result) => {
7494
7515
  var _a;
7495
7516
  if (!currentSession) {
7496
- const { data, error: error2 } = result;
7497
- if (error2) {
7498
- throw error2;
7517
+ const { data, error } = result;
7518
+ if (error) {
7519
+ throw error;
7499
7520
  }
7500
7521
  currentSession = (_a = data.session) !== null && _a !== undefined ? _a : undefined;
7501
7522
  }
@@ -7546,14 +7567,14 @@ var require_GoTrueClient = __commonJS((exports) => {
7546
7567
  this._debug("#_initialize()", "begin", "is PKCE flow", true);
7547
7568
  if (!params.code)
7548
7569
  throw new errors_1.AuthPKCEGrantCodeExchangeError("No code detected.");
7549
- const { data: data2, error: error2 } = await this._exchangeCodeForSession(params.code);
7550
- if (error2)
7551
- throw error2;
7570
+ const { data, error } = await this._exchangeCodeForSession(params.code);
7571
+ if (error)
7572
+ throw error;
7552
7573
  const url = new URL(window.location.href);
7553
7574
  url.searchParams.delete("code");
7554
7575
  window.history.replaceState(window.history.state, "", url.toString());
7555
7576
  return {
7556
- data: { session: data2.session, redirectType: (_a = data2.redirectType) !== null && _a !== undefined ? _a : null },
7577
+ data: { session: data.session, redirectType: (_a = data.redirectType) !== null && _a !== undefined ? _a : null },
7557
7578
  error: null
7558
7579
  };
7559
7580
  }
@@ -7741,19 +7762,19 @@ var require_GoTrueClient = __commonJS((exports) => {
7741
7762
  var _a;
7742
7763
  try {
7743
7764
  const { data, error } = await this._useSession(async (result) => {
7744
- var _a2, _b, _c, _d, _f;
7745
- const { data: data2, error: error2 } = result;
7746
- if (error2)
7747
- throw error2;
7765
+ var _a, _b, _c, _d, _f;
7766
+ const { data, error } = result;
7767
+ if (error)
7768
+ throw error;
7748
7769
  const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
7749
- redirectTo: (_a2 = credentials.options) === null || _a2 === undefined ? undefined : _a2.redirectTo,
7770
+ redirectTo: (_a = credentials.options) === null || _a === undefined ? undefined : _a.redirectTo,
7750
7771
  scopes: (_b = credentials.options) === null || _b === undefined ? undefined : _b.scopes,
7751
7772
  queryParams: (_c = credentials.options) === null || _c === undefined ? undefined : _c.queryParams,
7752
7773
  skipBrowserRedirect: true
7753
7774
  });
7754
7775
  return await (0, fetch_1._request)(this.fetch, "GET", url, {
7755
7776
  headers: this.headers,
7756
- jwt: (_f = (_d = data2.session) === null || _d === undefined ? undefined : _d.access_token) !== null && _f !== undefined ? _f : undefined
7777
+ jwt: (_f = (_d = data.session) === null || _d === undefined ? undefined : _d.access_token) !== null && _f !== undefined ? _f : undefined
7757
7778
  });
7758
7779
  });
7759
7780
  if (error)
@@ -7853,7 +7874,7 @@ var require_GoTrueClient = __commonJS((exports) => {
7853
7874
  });
7854
7875
  }, (attempt, error) => {
7855
7876
  const nextBackOffInterval = 200 * Math.pow(2, attempt);
7856
- return error && (0, errors_1.isAuthRetryableFetchError)(error) && Date.now() + nextBackOffInterval - startedAt < constants_1.AUTO_REFRESH_TICK_DURATION_MS;
7877
+ return error && (0, errors_1.isAuthRetryableFetchError)(error) && Date.now() + nextBackOffInterval - startedAt < (this.refreshRetryWindowMs ?? constants_1.AUTO_REFRESH_TICK_DURATION_MS);
7857
7878
  });
7858
7879
  } catch (error) {
7859
7880
  this._debug(debugName, "error", error);
@@ -8472,22 +8493,22 @@ var require_GoTrueClient = __commonJS((exports) => {
8472
8493
  var _a, _b, _c, _d;
8473
8494
  if (jwt) {
8474
8495
  try {
8475
- const { payload: payload2 } = (0, helpers_1.decodeJWT)(jwt);
8476
- let currentLevel2 = null;
8477
- if (payload2.aal) {
8478
- currentLevel2 = payload2.aal;
8496
+ const { payload } = (0, helpers_1.decodeJWT)(jwt);
8497
+ let currentLevel = null;
8498
+ if (payload.aal) {
8499
+ currentLevel = payload.aal;
8479
8500
  }
8480
- let nextLevel2 = currentLevel2;
8501
+ let nextLevel = currentLevel;
8481
8502
  const { data: { user }, error: userError } = await this.getUser(jwt);
8482
8503
  if (userError) {
8483
8504
  return this._returnResult({ data: null, error: userError });
8484
8505
  }
8485
- const verifiedFactors2 = (_b = (_a = user === null || user === undefined ? undefined : user.factors) === null || _a === undefined ? undefined : _a.filter((factor) => factor.status === "verified")) !== null && _b !== undefined ? _b : [];
8486
- if (verifiedFactors2.length > 0) {
8487
- nextLevel2 = "aal2";
8506
+ const verifiedFactors = (_b = (_a = user === null || user === undefined ? undefined : user.factors) === null || _a === undefined ? undefined : _a.filter((factor) => factor.status === "verified")) !== null && _b !== undefined ? _b : [];
8507
+ if (verifiedFactors.length > 0) {
8508
+ nextLevel = "aal2";
8488
8509
  }
8489
- const currentAuthenticationMethods2 = payload2.amr || [];
8490
- return { data: { currentLevel: currentLevel2, nextLevel: nextLevel2, currentAuthenticationMethods: currentAuthenticationMethods2 }, error: null };
8510
+ const currentAuthenticationMethods = payload.amr || [];
8511
+ return { data: { currentLevel, nextLevel, currentAuthenticationMethods }, error: null };
8491
8512
  } catch (error) {
8492
8513
  if ((0, errors_1.isAuthError)(error)) {
8493
8514
  return this._returnResult({ data: null, error });
@@ -8930,7 +8951,7 @@ var require_GoTrueClient = __commonJS((exports) => {
8930
8951
  const { data, error } = await (0, fetch_1._request)(this.fetch, "GET", `${this.url}/passkeys`, {
8931
8952
  headers: this.headers,
8932
8953
  jwt: session.access_token,
8933
- xform: (data2) => ({ data: data2, error: null })
8954
+ xform: (data) => ({ data, error: null })
8934
8955
  });
8935
8956
  if (error) {
8936
8957
  return this._returnResult({ data: null, error });
@@ -9006,7 +9027,7 @@ var require_GoTrueClient = __commonJS((exports) => {
9006
9027
  });
9007
9028
 
9008
9029
  // node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
9009
- var require_AuthAdminApi = __commonJS((exports) => {
9030
+ var require_AuthAdminApi = __commonJS(function(exports) {
9010
9031
  Object.defineProperty(exports, "__esModule", { value: true });
9011
9032
  var tslib_1 = require_tslib();
9012
9033
  var GoTrueAdminApi_1 = tslib_1.__importDefault(require_GoTrueAdminApi());
@@ -9015,7 +9036,7 @@ var require_AuthAdminApi = __commonJS((exports) => {
9015
9036
  });
9016
9037
 
9017
9038
  // node_modules/@supabase/auth-js/dist/main/AuthClient.js
9018
- var require_AuthClient = __commonJS((exports) => {
9039
+ var require_AuthClient = __commonJS(function(exports) {
9019
9040
  Object.defineProperty(exports, "__esModule", { value: true });
9020
9041
  var tslib_1 = require_tslib();
9021
9042
  var GoTrueClient_1 = tslib_1.__importDefault(require_GoTrueClient());
@@ -9024,7 +9045,7 @@ var require_AuthClient = __commonJS((exports) => {
9024
9045
  });
9025
9046
 
9026
9047
  // node_modules/@supabase/auth-js/dist/main/index.js
9027
- var require_main3 = __commonJS((exports) => {
9048
+ var require_main3 = __commonJS(function(exports) {
9028
9049
  Object.defineProperty(exports, "__esModule", { value: true });
9029
9050
  exports.processLock = exports.lockInternals = exports.NavigatorLockAcquireTimeoutError = exports.navigatorLock = exports.AuthClient = exports.AuthAdminApi = exports.GoTrueClient = exports.GoTrueAdminApi = undefined;
9030
9051
  var tslib_1 = require_tslib();
@@ -9056,29 +9077,32 @@ var require_main3 = __commonJS((exports) => {
9056
9077
  // node_modules/@supabase/supabase-js/dist/index.mjs
9057
9078
  var exports_dist3 = {};
9058
9079
  __export(exports_dist3, {
9059
- createClient: () => createClient,
9060
- SupabaseClient: () => SupabaseClient,
9061
- StorageApiError: () => StorageApiError,
9062
- PostgrestError: () => PostgrestError,
9063
- FunctionsRelayError: () => import_functions_js.FunctionsRelayError,
9064
- FunctionsHttpError: () => import_functions_js.FunctionsHttpError,
9080
+ FunctionRegion: () => import_functions_js.FunctionRegion,
9065
9081
  FunctionsFetchError: () => import_functions_js.FunctionsFetchError,
9066
- FunctionsError: () => import_functions_js.FunctionsError,
9067
- FunctionRegion: () => import_functions_js.FunctionRegion
9082
+ FunctionsHttpError: () => import_functions_js.FunctionsHttpError,
9083
+ FunctionsRelayError: () => import_functions_js.FunctionsRelayError,
9084
+ StorageApiError: () => StorageApiError,
9085
+ createClient: () => createClient
9068
9086
  });
9069
- var import_functions_js = __toESM(require_main(), 1);
9070
9087
 
9071
9088
  // node_modules/@supabase/postgrest-js/dist/index.mjs
9072
9089
  var exports_dist = {};
9073
9090
  __export(exports_dist, {
9074
- default: () => src_default,
9075
- PostgrestTransformBuilder: () => PostgrestTransformBuilder,
9076
- PostgrestQueryBuilder: () => PostgrestQueryBuilder,
9077
- PostgrestFilterBuilder: () => PostgrestFilterBuilder,
9078
- PostgrestError: () => PostgrestError,
9079
9091
  PostgrestClient: () => PostgrestClient,
9080
- PostgrestBuilder: () => PostgrestBuilder
9092
+ PostgrestError: () => PostgrestError
9093
+ });
9094
+
9095
+ // node_modules/@supabase/storage-js/dist/index.mjs
9096
+ var exports_dist2 = {};
9097
+ __export(exports_dist2, {
9098
+ StorageApiError: () => StorageApiError,
9099
+ StorageClient: () => StorageClient
9081
9100
  });
9101
+
9102
+ // node_modules/@supabase/supabase-js/dist/index.mjs
9103
+ var import_functions_js = __toESM(require_main(), 1);
9104
+
9105
+ // node_modules/@supabase/postgrest-js/dist/index.mjs
9082
9106
  var DEFAULT_MAX_RETRIES = 3;
9083
9107
  var getRetryDelay = (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30000);
9084
9108
  var RETRYABLE_STATUS_CODES = [520, 503];
@@ -9890,40 +9914,10 @@ var PostgrestClient = class PostgrestClient2 {
9890
9914
  });
9891
9915
  }
9892
9916
  };
9893
- var src_default = {
9894
- PostgrestClient,
9895
- PostgrestQueryBuilder,
9896
- PostgrestFilterBuilder,
9897
- PostgrestTransformBuilder,
9898
- PostgrestBuilder,
9899
- PostgrestError
9900
- };
9901
9917
 
9902
9918
  // node_modules/@supabase/supabase-js/dist/index.mjs
9903
9919
  var import_realtime_js = __toESM(require_main2(), 1);
9904
9920
 
9905
- // node_modules/@supabase/storage-js/dist/index.mjs
9906
- var exports_dist2 = {};
9907
- __export(exports_dist2, {
9908
- isStorageVectorsError: () => isStorageVectorsError,
9909
- isStorageError: () => isStorageError,
9910
- VectorIndexScope: () => VectorIndexScope,
9911
- VectorIndexApi: () => VectorIndexApi,
9912
- VectorDataApi: () => VectorDataApi,
9913
- VectorBucketScope: () => VectorBucketScope,
9914
- VectorBucketApi: () => VectorBucketApi,
9915
- StorageVectorsUnknownError: () => StorageVectorsUnknownError,
9916
- StorageVectorsErrorCode: () => StorageVectorsErrorCode,
9917
- StorageVectorsError: () => StorageVectorsError,
9918
- StorageVectorsClient: () => StorageVectorsClient,
9919
- StorageVectorsApiError: () => StorageVectorsApiError,
9920
- StorageUnknownError: () => StorageUnknownError,
9921
- StorageError: () => StorageError,
9922
- StorageClient: () => StorageClient,
9923
- StorageApiError: () => StorageApiError,
9924
- StorageAnalyticsClient: () => StorageAnalyticsClient
9925
- });
9926
-
9927
9921
  // node_modules/iceberg-js/dist/index.mjs
9928
9922
  var IcebergError = class extends Error {
9929
9923
  constructor(message, opts) {
@@ -10317,33 +10311,6 @@ var StorageUnknownError = class extends StorageError {
10317
10311
  this.originalError = originalError;
10318
10312
  }
10319
10313
  };
10320
- var StorageVectorsError = class extends StorageError {
10321
- constructor(message) {
10322
- super(message, "vectors");
10323
- }
10324
- };
10325
- function isStorageVectorsError(error) {
10326
- return isStorageError(error) && error["namespace"] === "vectors";
10327
- }
10328
- var StorageVectorsApiError = class extends StorageApiError {
10329
- constructor(message, status, statusCode) {
10330
- super(message, status, statusCode, "vectors");
10331
- }
10332
- };
10333
- var StorageVectorsUnknownError = class extends StorageUnknownError {
10334
- constructor(message, originalError) {
10335
- super(message, originalError, "vectors");
10336
- }
10337
- };
10338
- var StorageVectorsErrorCode = /* @__PURE__ */ function(StorageVectorsErrorCode$1) {
10339
- StorageVectorsErrorCode$1["InternalError"] = "InternalError";
10340
- StorageVectorsErrorCode$1["S3VectorConflictException"] = "S3VectorConflictException";
10341
- StorageVectorsErrorCode$1["S3VectorNotFoundException"] = "S3VectorNotFoundException";
10342
- StorageVectorsErrorCode$1["S3VectorBucketNotEmpty"] = "S3VectorBucketNotEmpty";
10343
- StorageVectorsErrorCode$1["S3VectorMaxBucketsExceeded"] = "S3VectorMaxBucketsExceeded";
10344
- StorageVectorsErrorCode$1["S3VectorMaxIndexesExceeded"] = "S3VectorMaxIndexesExceeded";
10345
- return StorageVectorsErrorCode$1;
10346
- }({});
10347
10314
  function setHeader(headers, name, value) {
10348
10315
  const result = _objectSpread22({}, headers);
10349
10316
  const nameLower = name.toLowerCase();
@@ -11865,10 +11832,56 @@ function blockRealtime(client) {
11865
11832
  client.realtime.connect = notSupported;
11866
11833
  }
11867
11834
 
11868
- // src/uploads.ts
11835
+ // src/platform.ts
11869
11836
  function isReactNative() {
11870
11837
  return typeof navigator !== "undefined" && navigator.product === "ReactNative";
11871
11838
  }
11839
+
11840
+ // src/refresh.ts
11841
+ var DEFAULT_REFRESH_RETRY_WINDOW_MS = 1e4;
11842
+ function refreshRetryWindow(options) {
11843
+ const windowMs = options?.refreshRetryWindowMs ?? DEFAULT_REFRESH_RETRY_WINDOW_MS;
11844
+ if (!Number.isFinite(windowMs) || windowMs < 0) {
11845
+ throw new Error(`auth.refreshRetryWindowMs must be a finite number of milliseconds, 0 or more. Got: ${windowMs}`);
11846
+ }
11847
+ return windowMs;
11848
+ }
11849
+ function setRefreshRetryWindow(auth, windowMs) {
11850
+ Object.assign(auth, { refreshRetryWindowMs: windowMs });
11851
+ }
11852
+ async function loadNetwork() {
11853
+ try {
11854
+ return await import("expo-network");
11855
+ } catch {
11856
+ return;
11857
+ }
11858
+ }
11859
+ async function pauseRefreshWhileOffline(auth, options, load = loadNetwork) {
11860
+ if (!isReactNative() || options?.autoRefreshToken === false || options?.skipAutoInitialize)
11861
+ return;
11862
+ const network = await load();
11863
+ if (!network)
11864
+ return;
11865
+ await auth.initialize();
11866
+ let offline = false;
11867
+ let heard = false;
11868
+ const apply = (state) => {
11869
+ const now = state.isConnected === false || state.isInternetReachable === false;
11870
+ if (now === offline)
11871
+ return;
11872
+ offline = now;
11873
+ now ? auth.stopAutoRefresh() : auth.startAutoRefresh();
11874
+ };
11875
+ network.addNetworkStateListener((state) => {
11876
+ heard = true;
11877
+ apply(state);
11878
+ });
11879
+ const initial = await network.getNetworkStateAsync();
11880
+ if (!heard)
11881
+ apply(initial);
11882
+ }
11883
+
11884
+ // src/uploads.ts
11872
11885
  function readBytes(blob) {
11873
11886
  if (typeof FileReader === "undefined")
11874
11887
  return blob.arrayBuffer();
@@ -11982,26 +11995,32 @@ function assertCredentials(url, key) {
11982
11995
  }
11983
11996
  var createClient2 = (url, key, options) => {
11984
11997
  assertCredentials(url, key);
11998
+ const auth = options?.auth;
11999
+ const windowMs = refreshRetryWindow(auth);
11985
12000
  const client = createClient(url, key, options);
12001
+ setRefreshRetryWindow(client.auth, windowMs);
12002
+ pauseRefreshWhileOffline(client.auth, auth).catch(() => {
12003
+ return;
12004
+ });
11986
12005
  sendNativeBlobsAsBytes(client);
11987
12006
  blockRealtime(client);
11988
12007
  return Object.assign(client, { notifications: notifications(client, url, key, options) });
11989
12008
  };
11990
- var export_FunctionsRelayError = import_functions_js.FunctionsRelayError;
11991
- var export_FunctionsHttpError = import_functions_js.FunctionsHttpError;
11992
- var export_FunctionsFetchError = import_functions_js.FunctionsFetchError;
11993
12009
  var export_FunctionRegion = import_functions_js.FunctionRegion;
12010
+ var export_FunctionsFetchError = import_functions_js.FunctionsFetchError;
12011
+ var export_FunctionsHttpError = import_functions_js.FunctionsHttpError;
12012
+ var export_FunctionsRelayError = import_functions_js.FunctionsRelayError;
11994
12013
 
11995
12014
  export {
11996
- webStorage,
11997
- memoryStorage,
11998
- createClient2 as createClient,
11999
- asyncStorage,
12000
- StorageApiError,
12001
- REALTIME_NOT_SUPPORTED,
12002
- NotificationsError,
12003
- export_FunctionsRelayError as FunctionsRelayError,
12004
- export_FunctionsHttpError as FunctionsHttpError,
12015
+ export_FunctionRegion as FunctionRegion,
12005
12016
  export_FunctionsFetchError as FunctionsFetchError,
12006
- export_FunctionRegion as FunctionRegion
12017
+ export_FunctionsHttpError as FunctionsHttpError,
12018
+ export_FunctionsRelayError as FunctionsRelayError,
12019
+ NotificationsError,
12020
+ REALTIME_NOT_SUPPORTED,
12021
+ StorageApiError,
12022
+ asyncStorage,
12023
+ createClient2 as createClient,
12024
+ memoryStorage,
12025
+ webStorage
12007
12026
  };