@strapi/plugin-users-permissions 0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c → 0.0.0-next.f09127d8df0234ad0b771b931b044b7c2e09c686

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 (40) hide show
  1. package/admin/src/components/Permissions/PermissionRow/SubCategory.jsx +1 -1
  2. package/admin/src/pages/EmailTemplates/components/EmailTable.jsx +2 -2
  3. package/admin/src/pages/Roles/pages/EditPage.jsx +1 -1
  4. package/admin/src/pages/Roles/pages/ListPage/components/TableBody.jsx +1 -1
  5. package/dist/_chunks/{index-CoScqJGB.js → index-BP1KkpZq.js} +3 -4
  6. package/dist/_chunks/{index-CoScqJGB.js.map → index-BP1KkpZq.js.map} +1 -1
  7. package/dist/_chunks/{index-BbN-IN0z.js → index-BnvtBuUS.js} +7 -8
  8. package/dist/_chunks/index-BnvtBuUS.js.map +1 -0
  9. package/dist/_chunks/{index--y8LTL2j.js → index-BphRo4l2.js} +22 -15
  10. package/dist/_chunks/{index--y8LTL2j.js.map → index-BphRo4l2.js.map} +1 -1
  11. package/dist/_chunks/{index-B7cPaHEP.mjs → index-C_5QiATG.mjs} +5 -5
  12. package/dist/_chunks/index-C_5QiATG.mjs.map +1 -0
  13. package/dist/_chunks/{index-C02D7oHu-fMZ4nmrb.js → index-Cn5HftCc-CvJvlZwK.js} +251 -1146
  14. package/dist/_chunks/index-Cn5HftCc-CvJvlZwK.js.map +1 -0
  15. package/dist/_chunks/{index-C02D7oHu-C1E7ADbJ.mjs → index-Cn5HftCc-Dku5eOkP.mjs} +250 -1144
  16. package/dist/_chunks/index-Cn5HftCc-Dku5eOkP.mjs.map +1 -0
  17. package/dist/_chunks/{index-BXqaoYHz.mjs → index-Cxhs260c.mjs} +5 -5
  18. package/dist/_chunks/index-Cxhs260c.mjs.map +1 -0
  19. package/dist/_chunks/{index-ty5-lJ4i.mjs → index-D4Ge_-Bp.mjs} +2 -2
  20. package/dist/_chunks/{index-ty5-lJ4i.mjs.map → index-D4Ge_-Bp.mjs.map} +1 -1
  21. package/dist/_chunks/{index-DsXSu1tx.mjs → index-D5yExFYc.mjs} +22 -15
  22. package/dist/_chunks/{index-DsXSu1tx.mjs.map → index-D5yExFYc.mjs.map} +1 -1
  23. package/dist/_chunks/{index-lmfzYgX7.mjs → index-D_J3MMcj.mjs} +3 -3
  24. package/dist/_chunks/{index-lmfzYgX7.mjs.map → index-D_J3MMcj.mjs.map} +1 -1
  25. package/dist/_chunks/{index-DL_kyirw.js → index-DoogNdMf.js} +8 -9
  26. package/dist/_chunks/{index-DL_kyirw.js.map → index-DoogNdMf.js.map} +1 -1
  27. package/dist/_chunks/{index-BVnfu10n.js → index-iJPHXbGD.js} +6 -7
  28. package/dist/_chunks/index-iJPHXbGD.js.map +1 -0
  29. package/dist/admin/index.js +1 -1
  30. package/dist/admin/index.mjs +1 -1
  31. package/package.json +8 -8
  32. package/server/graphql/types/index.js +1 -0
  33. package/server/graphql/types/me.js +1 -0
  34. package/server/graphql/types/user-input.js +20 -0
  35. package/dist/_chunks/index-B7cPaHEP.mjs.map +0 -1
  36. package/dist/_chunks/index-BVnfu10n.js.map +0 -1
  37. package/dist/_chunks/index-BXqaoYHz.mjs.map +0 -1
  38. package/dist/_chunks/index-BbN-IN0z.js.map +0 -1
  39. package/dist/_chunks/index-C02D7oHu-C1E7ADbJ.mjs.map +0 -1
  40. package/dist/_chunks/index-C02D7oHu-fMZ4nmrb.js.map +0 -1
@@ -10,6 +10,7 @@ const React = require("react");
10
10
  const reactIntl = require("react-intl");
11
11
  const icons = require("@strapi/icons");
12
12
  require("@strapi/icons/symbols");
13
+ require("lodash/trimEnd");
13
14
  const createNextState2 = require("immer");
14
15
  const reactRedux = require("react-redux");
15
16
  const pipe = require("lodash/fp/pipe");
@@ -29,8 +30,7 @@ require("formik");
29
30
  require("lodash/throttle");
30
31
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
31
32
  function _interopNamespace(e) {
32
- if (e && e.__esModule)
33
- return e;
33
+ if (e && e.__esModule) return e;
34
34
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
35
35
  if (e) {
36
36
  for (const k in e) {
@@ -58,8 +58,7 @@ function getDefaultExportFromCjs(x) {
58
58
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
59
59
  }
60
60
  function getAugmentedNamespace(n) {
61
- if (n.__esModule)
62
- return n;
61
+ if (n.__esModule) return n;
63
62
  var f2 = n.default;
64
63
  if (typeof f2 == "function") {
65
64
  var a2 = function a3() {
@@ -69,8 +68,7 @@ function getAugmentedNamespace(n) {
69
68
  return f2.apply(this, arguments);
70
69
  };
71
70
  a2.prototype = f2.prototype;
72
- } else
73
- a2 = {};
71
+ } else a2 = {};
74
72
  Object.defineProperty(a2, "__esModule", { value: true });
75
73
  Object.keys(n).forEach(function(k) {
76
74
  var d2 = Object.getOwnPropertyDescriptor(n, k);
@@ -153,11 +151,12 @@ var hasSymbols$1 = function hasNativeSymbols() {
153
151
  return hasSymbolSham();
154
152
  };
155
153
  var test$1 = {
154
+ __proto__: null,
156
155
  foo: {}
157
156
  };
158
157
  var $Object = Object;
159
158
  var hasProto$1 = function hasProto() {
160
- return { __proto__: test$1 }.foo === test$1.foo && !({ __proto__: null } instanceof $Object);
159
+ return { __proto__: test$1 }.foo === test$1.foo && !(test$1 instanceof $Object);
161
160
  };
162
161
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
163
162
  var toStr$1 = Object.prototype.toString;
@@ -544,8 +543,7 @@ var callBind$1 = { exports: {} };
544
543
  var esDefineProperty;
545
544
  var hasRequiredEsDefineProperty;
546
545
  function requireEsDefineProperty() {
547
- if (hasRequiredEsDefineProperty)
548
- return esDefineProperty;
546
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
549
547
  hasRequiredEsDefineProperty = 1;
550
548
  var GetIntrinsic3 = getIntrinsic;
551
549
  var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
@@ -2014,8 +2012,7 @@ var ActionTypes = {
2014
2012
  }
2015
2013
  };
2016
2014
  function isPlainObject$3(obj) {
2017
- if (typeof obj !== "object" || obj === null)
2018
- return false;
2015
+ if (typeof obj !== "object" || obj === null) return false;
2019
2016
  var proto = obj;
2020
2017
  while (Object.getPrototypeOf(proto) !== null) {
2021
2018
  proto = Object.getPrototypeOf(proto);
@@ -2023,10 +2020,8 @@ function isPlainObject$3(obj) {
2023
2020
  return Object.getPrototypeOf(obj) === proto;
2024
2021
  }
2025
2022
  function miniKindOf(val) {
2026
- if (val === void 0)
2027
- return "undefined";
2028
- if (val === null)
2029
- return "null";
2023
+ if (val === void 0) return "undefined";
2024
+ if (val === null) return "null";
2030
2025
  var type2 = typeof val;
2031
2026
  switch (type2) {
2032
2027
  case "boolean":
@@ -2037,12 +2032,9 @@ function miniKindOf(val) {
2037
2032
  return type2;
2038
2033
  }
2039
2034
  }
2040
- if (Array.isArray(val))
2041
- return "array";
2042
- if (isDate$1(val))
2043
- return "date";
2044
- if (isError(val))
2045
- return "error";
2035
+ if (Array.isArray(val)) return "array";
2036
+ if (isDate$1(val)) return "date";
2037
+ if (isError(val)) return "error";
2046
2038
  var constructorName = ctorName(val);
2047
2039
  switch (constructorName) {
2048
2040
  case "Symbol":
@@ -2062,8 +2054,7 @@ function isError(val) {
2062
2054
  return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
2063
2055
  }
2064
2056
  function isDate$1(val) {
2065
- if (val instanceof Date)
2066
- return true;
2057
+ if (val instanceof Date) return true;
2067
2058
  return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
2068
2059
  }
2069
2060
  function kindOf$1(val) {
@@ -2097,8 +2088,7 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une
2097
2088
  unexpectedKeys.forEach(function(key) {
2098
2089
  unexpectedKeyCache[key] = true;
2099
2090
  });
2100
- if (action && action.type === ActionTypes.REPLACE)
2101
- return;
2091
+ if (action && action.type === ActionTypes.REPLACE) return;
2102
2092
  if (unexpectedKeys.length > 0) {
2103
2093
  return "Unexpected " + (unexpectedKeys.length > 1 ? "keys" : "key") + " " + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
2104
2094
  }
@@ -2358,9 +2348,7 @@ var __extends = /* @__PURE__ */ function() {
2358
2348
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b2) {
2359
2349
  d3.__proto__ = b2;
2360
2350
  } || function(d3, b2) {
2361
- for (var p in b2)
2362
- if (Object.prototype.hasOwnProperty.call(b2, p))
2363
- d3[p] = b2[p];
2351
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d3[p] = b2[p];
2364
2352
  };
2365
2353
  return extendStatics(d2, b);
2366
2354
  };
@@ -2376,8 +2364,7 @@ var __extends = /* @__PURE__ */ function() {
2376
2364
  }();
2377
2365
  var __generator$1 = function(thisArg, body) {
2378
2366
  var _ = { label: 0, sent: function() {
2379
- if (t[0] & 1)
2380
- throw t[1];
2367
+ if (t[0] & 1) throw t[1];
2381
2368
  return t[1];
2382
2369
  }, trys: [], ops: [] }, f2, y, t, g;
2383
2370
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
@@ -2389,64 +2376,58 @@ var __generator$1 = function(thisArg, body) {
2389
2376
  };
2390
2377
  }
2391
2378
  function step(op) {
2392
- if (f2)
2393
- throw new TypeError("Generator is already executing.");
2394
- while (_)
2395
- try {
2396
- if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
2397
- return t;
2398
- if (y = 0, t)
2399
- op = [op[0] & 2, t.value];
2400
- switch (op[0]) {
2401
- case 0:
2402
- case 1:
2379
+ if (f2) throw new TypeError("Generator is already executing.");
2380
+ while (_) try {
2381
+ if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2382
+ if (y = 0, t) op = [op[0] & 2, t.value];
2383
+ switch (op[0]) {
2384
+ case 0:
2385
+ case 1:
2386
+ t = op;
2387
+ break;
2388
+ case 4:
2389
+ _.label++;
2390
+ return { value: op[1], done: false };
2391
+ case 5:
2392
+ _.label++;
2393
+ y = op[1];
2394
+ op = [0];
2395
+ continue;
2396
+ case 7:
2397
+ op = _.ops.pop();
2398
+ _.trys.pop();
2399
+ continue;
2400
+ default:
2401
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2402
+ _ = 0;
2403
+ continue;
2404
+ }
2405
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2406
+ _.label = op[1];
2407
+ break;
2408
+ }
2409
+ if (op[0] === 6 && _.label < t[1]) {
2410
+ _.label = t[1];
2403
2411
  t = op;
2404
2412
  break;
2405
- case 4:
2406
- _.label++;
2407
- return { value: op[1], done: false };
2408
- case 5:
2409
- _.label++;
2410
- y = op[1];
2411
- op = [0];
2412
- continue;
2413
- case 7:
2414
- op = _.ops.pop();
2415
- _.trys.pop();
2416
- continue;
2417
- default:
2418
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2419
- _ = 0;
2420
- continue;
2421
- }
2422
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2423
- _.label = op[1];
2424
- break;
2425
- }
2426
- if (op[0] === 6 && _.label < t[1]) {
2427
- _.label = t[1];
2428
- t = op;
2429
- break;
2430
- }
2431
- if (t && _.label < t[2]) {
2432
- _.label = t[2];
2433
- _.ops.push(op);
2434
- break;
2435
- }
2436
- if (t[2])
2437
- _.ops.pop();
2438
- _.trys.pop();
2439
- continue;
2440
- }
2441
- op = body.call(thisArg, _);
2442
- } catch (e) {
2443
- op = [6, e];
2444
- y = 0;
2445
- } finally {
2446
- f2 = t = 0;
2413
+ }
2414
+ if (t && _.label < t[2]) {
2415
+ _.label = t[2];
2416
+ _.ops.push(op);
2417
+ break;
2418
+ }
2419
+ if (t[2]) _.ops.pop();
2420
+ _.trys.pop();
2421
+ continue;
2447
2422
  }
2448
- if (op[0] & 5)
2449
- throw op[1];
2423
+ op = body.call(thisArg, _);
2424
+ } catch (e) {
2425
+ op = [6, e];
2426
+ y = 0;
2427
+ } finally {
2428
+ f2 = t = 0;
2429
+ }
2430
+ if (op[0] & 5) throw op[1];
2450
2431
  return { value: op[0] ? op[1] : void 0, done: true };
2451
2432
  }
2452
2433
  };
@@ -2957,8 +2938,7 @@ var createAsyncThunk = function() {
2957
2938
  case 0:
2958
2939
  _c.trys.push([0, 4, , 5]);
2959
2940
  conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState, extra });
2960
- if (!isThenable$1(conditionResult))
2961
- return [3, 2];
2941
+ if (!isThenable$1(conditionResult)) return [3, 2];
2962
2942
  return [4, conditionResult];
2963
2943
  case 1:
2964
2944
  conditionResult = _c.sent();
@@ -3227,8 +3207,7 @@ typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "un
3227
3207
  createNextState2.enableES5();
3228
3208
  var __generator = function(thisArg, body) {
3229
3209
  var _ = { label: 0, sent: function() {
3230
- if (t[0] & 1)
3231
- throw t[1];
3210
+ if (t[0] & 1) throw t[1];
3232
3211
  return t[1];
3233
3212
  }, trys: [], ops: [] }, f2, y, t, g;
3234
3213
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
@@ -3240,64 +3219,58 @@ var __generator = function(thisArg, body) {
3240
3219
  };
3241
3220
  }
3242
3221
  function step(op) {
3243
- if (f2)
3244
- throw new TypeError("Generator is already executing.");
3245
- while (_)
3246
- try {
3247
- if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
3248
- return t;
3249
- if (y = 0, t)
3250
- op = [op[0] & 2, t.value];
3251
- switch (op[0]) {
3252
- case 0:
3253
- case 1:
3222
+ if (f2) throw new TypeError("Generator is already executing.");
3223
+ while (_) try {
3224
+ if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
3225
+ if (y = 0, t) op = [op[0] & 2, t.value];
3226
+ switch (op[0]) {
3227
+ case 0:
3228
+ case 1:
3229
+ t = op;
3230
+ break;
3231
+ case 4:
3232
+ _.label++;
3233
+ return { value: op[1], done: false };
3234
+ case 5:
3235
+ _.label++;
3236
+ y = op[1];
3237
+ op = [0];
3238
+ continue;
3239
+ case 7:
3240
+ op = _.ops.pop();
3241
+ _.trys.pop();
3242
+ continue;
3243
+ default:
3244
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3245
+ _ = 0;
3246
+ continue;
3247
+ }
3248
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
3249
+ _.label = op[1];
3250
+ break;
3251
+ }
3252
+ if (op[0] === 6 && _.label < t[1]) {
3253
+ _.label = t[1];
3254
3254
  t = op;
3255
3255
  break;
3256
- case 4:
3257
- _.label++;
3258
- return { value: op[1], done: false };
3259
- case 5:
3260
- _.label++;
3261
- y = op[1];
3262
- op = [0];
3263
- continue;
3264
- case 7:
3265
- op = _.ops.pop();
3266
- _.trys.pop();
3267
- continue;
3268
- default:
3269
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3270
- _ = 0;
3271
- continue;
3272
- }
3273
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
3274
- _.label = op[1];
3275
- break;
3276
- }
3277
- if (op[0] === 6 && _.label < t[1]) {
3278
- _.label = t[1];
3279
- t = op;
3280
- break;
3281
- }
3282
- if (t && _.label < t[2]) {
3283
- _.label = t[2];
3284
- _.ops.push(op);
3285
- break;
3286
- }
3287
- if (t[2])
3288
- _.ops.pop();
3289
- _.trys.pop();
3290
- continue;
3291
- }
3292
- op = body.call(thisArg, _);
3293
- } catch (e) {
3294
- op = [6, e];
3295
- y = 0;
3296
- } finally {
3297
- f2 = t = 0;
3256
+ }
3257
+ if (t && _.label < t[2]) {
3258
+ _.label = t[2];
3259
+ _.ops.push(op);
3260
+ break;
3261
+ }
3262
+ if (t[2]) _.ops.pop();
3263
+ _.trys.pop();
3264
+ continue;
3298
3265
  }
3299
- if (op[0] & 5)
3300
- throw op[1];
3266
+ op = body.call(thisArg, _);
3267
+ } catch (e) {
3268
+ op = [6, e];
3269
+ y = 0;
3270
+ } finally {
3271
+ f2 = t = 0;
3272
+ }
3273
+ if (op[0] & 5) throw op[1];
3301
3274
  return { value: op[0] ? op[1] : void 0, done: true };
3302
3275
  }
3303
3276
  };
@@ -3763,13 +3736,11 @@ function buildThunks(_j) {
3763
3736
  forced: arg.type === "query" ? isForcedQuery(arg, getState()) : void 0
3764
3737
  };
3765
3738
  forceQueryFn = arg.type === "query" ? arg[forceQueryFnSymbol] : void 0;
3766
- if (!forceQueryFn)
3767
- return [3, 2];
3739
+ if (!forceQueryFn) return [3, 2];
3768
3740
  result = forceQueryFn();
3769
3741
  return [3, 6];
3770
3742
  case 2:
3771
- if (!endpointDefinition.query)
3772
- return [3, 4];
3743
+ if (!endpointDefinition.query) return [3, 4];
3773
3744
  return [4, baseQuery(endpointDefinition.query(arg.originalArgs), baseQueryApi_1, endpointDefinition.extraOptions)];
3774
3745
  case 3:
3775
3746
  result = _r.sent();
@@ -3821,8 +3792,7 @@ function buildThunks(_j) {
3821
3792
  case 8:
3822
3793
  error_1 = _r.sent();
3823
3794
  catchedError = error_1;
3824
- if (!(catchedError instanceof HandledError))
3825
- return [3, 12];
3795
+ if (!(catchedError instanceof HandledError)) return [3, 12];
3826
3796
  transformErrorResponse = defaultTransformResponse;
3827
3797
  if (endpointDefinition.query && endpointDefinition.transformErrorResponse) {
3828
3798
  transformErrorResponse = endpointDefinition.transformErrorResponse;
@@ -4061,8 +4031,7 @@ function buildSlice(_j) {
4061
4031
  }).addCase(queryThunk.rejected, function(draft, _j2) {
4062
4032
  var _k2 = _j2.meta, condition = _k2.condition, arg = _k2.arg, requestId = _k2.requestId, error = _j2.error, payload = _j2.payload;
4063
4033
  updateQuerySubstateIfExists(draft, arg.queryCacheKey, function(substate) {
4064
- if (condition)
4065
- ;
4034
+ if (condition) ;
4066
4035
  else {
4067
4036
  if (substate.requestId !== requestId)
4068
4037
  return;
@@ -5687,6 +5656,9 @@ const getFetchClient = (defaultOptions = {}) => {
5687
5656
  };
5688
5657
  const paramsSerializer = (params) => (url) => {
5689
5658
  if (params) {
5659
+ if (typeof params === "string") {
5660
+ return `${url}?${params}`;
5661
+ }
5690
5662
  const serializedParams = qs__default.stringify(params, { encode: false });
5691
5663
  return `${url}?${serializedParams}`;
5692
5664
  }
@@ -6006,8 +5978,7 @@ function findKey(obj, key) {
6006
5978
  return null;
6007
5979
  }
6008
5980
  const _global = (() => {
6009
- if (typeof globalThis !== "undefined")
6010
- return globalThis;
5981
+ if (typeof globalThis !== "undefined") return globalThis;
6011
5982
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
6012
5983
  })();
6013
5984
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
@@ -6061,8 +6032,7 @@ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
6061
6032
  let prop;
6062
6033
  const merged = {};
6063
6034
  destObj = destObj || {};
6064
- if (sourceObj == null)
6065
- return destObj;
6035
+ if (sourceObj == null) return destObj;
6066
6036
  do {
6067
6037
  props = Object.getOwnPropertyNames(sourceObj);
6068
6038
  i = props.length;
@@ -6087,13 +6057,10 @@ const endsWith = (str, searchString, position) => {
6087
6057
  return lastIndex !== -1 && lastIndex === position;
6088
6058
  };
6089
6059
  const toArray = (thing) => {
6090
- if (!thing)
6091
- return null;
6092
- if (isArray(thing))
6093
- return thing;
6060
+ if (!thing) return null;
6061
+ if (isArray(thing)) return thing;
6094
6062
  let i = thing.length;
6095
- if (!isNumber(i))
6096
- return null;
6063
+ if (!isNumber(i)) return null;
6097
6064
  const arr = new Array(i);
6098
6065
  while (i-- > 0) {
6099
6066
  arr[i] = thing[i];
@@ -6150,8 +6117,7 @@ const freezeMethods = (obj) => {
6150
6117
  return false;
6151
6118
  }
6152
6119
  const value = obj[name];
6153
- if (!isFunction(value))
6154
- return;
6120
+ if (!isFunction(value)) return;
6155
6121
  descriptor.enumerable = false;
6156
6122
  if ("writable" in descriptor) {
6157
6123
  descriptor.writable = false;
@@ -6378,8 +6344,7 @@ function removeBrackets(key) {
6378
6344
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
6379
6345
  }
6380
6346
  function renderKey(path, key, dots) {
6381
- if (!path)
6382
- return key;
6347
+ if (!path) return key;
6383
6348
  return path.concat(key).map(function each(token, i) {
6384
6349
  token = removeBrackets(token);
6385
6350
  return !dots && i ? "[" + token + "]" : token;
@@ -6413,8 +6378,7 @@ function toFormData(obj, formData, options) {
6413
6378
  throw new TypeError("visitor must be a function");
6414
6379
  }
6415
6380
  function convertValue(value) {
6416
- if (value === null)
6417
- return "";
6381
+ if (value === null) return "";
6418
6382
  if (utils$1.isDate(value)) {
6419
6383
  return value.toISOString();
6420
6384
  }
@@ -6457,8 +6421,7 @@ function toFormData(obj, formData, options) {
6457
6421
  isVisitable
6458
6422
  });
6459
6423
  function build(value, path) {
6460
- if (utils$1.isUndefined(value))
6461
- return;
6424
+ if (utils$1.isUndefined(value)) return;
6462
6425
  if (stack.indexOf(value) !== -1) {
6463
6426
  throw Error("Circular reference detected in " + path.join("."));
6464
6427
  }
@@ -6666,8 +6629,7 @@ function arrayToObject2(arr) {
6666
6629
  function formDataToJSON(formData) {
6667
6630
  function buildPath(path, value, target, index) {
6668
6631
  let name = path[index++];
6669
- if (name === "__proto__")
6670
- return true;
6632
+ if (name === "__proto__") return true;
6671
6633
  const isNumericKey = Number.isFinite(+name);
6672
6634
  const isLast = index >= path.length;
6673
6635
  name = !name && utils$1.isArray(target) ? target.length : name;
@@ -6708,7 +6670,7 @@ function stringifySafely(rawValue, parser, encoder) {
6708
6670
  }
6709
6671
  }
6710
6672
  }
6711
- return (encoder || JSON.stringify)(rawValue);
6673
+ return (0, JSON.stringify)(rawValue);
6712
6674
  }
6713
6675
  const defaults = {
6714
6676
  transitional: transitionalDefaults,
@@ -6873,8 +6835,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
6873
6835
  if (isHeaderNameFilter) {
6874
6836
  value = header;
6875
6837
  }
6876
- if (!utils$1.isString(value))
6877
- return;
6838
+ if (!utils$1.isString(value)) return;
6878
6839
  if (utils$1.isString(filter2)) {
6879
6840
  return value.indexOf(filter2) !== -1;
6880
6841
  }
@@ -7552,7 +7513,7 @@ const composeSignals = (signals, timeout) => {
7552
7513
  };
7553
7514
  const streamChunk = function* (chunk, chunkSize) {
7554
7515
  let len = chunk.byteLength;
7555
- if (!chunkSize || len < chunkSize) {
7516
+ if (len < chunkSize) {
7556
7517
  yield chunk;
7557
7518
  return;
7558
7519
  }
@@ -8091,8 +8052,7 @@ class CancelToken {
8091
8052
  });
8092
8053
  const token = this;
8093
8054
  this.promise.then((cancel) => {
8094
- if (!token._listeners)
8095
- return;
8055
+ if (!token._listeners) return;
8096
8056
  let i = token._listeners.length;
8097
8057
  while (i-- > 0) {
8098
8058
  token._listeners[i](cancel);
@@ -8286,41 +8246,32 @@ var scheduler_production_min = {};
8286
8246
  */
8287
8247
  var hasRequiredScheduler_production_min;
8288
8248
  function requireScheduler_production_min() {
8289
- if (hasRequiredScheduler_production_min)
8290
- return scheduler_production_min;
8249
+ if (hasRequiredScheduler_production_min) return scheduler_production_min;
8291
8250
  hasRequiredScheduler_production_min = 1;
8292
8251
  (function(exports2) {
8293
8252
  function f2(a2, b) {
8294
8253
  var c = a2.length;
8295
8254
  a2.push(b);
8296
- a:
8297
- for (; 0 < c; ) {
8298
- var d2 = c - 1 >>> 1, e = a2[d2];
8299
- if (0 < g(e, b))
8300
- a2[d2] = b, a2[c] = e, c = d2;
8301
- else
8302
- break a;
8303
- }
8255
+ a: for (; 0 < c; ) {
8256
+ var d2 = c - 1 >>> 1, e = a2[d2];
8257
+ if (0 < g(e, b)) a2[d2] = b, a2[c] = e, c = d2;
8258
+ else break a;
8259
+ }
8304
8260
  }
8305
8261
  function h2(a2) {
8306
8262
  return 0 === a2.length ? null : a2[0];
8307
8263
  }
8308
8264
  function k(a2) {
8309
- if (0 === a2.length)
8310
- return null;
8265
+ if (0 === a2.length) return null;
8311
8266
  var b = a2[0], c = a2.pop();
8312
8267
  if (c !== b) {
8313
8268
  a2[0] = c;
8314
- a:
8315
- for (var d2 = 0, e = a2.length, w = e >>> 1; d2 < w; ) {
8316
- var m = 2 * (d2 + 1) - 1, C = a2[m], n = m + 1, x = a2[n];
8317
- if (0 > g(C, c))
8318
- n < e && 0 > g(x, C) ? (a2[d2] = x, a2[n] = c, d2 = n) : (a2[d2] = C, a2[m] = c, d2 = m);
8319
- else if (n < e && 0 > g(x, c))
8320
- a2[d2] = x, a2[n] = c, d2 = n;
8321
- else
8322
- break a;
8323
- }
8269
+ a: for (var d2 = 0, e = a2.length, w = e >>> 1; d2 < w; ) {
8270
+ var m = 2 * (d2 + 1) - 1, C = a2[m], n = m + 1, x = a2[n];
8271
+ if (0 > g(C, c)) n < e && 0 > g(x, C) ? (a2[d2] = x, a2[n] = c, d2 = n) : (a2[d2] = C, a2[m] = c, d2 = m);
8272
+ else if (n < e && 0 > g(x, c)) a2[d2] = x, a2[n] = c, d2 = n;
8273
+ else break a;
8274
+ }
8324
8275
  }
8325
8276
  return b;
8326
8277
  }
@@ -8343,25 +8294,20 @@ function requireScheduler_production_min() {
8343
8294
  "undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
8344
8295
  function G(a2) {
8345
8296
  for (var b = h2(t); null !== b; ) {
8346
- if (null === b.callback)
8347
- k(t);
8348
- else if (b.startTime <= a2)
8349
- k(t), b.sortIndex = b.expirationTime, f2(r, b);
8350
- else
8351
- break;
8297
+ if (null === b.callback) k(t);
8298
+ else if (b.startTime <= a2) k(t), b.sortIndex = b.expirationTime, f2(r, b);
8299
+ else break;
8352
8300
  b = h2(t);
8353
8301
  }
8354
8302
  }
8355
8303
  function H(a2) {
8356
8304
  B = false;
8357
8305
  G(a2);
8358
- if (!A)
8359
- if (null !== h2(r))
8360
- A = true, I(J);
8361
- else {
8362
- var b = h2(t);
8363
- null !== b && K(H, b.startTime - a2);
8364
- }
8306
+ if (!A) if (null !== h2(r)) A = true, I(J);
8307
+ else {
8308
+ var b = h2(t);
8309
+ null !== b && K(H, b.startTime - a2);
8310
+ }
8365
8311
  }
8366
8312
  function J(a2, b) {
8367
8313
  A = false;
@@ -8379,12 +8325,10 @@ function requireScheduler_production_min() {
8379
8325
  b = exports2.unstable_now();
8380
8326
  "function" === typeof e ? v2.callback = e : v2 === h2(r) && k(r);
8381
8327
  G(b);
8382
- } else
8383
- k(r);
8328
+ } else k(r);
8384
8329
  v2 = h2(r);
8385
8330
  }
8386
- if (null !== v2)
8387
- var w = true;
8331
+ if (null !== v2) var w = true;
8388
8332
  else {
8389
8333
  var m = h2(t);
8390
8334
  null !== m && K(H, m.startTime - b);
@@ -8409,24 +8353,21 @@ function requireScheduler_production_min() {
8409
8353
  } finally {
8410
8354
  b ? S() : (N = false, O = null);
8411
8355
  }
8412
- } else
8413
- N = false;
8356
+ } else N = false;
8414
8357
  }
8415
8358
  var S;
8416
- if ("function" === typeof F)
8417
- S = function() {
8418
- F(R);
8419
- };
8359
+ if ("function" === typeof F) S = function() {
8360
+ F(R);
8361
+ };
8420
8362
  else if ("undefined" !== typeof MessageChannel) {
8421
8363
  var T = new MessageChannel(), U = T.port2;
8422
8364
  T.port1.onmessage = R;
8423
8365
  S = function() {
8424
8366
  U.postMessage(null);
8425
8367
  };
8426
- } else
8427
- S = function() {
8428
- D(R, 0);
8429
- };
8368
+ } else S = function() {
8369
+ D(R, 0);
8370
+ };
8430
8371
  function I(a2) {
8431
8372
  O = a2;
8432
8373
  N || (N = true, S());
@@ -8550,8 +8491,7 @@ var scheduler_development = {};
8550
8491
  */
8551
8492
  var hasRequiredScheduler_development;
8552
8493
  function requireScheduler_development() {
8553
- if (hasRequiredScheduler_development)
8554
- return scheduler_development;
8494
+ if (hasRequiredScheduler_development) return scheduler_development;
8555
8495
  hasRequiredScheduler_development = 1;
8556
8496
  (function(exports2) {
8557
8497
  if (process.env.NODE_ENV !== "production") {
@@ -8706,8 +8646,7 @@ function requireScheduler_development() {
8706
8646
  var previousPriorityLevel = currentPriorityLevel;
8707
8647
  try {
8708
8648
  var currentTime;
8709
- if (enableProfiling)
8710
- ;
8649
+ if (enableProfiling) ;
8711
8650
  else {
8712
8651
  return workLoop(hasTimeRemaining, initialTime2);
8713
8652
  }
@@ -9030,19 +8969,14 @@ function E(r) {
9030
8969
  }
9031
8970
  function h(e, n) {
9032
8971
  const o = React.useContext(e)[d];
9033
- if ("object" == typeof process && "production" !== process.env.NODE_ENV && !o)
9034
- throw new Error("useContextSelector requires special context");
8972
+ if ("object" == typeof process && "production" !== process.env.NODE_ENV && !o) throw new Error("useContextSelector requires special context");
9035
8973
  const { v: { current: c }, n: { current: u }, l: s } = o, i = n(c), [p, l] = React.useReducer((e2, r) => {
9036
- if (!r)
9037
- return [c, i];
9038
- if ("p" in r)
9039
- throw r.p;
9040
- if (r.n === u)
9041
- return Object.is(e2[1], i) ? e2 : [c, i];
8974
+ if (!r) return [c, i];
8975
+ if ("p" in r) throw r.p;
8976
+ if (r.n === u) return Object.is(e2[1], i) ? e2 : [c, i];
9042
8977
  try {
9043
8978
  if ("v" in r) {
9044
- if (Object.is(e2[0], r.v))
9045
- return e2;
8979
+ if (Object.is(e2[0], r.v)) return e2;
9046
8980
  const t = n(r.v);
9047
8981
  return Object.is(e2[1], t) ? e2 : [r.v, t];
9048
8982
  }
@@ -9593,869 +9527,6 @@ function generateNKeysBetween(a2, b, n, digits = BASE_62_DIGITS) {
9593
9527
  return [generateKeyBetween(a2, b, digits)];
9594
9528
  }
9595
9529
  }
9596
- function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
9597
- return amount - numerator * Math.floor(amount / numerator);
9598
- }
9599
- const $3b62074eb05584b2$var$EPOCH = 1721426;
9600
- function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
9601
- year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
9602
- let y1 = year - 1;
9603
- let monthOffset = -2;
9604
- if (month <= 2)
9605
- monthOffset = 0;
9606
- else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
9607
- monthOffset = -1;
9608
- return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
9609
- }
9610
- function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
9611
- return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
9612
- }
9613
- function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
9614
- return era === "BC" ? 1 - year : year;
9615
- }
9616
- function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
9617
- let era = "AD";
9618
- if (year <= 0) {
9619
- era = "BC";
9620
- year = 1 - year;
9621
- }
9622
- return [
9623
- era,
9624
- year
9625
- ];
9626
- }
9627
- const $3b62074eb05584b2$var$daysInMonth = {
9628
- standard: [
9629
- 31,
9630
- 28,
9631
- 31,
9632
- 30,
9633
- 31,
9634
- 30,
9635
- 31,
9636
- 31,
9637
- 30,
9638
- 31,
9639
- 30,
9640
- 31
9641
- ],
9642
- leapyear: [
9643
- 31,
9644
- 29,
9645
- 31,
9646
- 30,
9647
- 31,
9648
- 30,
9649
- 31,
9650
- 31,
9651
- 30,
9652
- 31,
9653
- 30,
9654
- 31
9655
- ]
9656
- };
9657
- class $3b62074eb05584b2$export$80ee6245ec4f29ec {
9658
- fromJulianDay(jd) {
9659
- let jd0 = jd;
9660
- let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
9661
- let quadricent = Math.floor(depoch / 146097);
9662
- let dqc = $2b4dce13dd5a17fa$export$842a2cf37af977e1(depoch, 146097);
9663
- let cent = Math.floor(dqc / 36524);
9664
- let dcent = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dqc, 36524);
9665
- let quad = Math.floor(dcent / 1461);
9666
- let dquad = $2b4dce13dd5a17fa$export$842a2cf37af977e1(dcent, 1461);
9667
- let yindex = Math.floor(dquad / 365);
9668
- let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
9669
- let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
9670
- let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
9671
- let leapAdj = 2;
9672
- if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1))
9673
- leapAdj = 0;
9674
- else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year))
9675
- leapAdj = 1;
9676
- let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
9677
- let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
9678
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(era, year, month, day);
9679
- }
9680
- toJulianDay(date) {
9681
- return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
9682
- }
9683
- getDaysInMonth(date) {
9684
- return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
9685
- }
9686
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9687
- getMonthsInYear(date) {
9688
- return 12;
9689
- }
9690
- getDaysInYear(date) {
9691
- return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
9692
- }
9693
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9694
- getYearsInEra(date) {
9695
- return 9999;
9696
- }
9697
- getEras() {
9698
- return [
9699
- "BC",
9700
- "AD"
9701
- ];
9702
- }
9703
- isInverseEra(date) {
9704
- return date.era === "BC";
9705
- }
9706
- balanceDate(date) {
9707
- if (date.year <= 0) {
9708
- date.era = date.era === "BC" ? "AD" : "BC";
9709
- date.year = 1 - date.year;
9710
- }
9711
- }
9712
- constructor() {
9713
- this.identifier = "gregory";
9714
- }
9715
- }
9716
- function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a2, b) {
9717
- return a2.calendar.toJulianDay(a2) - b.calendar.toJulianDay(b);
9718
- }
9719
- function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a2, b) {
9720
- return $14e0f24ef4ac5c92$var$timeToMs(a2) - $14e0f24ef4ac5c92$var$timeToMs(b);
9721
- }
9722
- function $14e0f24ef4ac5c92$var$timeToMs(a2) {
9723
- return a2.hour * 36e5 + a2.minute * 6e4 + a2.second * 1e3 + a2.millisecond;
9724
- }
9725
- let $14e0f24ef4ac5c92$var$localTimeZone = null;
9726
- function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
9727
- if ($14e0f24ef4ac5c92$var$localTimeZone == null)
9728
- $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
9729
- return $14e0f24ef4ac5c92$var$localTimeZone;
9730
- }
9731
- function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
9732
- date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
9733
- let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(date.era, date.year);
9734
- return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
9735
- }
9736
- function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
9737
- let date = /* @__PURE__ */ new Date();
9738
- date.setUTCHours(hour, minute, second, millisecond);
9739
- date.setUTCFullYear(year, month - 1, day);
9740
- return date.getTime();
9741
- }
9742
- function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
9743
- if (timeZone === "UTC")
9744
- return 0;
9745
- if (ms > 0 && timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2())
9746
- return new Date(ms).getTimezoneOffset() * -6e4;
9747
- let { year, month, day, hour, minute, second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
9748
- let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
9749
- return utc - Math.floor(ms / 1e3) * 1e3;
9750
- }
9751
- const $11d87f3f76e88657$var$formattersByTimeZone = /* @__PURE__ */ new Map();
9752
- function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
9753
- let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
9754
- if (!formatter) {
9755
- formatter = new Intl.DateTimeFormat("en-US", {
9756
- timeZone,
9757
- hour12: false,
9758
- era: "short",
9759
- year: "numeric",
9760
- month: "numeric",
9761
- day: "numeric",
9762
- hour: "numeric",
9763
- minute: "numeric",
9764
- second: "numeric"
9765
- });
9766
- $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
9767
- }
9768
- let parts = formatter.formatToParts(new Date(ms));
9769
- let namedParts = {};
9770
- for (let part of parts)
9771
- if (part.type !== "literal")
9772
- namedParts[part.type] = part.value;
9773
- return {
9774
- // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
9775
- year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
9776
- month: +namedParts.month,
9777
- day: +namedParts.day,
9778
- hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
9779
- minute: +namedParts.minute,
9780
- second: +namedParts.second
9781
- };
9782
- }
9783
- const $11d87f3f76e88657$var$DAYMILLIS = 864e5;
9784
- function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
9785
- let found = earlier === later ? [
9786
- earlier
9787
- ] : [
9788
- earlier,
9789
- later
9790
- ];
9791
- return found.filter((absolute) => $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
9792
- }
9793
- function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
9794
- let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
9795
- return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
9796
- }
9797
- function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
9798
- let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
9799
- if (timeZone === "UTC")
9800
- return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
9801
- if (timeZone === $14e0f24ef4ac5c92$export$aa8b41735afcabd2() && disambiguation === "compatible") {
9802
- dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
9803
- let date2 = /* @__PURE__ */ new Date();
9804
- let year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
9805
- date2.setFullYear(year, dateTime.month - 1, dateTime.day);
9806
- date2.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
9807
- return date2.getTime();
9808
- }
9809
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
9810
- let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
9811
- let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
9812
- let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
9813
- if (valid.length === 1)
9814
- return valid[0];
9815
- if (valid.length > 1)
9816
- switch (disambiguation) {
9817
- case "compatible":
9818
- case "earlier":
9819
- return valid[0];
9820
- case "later":
9821
- return valid[valid.length - 1];
9822
- case "reject":
9823
- throw new RangeError("Multiple possible absolute times found");
9824
- }
9825
- switch (disambiguation) {
9826
- case "earlier":
9827
- return Math.min(ms - offsetBefore, ms - offsetAfter);
9828
- case "compatible":
9829
- case "later":
9830
- return Math.max(ms - offsetBefore, ms - offsetAfter);
9831
- case "reject":
9832
- throw new RangeError("No such absolute time found");
9833
- }
9834
- }
9835
- function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
9836
- return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
9837
- }
9838
- function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
9839
- let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
9840
- let date = new Date(ms + offset);
9841
- let year = date.getUTCFullYear();
9842
- let month = date.getUTCMonth() + 1;
9843
- let day = date.getUTCDate();
9844
- let hour = date.getUTCHours();
9845
- let minute = date.getUTCMinutes();
9846
- let second = date.getUTCSeconds();
9847
- let millisecond = date.getUTCMilliseconds();
9848
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(year, month, day, timeZone, offset, hour, minute, second, millisecond);
9849
- }
9850
- function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
9851
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
9852
- }
9853
- function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
9854
- let hour = 0, minute = 0, second = 0, millisecond = 0;
9855
- if ("timeZone" in date)
9856
- ({ hour, minute, second, millisecond } = date);
9857
- else if ("hour" in date && !time)
9858
- return date;
9859
- if (time)
9860
- ({ hour, minute, second, millisecond } = time);
9861
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
9862
- }
9863
- function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
9864
- if (date.calendar.identifier === calendar.identifier)
9865
- return date;
9866
- let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
9867
- let copy = date.copy();
9868
- copy.calendar = calendar;
9869
- copy.era = calendarDate.era;
9870
- copy.year = calendarDate.year;
9871
- copy.month = calendarDate.month;
9872
- copy.day = calendarDate.day;
9873
- $735220c2d4774dd3$export$c4e2ecac49351ef2(copy);
9874
- return copy;
9875
- }
9876
- function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
9877
- if (date instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea) {
9878
- if (date.timeZone === timeZone)
9879
- return date;
9880
- return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
9881
- }
9882
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
9883
- return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
9884
- }
9885
- function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
9886
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
9887
- return new Date(ms);
9888
- }
9889
- function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
9890
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
9891
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
9892
- }
9893
- const $735220c2d4774dd3$var$ONE_HOUR = 36e5;
9894
- function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
9895
- let mutableDate = date.copy();
9896
- let days = "hour" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
9897
- $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
9898
- if (mutableDate.calendar.balanceYearMonth)
9899
- mutableDate.calendar.balanceYearMonth(mutableDate, date);
9900
- mutableDate.month += duration.months || 0;
9901
- $735220c2d4774dd3$var$balanceYearMonth(mutableDate);
9902
- $735220c2d4774dd3$var$constrainMonthDay(mutableDate);
9903
- mutableDate.day += (duration.weeks || 0) * 7;
9904
- mutableDate.day += duration.days || 0;
9905
- mutableDate.day += days;
9906
- $735220c2d4774dd3$var$balanceDay(mutableDate);
9907
- if (mutableDate.calendar.balanceDate)
9908
- mutableDate.calendar.balanceDate(mutableDate);
9909
- if (mutableDate.year < 1) {
9910
- mutableDate.year = 1;
9911
- mutableDate.month = 1;
9912
- mutableDate.day = 1;
9913
- }
9914
- let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
9915
- if (mutableDate.year > maxYear) {
9916
- var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
9917
- let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
9918
- mutableDate.year = maxYear;
9919
- mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
9920
- mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
9921
- }
9922
- if (mutableDate.month < 1) {
9923
- mutableDate.month = 1;
9924
- mutableDate.day = 1;
9925
- }
9926
- let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
9927
- if (mutableDate.month > maxMonth) {
9928
- mutableDate.month = maxMonth;
9929
- mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
9930
- }
9931
- mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
9932
- return mutableDate;
9933
- }
9934
- function $735220c2d4774dd3$var$addYears(date, years) {
9935
- var _date_calendar_isInverseEra, _date_calendar;
9936
- if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date))
9937
- years = -years;
9938
- date.year += years;
9939
- }
9940
- function $735220c2d4774dd3$var$balanceYearMonth(date) {
9941
- while (date.month < 1) {
9942
- $735220c2d4774dd3$var$addYears(date, -1);
9943
- date.month += date.calendar.getMonthsInYear(date);
9944
- }
9945
- let monthsInYear = 0;
9946
- while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
9947
- date.month -= monthsInYear;
9948
- $735220c2d4774dd3$var$addYears(date, 1);
9949
- }
9950
- }
9951
- function $735220c2d4774dd3$var$balanceDay(date) {
9952
- while (date.day < 1) {
9953
- date.month--;
9954
- $735220c2d4774dd3$var$balanceYearMonth(date);
9955
- date.day += date.calendar.getDaysInMonth(date);
9956
- }
9957
- while (date.day > date.calendar.getDaysInMonth(date)) {
9958
- date.day -= date.calendar.getDaysInMonth(date);
9959
- date.month++;
9960
- $735220c2d4774dd3$var$balanceYearMonth(date);
9961
- }
9962
- }
9963
- function $735220c2d4774dd3$var$constrainMonthDay(date) {
9964
- date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
9965
- date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
9966
- }
9967
- function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
9968
- if (date.calendar.constrainDate)
9969
- date.calendar.constrainDate(date);
9970
- date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
9971
- $735220c2d4774dd3$var$constrainMonthDay(date);
9972
- }
9973
- function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
9974
- let inverseDuration = {};
9975
- for (let key in duration)
9976
- if (typeof duration[key] === "number")
9977
- inverseDuration[key] = -duration[key];
9978
- return inverseDuration;
9979
- }
9980
- function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
9981
- return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
9982
- }
9983
- function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
9984
- let mutableDate = date.copy();
9985
- if (fields.era != null)
9986
- mutableDate.era = fields.era;
9987
- if (fields.year != null)
9988
- mutableDate.year = fields.year;
9989
- if (fields.month != null)
9990
- mutableDate.month = fields.month;
9991
- if (fields.day != null)
9992
- mutableDate.day = fields.day;
9993
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
9994
- return mutableDate;
9995
- }
9996
- function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
9997
- let mutableValue = value.copy();
9998
- if (fields.hour != null)
9999
- mutableValue.hour = fields.hour;
10000
- if (fields.minute != null)
10001
- mutableValue.minute = fields.minute;
10002
- if (fields.second != null)
10003
- mutableValue.second = fields.second;
10004
- if (fields.millisecond != null)
10005
- mutableValue.millisecond = fields.millisecond;
10006
- $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
10007
- return mutableValue;
10008
- }
10009
- function $735220c2d4774dd3$var$balanceTime(time) {
10010
- time.second += Math.floor(time.millisecond / 1e3);
10011
- time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1e3);
10012
- time.minute += Math.floor(time.second / 60);
10013
- time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
10014
- time.hour += Math.floor(time.minute / 60);
10015
- time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
10016
- let days = Math.floor(time.hour / 24);
10017
- time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
10018
- return days;
10019
- }
10020
- function $735220c2d4774dd3$export$7555de1e070510cb(time) {
10021
- time.millisecond = Math.max(0, Math.min(time.millisecond, 1e3));
10022
- time.second = Math.max(0, Math.min(time.second, 59));
10023
- time.minute = Math.max(0, Math.min(time.minute, 59));
10024
- time.hour = Math.max(0, Math.min(time.hour, 23));
10025
- }
10026
- function $735220c2d4774dd3$var$nonNegativeMod(a2, b) {
10027
- let result = a2 % b;
10028
- if (result < 0)
10029
- result += b;
10030
- return result;
10031
- }
10032
- function $735220c2d4774dd3$var$addTimeFields(time, duration) {
10033
- time.hour += duration.hours || 0;
10034
- time.minute += duration.minutes || 0;
10035
- time.second += duration.seconds || 0;
10036
- time.millisecond += duration.milliseconds || 0;
10037
- return $735220c2d4774dd3$var$balanceTime(time);
10038
- }
10039
- function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
10040
- let mutable = value.copy();
10041
- switch (field) {
10042
- case "era": {
10043
- let eras = value.calendar.getEras();
10044
- let eraIndex = eras.indexOf(value.era);
10045
- if (eraIndex < 0)
10046
- throw new Error("Invalid era: " + value.era);
10047
- eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
10048
- mutable.era = eras[eraIndex];
10049
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
10050
- break;
10051
- }
10052
- case "year":
10053
- var _mutable_calendar_isInverseEra, _mutable_calendar;
10054
- if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable))
10055
- amount = -amount;
10056
- mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
10057
- if (mutable.year === -Infinity)
10058
- mutable.year = 1;
10059
- if (mutable.calendar.balanceYearMonth)
10060
- mutable.calendar.balanceYearMonth(mutable, value);
10061
- break;
10062
- case "month":
10063
- mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
10064
- break;
10065
- case "day":
10066
- mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
10067
- break;
10068
- default:
10069
- throw new Error("Unsupported field " + field);
10070
- }
10071
- if (value.calendar.balanceDate)
10072
- value.calendar.balanceDate(mutable);
10073
- $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
10074
- return mutable;
10075
- }
10076
- function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
10077
- let mutable = value.copy();
10078
- switch (field) {
10079
- case "hour": {
10080
- let hours = value.hour;
10081
- let min = 0;
10082
- let max2 = 23;
10083
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
10084
- let isPM = hours >= 12;
10085
- min = isPM ? 12 : 0;
10086
- max2 = isPM ? 23 : 11;
10087
- }
10088
- mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max2, options === null || options === void 0 ? void 0 : options.round);
10089
- break;
10090
- }
10091
- case "minute":
10092
- mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
10093
- break;
10094
- case "second":
10095
- mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
10096
- break;
10097
- case "millisecond":
10098
- mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
10099
- break;
10100
- default:
10101
- throw new Error("Unsupported field " + field);
10102
- }
10103
- return mutable;
10104
- }
10105
- function $735220c2d4774dd3$var$cycleValue(value, amount, min, max2, round = false) {
10106
- if (round) {
10107
- value += Math.sign(amount);
10108
- if (value < min)
10109
- value = max2;
10110
- let div = Math.abs(amount);
10111
- if (amount > 0)
10112
- value = Math.ceil(value / div) * div;
10113
- else
10114
- value = Math.floor(value / div) * div;
10115
- if (value > max2)
10116
- value = min;
10117
- } else {
10118
- value += amount;
10119
- if (value < min)
10120
- value = max2 - (min - value - 1);
10121
- else if (value > max2)
10122
- value = min + (value - max2 - 1);
10123
- }
10124
- return value;
10125
- }
10126
- function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
10127
- let ms;
10128
- if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
10129
- let res2 = $735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(dateTime), {
10130
- years: duration.years,
10131
- months: duration.months,
10132
- weeks: duration.weeks,
10133
- days: duration.days
10134
- });
10135
- ms = $11d87f3f76e88657$export$5107c82f94518f5c(res2, dateTime.timeZone);
10136
- } else
10137
- ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
10138
- ms += duration.milliseconds || 0;
10139
- ms += (duration.seconds || 0) * 1e3;
10140
- ms += (duration.minutes || 0) * 6e4;
10141
- ms += (duration.hours || 0) * 36e5;
10142
- let res = $11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone);
10143
- return $11d87f3f76e88657$export$b4a036af3fc0b032(res, dateTime.calendar);
10144
- }
10145
- function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
10146
- return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
10147
- }
10148
- function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) {
10149
- switch (field) {
10150
- case "hour": {
10151
- let min = 0;
10152
- let max2 = 23;
10153
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
10154
- let isPM = dateTime.hour >= 12;
10155
- min = isPM ? 12 : 0;
10156
- max2 = isPM ? 23 : 11;
10157
- }
10158
- let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
10159
- let minDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
10160
- hour: min
10161
- }), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10162
- let minAbsolute = [
10163
- $11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"),
10164
- $11d87f3f76e88657$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")
10165
- ].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === minDate.day)[0];
10166
- let maxDate = $11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
10167
- hour: max2
10168
- }), new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10169
- let maxAbsolute = [
10170
- $11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"),
10171
- $11d87f3f76e88657$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")
10172
- ].filter((ms2) => $11d87f3f76e88657$export$1b96692a1ba042ac(ms2, dateTime.timeZone).day === maxDate.day).pop();
10173
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
10174
- let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);
10175
- let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;
10176
- ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;
10177
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10178
- }
10179
- case "minute":
10180
- case "second":
10181
- case "millisecond":
10182
- return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options);
10183
- case "era":
10184
- case "year":
10185
- case "month":
10186
- case "day": {
10187
- let res = $735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(dateTime), field, amount, options);
10188
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone);
10189
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10190
- }
10191
- default:
10192
- throw new Error("Unsupported field " + field);
10193
- }
10194
- }
10195
- function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
10196
- let plainDateTime = $11d87f3f76e88657$export$b21e0b124e224484(dateTime);
10197
- let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
10198
- if (res.compare(plainDateTime) === 0)
10199
- return dateTime;
10200
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation);
10201
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
10202
- }
10203
- const $fae977aafc393c5c$var$ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
10204
- function $fae977aafc393c5c$export$5adfdab05168c219(value, timeZone) {
10205
- let m = value.match($fae977aafc393c5c$var$ABSOLUTE_RE);
10206
- if (!m)
10207
- throw new Error("Invalid ISO 8601 date time string: " + value);
10208
- let date = new $35ea8db9cb2ccb90$export$d3b7288e7994edea($fae977aafc393c5c$var$parseNumber(m[1], 1, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1e3 : 0);
10209
- date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
10210
- var _m_;
10211
- if (m[8])
10212
- date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 36e5 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : "0", 0, 59) * 6e4;
10213
- return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
10214
- }
10215
- function $fae977aafc393c5c$var$parseNumber(value, min, max2) {
10216
- let val = Number(value);
10217
- if (val < min || val > max2)
10218
- throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max2}`);
10219
- return val;
10220
- }
10221
- function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
10222
- return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
10223
- }
10224
- function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
10225
- let gregorianDate = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new $3b62074eb05584b2$export$80ee6245ec4f29ec());
10226
- return `${String(gregorianDate.year).padStart(4, "0")}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
10227
- }
10228
- function $fae977aafc393c5c$export$4223de14708adc63(date) {
10229
- return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
10230
- }
10231
- function $fae977aafc393c5c$var$offsetToString(offset) {
10232
- let sign = Math.sign(offset) < 0 ? "-" : "+";
10233
- offset = Math.abs(offset);
10234
- let offsetHours = Math.floor(offset / 36e5);
10235
- let offsetMinutes = offset % 36e5 / 6e4;
10236
- return `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
10237
- }
10238
- function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
10239
- return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
10240
- }
10241
- function _check_private_redeclaration(obj, privateCollection) {
10242
- if (privateCollection.has(obj)) {
10243
- throw new TypeError("Cannot initialize the same private elements twice on an object");
10244
- }
10245
- }
10246
- function _class_private_field_init(obj, privateMap, value) {
10247
- _check_private_redeclaration(obj, privateMap);
10248
- privateMap.set(obj, value);
10249
- }
10250
- function $35ea8db9cb2ccb90$var$shiftArgs(args) {
10251
- let calendar = typeof args[0] === "object" ? args.shift() : new $3b62074eb05584b2$export$80ee6245ec4f29ec();
10252
- let era;
10253
- if (typeof args[0] === "string")
10254
- era = args.shift();
10255
- else {
10256
- let eras = calendar.getEras();
10257
- era = eras[eras.length - 1];
10258
- }
10259
- let year = args.shift();
10260
- let month = args.shift();
10261
- let day = args.shift();
10262
- return [
10263
- calendar,
10264
- era,
10265
- year,
10266
- month,
10267
- day
10268
- ];
10269
- }
10270
- var $35ea8db9cb2ccb90$var$_type = /* @__PURE__ */ new WeakMap();
10271
- class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
10272
- /** Returns a copy of this date. */
10273
- copy() {
10274
- if (this.era)
10275
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
10276
- else
10277
- return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
10278
- }
10279
- /** Returns a new `CalendarDate` with the given duration added to it. */
10280
- add(duration) {
10281
- return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
10282
- }
10283
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
10284
- subtract(duration) {
10285
- return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
10286
- }
10287
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10288
- set(fields) {
10289
- return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this, fields);
10290
- }
10291
- /**
10292
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
10293
- * When the resulting value reaches the limits of the field, it wraps around.
10294
- */
10295
- cycle(field, amount, options) {
10296
- return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
10297
- }
10298
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
10299
- toDate(timeZone) {
10300
- return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone);
10301
- }
10302
- /** Converts the date to an ISO 8601 formatted string. */
10303
- toString() {
10304
- return $fae977aafc393c5c$export$60dfd74aa96791bd(this);
10305
- }
10306
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10307
- compare(b) {
10308
- return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
10309
- }
10310
- constructor(...args) {
10311
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type, {
10312
- writable: true,
10313
- value: void 0
10314
- });
10315
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10316
- this.calendar = calendar;
10317
- this.era = era;
10318
- this.year = year;
10319
- this.month = month;
10320
- this.day = day;
10321
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10322
- }
10323
- }
10324
- var $35ea8db9cb2ccb90$var$_type2 = /* @__PURE__ */ new WeakMap();
10325
- class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
10326
- /** Returns a copy of this date. */
10327
- copy() {
10328
- if (this.era)
10329
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
10330
- else
10331
- return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
10332
- }
10333
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
10334
- add(duration) {
10335
- return $735220c2d4774dd3$export$e16d8520af44a096(this, duration);
10336
- }
10337
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
10338
- subtract(duration) {
10339
- return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this, duration);
10340
- }
10341
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10342
- set(fields) {
10343
- return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this, fields), fields);
10344
- }
10345
- /**
10346
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
10347
- * When the resulting value reaches the limits of the field, it wraps around.
10348
- */
10349
- cycle(field, amount, options) {
10350
- switch (field) {
10351
- case "era":
10352
- case "year":
10353
- case "month":
10354
- case "day":
10355
- return $735220c2d4774dd3$export$d52ced6badfb9a4c(this, field, amount, options);
10356
- default:
10357
- return $735220c2d4774dd3$export$dd02b3e0007dfe28(this, field, amount, options);
10358
- }
10359
- }
10360
- /** Converts the date to a native JavaScript Date object in the given time zone. */
10361
- toDate(timeZone, disambiguation) {
10362
- return $11d87f3f76e88657$export$e67a095c620b86fe(this, timeZone, disambiguation);
10363
- }
10364
- /** Converts the date to an ISO 8601 formatted string. */
10365
- toString() {
10366
- return $fae977aafc393c5c$export$4223de14708adc63(this);
10367
- }
10368
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10369
- compare(b) {
10370
- let res = $14e0f24ef4ac5c92$export$68781ddf31c0090f(this, b);
10371
- if (res === 0)
10372
- return $14e0f24ef4ac5c92$export$c19a80a9721b80f6(this, $11d87f3f76e88657$export$b21e0b124e224484(b));
10373
- return res;
10374
- }
10375
- constructor(...args) {
10376
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type2, {
10377
- writable: true,
10378
- value: void 0
10379
- });
10380
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10381
- this.calendar = calendar;
10382
- this.era = era;
10383
- this.year = year;
10384
- this.month = month;
10385
- this.day = day;
10386
- this.hour = args.shift() || 0;
10387
- this.minute = args.shift() || 0;
10388
- this.second = args.shift() || 0;
10389
- this.millisecond = args.shift() || 0;
10390
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10391
- }
10392
- }
10393
- var $35ea8db9cb2ccb90$var$_type3 = /* @__PURE__ */ new WeakMap();
10394
- class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
10395
- /** Returns a copy of this date. */
10396
- copy() {
10397
- if (this.era)
10398
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
10399
- else
10400
- return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
10401
- }
10402
- /** Returns a new `ZonedDateTime` with the given duration added to it. */
10403
- add(duration) {
10404
- return $735220c2d4774dd3$export$96b1d28349274637(this, duration);
10405
- }
10406
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
10407
- subtract(duration) {
10408
- return $735220c2d4774dd3$export$6814caac34ca03c7(this, duration);
10409
- }
10410
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
10411
- set(fields, disambiguation) {
10412
- return $735220c2d4774dd3$export$31b5430eb18be4f8(this, fields, disambiguation);
10413
- }
10414
- /**
10415
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
10416
- * When the resulting value reaches the limits of the field, it wraps around.
10417
- */
10418
- cycle(field, amount, options) {
10419
- return $735220c2d4774dd3$export$9a297d111fc86b79(this, field, amount, options);
10420
- }
10421
- /** Converts the date to a native JavaScript Date object. */
10422
- toDate() {
10423
- return $11d87f3f76e88657$export$83aac07b4c37b25(this);
10424
- }
10425
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
10426
- toString() {
10427
- return $fae977aafc393c5c$export$bf79f1ebf4b18792(this);
10428
- }
10429
- /** Converts the date to an ISO 8601 formatted string in UTC. */
10430
- toAbsoluteString() {
10431
- return this.toDate().toISOString();
10432
- }
10433
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
10434
- compare(b) {
10435
- return this.toDate().getTime() - $11d87f3f76e88657$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
10436
- }
10437
- constructor(...args) {
10438
- _class_private_field_init(this, $35ea8db9cb2ccb90$var$_type3, {
10439
- writable: true,
10440
- value: void 0
10441
- });
10442
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
10443
- let timeZone = args.shift();
10444
- let offset = args.shift();
10445
- this.calendar = calendar;
10446
- this.era = era;
10447
- this.year = year;
10448
- this.month = month;
10449
- this.day = day;
10450
- this.timeZone = timeZone;
10451
- this.offset = offset;
10452
- this.hour = args.shift() || 0;
10453
- this.minute = args.shift() || 0;
10454
- this.second = args.shift() || 0;
10455
- this.millisecond = args.shift() || 0;
10456
- $735220c2d4774dd3$export$c4e2ecac49351ef2(this);
10457
- }
10458
- }
10459
9530
  const [Provider, useHistory] = createContext("History", {
10460
9531
  history: [],
10461
9532
  currentLocationIndex: 0,
@@ -10468,32 +9539,44 @@ const [Provider, useHistory] = createContext("History", {
10468
9539
  throw new Error("You must use the `HistoryProvider` to access the `goBack` function.");
10469
9540
  }
10470
9541
  });
10471
- React__namespace.forwardRef(({ disabled }, ref2) => {
10472
- const { formatMessage } = reactIntl.useIntl();
10473
- const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
10474
- const goBack = useHistory("BackButton", (state) => state.goBack);
10475
- const history = useHistory("BackButton", (state) => state.history);
10476
- const handleClick = (e) => {
10477
- e.preventDefault();
10478
- goBack();
10479
- };
10480
- return /* @__PURE__ */ jsxRuntime.jsx(
10481
- designSystem.Link,
10482
- {
10483
- ref: ref2,
10484
- tag: reactRouterDom.NavLink,
10485
- to: history.at(-1) ?? "",
10486
- onClick: handleClick,
10487
- disabled: disabled || !canGoBack,
10488
- "aria-disabled": disabled || !canGoBack,
10489
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
10490
- children: formatMessage({
10491
- id: "global.back",
10492
- defaultMessage: "Back"
10493
- })
10494
- }
10495
- );
10496
- });
9542
+ React__namespace.forwardRef(
9543
+ ({ disabled, fallback = "" }, ref2) => {
9544
+ const { formatMessage } = reactIntl.useIntl();
9545
+ const navigate = reactRouterDom.useNavigate();
9546
+ const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
9547
+ const goBack = useHistory("BackButton", (state) => state.goBack);
9548
+ const history = useHistory("BackButton", (state) => state.history);
9549
+ const currentLocationIndex = useHistory("BackButton", (state) => state.currentLocationIndex);
9550
+ const hasFallback = fallback !== "";
9551
+ const shouldBeDisabled = disabled || !canGoBack && !hasFallback;
9552
+ const handleClick = (e) => {
9553
+ e.preventDefault();
9554
+ if (canGoBack) {
9555
+ goBack();
9556
+ } else if (hasFallback) {
9557
+ navigate(fallback);
9558
+ }
9559
+ };
9560
+ const historyTo = canGoBack ? history.at(currentLocationIndex - 2) : void 0;
9561
+ const toWithFallback = historyTo ?? fallback;
9562
+ return /* @__PURE__ */ jsxRuntime.jsx(
9563
+ designSystem.Link,
9564
+ {
9565
+ ref: ref2,
9566
+ tag: reactRouterDom.NavLink,
9567
+ to: toWithFallback,
9568
+ onClick: handleClick,
9569
+ disabled: shouldBeDisabled,
9570
+ "aria-disabled": shouldBeDisabled,
9571
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeft, {}),
9572
+ children: formatMessage({
9573
+ id: "global.back",
9574
+ defaultMessage: "Back"
9575
+ })
9576
+ }
9577
+ );
9578
+ }
9579
+ );
10497
9580
  new reactQuery.QueryClient({
10498
9581
  defaultOptions: {
10499
9582
  queries: {
@@ -11178,13 +10261,24 @@ const CheckboxInput = React.forwardRef(
11178
10261
  }
11179
10262
  );
11180
10263
  const MemoizedCheckboxInput = React.memo(CheckboxInput);
11181
- const DateInput = React.forwardRef(
10264
+ const DateInput = React__namespace.forwardRef(
11182
10265
  ({ name, required, label, hint, labelAction, type: _type, ...props }, ref2) => {
11183
10266
  const { formatMessage } = reactIntl.useIntl();
11184
10267
  const field = useField(name);
11185
10268
  const fieldRef = useFocusInputField(name);
11186
10269
  const composedRefs = designSystem.useComposedRefs(ref2, fieldRef);
10270
+ const [lastValidDate, setLastValidDate] = React__namespace.useState(null);
11187
10271
  const value = typeof field.value === "string" ? new Date(field.value) : field.value;
10272
+ const handleDateChange = (date) => {
10273
+ if (!date) {
10274
+ field.onChange(name, null);
10275
+ setLastValidDate(null);
10276
+ return;
10277
+ }
10278
+ const utcDate = toUTCMidnight(date);
10279
+ field.onChange(name, utcDate.toISOString());
10280
+ setLastValidDate(utcDate);
10281
+ };
11188
10282
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { error: field.error, name, hint, required, children: [
11189
10283
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
11190
10284
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11192,11 +10286,18 @@ const DateInput = React.forwardRef(
11192
10286
  {
11193
10287
  ref: composedRefs,
11194
10288
  clearLabel: formatMessage({ id: "clearLabel", defaultMessage: "Clear" }),
11195
- onChange: (date) => {
11196
- field.onChange(name, date ? convertLocalDateToUTCDate(date).toISOString() : null);
10289
+ onChange: handleDateChange,
10290
+ onClear: () => {
10291
+ field.onChange(name, null);
10292
+ setLastValidDate(null);
10293
+ return;
11197
10294
  },
11198
- onClear: () => field.onChange(name, null),
11199
- value: value ? convertLocalDateToUTCDate(value) : value,
10295
+ onBlur: () => {
10296
+ if (field.value && !value) {
10297
+ field.onChange(name, lastValidDate?.toISOString() ?? null);
10298
+ }
10299
+ },
10300
+ value,
11200
10301
  ...props
11201
10302
  }
11202
10303
  ),
@@ -11205,13 +10306,10 @@ const DateInput = React.forwardRef(
11205
10306
  ] });
11206
10307
  }
11207
10308
  );
11208
- const convertLocalDateToUTCDate = (date) => {
11209
- const utcDateString = date.toISOString();
11210
- const timeZone = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
11211
- const zonedDateTime = $fae977aafc393c5c$export$5adfdab05168c219(utcDateString, timeZone);
11212
- return $11d87f3f76e88657$export$93522d1a439f3617(zonedDateTime).toDate("UTC");
10309
+ const toUTCMidnight = (date) => {
10310
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
11213
10311
  };
11214
- const MemoizedDateInput = React.memo(DateInput);
10312
+ const MemoizedDateInput = React__namespace.memo(DateInput);
11215
10313
  const DateTimeInput = React.forwardRef(
11216
10314
  ({ name, required, label, hint, labelAction, ...props }, ref2) => {
11217
10315
  const { formatMessage } = reactIntl.useIntl();
@@ -11266,12 +10364,13 @@ const EmailInput = React.forwardRef(
11266
10364
  const MemoizedEmailInput = React.memo(EmailInput);
11267
10365
  const EnumerationInput = React.forwardRef(
11268
10366
  ({ name, required, label, hint, labelAction, options = [], ...props }, ref2) => {
10367
+ const { formatMessage } = reactIntl.useIntl();
11269
10368
  const field = useField(name);
11270
10369
  const fieldRef = useFocusInputField(name);
11271
10370
  const composedRefs = designSystem.useComposedRefs(ref2, fieldRef);
11272
10371
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { error: field.error, name, hint, required, children: [
11273
10372
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
11274
- /* @__PURE__ */ jsxRuntime.jsx(
10373
+ /* @__PURE__ */ jsxRuntime.jsxs(
11275
10374
  designSystem.SingleSelect,
11276
10375
  {
11277
10376
  ref: composedRefs,
@@ -11280,9 +10379,15 @@ const EnumerationInput = React.forwardRef(
11280
10379
  },
11281
10380
  value: field.value,
11282
10381
  ...props,
11283
- children: options.map(({ value, label: label2, disabled, hidden }) => {
11284
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, disabled, hidden, children: label2 ?? value }, value);
11285
- })
10382
+ children: [
10383
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: "", disabled: required, hidden: required, children: formatMessage({
10384
+ id: "components.InputSelect.option.placeholder",
10385
+ defaultMessage: "Choose here"
10386
+ }) }),
10387
+ options.map(({ value, label: label2, disabled, hidden }) => {
10388
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value, disabled, hidden, children: label2 ?? value }, value);
10389
+ })
10390
+ ]
11286
10391
  }
11287
10392
  ),
11288
10393
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
@@ -12005,4 +11110,4 @@ adminApi.enhanceEndpoints({
12005
11110
  });
12006
11111
  exports.Layouts = Layouts;
12007
11112
  exports.useTracking = useTracking;
12008
- //# sourceMappingURL=index-C02D7oHu-fMZ4nmrb.js.map
11113
+ //# sourceMappingURL=index-Cn5HftCc-CvJvlZwK.js.map