@percy.ai/heatmap 0.0.0-dev-20231130160548 → 0.0.0-dev-20231212003558
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/umd/heatmap.js +2209 -13
- package/dist/umd/heatmap.js.map +1 -1
- package/dist/umd/heatmap.min.js +2 -2
- package/dist/umd/heatmap.min.js.map +1 -1
- package/package.json +2 -2
package/dist/umd/heatmap.js
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
boolean: V,
|
|
57
57
|
function: N$1,
|
|
58
58
|
json: P
|
|
59
|
-
}, A = Symbol.for("r2wc.render"), h = Symbol.for("r2wc.connected"), u$
|
|
59
|
+
}, A = Symbol.for("r2wc.render"), h = Symbol.for("r2wc.connected"), u$2 = Symbol.for("r2wc.context"), i = Symbol.for("r2wc.props");
|
|
60
60
|
function z$1(t, e, r) {
|
|
61
61
|
var $, k, O;
|
|
62
62
|
e.props || (e.props = t.propTypes ? Object.keys(t.propTypes) : []);
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
this[h] = !0, this[A]();
|
|
89
89
|
}
|
|
90
90
|
disconnectedCallback() {
|
|
91
|
-
this[h] = !1, this[u$
|
|
91
|
+
this[h] = !1, this[u$2] && r.unmount(this[u$2]);
|
|
92
92
|
}
|
|
93
93
|
attributeChangedCallback(c, l, n) {
|
|
94
94
|
const o = m[c], a = f[o], y = w[a];
|
|
95
95
|
o in f && (y != null && y.parse) && (this[i][o] = y.parse(n, this), this[A]());
|
|
96
96
|
}
|
|
97
|
-
[($ = h, k = u$
|
|
98
|
-
this[h] && (this[u$
|
|
97
|
+
[($ = h, k = u$2, O = i, A)]() {
|
|
98
|
+
this[h] && (this[u$2] ? r.update(this[u$2], this[i]) : this[u$2] = r.mount(
|
|
99
99
|
this.container,
|
|
100
100
|
t,
|
|
101
101
|
this[i]
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
var u, n
|
|
130
|
-
u = n
|
|
129
|
+
var u$1, n = $7SXl2$reactdom;
|
|
130
|
+
u$1 = n.createRoot, n.hydrateRoot;
|
|
131
131
|
function E(t, e, o) {
|
|
132
|
-
const r = u(t), a = React.createElement(e, o);
|
|
132
|
+
const r = u$1(t), a = React.createElement(e, o);
|
|
133
133
|
return r.render(a), {
|
|
134
134
|
root: r,
|
|
135
135
|
ReactComponent: e
|
|
@@ -139,11 +139,11 @@
|
|
|
139
139
|
const r = React.createElement(e, o);
|
|
140
140
|
t.render(r);
|
|
141
141
|
}
|
|
142
|
-
function l
|
|
142
|
+
function l({ root: t }) {
|
|
143
143
|
t.unmount();
|
|
144
144
|
}
|
|
145
|
-
function p(t, e = {}) {
|
|
146
|
-
return z$1(t, e, { mount: E, update: _, unmount: l
|
|
145
|
+
function p$1(t, e = {}) {
|
|
146
|
+
return z$1(t, e, { mount: E, update: _, unmount: l });
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function _extends$g() {
|
|
@@ -8330,6 +8330,2202 @@ Defaulting to \`null\`.`;
|
|
|
8330
8330
|
const $905f4ae918aab1aa$export$f99233281efd08a0 = $905f4ae918aab1aa$export$225e0da62d314b7;
|
|
8331
8331
|
const $905f4ae918aab1aa$export$393edc798c47379d = $905f4ae918aab1aa$export$a23b55cde55ad9a5;
|
|
8332
8332
|
|
|
8333
|
+
function _typeof$1(o) {
|
|
8334
|
+
"@babel/helpers - typeof";
|
|
8335
|
+
|
|
8336
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
8337
|
+
return typeof o;
|
|
8338
|
+
} : function (o) {
|
|
8339
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8340
|
+
}, _typeof$1(o);
|
|
8341
|
+
}
|
|
8342
|
+
|
|
8343
|
+
function toInteger(dirtyNumber) {
|
|
8344
|
+
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
8345
|
+
return NaN;
|
|
8346
|
+
}
|
|
8347
|
+
var number = Number(dirtyNumber);
|
|
8348
|
+
if (isNaN(number)) {
|
|
8349
|
+
return number;
|
|
8350
|
+
}
|
|
8351
|
+
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
8352
|
+
}
|
|
8353
|
+
|
|
8354
|
+
function requiredArgs(required, args) {
|
|
8355
|
+
if (args.length < required) {
|
|
8356
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
8357
|
+
}
|
|
8358
|
+
}
|
|
8359
|
+
|
|
8360
|
+
/**
|
|
8361
|
+
* @name toDate
|
|
8362
|
+
* @category Common Helpers
|
|
8363
|
+
* @summary Convert the given argument to an instance of Date.
|
|
8364
|
+
*
|
|
8365
|
+
* @description
|
|
8366
|
+
* Convert the given argument to an instance of Date.
|
|
8367
|
+
*
|
|
8368
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
8369
|
+
*
|
|
8370
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
8371
|
+
*
|
|
8372
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
8373
|
+
*
|
|
8374
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
8375
|
+
*
|
|
8376
|
+
* @param {Date|Number} argument - the value to convert
|
|
8377
|
+
* @returns {Date} the parsed date in the local time zone
|
|
8378
|
+
* @throws {TypeError} 1 argument required
|
|
8379
|
+
*
|
|
8380
|
+
* @example
|
|
8381
|
+
* // Clone the date:
|
|
8382
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
8383
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
8384
|
+
*
|
|
8385
|
+
* @example
|
|
8386
|
+
* // Convert the timestamp to date:
|
|
8387
|
+
* const result = toDate(1392098430000)
|
|
8388
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
8389
|
+
*/
|
|
8390
|
+
function toDate(argument) {
|
|
8391
|
+
requiredArgs(1, arguments);
|
|
8392
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
8393
|
+
|
|
8394
|
+
// Clone the date
|
|
8395
|
+
if (argument instanceof Date || _typeof$1(argument) === 'object' && argStr === '[object Date]') {
|
|
8396
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
8397
|
+
return new Date(argument.getTime());
|
|
8398
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
8399
|
+
return new Date(argument);
|
|
8400
|
+
} else {
|
|
8401
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
8402
|
+
// eslint-disable-next-line no-console
|
|
8403
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
8404
|
+
// eslint-disable-next-line no-console
|
|
8405
|
+
console.warn(new Error().stack);
|
|
8406
|
+
}
|
|
8407
|
+
return new Date(NaN);
|
|
8408
|
+
}
|
|
8409
|
+
}
|
|
8410
|
+
|
|
8411
|
+
/**
|
|
8412
|
+
* @name addMilliseconds
|
|
8413
|
+
* @category Millisecond Helpers
|
|
8414
|
+
* @summary Add the specified number of milliseconds to the given date.
|
|
8415
|
+
*
|
|
8416
|
+
* @description
|
|
8417
|
+
* Add the specified number of milliseconds to the given date.
|
|
8418
|
+
*
|
|
8419
|
+
* @param {Date|Number} date - the date to be changed
|
|
8420
|
+
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
8421
|
+
* @returns {Date} the new date with the milliseconds added
|
|
8422
|
+
* @throws {TypeError} 2 arguments required
|
|
8423
|
+
*
|
|
8424
|
+
* @example
|
|
8425
|
+
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
8426
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
8427
|
+
* //=> Thu Jul 10 2014 12:45:30.750
|
|
8428
|
+
*/
|
|
8429
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
8430
|
+
requiredArgs(2, arguments);
|
|
8431
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
8432
|
+
var amount = toInteger(dirtyAmount);
|
|
8433
|
+
return new Date(timestamp + amount);
|
|
8434
|
+
}
|
|
8435
|
+
|
|
8436
|
+
var defaultOptions = {};
|
|
8437
|
+
function getDefaultOptions() {
|
|
8438
|
+
return defaultOptions;
|
|
8439
|
+
}
|
|
8440
|
+
|
|
8441
|
+
/**
|
|
8442
|
+
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
8443
|
+
* They usually appear for dates that denote time before the timezones were introduced
|
|
8444
|
+
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
8445
|
+
* and GMT+01:00:00 after that date)
|
|
8446
|
+
*
|
|
8447
|
+
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
8448
|
+
* which would lead to incorrect calculations.
|
|
8449
|
+
*
|
|
8450
|
+
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
8451
|
+
*/
|
|
8452
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
8453
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
8454
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
8455
|
+
return date.getTime() - utcDate.getTime();
|
|
8456
|
+
}
|
|
8457
|
+
|
|
8458
|
+
/**
|
|
8459
|
+
* @name isDate
|
|
8460
|
+
* @category Common Helpers
|
|
8461
|
+
* @summary Is the given value a date?
|
|
8462
|
+
*
|
|
8463
|
+
* @description
|
|
8464
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
8465
|
+
*
|
|
8466
|
+
* @param {*} value - the value to check
|
|
8467
|
+
* @returns {boolean} true if the given value is a date
|
|
8468
|
+
* @throws {TypeError} 1 arguments required
|
|
8469
|
+
*
|
|
8470
|
+
* @example
|
|
8471
|
+
* // For a valid date:
|
|
8472
|
+
* const result = isDate(new Date())
|
|
8473
|
+
* //=> true
|
|
8474
|
+
*
|
|
8475
|
+
* @example
|
|
8476
|
+
* // For an invalid date:
|
|
8477
|
+
* const result = isDate(new Date(NaN))
|
|
8478
|
+
* //=> true
|
|
8479
|
+
*
|
|
8480
|
+
* @example
|
|
8481
|
+
* // For some value:
|
|
8482
|
+
* const result = isDate('2014-02-31')
|
|
8483
|
+
* //=> false
|
|
8484
|
+
*
|
|
8485
|
+
* @example
|
|
8486
|
+
* // For an object:
|
|
8487
|
+
* const result = isDate({})
|
|
8488
|
+
* //=> false
|
|
8489
|
+
*/
|
|
8490
|
+
function isDate(value) {
|
|
8491
|
+
requiredArgs(1, arguments);
|
|
8492
|
+
return value instanceof Date || _typeof$1(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8495
|
+
/**
|
|
8496
|
+
* @name isValid
|
|
8497
|
+
* @category Common Helpers
|
|
8498
|
+
* @summary Is the given date valid?
|
|
8499
|
+
*
|
|
8500
|
+
* @description
|
|
8501
|
+
* Returns false if argument is Invalid Date and true otherwise.
|
|
8502
|
+
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
8503
|
+
* Invalid Date is a Date, whose time value is NaN.
|
|
8504
|
+
*
|
|
8505
|
+
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
8506
|
+
*
|
|
8507
|
+
* @param {*} date - the date to check
|
|
8508
|
+
* @returns {Boolean} the date is valid
|
|
8509
|
+
* @throws {TypeError} 1 argument required
|
|
8510
|
+
*
|
|
8511
|
+
* @example
|
|
8512
|
+
* // For the valid date:
|
|
8513
|
+
* const result = isValid(new Date(2014, 1, 31))
|
|
8514
|
+
* //=> true
|
|
8515
|
+
*
|
|
8516
|
+
* @example
|
|
8517
|
+
* // For the value, convertable into a date:
|
|
8518
|
+
* const result = isValid(1393804800000)
|
|
8519
|
+
* //=> true
|
|
8520
|
+
*
|
|
8521
|
+
* @example
|
|
8522
|
+
* // For the invalid date:
|
|
8523
|
+
* const result = isValid(new Date(''))
|
|
8524
|
+
* //=> false
|
|
8525
|
+
*/
|
|
8526
|
+
function isValid$1(dirtyDate) {
|
|
8527
|
+
requiredArgs(1, arguments);
|
|
8528
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
8529
|
+
return false;
|
|
8530
|
+
}
|
|
8531
|
+
var date = toDate(dirtyDate);
|
|
8532
|
+
return !isNaN(Number(date));
|
|
8533
|
+
}
|
|
8534
|
+
|
|
8535
|
+
/**
|
|
8536
|
+
* @name subMilliseconds
|
|
8537
|
+
* @category Millisecond Helpers
|
|
8538
|
+
* @summary Subtract the specified number of milliseconds from the given date.
|
|
8539
|
+
*
|
|
8540
|
+
* @description
|
|
8541
|
+
* Subtract the specified number of milliseconds from the given date.
|
|
8542
|
+
*
|
|
8543
|
+
* @param {Date|Number} date - the date to be changed
|
|
8544
|
+
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
8545
|
+
* @returns {Date} the new date with the milliseconds subtracted
|
|
8546
|
+
* @throws {TypeError} 2 arguments required
|
|
8547
|
+
*
|
|
8548
|
+
* @example
|
|
8549
|
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
8550
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
8551
|
+
* //=> Thu Jul 10 2014 12:45:29.250
|
|
8552
|
+
*/
|
|
8553
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
8554
|
+
requiredArgs(2, arguments);
|
|
8555
|
+
var amount = toInteger(dirtyAmount);
|
|
8556
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
8557
|
+
}
|
|
8558
|
+
|
|
8559
|
+
var MILLISECONDS_IN_DAY = 86400000;
|
|
8560
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
8561
|
+
requiredArgs(1, arguments);
|
|
8562
|
+
var date = toDate(dirtyDate);
|
|
8563
|
+
var timestamp = date.getTime();
|
|
8564
|
+
date.setUTCMonth(0, 1);
|
|
8565
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
8566
|
+
var startOfYearTimestamp = date.getTime();
|
|
8567
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
8568
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
8569
|
+
}
|
|
8570
|
+
|
|
8571
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
8572
|
+
requiredArgs(1, arguments);
|
|
8573
|
+
var weekStartsOn = 1;
|
|
8574
|
+
var date = toDate(dirtyDate);
|
|
8575
|
+
var day = date.getUTCDay();
|
|
8576
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
8577
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
8578
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
8579
|
+
return date;
|
|
8580
|
+
}
|
|
8581
|
+
|
|
8582
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
8583
|
+
requiredArgs(1, arguments);
|
|
8584
|
+
var date = toDate(dirtyDate);
|
|
8585
|
+
var year = date.getUTCFullYear();
|
|
8586
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
8587
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
8588
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
8589
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
8590
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
8591
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
8592
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
8593
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
8594
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
8595
|
+
return year + 1;
|
|
8596
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
8597
|
+
return year;
|
|
8598
|
+
} else {
|
|
8599
|
+
return year - 1;
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
|
|
8603
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
8604
|
+
requiredArgs(1, arguments);
|
|
8605
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
8606
|
+
var fourthOfJanuary = new Date(0);
|
|
8607
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
8608
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
8609
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
8610
|
+
return date;
|
|
8611
|
+
}
|
|
8612
|
+
|
|
8613
|
+
var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
8614
|
+
function getUTCISOWeek(dirtyDate) {
|
|
8615
|
+
requiredArgs(1, arguments);
|
|
8616
|
+
var date = toDate(dirtyDate);
|
|
8617
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
8618
|
+
|
|
8619
|
+
// Round the number of days to the nearest integer
|
|
8620
|
+
// because the number of milliseconds in a week is not constant
|
|
8621
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
8622
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
8623
|
+
}
|
|
8624
|
+
|
|
8625
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
8626
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
8627
|
+
requiredArgs(1, arguments);
|
|
8628
|
+
var defaultOptions = getDefaultOptions();
|
|
8629
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
8630
|
+
|
|
8631
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
8632
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
8633
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
8634
|
+
}
|
|
8635
|
+
var date = toDate(dirtyDate);
|
|
8636
|
+
var day = date.getUTCDay();
|
|
8637
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
8638
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
8639
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
8640
|
+
return date;
|
|
8641
|
+
}
|
|
8642
|
+
|
|
8643
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
8644
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
8645
|
+
requiredArgs(1, arguments);
|
|
8646
|
+
var date = toDate(dirtyDate);
|
|
8647
|
+
var year = date.getUTCFullYear();
|
|
8648
|
+
var defaultOptions = getDefaultOptions();
|
|
8649
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
8650
|
+
|
|
8651
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
8652
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
8653
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
8654
|
+
}
|
|
8655
|
+
var firstWeekOfNextYear = new Date(0);
|
|
8656
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
8657
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
8658
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
8659
|
+
var firstWeekOfThisYear = new Date(0);
|
|
8660
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
8661
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
8662
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
8663
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
8664
|
+
return year + 1;
|
|
8665
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
8666
|
+
return year;
|
|
8667
|
+
} else {
|
|
8668
|
+
return year - 1;
|
|
8669
|
+
}
|
|
8670
|
+
}
|
|
8671
|
+
|
|
8672
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
8673
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
8674
|
+
requiredArgs(1, arguments);
|
|
8675
|
+
var defaultOptions = getDefaultOptions();
|
|
8676
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
8677
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
8678
|
+
var firstWeek = new Date(0);
|
|
8679
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
8680
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
8681
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
8682
|
+
return date;
|
|
8683
|
+
}
|
|
8684
|
+
|
|
8685
|
+
var MILLISECONDS_IN_WEEK = 604800000;
|
|
8686
|
+
function getUTCWeek(dirtyDate, options) {
|
|
8687
|
+
requiredArgs(1, arguments);
|
|
8688
|
+
var date = toDate(dirtyDate);
|
|
8689
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
8690
|
+
|
|
8691
|
+
// Round the number of days to the nearest integer
|
|
8692
|
+
// because the number of milliseconds in a week is not constant
|
|
8693
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
8694
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
8695
|
+
}
|
|
8696
|
+
|
|
8697
|
+
function addLeadingZeros(number, targetLength) {
|
|
8698
|
+
var sign = number < 0 ? '-' : '';
|
|
8699
|
+
var output = Math.abs(number).toString();
|
|
8700
|
+
while (output.length < targetLength) {
|
|
8701
|
+
output = '0' + output;
|
|
8702
|
+
}
|
|
8703
|
+
return sign + output;
|
|
8704
|
+
}
|
|
8705
|
+
|
|
8706
|
+
/*
|
|
8707
|
+
* | | Unit | | Unit |
|
|
8708
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
8709
|
+
* | a | AM, PM | A* | |
|
|
8710
|
+
* | d | Day of month | D | |
|
|
8711
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
8712
|
+
* | m | Minute | M | Month |
|
|
8713
|
+
* | s | Second | S | Fraction of second |
|
|
8714
|
+
* | y | Year (abs) | Y | |
|
|
8715
|
+
*
|
|
8716
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
8717
|
+
*/
|
|
8718
|
+
var formatters$2 = {
|
|
8719
|
+
// Year
|
|
8720
|
+
y: function y(date, token) {
|
|
8721
|
+
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
8722
|
+
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
8723
|
+
// |----------|-------|----|-------|-------|-------|
|
|
8724
|
+
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
8725
|
+
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
8726
|
+
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
8727
|
+
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
8728
|
+
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
8729
|
+
|
|
8730
|
+
var signedYear = date.getUTCFullYear();
|
|
8731
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
8732
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
8733
|
+
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
8734
|
+
},
|
|
8735
|
+
// Month
|
|
8736
|
+
M: function M(date, token) {
|
|
8737
|
+
var month = date.getUTCMonth();
|
|
8738
|
+
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
8739
|
+
},
|
|
8740
|
+
// Day of the month
|
|
8741
|
+
d: function d(date, token) {
|
|
8742
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
8743
|
+
},
|
|
8744
|
+
// AM or PM
|
|
8745
|
+
a: function a(date, token) {
|
|
8746
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
8747
|
+
switch (token) {
|
|
8748
|
+
case 'a':
|
|
8749
|
+
case 'aa':
|
|
8750
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
8751
|
+
case 'aaa':
|
|
8752
|
+
return dayPeriodEnumValue;
|
|
8753
|
+
case 'aaaaa':
|
|
8754
|
+
return dayPeriodEnumValue[0];
|
|
8755
|
+
case 'aaaa':
|
|
8756
|
+
default:
|
|
8757
|
+
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
8758
|
+
}
|
|
8759
|
+
},
|
|
8760
|
+
// Hour [1-12]
|
|
8761
|
+
h: function h(date, token) {
|
|
8762
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
8763
|
+
},
|
|
8764
|
+
// Hour [0-23]
|
|
8765
|
+
H: function H(date, token) {
|
|
8766
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
8767
|
+
},
|
|
8768
|
+
// Minute
|
|
8769
|
+
m: function m(date, token) {
|
|
8770
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
8771
|
+
},
|
|
8772
|
+
// Second
|
|
8773
|
+
s: function s(date, token) {
|
|
8774
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
8775
|
+
},
|
|
8776
|
+
// Fraction of second
|
|
8777
|
+
S: function S(date, token) {
|
|
8778
|
+
var numberOfDigits = token.length;
|
|
8779
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
8780
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
8781
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
8782
|
+
}
|
|
8783
|
+
};
|
|
8784
|
+
var formatters$3 = formatters$2;
|
|
8785
|
+
|
|
8786
|
+
var dayPeriodEnum = {
|
|
8787
|
+
am: 'am',
|
|
8788
|
+
pm: 'pm',
|
|
8789
|
+
midnight: 'midnight',
|
|
8790
|
+
noon: 'noon',
|
|
8791
|
+
morning: 'morning',
|
|
8792
|
+
afternoon: 'afternoon',
|
|
8793
|
+
evening: 'evening',
|
|
8794
|
+
night: 'night'
|
|
8795
|
+
};
|
|
8796
|
+
/*
|
|
8797
|
+
* | | Unit | | Unit |
|
|
8798
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
8799
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
8800
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
8801
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
8802
|
+
* | d | Day of month | D | Day of year |
|
|
8803
|
+
* | e | Local day of week | E | Day of week |
|
|
8804
|
+
* | f | | F* | Day of week in month |
|
|
8805
|
+
* | g* | Modified Julian day | G | Era |
|
|
8806
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
8807
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
8808
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
8809
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
8810
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
8811
|
+
* | m | Minute | M | Month |
|
|
8812
|
+
* | n | | N | |
|
|
8813
|
+
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
8814
|
+
* | p! | Long localized time | P! | Long localized date |
|
|
8815
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
8816
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
8817
|
+
* | s | Second | S | Fraction of second |
|
|
8818
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
8819
|
+
* | u | Extended year | U* | Cyclic year |
|
|
8820
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
8821
|
+
* | w | Local week of year | W* | Week of month |
|
|
8822
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
8823
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
8824
|
+
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
8825
|
+
*
|
|
8826
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
8827
|
+
*
|
|
8828
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
8829
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
8830
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
8831
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
8832
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
8833
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
8834
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
8835
|
+
* for universal ISO week-numbering date, whereas
|
|
8836
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
8837
|
+
* for week-numbering date specific to the locale.
|
|
8838
|
+
* - `P` is long localized date format
|
|
8839
|
+
* - `p` is long localized time format
|
|
8840
|
+
*/
|
|
8841
|
+
|
|
8842
|
+
var formatters = {
|
|
8843
|
+
// Era
|
|
8844
|
+
G: function G(date, token, localize) {
|
|
8845
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
8846
|
+
switch (token) {
|
|
8847
|
+
// AD, BC
|
|
8848
|
+
case 'G':
|
|
8849
|
+
case 'GG':
|
|
8850
|
+
case 'GGG':
|
|
8851
|
+
return localize.era(era, {
|
|
8852
|
+
width: 'abbreviated'
|
|
8853
|
+
});
|
|
8854
|
+
// A, B
|
|
8855
|
+
case 'GGGGG':
|
|
8856
|
+
return localize.era(era, {
|
|
8857
|
+
width: 'narrow'
|
|
8858
|
+
});
|
|
8859
|
+
// Anno Domini, Before Christ
|
|
8860
|
+
case 'GGGG':
|
|
8861
|
+
default:
|
|
8862
|
+
return localize.era(era, {
|
|
8863
|
+
width: 'wide'
|
|
8864
|
+
});
|
|
8865
|
+
}
|
|
8866
|
+
},
|
|
8867
|
+
// Year
|
|
8868
|
+
y: function y(date, token, localize) {
|
|
8869
|
+
// Ordinal number
|
|
8870
|
+
if (token === 'yo') {
|
|
8871
|
+
var signedYear = date.getUTCFullYear();
|
|
8872
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
8873
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
8874
|
+
return localize.ordinalNumber(year, {
|
|
8875
|
+
unit: 'year'
|
|
8876
|
+
});
|
|
8877
|
+
}
|
|
8878
|
+
return formatters$3.y(date, token);
|
|
8879
|
+
},
|
|
8880
|
+
// Local week-numbering year
|
|
8881
|
+
Y: function Y(date, token, localize, options) {
|
|
8882
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
8883
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
8884
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
8885
|
+
|
|
8886
|
+
// Two digit year
|
|
8887
|
+
if (token === 'YY') {
|
|
8888
|
+
var twoDigitYear = weekYear % 100;
|
|
8889
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
8890
|
+
}
|
|
8891
|
+
|
|
8892
|
+
// Ordinal number
|
|
8893
|
+
if (token === 'Yo') {
|
|
8894
|
+
return localize.ordinalNumber(weekYear, {
|
|
8895
|
+
unit: 'year'
|
|
8896
|
+
});
|
|
8897
|
+
}
|
|
8898
|
+
|
|
8899
|
+
// Padding
|
|
8900
|
+
return addLeadingZeros(weekYear, token.length);
|
|
8901
|
+
},
|
|
8902
|
+
// ISO week-numbering year
|
|
8903
|
+
R: function R(date, token) {
|
|
8904
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
8905
|
+
|
|
8906
|
+
// Padding
|
|
8907
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
8908
|
+
},
|
|
8909
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
8910
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
8911
|
+
// | Year | `y` | `u` |
|
|
8912
|
+
// |------|-----|-----|
|
|
8913
|
+
// | AC 1 | 1 | 1 |
|
|
8914
|
+
// | BC 1 | 1 | 0 |
|
|
8915
|
+
// | BC 2 | 2 | -1 |
|
|
8916
|
+
// Also `yy` always returns the last two digits of a year,
|
|
8917
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
8918
|
+
u: function u(date, token) {
|
|
8919
|
+
var year = date.getUTCFullYear();
|
|
8920
|
+
return addLeadingZeros(year, token.length);
|
|
8921
|
+
},
|
|
8922
|
+
// Quarter
|
|
8923
|
+
Q: function Q(date, token, localize) {
|
|
8924
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
8925
|
+
switch (token) {
|
|
8926
|
+
// 1, 2, 3, 4
|
|
8927
|
+
case 'Q':
|
|
8928
|
+
return String(quarter);
|
|
8929
|
+
// 01, 02, 03, 04
|
|
8930
|
+
case 'QQ':
|
|
8931
|
+
return addLeadingZeros(quarter, 2);
|
|
8932
|
+
// 1st, 2nd, 3rd, 4th
|
|
8933
|
+
case 'Qo':
|
|
8934
|
+
return localize.ordinalNumber(quarter, {
|
|
8935
|
+
unit: 'quarter'
|
|
8936
|
+
});
|
|
8937
|
+
// Q1, Q2, Q3, Q4
|
|
8938
|
+
case 'QQQ':
|
|
8939
|
+
return localize.quarter(quarter, {
|
|
8940
|
+
width: 'abbreviated',
|
|
8941
|
+
context: 'formatting'
|
|
8942
|
+
});
|
|
8943
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
8944
|
+
case 'QQQQQ':
|
|
8945
|
+
return localize.quarter(quarter, {
|
|
8946
|
+
width: 'narrow',
|
|
8947
|
+
context: 'formatting'
|
|
8948
|
+
});
|
|
8949
|
+
// 1st quarter, 2nd quarter, ...
|
|
8950
|
+
case 'QQQQ':
|
|
8951
|
+
default:
|
|
8952
|
+
return localize.quarter(quarter, {
|
|
8953
|
+
width: 'wide',
|
|
8954
|
+
context: 'formatting'
|
|
8955
|
+
});
|
|
8956
|
+
}
|
|
8957
|
+
},
|
|
8958
|
+
// Stand-alone quarter
|
|
8959
|
+
q: function q(date, token, localize) {
|
|
8960
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
8961
|
+
switch (token) {
|
|
8962
|
+
// 1, 2, 3, 4
|
|
8963
|
+
case 'q':
|
|
8964
|
+
return String(quarter);
|
|
8965
|
+
// 01, 02, 03, 04
|
|
8966
|
+
case 'qq':
|
|
8967
|
+
return addLeadingZeros(quarter, 2);
|
|
8968
|
+
// 1st, 2nd, 3rd, 4th
|
|
8969
|
+
case 'qo':
|
|
8970
|
+
return localize.ordinalNumber(quarter, {
|
|
8971
|
+
unit: 'quarter'
|
|
8972
|
+
});
|
|
8973
|
+
// Q1, Q2, Q3, Q4
|
|
8974
|
+
case 'qqq':
|
|
8975
|
+
return localize.quarter(quarter, {
|
|
8976
|
+
width: 'abbreviated',
|
|
8977
|
+
context: 'standalone'
|
|
8978
|
+
});
|
|
8979
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
8980
|
+
case 'qqqqq':
|
|
8981
|
+
return localize.quarter(quarter, {
|
|
8982
|
+
width: 'narrow',
|
|
8983
|
+
context: 'standalone'
|
|
8984
|
+
});
|
|
8985
|
+
// 1st quarter, 2nd quarter, ...
|
|
8986
|
+
case 'qqqq':
|
|
8987
|
+
default:
|
|
8988
|
+
return localize.quarter(quarter, {
|
|
8989
|
+
width: 'wide',
|
|
8990
|
+
context: 'standalone'
|
|
8991
|
+
});
|
|
8992
|
+
}
|
|
8993
|
+
},
|
|
8994
|
+
// Month
|
|
8995
|
+
M: function M(date, token, localize) {
|
|
8996
|
+
var month = date.getUTCMonth();
|
|
8997
|
+
switch (token) {
|
|
8998
|
+
case 'M':
|
|
8999
|
+
case 'MM':
|
|
9000
|
+
return formatters$3.M(date, token);
|
|
9001
|
+
// 1st, 2nd, ..., 12th
|
|
9002
|
+
case 'Mo':
|
|
9003
|
+
return localize.ordinalNumber(month + 1, {
|
|
9004
|
+
unit: 'month'
|
|
9005
|
+
});
|
|
9006
|
+
// Jan, Feb, ..., Dec
|
|
9007
|
+
case 'MMM':
|
|
9008
|
+
return localize.month(month, {
|
|
9009
|
+
width: 'abbreviated',
|
|
9010
|
+
context: 'formatting'
|
|
9011
|
+
});
|
|
9012
|
+
// J, F, ..., D
|
|
9013
|
+
case 'MMMMM':
|
|
9014
|
+
return localize.month(month, {
|
|
9015
|
+
width: 'narrow',
|
|
9016
|
+
context: 'formatting'
|
|
9017
|
+
});
|
|
9018
|
+
// January, February, ..., December
|
|
9019
|
+
case 'MMMM':
|
|
9020
|
+
default:
|
|
9021
|
+
return localize.month(month, {
|
|
9022
|
+
width: 'wide',
|
|
9023
|
+
context: 'formatting'
|
|
9024
|
+
});
|
|
9025
|
+
}
|
|
9026
|
+
},
|
|
9027
|
+
// Stand-alone month
|
|
9028
|
+
L: function L(date, token, localize) {
|
|
9029
|
+
var month = date.getUTCMonth();
|
|
9030
|
+
switch (token) {
|
|
9031
|
+
// 1, 2, ..., 12
|
|
9032
|
+
case 'L':
|
|
9033
|
+
return String(month + 1);
|
|
9034
|
+
// 01, 02, ..., 12
|
|
9035
|
+
case 'LL':
|
|
9036
|
+
return addLeadingZeros(month + 1, 2);
|
|
9037
|
+
// 1st, 2nd, ..., 12th
|
|
9038
|
+
case 'Lo':
|
|
9039
|
+
return localize.ordinalNumber(month + 1, {
|
|
9040
|
+
unit: 'month'
|
|
9041
|
+
});
|
|
9042
|
+
// Jan, Feb, ..., Dec
|
|
9043
|
+
case 'LLL':
|
|
9044
|
+
return localize.month(month, {
|
|
9045
|
+
width: 'abbreviated',
|
|
9046
|
+
context: 'standalone'
|
|
9047
|
+
});
|
|
9048
|
+
// J, F, ..., D
|
|
9049
|
+
case 'LLLLL':
|
|
9050
|
+
return localize.month(month, {
|
|
9051
|
+
width: 'narrow',
|
|
9052
|
+
context: 'standalone'
|
|
9053
|
+
});
|
|
9054
|
+
// January, February, ..., December
|
|
9055
|
+
case 'LLLL':
|
|
9056
|
+
default:
|
|
9057
|
+
return localize.month(month, {
|
|
9058
|
+
width: 'wide',
|
|
9059
|
+
context: 'standalone'
|
|
9060
|
+
});
|
|
9061
|
+
}
|
|
9062
|
+
},
|
|
9063
|
+
// Local week of year
|
|
9064
|
+
w: function w(date, token, localize, options) {
|
|
9065
|
+
var week = getUTCWeek(date, options);
|
|
9066
|
+
if (token === 'wo') {
|
|
9067
|
+
return localize.ordinalNumber(week, {
|
|
9068
|
+
unit: 'week'
|
|
9069
|
+
});
|
|
9070
|
+
}
|
|
9071
|
+
return addLeadingZeros(week, token.length);
|
|
9072
|
+
},
|
|
9073
|
+
// ISO week of year
|
|
9074
|
+
I: function I(date, token, localize) {
|
|
9075
|
+
var isoWeek = getUTCISOWeek(date);
|
|
9076
|
+
if (token === 'Io') {
|
|
9077
|
+
return localize.ordinalNumber(isoWeek, {
|
|
9078
|
+
unit: 'week'
|
|
9079
|
+
});
|
|
9080
|
+
}
|
|
9081
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
9082
|
+
},
|
|
9083
|
+
// Day of the month
|
|
9084
|
+
d: function d(date, token, localize) {
|
|
9085
|
+
if (token === 'do') {
|
|
9086
|
+
return localize.ordinalNumber(date.getUTCDate(), {
|
|
9087
|
+
unit: 'date'
|
|
9088
|
+
});
|
|
9089
|
+
}
|
|
9090
|
+
return formatters$3.d(date, token);
|
|
9091
|
+
},
|
|
9092
|
+
// Day of year
|
|
9093
|
+
D: function D(date, token, localize) {
|
|
9094
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
9095
|
+
if (token === 'Do') {
|
|
9096
|
+
return localize.ordinalNumber(dayOfYear, {
|
|
9097
|
+
unit: 'dayOfYear'
|
|
9098
|
+
});
|
|
9099
|
+
}
|
|
9100
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
9101
|
+
},
|
|
9102
|
+
// Day of week
|
|
9103
|
+
E: function E(date, token, localize) {
|
|
9104
|
+
var dayOfWeek = date.getUTCDay();
|
|
9105
|
+
switch (token) {
|
|
9106
|
+
// Tue
|
|
9107
|
+
case 'E':
|
|
9108
|
+
case 'EE':
|
|
9109
|
+
case 'EEE':
|
|
9110
|
+
return localize.day(dayOfWeek, {
|
|
9111
|
+
width: 'abbreviated',
|
|
9112
|
+
context: 'formatting'
|
|
9113
|
+
});
|
|
9114
|
+
// T
|
|
9115
|
+
case 'EEEEE':
|
|
9116
|
+
return localize.day(dayOfWeek, {
|
|
9117
|
+
width: 'narrow',
|
|
9118
|
+
context: 'formatting'
|
|
9119
|
+
});
|
|
9120
|
+
// Tu
|
|
9121
|
+
case 'EEEEEE':
|
|
9122
|
+
return localize.day(dayOfWeek, {
|
|
9123
|
+
width: 'short',
|
|
9124
|
+
context: 'formatting'
|
|
9125
|
+
});
|
|
9126
|
+
// Tuesday
|
|
9127
|
+
case 'EEEE':
|
|
9128
|
+
default:
|
|
9129
|
+
return localize.day(dayOfWeek, {
|
|
9130
|
+
width: 'wide',
|
|
9131
|
+
context: 'formatting'
|
|
9132
|
+
});
|
|
9133
|
+
}
|
|
9134
|
+
},
|
|
9135
|
+
// Local day of week
|
|
9136
|
+
e: function e(date, token, localize, options) {
|
|
9137
|
+
var dayOfWeek = date.getUTCDay();
|
|
9138
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
9139
|
+
switch (token) {
|
|
9140
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
9141
|
+
case 'e':
|
|
9142
|
+
return String(localDayOfWeek);
|
|
9143
|
+
// Padded numerical value
|
|
9144
|
+
case 'ee':
|
|
9145
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
9146
|
+
// 1st, 2nd, ..., 7th
|
|
9147
|
+
case 'eo':
|
|
9148
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
9149
|
+
unit: 'day'
|
|
9150
|
+
});
|
|
9151
|
+
case 'eee':
|
|
9152
|
+
return localize.day(dayOfWeek, {
|
|
9153
|
+
width: 'abbreviated',
|
|
9154
|
+
context: 'formatting'
|
|
9155
|
+
});
|
|
9156
|
+
// T
|
|
9157
|
+
case 'eeeee':
|
|
9158
|
+
return localize.day(dayOfWeek, {
|
|
9159
|
+
width: 'narrow',
|
|
9160
|
+
context: 'formatting'
|
|
9161
|
+
});
|
|
9162
|
+
// Tu
|
|
9163
|
+
case 'eeeeee':
|
|
9164
|
+
return localize.day(dayOfWeek, {
|
|
9165
|
+
width: 'short',
|
|
9166
|
+
context: 'formatting'
|
|
9167
|
+
});
|
|
9168
|
+
// Tuesday
|
|
9169
|
+
case 'eeee':
|
|
9170
|
+
default:
|
|
9171
|
+
return localize.day(dayOfWeek, {
|
|
9172
|
+
width: 'wide',
|
|
9173
|
+
context: 'formatting'
|
|
9174
|
+
});
|
|
9175
|
+
}
|
|
9176
|
+
},
|
|
9177
|
+
// Stand-alone local day of week
|
|
9178
|
+
c: function c(date, token, localize, options) {
|
|
9179
|
+
var dayOfWeek = date.getUTCDay();
|
|
9180
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
9181
|
+
switch (token) {
|
|
9182
|
+
// Numerical value (same as in `e`)
|
|
9183
|
+
case 'c':
|
|
9184
|
+
return String(localDayOfWeek);
|
|
9185
|
+
// Padded numerical value
|
|
9186
|
+
case 'cc':
|
|
9187
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
9188
|
+
// 1st, 2nd, ..., 7th
|
|
9189
|
+
case 'co':
|
|
9190
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
9191
|
+
unit: 'day'
|
|
9192
|
+
});
|
|
9193
|
+
case 'ccc':
|
|
9194
|
+
return localize.day(dayOfWeek, {
|
|
9195
|
+
width: 'abbreviated',
|
|
9196
|
+
context: 'standalone'
|
|
9197
|
+
});
|
|
9198
|
+
// T
|
|
9199
|
+
case 'ccccc':
|
|
9200
|
+
return localize.day(dayOfWeek, {
|
|
9201
|
+
width: 'narrow',
|
|
9202
|
+
context: 'standalone'
|
|
9203
|
+
});
|
|
9204
|
+
// Tu
|
|
9205
|
+
case 'cccccc':
|
|
9206
|
+
return localize.day(dayOfWeek, {
|
|
9207
|
+
width: 'short',
|
|
9208
|
+
context: 'standalone'
|
|
9209
|
+
});
|
|
9210
|
+
// Tuesday
|
|
9211
|
+
case 'cccc':
|
|
9212
|
+
default:
|
|
9213
|
+
return localize.day(dayOfWeek, {
|
|
9214
|
+
width: 'wide',
|
|
9215
|
+
context: 'standalone'
|
|
9216
|
+
});
|
|
9217
|
+
}
|
|
9218
|
+
},
|
|
9219
|
+
// ISO day of week
|
|
9220
|
+
i: function i(date, token, localize) {
|
|
9221
|
+
var dayOfWeek = date.getUTCDay();
|
|
9222
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
9223
|
+
switch (token) {
|
|
9224
|
+
// 2
|
|
9225
|
+
case 'i':
|
|
9226
|
+
return String(isoDayOfWeek);
|
|
9227
|
+
// 02
|
|
9228
|
+
case 'ii':
|
|
9229
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
9230
|
+
// 2nd
|
|
9231
|
+
case 'io':
|
|
9232
|
+
return localize.ordinalNumber(isoDayOfWeek, {
|
|
9233
|
+
unit: 'day'
|
|
9234
|
+
});
|
|
9235
|
+
// Tue
|
|
9236
|
+
case 'iii':
|
|
9237
|
+
return localize.day(dayOfWeek, {
|
|
9238
|
+
width: 'abbreviated',
|
|
9239
|
+
context: 'formatting'
|
|
9240
|
+
});
|
|
9241
|
+
// T
|
|
9242
|
+
case 'iiiii':
|
|
9243
|
+
return localize.day(dayOfWeek, {
|
|
9244
|
+
width: 'narrow',
|
|
9245
|
+
context: 'formatting'
|
|
9246
|
+
});
|
|
9247
|
+
// Tu
|
|
9248
|
+
case 'iiiiii':
|
|
9249
|
+
return localize.day(dayOfWeek, {
|
|
9250
|
+
width: 'short',
|
|
9251
|
+
context: 'formatting'
|
|
9252
|
+
});
|
|
9253
|
+
// Tuesday
|
|
9254
|
+
case 'iiii':
|
|
9255
|
+
default:
|
|
9256
|
+
return localize.day(dayOfWeek, {
|
|
9257
|
+
width: 'wide',
|
|
9258
|
+
context: 'formatting'
|
|
9259
|
+
});
|
|
9260
|
+
}
|
|
9261
|
+
},
|
|
9262
|
+
// AM or PM
|
|
9263
|
+
a: function a(date, token, localize) {
|
|
9264
|
+
var hours = date.getUTCHours();
|
|
9265
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
9266
|
+
switch (token) {
|
|
9267
|
+
case 'a':
|
|
9268
|
+
case 'aa':
|
|
9269
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9270
|
+
width: 'abbreviated',
|
|
9271
|
+
context: 'formatting'
|
|
9272
|
+
});
|
|
9273
|
+
case 'aaa':
|
|
9274
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9275
|
+
width: 'abbreviated',
|
|
9276
|
+
context: 'formatting'
|
|
9277
|
+
}).toLowerCase();
|
|
9278
|
+
case 'aaaaa':
|
|
9279
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9280
|
+
width: 'narrow',
|
|
9281
|
+
context: 'formatting'
|
|
9282
|
+
});
|
|
9283
|
+
case 'aaaa':
|
|
9284
|
+
default:
|
|
9285
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9286
|
+
width: 'wide',
|
|
9287
|
+
context: 'formatting'
|
|
9288
|
+
});
|
|
9289
|
+
}
|
|
9290
|
+
},
|
|
9291
|
+
// AM, PM, midnight, noon
|
|
9292
|
+
b: function b(date, token, localize) {
|
|
9293
|
+
var hours = date.getUTCHours();
|
|
9294
|
+
var dayPeriodEnumValue;
|
|
9295
|
+
if (hours === 12) {
|
|
9296
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
9297
|
+
} else if (hours === 0) {
|
|
9298
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
9299
|
+
} else {
|
|
9300
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
9301
|
+
}
|
|
9302
|
+
switch (token) {
|
|
9303
|
+
case 'b':
|
|
9304
|
+
case 'bb':
|
|
9305
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9306
|
+
width: 'abbreviated',
|
|
9307
|
+
context: 'formatting'
|
|
9308
|
+
});
|
|
9309
|
+
case 'bbb':
|
|
9310
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9311
|
+
width: 'abbreviated',
|
|
9312
|
+
context: 'formatting'
|
|
9313
|
+
}).toLowerCase();
|
|
9314
|
+
case 'bbbbb':
|
|
9315
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9316
|
+
width: 'narrow',
|
|
9317
|
+
context: 'formatting'
|
|
9318
|
+
});
|
|
9319
|
+
case 'bbbb':
|
|
9320
|
+
default:
|
|
9321
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9322
|
+
width: 'wide',
|
|
9323
|
+
context: 'formatting'
|
|
9324
|
+
});
|
|
9325
|
+
}
|
|
9326
|
+
},
|
|
9327
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
9328
|
+
B: function B(date, token, localize) {
|
|
9329
|
+
var hours = date.getUTCHours();
|
|
9330
|
+
var dayPeriodEnumValue;
|
|
9331
|
+
if (hours >= 17) {
|
|
9332
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
9333
|
+
} else if (hours >= 12) {
|
|
9334
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
9335
|
+
} else if (hours >= 4) {
|
|
9336
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
9337
|
+
} else {
|
|
9338
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
9339
|
+
}
|
|
9340
|
+
switch (token) {
|
|
9341
|
+
case 'B':
|
|
9342
|
+
case 'BB':
|
|
9343
|
+
case 'BBB':
|
|
9344
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9345
|
+
width: 'abbreviated',
|
|
9346
|
+
context: 'formatting'
|
|
9347
|
+
});
|
|
9348
|
+
case 'BBBBB':
|
|
9349
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9350
|
+
width: 'narrow',
|
|
9351
|
+
context: 'formatting'
|
|
9352
|
+
});
|
|
9353
|
+
case 'BBBB':
|
|
9354
|
+
default:
|
|
9355
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
9356
|
+
width: 'wide',
|
|
9357
|
+
context: 'formatting'
|
|
9358
|
+
});
|
|
9359
|
+
}
|
|
9360
|
+
},
|
|
9361
|
+
// Hour [1-12]
|
|
9362
|
+
h: function h(date, token, localize) {
|
|
9363
|
+
if (token === 'ho') {
|
|
9364
|
+
var hours = date.getUTCHours() % 12;
|
|
9365
|
+
if (hours === 0) hours = 12;
|
|
9366
|
+
return localize.ordinalNumber(hours, {
|
|
9367
|
+
unit: 'hour'
|
|
9368
|
+
});
|
|
9369
|
+
}
|
|
9370
|
+
return formatters$3.h(date, token);
|
|
9371
|
+
},
|
|
9372
|
+
// Hour [0-23]
|
|
9373
|
+
H: function H(date, token, localize) {
|
|
9374
|
+
if (token === 'Ho') {
|
|
9375
|
+
return localize.ordinalNumber(date.getUTCHours(), {
|
|
9376
|
+
unit: 'hour'
|
|
9377
|
+
});
|
|
9378
|
+
}
|
|
9379
|
+
return formatters$3.H(date, token);
|
|
9380
|
+
},
|
|
9381
|
+
// Hour [0-11]
|
|
9382
|
+
K: function K(date, token, localize) {
|
|
9383
|
+
var hours = date.getUTCHours() % 12;
|
|
9384
|
+
if (token === 'Ko') {
|
|
9385
|
+
return localize.ordinalNumber(hours, {
|
|
9386
|
+
unit: 'hour'
|
|
9387
|
+
});
|
|
9388
|
+
}
|
|
9389
|
+
return addLeadingZeros(hours, token.length);
|
|
9390
|
+
},
|
|
9391
|
+
// Hour [1-24]
|
|
9392
|
+
k: function k(date, token, localize) {
|
|
9393
|
+
var hours = date.getUTCHours();
|
|
9394
|
+
if (hours === 0) hours = 24;
|
|
9395
|
+
if (token === 'ko') {
|
|
9396
|
+
return localize.ordinalNumber(hours, {
|
|
9397
|
+
unit: 'hour'
|
|
9398
|
+
});
|
|
9399
|
+
}
|
|
9400
|
+
return addLeadingZeros(hours, token.length);
|
|
9401
|
+
},
|
|
9402
|
+
// Minute
|
|
9403
|
+
m: function m(date, token, localize) {
|
|
9404
|
+
if (token === 'mo') {
|
|
9405
|
+
return localize.ordinalNumber(date.getUTCMinutes(), {
|
|
9406
|
+
unit: 'minute'
|
|
9407
|
+
});
|
|
9408
|
+
}
|
|
9409
|
+
return formatters$3.m(date, token);
|
|
9410
|
+
},
|
|
9411
|
+
// Second
|
|
9412
|
+
s: function s(date, token, localize) {
|
|
9413
|
+
if (token === 'so') {
|
|
9414
|
+
return localize.ordinalNumber(date.getUTCSeconds(), {
|
|
9415
|
+
unit: 'second'
|
|
9416
|
+
});
|
|
9417
|
+
}
|
|
9418
|
+
return formatters$3.s(date, token);
|
|
9419
|
+
},
|
|
9420
|
+
// Fraction of second
|
|
9421
|
+
S: function S(date, token) {
|
|
9422
|
+
return formatters$3.S(date, token);
|
|
9423
|
+
},
|
|
9424
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
9425
|
+
X: function X(date, token, _localize, options) {
|
|
9426
|
+
var originalDate = options._originalDate || date;
|
|
9427
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
9428
|
+
if (timezoneOffset === 0) {
|
|
9429
|
+
return 'Z';
|
|
9430
|
+
}
|
|
9431
|
+
switch (token) {
|
|
9432
|
+
// Hours and optional minutes
|
|
9433
|
+
case 'X':
|
|
9434
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
9435
|
+
|
|
9436
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
9437
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
9438
|
+
// so this token always has the same output as `XX`
|
|
9439
|
+
case 'XXXX':
|
|
9440
|
+
case 'XX':
|
|
9441
|
+
// Hours and minutes without `:` delimiter
|
|
9442
|
+
return formatTimezone(timezoneOffset);
|
|
9443
|
+
|
|
9444
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
9445
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
9446
|
+
// so this token always has the same output as `XXX`
|
|
9447
|
+
case 'XXXXX':
|
|
9448
|
+
case 'XXX': // Hours and minutes with `:` delimiter
|
|
9449
|
+
default:
|
|
9450
|
+
return formatTimezone(timezoneOffset, ':');
|
|
9451
|
+
}
|
|
9452
|
+
},
|
|
9453
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
9454
|
+
x: function x(date, token, _localize, options) {
|
|
9455
|
+
var originalDate = options._originalDate || date;
|
|
9456
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
9457
|
+
switch (token) {
|
|
9458
|
+
// Hours and optional minutes
|
|
9459
|
+
case 'x':
|
|
9460
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
9461
|
+
|
|
9462
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
9463
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
9464
|
+
// so this token always has the same output as `xx`
|
|
9465
|
+
case 'xxxx':
|
|
9466
|
+
case 'xx':
|
|
9467
|
+
// Hours and minutes without `:` delimiter
|
|
9468
|
+
return formatTimezone(timezoneOffset);
|
|
9469
|
+
|
|
9470
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
9471
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
9472
|
+
// so this token always has the same output as `xxx`
|
|
9473
|
+
case 'xxxxx':
|
|
9474
|
+
case 'xxx': // Hours and minutes with `:` delimiter
|
|
9475
|
+
default:
|
|
9476
|
+
return formatTimezone(timezoneOffset, ':');
|
|
9477
|
+
}
|
|
9478
|
+
},
|
|
9479
|
+
// Timezone (GMT)
|
|
9480
|
+
O: function O(date, token, _localize, options) {
|
|
9481
|
+
var originalDate = options._originalDate || date;
|
|
9482
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
9483
|
+
switch (token) {
|
|
9484
|
+
// Short
|
|
9485
|
+
case 'O':
|
|
9486
|
+
case 'OO':
|
|
9487
|
+
case 'OOO':
|
|
9488
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
9489
|
+
// Long
|
|
9490
|
+
case 'OOOO':
|
|
9491
|
+
default:
|
|
9492
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
9493
|
+
}
|
|
9494
|
+
},
|
|
9495
|
+
// Timezone (specific non-location)
|
|
9496
|
+
z: function z(date, token, _localize, options) {
|
|
9497
|
+
var originalDate = options._originalDate || date;
|
|
9498
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
9499
|
+
switch (token) {
|
|
9500
|
+
// Short
|
|
9501
|
+
case 'z':
|
|
9502
|
+
case 'zz':
|
|
9503
|
+
case 'zzz':
|
|
9504
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
9505
|
+
// Long
|
|
9506
|
+
case 'zzzz':
|
|
9507
|
+
default:
|
|
9508
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
9509
|
+
}
|
|
9510
|
+
},
|
|
9511
|
+
// Seconds timestamp
|
|
9512
|
+
t: function t(date, token, _localize, options) {
|
|
9513
|
+
var originalDate = options._originalDate || date;
|
|
9514
|
+
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
9515
|
+
return addLeadingZeros(timestamp, token.length);
|
|
9516
|
+
},
|
|
9517
|
+
// Milliseconds timestamp
|
|
9518
|
+
T: function T(date, token, _localize, options) {
|
|
9519
|
+
var originalDate = options._originalDate || date;
|
|
9520
|
+
var timestamp = originalDate.getTime();
|
|
9521
|
+
return addLeadingZeros(timestamp, token.length);
|
|
9522
|
+
}
|
|
9523
|
+
};
|
|
9524
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
9525
|
+
var sign = offset > 0 ? '-' : '+';
|
|
9526
|
+
var absOffset = Math.abs(offset);
|
|
9527
|
+
var hours = Math.floor(absOffset / 60);
|
|
9528
|
+
var minutes = absOffset % 60;
|
|
9529
|
+
if (minutes === 0) {
|
|
9530
|
+
return sign + String(hours);
|
|
9531
|
+
}
|
|
9532
|
+
var delimiter = dirtyDelimiter || '';
|
|
9533
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
9534
|
+
}
|
|
9535
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
9536
|
+
if (offset % 60 === 0) {
|
|
9537
|
+
var sign = offset > 0 ? '-' : '+';
|
|
9538
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
9539
|
+
}
|
|
9540
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
9541
|
+
}
|
|
9542
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
9543
|
+
var delimiter = dirtyDelimiter || '';
|
|
9544
|
+
var sign = offset > 0 ? '-' : '+';
|
|
9545
|
+
var absOffset = Math.abs(offset);
|
|
9546
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
9547
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
9548
|
+
return sign + hours + delimiter + minutes;
|
|
9549
|
+
}
|
|
9550
|
+
var formatters$1 = formatters;
|
|
9551
|
+
|
|
9552
|
+
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
9553
|
+
switch (pattern) {
|
|
9554
|
+
case 'P':
|
|
9555
|
+
return formatLong.date({
|
|
9556
|
+
width: 'short'
|
|
9557
|
+
});
|
|
9558
|
+
case 'PP':
|
|
9559
|
+
return formatLong.date({
|
|
9560
|
+
width: 'medium'
|
|
9561
|
+
});
|
|
9562
|
+
case 'PPP':
|
|
9563
|
+
return formatLong.date({
|
|
9564
|
+
width: 'long'
|
|
9565
|
+
});
|
|
9566
|
+
case 'PPPP':
|
|
9567
|
+
default:
|
|
9568
|
+
return formatLong.date({
|
|
9569
|
+
width: 'full'
|
|
9570
|
+
});
|
|
9571
|
+
}
|
|
9572
|
+
};
|
|
9573
|
+
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
9574
|
+
switch (pattern) {
|
|
9575
|
+
case 'p':
|
|
9576
|
+
return formatLong.time({
|
|
9577
|
+
width: 'short'
|
|
9578
|
+
});
|
|
9579
|
+
case 'pp':
|
|
9580
|
+
return formatLong.time({
|
|
9581
|
+
width: 'medium'
|
|
9582
|
+
});
|
|
9583
|
+
case 'ppp':
|
|
9584
|
+
return formatLong.time({
|
|
9585
|
+
width: 'long'
|
|
9586
|
+
});
|
|
9587
|
+
case 'pppp':
|
|
9588
|
+
default:
|
|
9589
|
+
return formatLong.time({
|
|
9590
|
+
width: 'full'
|
|
9591
|
+
});
|
|
9592
|
+
}
|
|
9593
|
+
};
|
|
9594
|
+
var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
|
|
9595
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
9596
|
+
var datePattern = matchResult[1];
|
|
9597
|
+
var timePattern = matchResult[2];
|
|
9598
|
+
if (!timePattern) {
|
|
9599
|
+
return dateLongFormatter(pattern, formatLong);
|
|
9600
|
+
}
|
|
9601
|
+
var dateTimeFormat;
|
|
9602
|
+
switch (datePattern) {
|
|
9603
|
+
case 'P':
|
|
9604
|
+
dateTimeFormat = formatLong.dateTime({
|
|
9605
|
+
width: 'short'
|
|
9606
|
+
});
|
|
9607
|
+
break;
|
|
9608
|
+
case 'PP':
|
|
9609
|
+
dateTimeFormat = formatLong.dateTime({
|
|
9610
|
+
width: 'medium'
|
|
9611
|
+
});
|
|
9612
|
+
break;
|
|
9613
|
+
case 'PPP':
|
|
9614
|
+
dateTimeFormat = formatLong.dateTime({
|
|
9615
|
+
width: 'long'
|
|
9616
|
+
});
|
|
9617
|
+
break;
|
|
9618
|
+
case 'PPPP':
|
|
9619
|
+
default:
|
|
9620
|
+
dateTimeFormat = formatLong.dateTime({
|
|
9621
|
+
width: 'full'
|
|
9622
|
+
});
|
|
9623
|
+
break;
|
|
9624
|
+
}
|
|
9625
|
+
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
9626
|
+
};
|
|
9627
|
+
var longFormatters = {
|
|
9628
|
+
p: timeLongFormatter,
|
|
9629
|
+
P: dateTimeLongFormatter
|
|
9630
|
+
};
|
|
9631
|
+
var longFormatters$1 = longFormatters;
|
|
9632
|
+
|
|
9633
|
+
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
9634
|
+
var protectedWeekYearTokens = ['YY', 'YYYY'];
|
|
9635
|
+
function isProtectedDayOfYearToken(token) {
|
|
9636
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
9637
|
+
}
|
|
9638
|
+
function isProtectedWeekYearToken(token) {
|
|
9639
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
9640
|
+
}
|
|
9641
|
+
function throwProtectedError(token, format, input) {
|
|
9642
|
+
if (token === 'YYYY') {
|
|
9643
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
9644
|
+
} else if (token === 'YY') {
|
|
9645
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
9646
|
+
} else if (token === 'D') {
|
|
9647
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
9648
|
+
} else if (token === 'DD') {
|
|
9649
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
9650
|
+
}
|
|
9651
|
+
}
|
|
9652
|
+
|
|
9653
|
+
var formatDistanceLocale = {
|
|
9654
|
+
lessThanXSeconds: {
|
|
9655
|
+
one: 'less than a second',
|
|
9656
|
+
other: 'less than {{count}} seconds'
|
|
9657
|
+
},
|
|
9658
|
+
xSeconds: {
|
|
9659
|
+
one: '1 second',
|
|
9660
|
+
other: '{{count}} seconds'
|
|
9661
|
+
},
|
|
9662
|
+
halfAMinute: 'half a minute',
|
|
9663
|
+
lessThanXMinutes: {
|
|
9664
|
+
one: 'less than a minute',
|
|
9665
|
+
other: 'less than {{count}} minutes'
|
|
9666
|
+
},
|
|
9667
|
+
xMinutes: {
|
|
9668
|
+
one: '1 minute',
|
|
9669
|
+
other: '{{count}} minutes'
|
|
9670
|
+
},
|
|
9671
|
+
aboutXHours: {
|
|
9672
|
+
one: 'about 1 hour',
|
|
9673
|
+
other: 'about {{count}} hours'
|
|
9674
|
+
},
|
|
9675
|
+
xHours: {
|
|
9676
|
+
one: '1 hour',
|
|
9677
|
+
other: '{{count}} hours'
|
|
9678
|
+
},
|
|
9679
|
+
xDays: {
|
|
9680
|
+
one: '1 day',
|
|
9681
|
+
other: '{{count}} days'
|
|
9682
|
+
},
|
|
9683
|
+
aboutXWeeks: {
|
|
9684
|
+
one: 'about 1 week',
|
|
9685
|
+
other: 'about {{count}} weeks'
|
|
9686
|
+
},
|
|
9687
|
+
xWeeks: {
|
|
9688
|
+
one: '1 week',
|
|
9689
|
+
other: '{{count}} weeks'
|
|
9690
|
+
},
|
|
9691
|
+
aboutXMonths: {
|
|
9692
|
+
one: 'about 1 month',
|
|
9693
|
+
other: 'about {{count}} months'
|
|
9694
|
+
},
|
|
9695
|
+
xMonths: {
|
|
9696
|
+
one: '1 month',
|
|
9697
|
+
other: '{{count}} months'
|
|
9698
|
+
},
|
|
9699
|
+
aboutXYears: {
|
|
9700
|
+
one: 'about 1 year',
|
|
9701
|
+
other: 'about {{count}} years'
|
|
9702
|
+
},
|
|
9703
|
+
xYears: {
|
|
9704
|
+
one: '1 year',
|
|
9705
|
+
other: '{{count}} years'
|
|
9706
|
+
},
|
|
9707
|
+
overXYears: {
|
|
9708
|
+
one: 'over 1 year',
|
|
9709
|
+
other: 'over {{count}} years'
|
|
9710
|
+
},
|
|
9711
|
+
almostXYears: {
|
|
9712
|
+
one: 'almost 1 year',
|
|
9713
|
+
other: 'almost {{count}} years'
|
|
9714
|
+
}
|
|
9715
|
+
};
|
|
9716
|
+
var formatDistance = function formatDistance(token, count, options) {
|
|
9717
|
+
var result;
|
|
9718
|
+
var tokenValue = formatDistanceLocale[token];
|
|
9719
|
+
if (typeof tokenValue === 'string') {
|
|
9720
|
+
result = tokenValue;
|
|
9721
|
+
} else if (count === 1) {
|
|
9722
|
+
result = tokenValue.one;
|
|
9723
|
+
} else {
|
|
9724
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
9725
|
+
}
|
|
9726
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
9727
|
+
if (options.comparison && options.comparison > 0) {
|
|
9728
|
+
return 'in ' + result;
|
|
9729
|
+
} else {
|
|
9730
|
+
return result + ' ago';
|
|
9731
|
+
}
|
|
9732
|
+
}
|
|
9733
|
+
return result;
|
|
9734
|
+
};
|
|
9735
|
+
var formatDistance$1 = formatDistance;
|
|
9736
|
+
|
|
9737
|
+
function buildFormatLongFn(args) {
|
|
9738
|
+
return function () {
|
|
9739
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9740
|
+
// TODO: Remove String()
|
|
9741
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
9742
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
9743
|
+
return format;
|
|
9744
|
+
};
|
|
9745
|
+
}
|
|
9746
|
+
|
|
9747
|
+
var dateFormats = {
|
|
9748
|
+
full: 'EEEE, MMMM do, y',
|
|
9749
|
+
long: 'MMMM do, y',
|
|
9750
|
+
medium: 'MMM d, y',
|
|
9751
|
+
short: 'MM/dd/yyyy'
|
|
9752
|
+
};
|
|
9753
|
+
var timeFormats = {
|
|
9754
|
+
full: 'h:mm:ss a zzzz',
|
|
9755
|
+
long: 'h:mm:ss a z',
|
|
9756
|
+
medium: 'h:mm:ss a',
|
|
9757
|
+
short: 'h:mm a'
|
|
9758
|
+
};
|
|
9759
|
+
var dateTimeFormats = {
|
|
9760
|
+
full: "{{date}} 'at' {{time}}",
|
|
9761
|
+
long: "{{date}} 'at' {{time}}",
|
|
9762
|
+
medium: '{{date}}, {{time}}',
|
|
9763
|
+
short: '{{date}}, {{time}}'
|
|
9764
|
+
};
|
|
9765
|
+
var formatLong = {
|
|
9766
|
+
date: buildFormatLongFn({
|
|
9767
|
+
formats: dateFormats,
|
|
9768
|
+
defaultWidth: 'full'
|
|
9769
|
+
}),
|
|
9770
|
+
time: buildFormatLongFn({
|
|
9771
|
+
formats: timeFormats,
|
|
9772
|
+
defaultWidth: 'full'
|
|
9773
|
+
}),
|
|
9774
|
+
dateTime: buildFormatLongFn({
|
|
9775
|
+
formats: dateTimeFormats,
|
|
9776
|
+
defaultWidth: 'full'
|
|
9777
|
+
})
|
|
9778
|
+
};
|
|
9779
|
+
var formatLong$1 = formatLong;
|
|
9780
|
+
|
|
9781
|
+
var formatRelativeLocale = {
|
|
9782
|
+
lastWeek: "'last' eeee 'at' p",
|
|
9783
|
+
yesterday: "'yesterday at' p",
|
|
9784
|
+
today: "'today at' p",
|
|
9785
|
+
tomorrow: "'tomorrow at' p",
|
|
9786
|
+
nextWeek: "eeee 'at' p",
|
|
9787
|
+
other: 'P'
|
|
9788
|
+
};
|
|
9789
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
9790
|
+
return formatRelativeLocale[token];
|
|
9791
|
+
};
|
|
9792
|
+
var formatRelative$1 = formatRelative;
|
|
9793
|
+
|
|
9794
|
+
function buildLocalizeFn(args) {
|
|
9795
|
+
return function (dirtyIndex, options) {
|
|
9796
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
|
|
9797
|
+
var valuesArray;
|
|
9798
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
9799
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
9800
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
9801
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
9802
|
+
} else {
|
|
9803
|
+
var _defaultWidth = args.defaultWidth;
|
|
9804
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
9805
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
9806
|
+
}
|
|
9807
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
9808
|
+
// @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
9809
|
+
return valuesArray[index];
|
|
9810
|
+
};
|
|
9811
|
+
}
|
|
9812
|
+
|
|
9813
|
+
var eraValues = {
|
|
9814
|
+
narrow: ['B', 'A'],
|
|
9815
|
+
abbreviated: ['BC', 'AD'],
|
|
9816
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
9817
|
+
};
|
|
9818
|
+
var quarterValues = {
|
|
9819
|
+
narrow: ['1', '2', '3', '4'],
|
|
9820
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
9821
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
9822
|
+
};
|
|
9823
|
+
|
|
9824
|
+
// Note: in English, the names of days of the week and months are capitalized.
|
|
9825
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
9826
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
9827
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
9828
|
+
var monthValues = {
|
|
9829
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
9830
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
9831
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
9832
|
+
};
|
|
9833
|
+
var dayValues = {
|
|
9834
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
9835
|
+
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
9836
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
9837
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
9838
|
+
};
|
|
9839
|
+
var dayPeriodValues = {
|
|
9840
|
+
narrow: {
|
|
9841
|
+
am: 'a',
|
|
9842
|
+
pm: 'p',
|
|
9843
|
+
midnight: 'mi',
|
|
9844
|
+
noon: 'n',
|
|
9845
|
+
morning: 'morning',
|
|
9846
|
+
afternoon: 'afternoon',
|
|
9847
|
+
evening: 'evening',
|
|
9848
|
+
night: 'night'
|
|
9849
|
+
},
|
|
9850
|
+
abbreviated: {
|
|
9851
|
+
am: 'AM',
|
|
9852
|
+
pm: 'PM',
|
|
9853
|
+
midnight: 'midnight',
|
|
9854
|
+
noon: 'noon',
|
|
9855
|
+
morning: 'morning',
|
|
9856
|
+
afternoon: 'afternoon',
|
|
9857
|
+
evening: 'evening',
|
|
9858
|
+
night: 'night'
|
|
9859
|
+
},
|
|
9860
|
+
wide: {
|
|
9861
|
+
am: 'a.m.',
|
|
9862
|
+
pm: 'p.m.',
|
|
9863
|
+
midnight: 'midnight',
|
|
9864
|
+
noon: 'noon',
|
|
9865
|
+
morning: 'morning',
|
|
9866
|
+
afternoon: 'afternoon',
|
|
9867
|
+
evening: 'evening',
|
|
9868
|
+
night: 'night'
|
|
9869
|
+
}
|
|
9870
|
+
};
|
|
9871
|
+
var formattingDayPeriodValues = {
|
|
9872
|
+
narrow: {
|
|
9873
|
+
am: 'a',
|
|
9874
|
+
pm: 'p',
|
|
9875
|
+
midnight: 'mi',
|
|
9876
|
+
noon: 'n',
|
|
9877
|
+
morning: 'in the morning',
|
|
9878
|
+
afternoon: 'in the afternoon',
|
|
9879
|
+
evening: 'in the evening',
|
|
9880
|
+
night: 'at night'
|
|
9881
|
+
},
|
|
9882
|
+
abbreviated: {
|
|
9883
|
+
am: 'AM',
|
|
9884
|
+
pm: 'PM',
|
|
9885
|
+
midnight: 'midnight',
|
|
9886
|
+
noon: 'noon',
|
|
9887
|
+
morning: 'in the morning',
|
|
9888
|
+
afternoon: 'in the afternoon',
|
|
9889
|
+
evening: 'in the evening',
|
|
9890
|
+
night: 'at night'
|
|
9891
|
+
},
|
|
9892
|
+
wide: {
|
|
9893
|
+
am: 'a.m.',
|
|
9894
|
+
pm: 'p.m.',
|
|
9895
|
+
midnight: 'midnight',
|
|
9896
|
+
noon: 'noon',
|
|
9897
|
+
morning: 'in the morning',
|
|
9898
|
+
afternoon: 'in the afternoon',
|
|
9899
|
+
evening: 'in the evening',
|
|
9900
|
+
night: 'at night'
|
|
9901
|
+
}
|
|
9902
|
+
};
|
|
9903
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
|
|
9904
|
+
var number = Number(dirtyNumber);
|
|
9905
|
+
|
|
9906
|
+
// If ordinal numbers depend on context, for example,
|
|
9907
|
+
// if they are different for different grammatical genders,
|
|
9908
|
+
// use `options.unit`.
|
|
9909
|
+
//
|
|
9910
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
9911
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
9912
|
+
|
|
9913
|
+
var rem100 = number % 100;
|
|
9914
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
9915
|
+
switch (rem100 % 10) {
|
|
9916
|
+
case 1:
|
|
9917
|
+
return number + 'st';
|
|
9918
|
+
case 2:
|
|
9919
|
+
return number + 'nd';
|
|
9920
|
+
case 3:
|
|
9921
|
+
return number + 'rd';
|
|
9922
|
+
}
|
|
9923
|
+
}
|
|
9924
|
+
return number + 'th';
|
|
9925
|
+
};
|
|
9926
|
+
var localize = {
|
|
9927
|
+
ordinalNumber: ordinalNumber,
|
|
9928
|
+
era: buildLocalizeFn({
|
|
9929
|
+
values: eraValues,
|
|
9930
|
+
defaultWidth: 'wide'
|
|
9931
|
+
}),
|
|
9932
|
+
quarter: buildLocalizeFn({
|
|
9933
|
+
values: quarterValues,
|
|
9934
|
+
defaultWidth: 'wide',
|
|
9935
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
9936
|
+
return quarter - 1;
|
|
9937
|
+
}
|
|
9938
|
+
}),
|
|
9939
|
+
month: buildLocalizeFn({
|
|
9940
|
+
values: monthValues,
|
|
9941
|
+
defaultWidth: 'wide'
|
|
9942
|
+
}),
|
|
9943
|
+
day: buildLocalizeFn({
|
|
9944
|
+
values: dayValues,
|
|
9945
|
+
defaultWidth: 'wide'
|
|
9946
|
+
}),
|
|
9947
|
+
dayPeriod: buildLocalizeFn({
|
|
9948
|
+
values: dayPeriodValues,
|
|
9949
|
+
defaultWidth: 'wide',
|
|
9950
|
+
formattingValues: formattingDayPeriodValues,
|
|
9951
|
+
defaultFormattingWidth: 'wide'
|
|
9952
|
+
})
|
|
9953
|
+
};
|
|
9954
|
+
var localize$1 = localize;
|
|
9955
|
+
|
|
9956
|
+
function buildMatchFn(args) {
|
|
9957
|
+
return function (string) {
|
|
9958
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9959
|
+
var width = options.width;
|
|
9960
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
9961
|
+
var matchResult = string.match(matchPattern);
|
|
9962
|
+
if (!matchResult) {
|
|
9963
|
+
return null;
|
|
9964
|
+
}
|
|
9965
|
+
var matchedString = matchResult[0];
|
|
9966
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
9967
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
9968
|
+
return pattern.test(matchedString);
|
|
9969
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
9970
|
+
return pattern.test(matchedString);
|
|
9971
|
+
});
|
|
9972
|
+
var value;
|
|
9973
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
9974
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
9975
|
+
var rest = string.slice(matchedString.length);
|
|
9976
|
+
return {
|
|
9977
|
+
value: value,
|
|
9978
|
+
rest: rest
|
|
9979
|
+
};
|
|
9980
|
+
};
|
|
9981
|
+
}
|
|
9982
|
+
function findKey(object, predicate) {
|
|
9983
|
+
for (var key in object) {
|
|
9984
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
9985
|
+
return key;
|
|
9986
|
+
}
|
|
9987
|
+
}
|
|
9988
|
+
return undefined;
|
|
9989
|
+
}
|
|
9990
|
+
function findIndex(array, predicate) {
|
|
9991
|
+
for (var key = 0; key < array.length; key++) {
|
|
9992
|
+
if (predicate(array[key])) {
|
|
9993
|
+
return key;
|
|
9994
|
+
}
|
|
9995
|
+
}
|
|
9996
|
+
return undefined;
|
|
9997
|
+
}
|
|
9998
|
+
|
|
9999
|
+
function buildMatchPatternFn(args) {
|
|
10000
|
+
return function (string) {
|
|
10001
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10002
|
+
var matchResult = string.match(args.matchPattern);
|
|
10003
|
+
if (!matchResult) return null;
|
|
10004
|
+
var matchedString = matchResult[0];
|
|
10005
|
+
var parseResult = string.match(args.parsePattern);
|
|
10006
|
+
if (!parseResult) return null;
|
|
10007
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
10008
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
10009
|
+
var rest = string.slice(matchedString.length);
|
|
10010
|
+
return {
|
|
10011
|
+
value: value,
|
|
10012
|
+
rest: rest
|
|
10013
|
+
};
|
|
10014
|
+
};
|
|
10015
|
+
}
|
|
10016
|
+
|
|
10017
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
10018
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
10019
|
+
var matchEraPatterns = {
|
|
10020
|
+
narrow: /^(b|a)/i,
|
|
10021
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
10022
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
10023
|
+
};
|
|
10024
|
+
var parseEraPatterns = {
|
|
10025
|
+
any: [/^b/i, /^(a|c)/i]
|
|
10026
|
+
};
|
|
10027
|
+
var matchQuarterPatterns = {
|
|
10028
|
+
narrow: /^[1234]/i,
|
|
10029
|
+
abbreviated: /^q[1234]/i,
|
|
10030
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
10031
|
+
};
|
|
10032
|
+
var parseQuarterPatterns = {
|
|
10033
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
10034
|
+
};
|
|
10035
|
+
var matchMonthPatterns = {
|
|
10036
|
+
narrow: /^[jfmasond]/i,
|
|
10037
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
10038
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
10039
|
+
};
|
|
10040
|
+
var parseMonthPatterns = {
|
|
10041
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
10042
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
10043
|
+
};
|
|
10044
|
+
var matchDayPatterns = {
|
|
10045
|
+
narrow: /^[smtwf]/i,
|
|
10046
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
10047
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
10048
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
10049
|
+
};
|
|
10050
|
+
var parseDayPatterns = {
|
|
10051
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
10052
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
10053
|
+
};
|
|
10054
|
+
var matchDayPeriodPatterns = {
|
|
10055
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
10056
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
10057
|
+
};
|
|
10058
|
+
var parseDayPeriodPatterns = {
|
|
10059
|
+
any: {
|
|
10060
|
+
am: /^a/i,
|
|
10061
|
+
pm: /^p/i,
|
|
10062
|
+
midnight: /^mi/i,
|
|
10063
|
+
noon: /^no/i,
|
|
10064
|
+
morning: /morning/i,
|
|
10065
|
+
afternoon: /afternoon/i,
|
|
10066
|
+
evening: /evening/i,
|
|
10067
|
+
night: /night/i
|
|
10068
|
+
}
|
|
10069
|
+
};
|
|
10070
|
+
var match = {
|
|
10071
|
+
ordinalNumber: buildMatchPatternFn({
|
|
10072
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
10073
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
10074
|
+
valueCallback: function valueCallback(value) {
|
|
10075
|
+
return parseInt(value, 10);
|
|
10076
|
+
}
|
|
10077
|
+
}),
|
|
10078
|
+
era: buildMatchFn({
|
|
10079
|
+
matchPatterns: matchEraPatterns,
|
|
10080
|
+
defaultMatchWidth: 'wide',
|
|
10081
|
+
parsePatterns: parseEraPatterns,
|
|
10082
|
+
defaultParseWidth: 'any'
|
|
10083
|
+
}),
|
|
10084
|
+
quarter: buildMatchFn({
|
|
10085
|
+
matchPatterns: matchQuarterPatterns,
|
|
10086
|
+
defaultMatchWidth: 'wide',
|
|
10087
|
+
parsePatterns: parseQuarterPatterns,
|
|
10088
|
+
defaultParseWidth: 'any',
|
|
10089
|
+
valueCallback: function valueCallback(index) {
|
|
10090
|
+
return index + 1;
|
|
10091
|
+
}
|
|
10092
|
+
}),
|
|
10093
|
+
month: buildMatchFn({
|
|
10094
|
+
matchPatterns: matchMonthPatterns,
|
|
10095
|
+
defaultMatchWidth: 'wide',
|
|
10096
|
+
parsePatterns: parseMonthPatterns,
|
|
10097
|
+
defaultParseWidth: 'any'
|
|
10098
|
+
}),
|
|
10099
|
+
day: buildMatchFn({
|
|
10100
|
+
matchPatterns: matchDayPatterns,
|
|
10101
|
+
defaultMatchWidth: 'wide',
|
|
10102
|
+
parsePatterns: parseDayPatterns,
|
|
10103
|
+
defaultParseWidth: 'any'
|
|
10104
|
+
}),
|
|
10105
|
+
dayPeriod: buildMatchFn({
|
|
10106
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
10107
|
+
defaultMatchWidth: 'any',
|
|
10108
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
10109
|
+
defaultParseWidth: 'any'
|
|
10110
|
+
})
|
|
10111
|
+
};
|
|
10112
|
+
var match$1 = match;
|
|
10113
|
+
|
|
10114
|
+
/**
|
|
10115
|
+
* @type {Locale}
|
|
10116
|
+
* @category Locales
|
|
10117
|
+
* @summary English locale (United States).
|
|
10118
|
+
* @language English
|
|
10119
|
+
* @iso-639-2 eng
|
|
10120
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
10121
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
10122
|
+
*/
|
|
10123
|
+
var locale = {
|
|
10124
|
+
code: 'en-US',
|
|
10125
|
+
formatDistance: formatDistance$1,
|
|
10126
|
+
formatLong: formatLong$1,
|
|
10127
|
+
formatRelative: formatRelative$1,
|
|
10128
|
+
localize: localize$1,
|
|
10129
|
+
match: match$1,
|
|
10130
|
+
options: {
|
|
10131
|
+
weekStartsOn: 0 /* Sunday */,
|
|
10132
|
+
firstWeekContainsDate: 1
|
|
10133
|
+
}
|
|
10134
|
+
};
|
|
10135
|
+
var enUS = locale;
|
|
10136
|
+
|
|
10137
|
+
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
10138
|
+
// (one of the certain letters followed by `o`)
|
|
10139
|
+
// - (\w)\1* matches any sequences of the same letter
|
|
10140
|
+
// - '' matches two quote characters in a row
|
|
10141
|
+
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
|
|
10142
|
+
// except a single quote symbol, which ends the sequence.
|
|
10143
|
+
// Two quote characters do not end the sequence.
|
|
10144
|
+
// If there is no matching single quote
|
|
10145
|
+
// then the sequence will continue until the end of the string.
|
|
10146
|
+
// - . matches any single character unmatched by previous parts of the RegExps
|
|
10147
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
10148
|
+
|
|
10149
|
+
// This RegExp catches symbols escaped by quotes, and also
|
|
10150
|
+
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
10151
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
10152
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
10153
|
+
var doubleQuoteRegExp = /''/g;
|
|
10154
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
10155
|
+
|
|
10156
|
+
/**
|
|
10157
|
+
* @name format
|
|
10158
|
+
* @category Common Helpers
|
|
10159
|
+
* @summary Format the date.
|
|
10160
|
+
*
|
|
10161
|
+
* @description
|
|
10162
|
+
* Return the formatted date string in the given format. The result may vary by locale.
|
|
10163
|
+
*
|
|
10164
|
+
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
|
|
10165
|
+
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10166
|
+
*
|
|
10167
|
+
* The characters wrapped between two single quotes characters (') are escaped.
|
|
10168
|
+
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
|
|
10169
|
+
* (see the last example)
|
|
10170
|
+
*
|
|
10171
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
10172
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
10173
|
+
* with a few additions (see note 7 below the table).
|
|
10174
|
+
*
|
|
10175
|
+
* Accepted patterns:
|
|
10176
|
+
* | Unit | Pattern | Result examples | Notes |
|
|
10177
|
+
* |---------------------------------|---------|-----------------------------------|-------|
|
|
10178
|
+
* | Era | G..GGG | AD, BC | |
|
|
10179
|
+
* | | GGGG | Anno Domini, Before Christ | 2 |
|
|
10180
|
+
* | | GGGGG | A, B | |
|
|
10181
|
+
* | Calendar year | y | 44, 1, 1900, 2017 | 5 |
|
|
10182
|
+
* | | yo | 44th, 1st, 0th, 17th | 5,7 |
|
|
10183
|
+
* | | yy | 44, 01, 00, 17 | 5 |
|
|
10184
|
+
* | | yyy | 044, 001, 1900, 2017 | 5 |
|
|
10185
|
+
* | | yyyy | 0044, 0001, 1900, 2017 | 5 |
|
|
10186
|
+
* | | yyyyy | ... | 3,5 |
|
|
10187
|
+
* | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
|
|
10188
|
+
* | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
|
|
10189
|
+
* | | YY | 44, 01, 00, 17 | 5,8 |
|
|
10190
|
+
* | | YYY | 044, 001, 1900, 2017 | 5 |
|
|
10191
|
+
* | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
|
|
10192
|
+
* | | YYYYY | ... | 3,5 |
|
|
10193
|
+
* | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
|
|
10194
|
+
* | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
|
|
10195
|
+
* | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
|
|
10196
|
+
* | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
|
|
10197
|
+
* | | RRRRR | ... | 3,5,7 |
|
|
10198
|
+
* | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
|
|
10199
|
+
* | | uu | -43, 01, 1900, 2017 | 5 |
|
|
10200
|
+
* | | uuu | -043, 001, 1900, 2017 | 5 |
|
|
10201
|
+
* | | uuuu | -0043, 0001, 1900, 2017 | 5 |
|
|
10202
|
+
* | | uuuuu | ... | 3,5 |
|
|
10203
|
+
* | Quarter (formatting) | Q | 1, 2, 3, 4 | |
|
|
10204
|
+
* | | Qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
10205
|
+
* | | QQ | 01, 02, 03, 04 | |
|
|
10206
|
+
* | | QQQ | Q1, Q2, Q3, Q4 | |
|
|
10207
|
+
* | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
|
|
10208
|
+
* | | QQQQQ | 1, 2, 3, 4 | 4 |
|
|
10209
|
+
* | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
|
|
10210
|
+
* | | qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
10211
|
+
* | | qq | 01, 02, 03, 04 | |
|
|
10212
|
+
* | | qqq | Q1, Q2, Q3, Q4 | |
|
|
10213
|
+
* | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
|
|
10214
|
+
* | | qqqqq | 1, 2, 3, 4 | 4 |
|
|
10215
|
+
* | Month (formatting) | M | 1, 2, ..., 12 | |
|
|
10216
|
+
* | | Mo | 1st, 2nd, ..., 12th | 7 |
|
|
10217
|
+
* | | MM | 01, 02, ..., 12 | |
|
|
10218
|
+
* | | MMM | Jan, Feb, ..., Dec | |
|
|
10219
|
+
* | | MMMM | January, February, ..., December | 2 |
|
|
10220
|
+
* | | MMMMM | J, F, ..., D | |
|
|
10221
|
+
* | Month (stand-alone) | L | 1, 2, ..., 12 | |
|
|
10222
|
+
* | | Lo | 1st, 2nd, ..., 12th | 7 |
|
|
10223
|
+
* | | LL | 01, 02, ..., 12 | |
|
|
10224
|
+
* | | LLL | Jan, Feb, ..., Dec | |
|
|
10225
|
+
* | | LLLL | January, February, ..., December | 2 |
|
|
10226
|
+
* | | LLLLL | J, F, ..., D | |
|
|
10227
|
+
* | Local week of year | w | 1, 2, ..., 53 | |
|
|
10228
|
+
* | | wo | 1st, 2nd, ..., 53th | 7 |
|
|
10229
|
+
* | | ww | 01, 02, ..., 53 | |
|
|
10230
|
+
* | ISO week of year | I | 1, 2, ..., 53 | 7 |
|
|
10231
|
+
* | | Io | 1st, 2nd, ..., 53th | 7 |
|
|
10232
|
+
* | | II | 01, 02, ..., 53 | 7 |
|
|
10233
|
+
* | Day of month | d | 1, 2, ..., 31 | |
|
|
10234
|
+
* | | do | 1st, 2nd, ..., 31st | 7 |
|
|
10235
|
+
* | | dd | 01, 02, ..., 31 | |
|
|
10236
|
+
* | Day of year | D | 1, 2, ..., 365, 366 | 9 |
|
|
10237
|
+
* | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
|
|
10238
|
+
* | | DD | 01, 02, ..., 365, 366 | 9 |
|
|
10239
|
+
* | | DDD | 001, 002, ..., 365, 366 | |
|
|
10240
|
+
* | | DDDD | ... | 3 |
|
|
10241
|
+
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
10242
|
+
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
10243
|
+
* | | EEEEE | M, T, W, T, F, S, S | |
|
|
10244
|
+
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
10245
|
+
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
|
|
10246
|
+
* | | io | 1st, 2nd, ..., 7th | 7 |
|
|
10247
|
+
* | | ii | 01, 02, ..., 07 | 7 |
|
|
10248
|
+
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
|
|
10249
|
+
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
|
|
10250
|
+
* | | iiiii | M, T, W, T, F, S, S | 7 |
|
|
10251
|
+
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
|
|
10252
|
+
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
|
|
10253
|
+
* | | eo | 2nd, 3rd, ..., 1st | 7 |
|
|
10254
|
+
* | | ee | 02, 03, ..., 01 | |
|
|
10255
|
+
* | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
10256
|
+
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
10257
|
+
* | | eeeee | M, T, W, T, F, S, S | |
|
|
10258
|
+
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
10259
|
+
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
|
|
10260
|
+
* | | co | 2nd, 3rd, ..., 1st | 7 |
|
|
10261
|
+
* | | cc | 02, 03, ..., 01 | |
|
|
10262
|
+
* | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
10263
|
+
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
10264
|
+
* | | ccccc | M, T, W, T, F, S, S | |
|
|
10265
|
+
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
10266
|
+
* | AM, PM | a..aa | AM, PM | |
|
|
10267
|
+
* | | aaa | am, pm | |
|
|
10268
|
+
* | | aaaa | a.m., p.m. | 2 |
|
|
10269
|
+
* | | aaaaa | a, p | |
|
|
10270
|
+
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
|
|
10271
|
+
* | | bbb | am, pm, noon, midnight | |
|
|
10272
|
+
* | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
10273
|
+
* | | bbbbb | a, p, n, mi | |
|
|
10274
|
+
* | Flexible day period | B..BBB | at night, in the morning, ... | |
|
|
10275
|
+
* | | BBBB | at night, in the morning, ... | 2 |
|
|
10276
|
+
* | | BBBBB | at night, in the morning, ... | |
|
|
10277
|
+
* | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
|
|
10278
|
+
* | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
|
|
10279
|
+
* | | hh | 01, 02, ..., 11, 12 | |
|
|
10280
|
+
* | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
|
|
10281
|
+
* | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
|
|
10282
|
+
* | | HH | 00, 01, 02, ..., 23 | |
|
|
10283
|
+
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
|
|
10284
|
+
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
|
|
10285
|
+
* | | KK | 01, 02, ..., 11, 00 | |
|
|
10286
|
+
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
|
|
10287
|
+
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
|
|
10288
|
+
* | | kk | 24, 01, 02, ..., 23 | |
|
|
10289
|
+
* | Minute | m | 0, 1, ..., 59 | |
|
|
10290
|
+
* | | mo | 0th, 1st, ..., 59th | 7 |
|
|
10291
|
+
* | | mm | 00, 01, ..., 59 | |
|
|
10292
|
+
* | Second | s | 0, 1, ..., 59 | |
|
|
10293
|
+
* | | so | 0th, 1st, ..., 59th | 7 |
|
|
10294
|
+
* | | ss | 00, 01, ..., 59 | |
|
|
10295
|
+
* | Fraction of second | S | 0, 1, ..., 9 | |
|
|
10296
|
+
* | | SS | 00, 01, ..., 99 | |
|
|
10297
|
+
* | | SSS | 000, 001, ..., 999 | |
|
|
10298
|
+
* | | SSSS | ... | 3 |
|
|
10299
|
+
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
|
|
10300
|
+
* | | XX | -0800, +0530, Z | |
|
|
10301
|
+
* | | XXX | -08:00, +05:30, Z | |
|
|
10302
|
+
* | | XXXX | -0800, +0530, Z, +123456 | 2 |
|
|
10303
|
+
* | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
|
|
10304
|
+
* | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
|
|
10305
|
+
* | | xx | -0800, +0530, +0000 | |
|
|
10306
|
+
* | | xxx | -08:00, +05:30, +00:00 | 2 |
|
|
10307
|
+
* | | xxxx | -0800, +0530, +0000, +123456 | |
|
|
10308
|
+
* | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
|
|
10309
|
+
* | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
|
|
10310
|
+
* | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
|
|
10311
|
+
* | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
|
|
10312
|
+
* | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
|
|
10313
|
+
* | Seconds timestamp | t | 512969520 | 7 |
|
|
10314
|
+
* | | tt | ... | 3,7 |
|
|
10315
|
+
* | Milliseconds timestamp | T | 512969520900 | 7 |
|
|
10316
|
+
* | | TT | ... | 3,7 |
|
|
10317
|
+
* | Long localized date | P | 04/29/1453 | 7 |
|
|
10318
|
+
* | | PP | Apr 29, 1453 | 7 |
|
|
10319
|
+
* | | PPP | April 29th, 1453 | 7 |
|
|
10320
|
+
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
|
|
10321
|
+
* | Long localized time | p | 12:00 AM | 7 |
|
|
10322
|
+
* | | pp | 12:00:00 AM | 7 |
|
|
10323
|
+
* | | ppp | 12:00:00 AM GMT+2 | 7 |
|
|
10324
|
+
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
|
|
10325
|
+
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
|
|
10326
|
+
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
|
|
10327
|
+
* | | PPPppp | April 29th, 1453 at ... | 7 |
|
|
10328
|
+
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
|
|
10329
|
+
* Notes:
|
|
10330
|
+
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
10331
|
+
* are the same as "stand-alone" units, but are different in some languages.
|
|
10332
|
+
* "Formatting" units are declined according to the rules of the language
|
|
10333
|
+
* in the context of a date. "Stand-alone" units are always nominative singular:
|
|
10334
|
+
*
|
|
10335
|
+
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
|
|
10336
|
+
*
|
|
10337
|
+
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
|
|
10338
|
+
*
|
|
10339
|
+
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
|
|
10340
|
+
* the single quote characters (see below).
|
|
10341
|
+
* If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
|
|
10342
|
+
* the output will be the same as default pattern for this unit, usually
|
|
10343
|
+
* the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
|
|
10344
|
+
* are marked with "2" in the last column of the table.
|
|
10345
|
+
*
|
|
10346
|
+
* `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
|
|
10347
|
+
*
|
|
10348
|
+
* `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
|
|
10349
|
+
*
|
|
10350
|
+
* `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
|
|
10351
|
+
*
|
|
10352
|
+
* `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
|
|
10353
|
+
*
|
|
10354
|
+
* `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
|
|
10355
|
+
*
|
|
10356
|
+
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
|
|
10357
|
+
* The output will be padded with zeros to match the length of the pattern.
|
|
10358
|
+
*
|
|
10359
|
+
* `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
|
|
10360
|
+
*
|
|
10361
|
+
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
|
|
10362
|
+
* These tokens represent the shortest form of the quarter.
|
|
10363
|
+
*
|
|
10364
|
+
* 5. The main difference between `y` and `u` patterns are B.C. years:
|
|
10365
|
+
*
|
|
10366
|
+
* | Year | `y` | `u` |
|
|
10367
|
+
* |------|-----|-----|
|
|
10368
|
+
* | AC 1 | 1 | 1 |
|
|
10369
|
+
* | BC 1 | 1 | 0 |
|
|
10370
|
+
* | BC 2 | 2 | -1 |
|
|
10371
|
+
*
|
|
10372
|
+
* Also `yy` always returns the last two digits of a year,
|
|
10373
|
+
* while `uu` pads single digit years to 2 characters and returns other years unchanged:
|
|
10374
|
+
*
|
|
10375
|
+
* | Year | `yy` | `uu` |
|
|
10376
|
+
* |------|------|------|
|
|
10377
|
+
* | 1 | 01 | 01 |
|
|
10378
|
+
* | 14 | 14 | 14 |
|
|
10379
|
+
* | 376 | 76 | 376 |
|
|
10380
|
+
* | 1453 | 53 | 1453 |
|
|
10381
|
+
*
|
|
10382
|
+
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
10383
|
+
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
10384
|
+
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
|
|
10385
|
+
* and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
|
|
10386
|
+
*
|
|
10387
|
+
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
|
|
10388
|
+
* so right now these tokens fall back to GMT timezones.
|
|
10389
|
+
*
|
|
10390
|
+
* 7. These patterns are not in the Unicode Technical Standard #35:
|
|
10391
|
+
* - `i`: ISO day of week
|
|
10392
|
+
* - `I`: ISO week of year
|
|
10393
|
+
* - `R`: ISO week-numbering year
|
|
10394
|
+
* - `t`: seconds timestamp
|
|
10395
|
+
* - `T`: milliseconds timestamp
|
|
10396
|
+
* - `o`: ordinal number modifier
|
|
10397
|
+
* - `P`: long localized date
|
|
10398
|
+
* - `p`: long localized time
|
|
10399
|
+
*
|
|
10400
|
+
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
|
|
10401
|
+
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10402
|
+
*
|
|
10403
|
+
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
|
|
10404
|
+
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10405
|
+
*
|
|
10406
|
+
* @param {Date|Number} date - the original date
|
|
10407
|
+
* @param {String} format - the string of tokens
|
|
10408
|
+
* @param {Object} [options] - an object with options.
|
|
10409
|
+
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
10410
|
+
* @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
10411
|
+
* @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
|
|
10412
|
+
* @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
|
|
10413
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10414
|
+
* @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
|
|
10415
|
+
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10416
|
+
* @returns {String} the formatted date string
|
|
10417
|
+
* @throws {TypeError} 2 arguments required
|
|
10418
|
+
* @throws {RangeError} `date` must not be Invalid Date
|
|
10419
|
+
* @throws {RangeError} `options.locale` must contain `localize` property
|
|
10420
|
+
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
10421
|
+
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
10422
|
+
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
10423
|
+
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10424
|
+
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10425
|
+
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10426
|
+
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
|
|
10427
|
+
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
10428
|
+
*
|
|
10429
|
+
* @example
|
|
10430
|
+
* // Represent 11 February 2014 in middle-endian format:
|
|
10431
|
+
* const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
|
|
10432
|
+
* //=> '02/11/2014'
|
|
10433
|
+
*
|
|
10434
|
+
* @example
|
|
10435
|
+
* // Represent 2 July 2014 in Esperanto:
|
|
10436
|
+
* import { eoLocale } from 'date-fns/locale/eo'
|
|
10437
|
+
* const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
|
|
10438
|
+
* locale: eoLocale
|
|
10439
|
+
* })
|
|
10440
|
+
* //=> '2-a de julio 2014'
|
|
10441
|
+
*
|
|
10442
|
+
* @example
|
|
10443
|
+
* // Escape string by single quote characters:
|
|
10444
|
+
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
10445
|
+
* //=> "3 o'clock"
|
|
10446
|
+
*/
|
|
10447
|
+
|
|
10448
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
10449
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
10450
|
+
requiredArgs(2, arguments);
|
|
10451
|
+
var formatStr = String(dirtyFormatStr);
|
|
10452
|
+
var defaultOptions = getDefaultOptions();
|
|
10453
|
+
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : enUS;
|
|
10454
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
10455
|
+
|
|
10456
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
10457
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
10458
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
10459
|
+
}
|
|
10460
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
10461
|
+
|
|
10462
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
10463
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
10464
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
10465
|
+
}
|
|
10466
|
+
if (!locale.localize) {
|
|
10467
|
+
throw new RangeError('locale must contain localize property');
|
|
10468
|
+
}
|
|
10469
|
+
if (!locale.formatLong) {
|
|
10470
|
+
throw new RangeError('locale must contain formatLong property');
|
|
10471
|
+
}
|
|
10472
|
+
var originalDate = toDate(dirtyDate);
|
|
10473
|
+
if (!isValid$1(originalDate)) {
|
|
10474
|
+
throw new RangeError('Invalid time value');
|
|
10475
|
+
}
|
|
10476
|
+
|
|
10477
|
+
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
10478
|
+
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
10479
|
+
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
10480
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
10481
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
10482
|
+
var formatterOptions = {
|
|
10483
|
+
firstWeekContainsDate: firstWeekContainsDate,
|
|
10484
|
+
weekStartsOn: weekStartsOn,
|
|
10485
|
+
locale: locale,
|
|
10486
|
+
_originalDate: originalDate
|
|
10487
|
+
};
|
|
10488
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
10489
|
+
var firstCharacter = substring[0];
|
|
10490
|
+
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
10491
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
10492
|
+
return longFormatter(substring, locale.formatLong);
|
|
10493
|
+
}
|
|
10494
|
+
return substring;
|
|
10495
|
+
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
10496
|
+
// Replace two single quote characters with one single quote character
|
|
10497
|
+
if (substring === "''") {
|
|
10498
|
+
return "'";
|
|
10499
|
+
}
|
|
10500
|
+
var firstCharacter = substring[0];
|
|
10501
|
+
if (firstCharacter === "'") {
|
|
10502
|
+
return cleanEscapedString(substring);
|
|
10503
|
+
}
|
|
10504
|
+
var formatter = formatters$1[firstCharacter];
|
|
10505
|
+
if (formatter) {
|
|
10506
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
10507
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
10508
|
+
}
|
|
10509
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
10510
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
10511
|
+
}
|
|
10512
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
10513
|
+
}
|
|
10514
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
10515
|
+
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
10516
|
+
}
|
|
10517
|
+
return substring;
|
|
10518
|
+
}).join('');
|
|
10519
|
+
return result;
|
|
10520
|
+
}
|
|
10521
|
+
function cleanEscapedString(input) {
|
|
10522
|
+
var matched = input.match(escapedStringRegExp);
|
|
10523
|
+
if (!matched) {
|
|
10524
|
+
return input;
|
|
10525
|
+
}
|
|
10526
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
10527
|
+
}
|
|
10528
|
+
|
|
8333
10529
|
/******************************************************************************
|
|
8334
10530
|
Copyright (c) Microsoft Corporation.
|
|
8335
10531
|
|
|
@@ -10244,7 +12440,7 @@ Defaulting to \`null\`.`;
|
|
|
10244
12440
|
|
|
10245
12441
|
var le = /*@__PURE__*/getDefaultExportFromCjs(commandScore_1);
|
|
10246
12442
|
|
|
10247
|
-
var ue$1='[cmdk-list-sizer=""]',M='[cmdk-group=""]',N='[cmdk-group-items=""]',de='[cmdk-group-heading=""]',ee$1='[cmdk-item=""]',Z=`${ee$1}:not([aria-disabled="true"])`,z="cmdk-item-select",S="data-value",fe=(n,a)=>le(n,a),te$1=React__namespace.createContext(void 0),k=()=>React__namespace.useContext(te$1),re=React__namespace.createContext(void 0),U=()=>React__namespace.useContext(re),ne$1=React__namespace.createContext(void 0),oe=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useRef(null),o=x(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),u=x(()=>new Set),l=x(()=>new Map),p=x(()=>new Map),f=x(()=>new Set),d=ae(n),{label:v,children:E,value:R,onValueChange:w,filter:O,shouldFilter:ie,...D}=n,F=React__namespace.useId(),g=React__namespace.useId(),A=React__namespace.useId(),y=ye();L(()=>{if(R!==void 0){let e=R.trim().toLowerCase();o.current.value=e,y(6,W),h.emit();}},[R]);let h=React__namespace.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>o.current,setState:(e,c,i)=>{var s,m,b;if(!Object.is(o.current[e],c)){if(o.current[e]=c,e==="search")j(),G(),y(1,V);else if(e==="value")if(((s=d.current)==null?void 0:s.value)!==void 0){(b=(m=d.current).onValueChange)==null||b.call(m,c);return}else i||y(5,W);h.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),K=React__namespace.useMemo(()=>({value:(e,c)=>{c!==p.current.get(e)&&(p.current.set(e,c),o.current.filtered.items.set(e,B(c)),y(2,()=>{G(),h.emit();}));},item:(e,c)=>(u.current.add(e),c&&(l.current.has(c)?l.current.get(c).add(e):l.current.set(c,new Set([e]))),y(3,()=>{j(),G(),o.current.value||V(),h.emit();}),()=>{p.current.delete(e),u.current.delete(e),o.current.filtered.items.delete(e),y(4,()=>{j(),V(),h.emit();});}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{p.current.delete(e),l.current.delete(e);}),filter:()=>d.current.shouldFilter,label:v||n["aria-label"],listId:F,inputId:A,labelId:g}),[]);function B(e){var i;let c=((i=d.current)==null?void 0:i.filter)??fe;return e?c(e,o.current.search):0}function G(){if(!r.current||!o.current.search||d.current.shouldFilter===!1)return;let e=o.current.filtered.items,c=[];o.current.filtered.groups.forEach(s=>{let m=l.current.get(s),b=0;m.forEach(P=>{let ce=e.get(P);b=Math.max(ce,b);}),c.push([s,b]);});let i=r.current.querySelector(ue$1);I().sort((s,m)=>{let b=s.getAttribute(S),P=m.getAttribute(S);return (e.get(P)??0)-(e.get(b)??0)}).forEach(s=>{let m=s.closest(N);m?m.appendChild(s.parentElement===m?s:s.closest(`${N} > *`)):i.appendChild(s.parentElement===i?s:s.closest(`${N} > *`));}),c.sort((s,m)=>m[1]-s[1]).forEach(s=>{let m=r.current.querySelector(`${M}[${S}="${s[0]}"]`);m==null||m.parentElement.appendChild(m);});}function V(){let e=I().find(i=>!i.ariaDisabled),c=e==null?void 0:e.getAttribute(S);h.setState("value",c||void 0);}function j(){if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=u.current.size;return}o.current.filtered.groups=new Set;let e=0;for(let c of u.current){let i=p.current.get(c),s=B(i);o.current.filtered.items.set(c,s),s>0&&e++;}for(let[c,i]of l.current)for(let s of i)if(o.current.filtered.items.get(s)>0){o.current.filtered.groups.add(c);break}o.current.filtered.count=e;}function W(){var c,i,s;let e=_();e&&(((c=e.parentElement)==null?void 0:c.firstChild)===e&&((s=(i=e.closest(M))==null?void 0:i.querySelector(de))==null||s.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function _(){return r.current.querySelector(`${ee$1}[aria-selected="true"]`)}function I(){return Array.from(r.current.querySelectorAll(Z))}function q(e){let i=I()[e];i&&h.setState("value",i.getAttribute(S));}function $(e){var b;let c=_(),i=I(),s=i.findIndex(P=>P===c),m=i[s+e];(b=d.current)!=null&&b.loop&&(m=s+e<0?i[i.length-1]:s+e===i.length?i[0]:i[s+e]),m&&h.setState("value",m.getAttribute(S));}function J(e){let c=_(),i=c==null?void 0:c.closest(M),s;for(;i&&!s;)i=e>0?Se(i,M):Ce(i,M),s=i==null?void 0:i.querySelector(Z);s?h.setState("value",s.getAttribute(S)):$(e);}let Q=()=>q(I().length-1),X=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):$(1);},Y=e=>{e.preventDefault(),e.metaKey?q(0):e.altKey?J(-1):$(-1);};return React__namespace.createElement("div",{ref:H([r,a]),...D,"cmdk-root":"",onKeyDown:e=>{var c;if((c=D.onKeyDown)==null||c.call(D,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{e.ctrlKey&&X(e);break}case"ArrowDown":{X(e);break}case"p":case"k":{e.ctrlKey&&Y(e);break}case"ArrowUp":{Y(e);break}case"Home":{e.preventDefault(),q(0);break}case"End":{e.preventDefault(),Q();break}case"Enter":{e.preventDefault();let i=_();if(i){let s=new Event(z);i.dispatchEvent(s);}}}}},React__namespace.createElement("label",{"cmdk-label":"",htmlFor:K.inputId,id:K.labelId,style:xe},v),React__namespace.createElement(re.Provider,{value:h},React__namespace.createElement(te$1.Provider,{value:K},E)))}),me$1=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useId(),o=React__namespace.useRef(null),u=React__namespace.useContext(ne$1),l=k(),p=ae(n);L(()=>l.item(r,u),[]);let f=se$1(r,o,[n.value,n.children,o]),d=U(),v=T(g=>g.value&&g.value===f.current),E=T(g=>l.filter()===!1?!0:g.search?g.filtered.items.get(r)>0:!0);React__namespace.useEffect(()=>{let g=o.current;if(!(!g||n.disabled))return g.addEventListener(z,R),()=>g.removeEventListener(z,R)},[E,n.onSelect,n.disabled]);function R(){var g,A;(A=(g=p.current).onSelect)==null||A.call(g,f.current);}function w(){d.setState("value",f.current,!0);}if(!E)return null;let{disabled:O,value:ie,onSelect:D,...F}=n;return React__namespace.createElement("div",{ref:H([o,a]),...F,"cmdk-item":"",role:"option","aria-disabled":O||void 0,"aria-selected":v||void 0,"data-selected":v||void 0,onPointerMove:O?void 0:w,onClick:O?void 0:R},n.children)}),pe=React__namespace.forwardRef((n,a)=>{let{heading:r,children:o,...u}=n,l=React__namespace.useId(),p=React__namespace.useRef(null),f=React__namespace.useRef(null),d=React__namespace.useId(),v=k(),E=T(w=>v.filter()===!1?!0:w.search?w.filtered.groups.has(l):!0);L(()=>v.group(l),[]),se$1(l,p,[n.value,n.heading,f]);let R=React__namespace.createElement(ne$1.Provider,{value:l},o);return React__namespace.createElement("div",{ref:H([p,a]),...u,"cmdk-group":"",role:"presentation",hidden:E?void 0:!0},r&&React__namespace.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),React__namespace.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},R))}),ge=React__namespace.forwardRef((n,a)=>{let{alwaysRender:r,...o}=n,u=React__namespace.useRef(null),l=T(p=>!p.search);return !r&&!l?null:React__namespace.createElement("div",{ref:H([u,a]),...o,"cmdk-separator":"",role:"separator"})}),ve=React__namespace.forwardRef((n,a)=>{let{onValueChange:r,...o}=n,u=n.value!=null,l=U(),p=T(d=>d.search),f=k();return React__namespace.useEffect(()=>{n.value!=null&&l.setState("search",n.value);},[n.value]),React__namespace.createElement("input",{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,id:f.inputId,type:"text",value:u?n.value:p,onChange:d=>{u||l.setState("search",d.target.value),r==null||r(d.target.value);}})}),Re=React__namespace.forwardRef((n,a)=>{let{children:r,...o}=n,u=React__namespace.useRef(null),l=React__namespace.useRef(null),p=k();return React__namespace.useEffect(()=>{if(l.current&&u.current){let f=l.current,d=u.current,v,E=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let R=f.getBoundingClientRect().height;d.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px");});});return E.observe(f),()=>{cancelAnimationFrame(v),E.unobserve(f);}}},[]),React__namespace.createElement("div",{ref:H([u,a]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:p.listId,"aria-labelledby":p.inputId},React__namespace.createElement("div",{ref:l,"cmdk-list-sizer":""},r))}),be=React__namespace.forwardRef((n,a)=>{let{open:r,onOpenChange:o,container:u,...l}=n;return React__namespace.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:r,onOpenChange:o},React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:u},React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":""}),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":n.label,"cmdk-dialog":""},React__namespace.createElement(oe,{ref:a,...l}))))}),he$1=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useRef(!0),o=T(u=>u.filtered.count===0);return React__namespace.useEffect(()=>{r.current=!1;},[]),r.current||!o?null:React__namespace.createElement("div",{ref:a,...n,"cmdk-empty":"",role:"presentation"})}),Ee$1=React__namespace.forwardRef((n,a)=>{let{progress:r,children:o,...u}=n;return React__namespace.createElement("div",{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},React__namespace.createElement("div",{"aria-hidden":!0},o))}),Le=Object.assign(oe,{List:Re,Item:me$1,Input:ve,Group:pe,Separator:ge,Dialog:be,Empty:he$1,Loading:Ee$1});function Se(n,a){let r=n.nextElementSibling;for(;r;){if(r.matches(a))return r;r=r.nextElementSibling;}}function Ce(n,a){let r=n.previousElementSibling;for(;r;){if(r.matches(a))return r;r=r.previousElementSibling;}}function ae(n){let a=React__namespace.useRef(n);return L(()=>{a.current=n;}),a}var L=typeof window>"u"?React__namespace.useEffect:React__namespace.useLayoutEffect;function x(n){let a=React__namespace.useRef();return a.current===void 0&&(a.current=n()),a}function H(n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a);});}}function T(n){let a=U(),r=()=>n(a.snapshot());return React__namespace.useSyncExternalStore(a.subscribe,r,r)}function se$1(n,a,r){let o=React__namespace.useRef(),u=k();return L(()=>{var p;let l=(()=>{var f;for(let d of r){if(typeof d=="string")return d.trim().toLowerCase();if(typeof d=="object"&&"current"in d&&d.current)return (f=d.current.textContent)==null?void 0:f.trim().toLowerCase()}})();u.value(n,l),(p=a.current)==null||p.setAttribute(S,l),o.current=l;}),o}var ye=()=>{let[n,a]=React__namespace.useState(),r=x(()=>new Map);return L(()=>{r.current.forEach(o=>o()),r.current=new Map;},[n]),(o,u)=>{r.current.set(o,u),a({});}},xe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
|
|
12443
|
+
var ue='[cmdk-list-sizer=""]',M='[cmdk-group=""]',N='[cmdk-group-items=""]',de='[cmdk-group-heading=""]',ee='[cmdk-item=""]',Z=`${ee}:not([aria-disabled="true"])`,z="cmdk-item-select",S="data-value",fe=(n,a)=>le(n,a),te=React__namespace.createContext(void 0),k=()=>React__namespace.useContext(te),re=React__namespace.createContext(void 0),U=()=>React__namespace.useContext(re),ne=React__namespace.createContext(void 0),oe=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useRef(null),o=x(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),u=x(()=>new Set),l=x(()=>new Map),p=x(()=>new Map),f=x(()=>new Set),d=ae(n),{label:v,children:E,value:R,onValueChange:w,filter:O,shouldFilter:ie,...D}=n,F=React__namespace.useId(),g=React__namespace.useId(),A=React__namespace.useId(),y=ye();L(()=>{if(R!==void 0){let e=R.trim().toLowerCase();o.current.value=e,y(6,W),h.emit();}},[R]);let h=React__namespace.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>o.current,setState:(e,c,i)=>{var s,m,b;if(!Object.is(o.current[e],c)){if(o.current[e]=c,e==="search")j(),G(),y(1,V);else if(e==="value")if(((s=d.current)==null?void 0:s.value)!==void 0){(b=(m=d.current).onValueChange)==null||b.call(m,c);return}else i||y(5,W);h.emit();}},emit:()=>{f.current.forEach(e=>e());}}),[]),K=React__namespace.useMemo(()=>({value:(e,c)=>{c!==p.current.get(e)&&(p.current.set(e,c),o.current.filtered.items.set(e,B(c)),y(2,()=>{G(),h.emit();}));},item:(e,c)=>(u.current.add(e),c&&(l.current.has(c)?l.current.get(c).add(e):l.current.set(c,new Set([e]))),y(3,()=>{j(),G(),o.current.value||V(),h.emit();}),()=>{p.current.delete(e),u.current.delete(e),o.current.filtered.items.delete(e),y(4,()=>{j(),V(),h.emit();});}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{p.current.delete(e),l.current.delete(e);}),filter:()=>d.current.shouldFilter,label:v||n["aria-label"],listId:F,inputId:A,labelId:g}),[]);function B(e){var i;let c=((i=d.current)==null?void 0:i.filter)??fe;return e?c(e,o.current.search):0}function G(){if(!r.current||!o.current.search||d.current.shouldFilter===!1)return;let e=o.current.filtered.items,c=[];o.current.filtered.groups.forEach(s=>{let m=l.current.get(s),b=0;m.forEach(P=>{let ce=e.get(P);b=Math.max(ce,b);}),c.push([s,b]);});let i=r.current.querySelector(ue);I().sort((s,m)=>{let b=s.getAttribute(S),P=m.getAttribute(S);return (e.get(P)??0)-(e.get(b)??0)}).forEach(s=>{let m=s.closest(N);m?m.appendChild(s.parentElement===m?s:s.closest(`${N} > *`)):i.appendChild(s.parentElement===i?s:s.closest(`${N} > *`));}),c.sort((s,m)=>m[1]-s[1]).forEach(s=>{let m=r.current.querySelector(`${M}[${S}="${s[0]}"]`);m==null||m.parentElement.appendChild(m);});}function V(){let e=I().find(i=>!i.ariaDisabled),c=e==null?void 0:e.getAttribute(S);h.setState("value",c||void 0);}function j(){if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=u.current.size;return}o.current.filtered.groups=new Set;let e=0;for(let c of u.current){let i=p.current.get(c),s=B(i);o.current.filtered.items.set(c,s),s>0&&e++;}for(let[c,i]of l.current)for(let s of i)if(o.current.filtered.items.get(s)>0){o.current.filtered.groups.add(c);break}o.current.filtered.count=e;}function W(){var c,i,s;let e=_();e&&(((c=e.parentElement)==null?void 0:c.firstChild)===e&&((s=(i=e.closest(M))==null?void 0:i.querySelector(de))==null||s.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}));}function _(){return r.current.querySelector(`${ee}[aria-selected="true"]`)}function I(){return Array.from(r.current.querySelectorAll(Z))}function q(e){let i=I()[e];i&&h.setState("value",i.getAttribute(S));}function $(e){var b;let c=_(),i=I(),s=i.findIndex(P=>P===c),m=i[s+e];(b=d.current)!=null&&b.loop&&(m=s+e<0?i[i.length-1]:s+e===i.length?i[0]:i[s+e]),m&&h.setState("value",m.getAttribute(S));}function J(e){let c=_(),i=c==null?void 0:c.closest(M),s;for(;i&&!s;)i=e>0?Se(i,M):Ce$1(i,M),s=i==null?void 0:i.querySelector(Z);s?h.setState("value",s.getAttribute(S)):$(e);}let Q=()=>q(I().length-1),X=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):$(1);},Y=e=>{e.preventDefault(),e.metaKey?q(0):e.altKey?J(-1):$(-1);};return React__namespace.createElement("div",{ref:H([r,a]),...D,"cmdk-root":"",onKeyDown:e=>{var c;if((c=D.onKeyDown)==null||c.call(D,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{e.ctrlKey&&X(e);break}case"ArrowDown":{X(e);break}case"p":case"k":{e.ctrlKey&&Y(e);break}case"ArrowUp":{Y(e);break}case"Home":{e.preventDefault(),q(0);break}case"End":{e.preventDefault(),Q();break}case"Enter":{e.preventDefault();let i=_();if(i){let s=new Event(z);i.dispatchEvent(s);}}}}},React__namespace.createElement("label",{"cmdk-label":"",htmlFor:K.inputId,id:K.labelId,style:xe},v),React__namespace.createElement(re.Provider,{value:h},React__namespace.createElement(te.Provider,{value:K},E)))}),me$1=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useId(),o=React__namespace.useRef(null),u=React__namespace.useContext(ne),l=k(),p=ae(n);L(()=>l.item(r,u),[]);let f=se(r,o,[n.value,n.children,o]),d=U(),v=T(g=>g.value&&g.value===f.current),E=T(g=>l.filter()===!1?!0:g.search?g.filtered.items.get(r)>0:!0);React__namespace.useEffect(()=>{let g=o.current;if(!(!g||n.disabled))return g.addEventListener(z,R),()=>g.removeEventListener(z,R)},[E,n.onSelect,n.disabled]);function R(){var g,A;(A=(g=p.current).onSelect)==null||A.call(g,f.current);}function w(){d.setState("value",f.current,!0);}if(!E)return null;let{disabled:O,value:ie,onSelect:D,...F}=n;return React__namespace.createElement("div",{ref:H([o,a]),...F,"cmdk-item":"",role:"option","aria-disabled":O||void 0,"aria-selected":v||void 0,"data-selected":v||void 0,onPointerMove:O?void 0:w,onClick:O?void 0:R},n.children)}),pe=React__namespace.forwardRef((n,a)=>{let{heading:r,children:o,...u}=n,l=React__namespace.useId(),p=React__namespace.useRef(null),f=React__namespace.useRef(null),d=React__namespace.useId(),v=k(),E=T(w=>v.filter()===!1?!0:w.search?w.filtered.groups.has(l):!0);L(()=>v.group(l),[]),se(l,p,[n.value,n.heading,f]);let R=React__namespace.createElement(ne.Provider,{value:l},o);return React__namespace.createElement("div",{ref:H([p,a]),...u,"cmdk-group":"",role:"presentation",hidden:E?void 0:!0},r&&React__namespace.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),React__namespace.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},R))}),ge=React__namespace.forwardRef((n,a)=>{let{alwaysRender:r,...o}=n,u=React__namespace.useRef(null),l=T(p=>!p.search);return !r&&!l?null:React__namespace.createElement("div",{ref:H([u,a]),...o,"cmdk-separator":"",role:"separator"})}),ve$1=React__namespace.forwardRef((n,a)=>{let{onValueChange:r,...o}=n,u=n.value!=null,l=U(),p=T(d=>d.search),f=k();return React__namespace.useEffect(()=>{n.value!=null&&l.setState("search",n.value);},[n.value]),React__namespace.createElement("input",{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,id:f.inputId,type:"text",value:u?n.value:p,onChange:d=>{u||l.setState("search",d.target.value),r==null||r(d.target.value);}})}),Re$1=React__namespace.forwardRef((n,a)=>{let{children:r,...o}=n,u=React__namespace.useRef(null),l=React__namespace.useRef(null),p=k();return React__namespace.useEffect(()=>{if(l.current&&u.current){let f=l.current,d=u.current,v,E=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let R=f.getBoundingClientRect().height;d.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px");});});return E.observe(f),()=>{cancelAnimationFrame(v),E.unobserve(f);}}},[]),React__namespace.createElement("div",{ref:H([u,a]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:p.listId,"aria-labelledby":p.inputId},React__namespace.createElement("div",{ref:l,"cmdk-list-sizer":""},r))}),be=React__namespace.forwardRef((n,a)=>{let{open:r,onOpenChange:o,container:u,...l}=n;return React__namespace.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:r,onOpenChange:o},React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:u},React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":""}),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":n.label,"cmdk-dialog":""},React__namespace.createElement(oe,{ref:a,...l}))))}),he$1=React__namespace.forwardRef((n,a)=>{let r=React__namespace.useRef(!0),o=T(u=>u.filtered.count===0);return React__namespace.useEffect(()=>{r.current=!1;},[]),r.current||!o?null:React__namespace.createElement("div",{ref:a,...n,"cmdk-empty":"",role:"presentation"})}),Ee=React__namespace.forwardRef((n,a)=>{let{progress:r,children:o,...u}=n;return React__namespace.createElement("div",{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},React__namespace.createElement("div",{"aria-hidden":!0},o))}),Le$1=Object.assign(oe,{List:Re$1,Item:me$1,Input:ve$1,Group:pe,Separator:ge,Dialog:be,Empty:he$1,Loading:Ee});function Se(n,a){let r=n.nextElementSibling;for(;r;){if(r.matches(a))return r;r=r.nextElementSibling;}}function Ce$1(n,a){let r=n.previousElementSibling;for(;r;){if(r.matches(a))return r;r=r.previousElementSibling;}}function ae(n){let a=React__namespace.useRef(n);return L(()=>{a.current=n;}),a}var L=typeof window>"u"?React__namespace.useEffect:React__namespace.useLayoutEffect;function x(n){let a=React__namespace.useRef();return a.current===void 0&&(a.current=n()),a}function H(n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a);});}}function T(n){let a=U(),r=()=>n(a.snapshot());return React__namespace.useSyncExternalStore(a.subscribe,r,r)}function se(n,a,r){let o=React__namespace.useRef(),u=k();return L(()=>{var p;let l=(()=>{var f;for(let d of r){if(typeof d=="string")return d.trim().toLowerCase();if(typeof d=="object"&&"current"in d&&d.current)return (f=d.current.textContent)==null?void 0:f.trim().toLowerCase()}})();u.value(n,l),(p=a.current)==null||p.setAttribute(S,l),o.current=l;}),o}var ye=()=>{let[n,a]=React__namespace.useState(),r=x(()=>new Map);return L(()=>{r.current.forEach(o=>o()),r.current=new Map;},[n]),(o,u)=>{r.current.set(o,u),a({});}},xe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
|
|
10248
12444
|
|
|
10249
12445
|
const $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
|
|
10250
12446
|
const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
@@ -35211,9 +37407,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
35211
37407
|
|
|
35212
37408
|
ColorWrap(Google);
|
|
35213
37409
|
|
|
35214
|
-
function r(...e){return twMerge(clsx(e))}var wr="https://api-dev.liberty.percyai.io/key_service/v1/jwt/generate";var _t=async({clientKey:e})=>{try{return e?await(await fetch(wr,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientKey:e})})).json():void 0}catch(t){console.error("Error requesting token:",t);return}};var he=(e,t)=>e?.config?e.config.find(o=>o.name===t):{};var Me=cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),te=React__namespace.forwardRef(({className:e,variant:t,size:o,asChild:a=!1,...i},s)=>React__namespace.createElement(a?$5e63c961fc1ce211$export$8c6ed5c666ac1360$1:"button",{className:r(Me({variant:t,size:o,className:e})),ref:s,...i}));te.displayName="Button";var ze=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ze.displayName="Card";var Ye=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("flex flex-col space-y-1.5 p-6",e),...t}));Ye.displayName="CardHeader";var Ot=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("h3",{ref:o,className:r("font-semibold leading-none tracking-tight",e),...t}));Ot.displayName="CardTitle";var Dr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("p",{ref:o,className:r("text-sm text-muted-foreground",e),...t}));Dr.displayName="CardDescription";var $e=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("p-6 pt-0",e),...t}));$e.displayName="CardContent";var je=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("flex items-center p-6 pt-0",e),...t}));je.displayName="CardFooter";var kt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$be92b6f5f03c0fe9,{ref:o,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));kt.displayName=$cddcb0b647441e34$export$be92b6f5f03c0fe9.displayName;var Lr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$3e431a229df88919,{ref:o,className:r("aspect-square h-full w-full",e),...t}));Lr.displayName=$cddcb0b647441e34$export$3e431a229df88919.displayName;var Ft=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$fb8d7f40caaeea67,{ref:o,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ft.displayName=$cddcb0b647441e34$export$fb8d7f40caaeea67.displayName;var Ht=React__namespace.forwardRef(({className:e,value:t,...o},a)=>React__namespace.createElement($67824d98245208a0$export$be92b6f5f03c0fe9,{ref:a,className:r("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o},React__namespace.createElement($67824d98245208a0$export$adb584737d712b70,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Ht.displayName=$67824d98245208a0$export$be92b6f5f03c0fe9.displayName;var Qe=React__namespace.forwardRef(({className:e,sideOffset:t=4,...o},a)=>React__namespace.createElement($a093c7e1ec25a057$export$7c6e2c02157bb7d2,{ref:a,sideOffset:t,className:r("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Qe.displayName=$a093c7e1ec25a057$export$7c6e2c02157bb7d2.displayName;var Eo=({className:e,...t})=>React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c$1,{className:r(e),...t});Eo.displayName=$5d3850c4d0b4e6c7$export$602eac185826482c$1.displayName;var Ao=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1,{className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Ao.displayName=$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1.displayName;var Fr=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Hr=React__namespace.forwardRef(({side:e="right",className:t,children:o,...a},i)=>React__namespace.createElement(Eo,null,React__namespace.createElement(Ao,null),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1,{ref:i,className:r(Fr({side:e}),t),...a},o,React__namespace.createElement($5d3850c4d0b4e6c7$export$f39c2d165cd861fe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"}),React__namespace.createElement("span",{className:"sr-only"},"Close")))));Hr.displayName=$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1.displayName;var Ur=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold text-foreground",e),...t}));Ur.displayName=$5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;var Gr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));Gr.displayName=$5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;var Vt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:"w-full overflow-auto"},React__namespace.createElement("table",{ref:o,className:r("w-full caption-bottom text-sm",e),...t})));Vt.displayName="Table";var Bt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("thead",{ref:o,className:r("[&_tr]:border-b",e),...t}));Bt.displayName="TableHeader";var Ut=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tbody",{ref:o,className:r("[&_tr:last-child]:border-0",e),...t}));Ut.displayName="TableBody";var Gt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tfoot",{ref:o,className:r("bg-primary font-medium text-primary-foreground",e),...t}));Gt.displayName="TableFooter";var Ke=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tr",{ref:o,className:r("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ke.displayName="TableRow";var Pe=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("th",{ref:o,className:r("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Pe.displayName="TableHead";var Te=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("td",{ref:o,className:r("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Te.displayName="TableCell";var Wt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("caption",{ref:o,className:r("mt-4 text-sm text-muted-foreground",e),...t}));Wt.displayName="TableCaption";var zr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1bf158f521e1b1b4$export$6d08773d2e66f8f2,{ref:o,className:r("border-b",e),...t}));zr.displayName="AccordionItem";var Yr=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1bf158f521e1b1b4$export$8b251419efc915eb,{className:"flex"},React__namespace.createElement($1bf158f521e1b1b4$export$41fb9f06171c75f4,{ref:a,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,React__namespace.createElement(ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"}))));Yr.displayName=$1bf158f521e1b1b4$export$41fb9f06171c75f4.displayName;var $r=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1bf158f521e1b1b4$export$7c6e2c02157bb7d2,{ref:a,className:r("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o},React__namespace.createElement("div",{className:"pb-4 pt-0"},t)));$r.displayName=$1bf158f521e1b1b4$export$7c6e2c02157bb7d2.displayName;var Jr=cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),zt=React__namespace.forwardRef(({className:e,variant:t,...o},a)=>React__namespace.createElement("div",{ref:a,role:"alert",className:r(Jr({variant:t}),e),...o}));zt.displayName="Alert";var Yt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("h5",{ref:o,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));Yt.displayName="AlertTitle";var $t=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("text-sm [&_p]:leading-relaxed",e),...t}));$t.displayName="AlertDescription";var Co=$905f4ae918aab1aa$export$be92b6f5f03c0fe9,wo=$905f4ae918aab1aa$export$41fb9f06171c75f4,So=({className:e,...t})=>React__namespace.createElement($905f4ae918aab1aa$export$602eac185826482c,{className:r(e),...t});So.displayName=$905f4ae918aab1aa$export$602eac185826482c.displayName;var Mo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$c6fdb837b070b4ff,{className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Mo.displayName=$905f4ae918aab1aa$export$c6fdb837b070b4ff.displayName;var jt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(So,null,React__namespace.createElement(Mo,null),React__namespace.createElement($905f4ae918aab1aa$export$7c6e2c02157bb7d2,{ref:o,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})));jt.displayName=$905f4ae918aab1aa$export$7c6e2c02157bb7d2.displayName;var Jt=({className:e,...t})=>React__namespace.createElement("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jt.displayName="AlertDialogFooter";var qt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold",e),...t}));qt.displayName=$905f4ae918aab1aa$export$f99233281efd08a0.displayName;var Qr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));Qr.displayName=$905f4ae918aab1aa$export$393edc798c47379d.displayName;var Qt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$e19cd5f9376f8cee,{ref:o,className:r(Me(),e),...t}));Qt.displayName=$905f4ae918aab1aa$export$e19cd5f9376f8cee.displayName;var Kr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$848c9b7ead0df967,{ref:o,className:r(Me({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Kr.displayName=$905f4ae918aab1aa$export$848c9b7ead0df967.displayName;var Kt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($e698a72e93240346$export$be92b6f5f03c0fe9,{ref:o,className:r("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},React__namespace.createElement($e698a72e93240346$export$adb584737d712b70,{className:r("flex items-center justify-center text-current")},React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))));Kt.displayName=$e698a72e93240346$export$be92b6f5f03c0fe9.displayName;var Do=({className:e,...t})=>React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c$1,{className:r(e),...t});Do.displayName=$5d3850c4d0b4e6c7$export$602eac185826482c$1.displayName;var Lo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1,{ref:o,className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Lo.displayName=$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1.displayName;var De=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement(Do,null,React__namespace.createElement(Lo,null),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1,{ref:a,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...o},t,React__namespace.createElement($5d3850c4d0b4e6c7$export$f39c2d165cd861fe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"}),React__namespace.createElement("span",{className:"sr-only"},"Close")))));De.displayName=$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1.displayName;var eo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));eo.displayName=$5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;var to=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));to.displayName=$5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;var Io=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Io.displayName=Le.displayName;var ia=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},React__namespace.createElement(MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),React__namespace.createElement(Le.Input,{ref:o,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));ia.displayName=Le.Input.displayName;var na=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));na.displayName=Le.List.displayName;var sa=React__namespace.forwardRef((e,t)=>React__namespace.createElement(Le.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));sa.displayName=Le.Empty.displayName;var ma=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le.Group,{ref:o,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ma.displayName=Le.Group.displayName;var la=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le.Separator,{ref:o,className:r("-mx-1 h-px bg-border",e),...t}));la.displayName=Le.Separator.displayName;var ca=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le.Item,{ref:o,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));ca.displayName=Le.Item.displayName;var ga=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($1b0217ee4a91d156$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));ga.displayName=$1b0217ee4a91d156$export$2ea8a7a591ac5eac.displayName;var Ra=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ra.displayName=$1b0217ee4a91d156$export$6d4de93b380beddf.displayName;var va=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$602eac185826482c,null,React__namespace.createElement($1b0217ee4a91d156$export$7c6e2c02157bb7d2,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));va.displayName=$1b0217ee4a91d156$export$7c6e2c02157bb7d2.displayName;var ba=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));ba.displayName=$1b0217ee4a91d156$export$6d08773d2e66f8f2.displayName;var xa=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($1b0217ee4a91d156$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($1b0217ee4a91d156$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));xa.displayName=$1b0217ee4a91d156$export$16ce288f89fa631c.displayName;var ha=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($1b0217ee4a91d156$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));ha.displayName=$1b0217ee4a91d156$export$371ab307eab489c0.displayName;var ya=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));ya.displayName=$1b0217ee4a91d156$export$b04be29aa201d4f5.displayName;var Pa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-border",e),...t}));Pa.displayName=$1b0217ee4a91d156$export$1ff3c3f08ae963c0.displayName;var Ca=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($d08ef79370b62062$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));Ca.displayName=$d08ef79370b62062$export$2ea8a7a591ac5eac.displayName;var wa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($d08ef79370b62062$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));wa.displayName=$d08ef79370b62062$export$6d4de93b380beddf.displayName;var oo=React__namespace.forwardRef(({className:e,sideOffset:t=4,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$602eac185826482c,null,React__namespace.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2,{ref:a,sideOffset:t,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})));oo.displayName=$d08ef79370b62062$export$7c6e2c02157bb7d2.displayName;var Sa=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Sa.displayName=$d08ef79370b62062$export$6d08773d2e66f8f2.displayName;var Ma=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($d08ef79370b62062$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($d08ef79370b62062$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));Ma.displayName=$d08ef79370b62062$export$16ce288f89fa631c.displayName;var Da=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($d08ef79370b62062$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));Da.displayName=$d08ef79370b62062$export$371ab307eab489c0.displayName;var La=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));La.displayName=$d08ef79370b62062$export$b04be29aa201d4f5.displayName;var Ia=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));Ia.displayName=$d08ef79370b62062$export$1ff3c3f08ae963c0.displayName;var ka=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ao=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($b73a6c6685e72184$export$be92b6f5f03c0fe9,{ref:o,className:r(ka(),e),...t}));ao.displayName=$b73a6c6685e72184$export$be92b6f5f03c0fe9.displayName;var Fo=React__namespace.createContext({}),gt=()=>{let e=React__namespace.useContext(Fo),t=React__namespace.useContext(Ho),{getFieldState:o,formState:a}=useFormContext(),i=o(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:s}=t;return {id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},Ho=React__namespace.createContext({}),ne=React__namespace.forwardRef(({className:e,...t},o)=>{let a=React__namespace.useId();return React__namespace.createElement(Ho.Provider,{value:{id:a}},React__namespace.createElement("div",{ref:o,className:r("space-y-2",e),...t}))});ne.displayName="FormItem";var ue=React__namespace.forwardRef(({className:e,...t},o)=>{let{error:a,formItemId:i}=gt();return React__namespace.createElement(ao,{ref:o,className:r(a&&"text-destructive",e),htmlFor:i,...t})});ue.displayName="FormLabel";var se=React__namespace.forwardRef(({...e},t)=>{let{error:o,formItemId:a,formDescriptionId:i,formMessageId:s}=gt();return React__namespace.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1,{ref:t,id:a,"aria-describedby":o?`${i} ${s}`:`${i}`,"aria-invalid":!!o,...e})});se.displayName="FormControl";var Ua=React__namespace.forwardRef(({className:e,...t},o)=>{let{formDescriptionId:a}=gt();return React__namespace.createElement("p",{ref:o,id:a,className:r("text-[0.8rem] text-muted-foreground",e),...t})});Ua.displayName="FormDescription";var Ee=React__namespace.forwardRef(({className:e,children:t,...o},a)=>{let{error:i,formMessageId:s}=gt(),R=i?String(i?.message):t;return R?React__namespace.createElement("p",{ref:a,id:s,className:r("text-[0.8rem] font-medium text-destructive",e),...o},R):null});Ee.displayName="FormMessage";var me=React__namespace.forwardRef(({className:e,type:t,...o},a)=>React__namespace.createElement("input",{type:t,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));me.displayName="Input";var Ya=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$be92b6f5f03c0fe9,{ref:o,className:r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));Ya.displayName=$0520064cdfc1bd2d$export$be92b6f5f03c0fe9.displayName;var $a=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$41fb9f06171c75f4,{ref:o,className:r("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));$a.displayName=$0520064cdfc1bd2d$export$41fb9f06171c75f4.displayName;var ja=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($0520064cdfc1bd2d$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));ja.displayName=$0520064cdfc1bd2d$export$2ea8a7a591ac5eac.displayName;var Ja=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ja.displayName=$0520064cdfc1bd2d$export$6d4de93b380beddf.displayName;var qa=React__namespace.forwardRef(({className:e,align:t="start",alignOffset:o=-4,sideOffset:a=8,...i},s)=>React__namespace.createElement($0520064cdfc1bd2d$export$602eac185826482c,null,React__namespace.createElement($0520064cdfc1bd2d$export$7c6e2c02157bb7d2,{ref:s,align:t,alignOffset:o,sideOffset:a,className:r("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})));qa.displayName=$0520064cdfc1bd2d$export$7c6e2c02157bb7d2.displayName;var Qa=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Qa.displayName=$0520064cdfc1bd2d$export$6d08773d2e66f8f2.displayName;var Ka=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($0520064cdfc1bd2d$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($0520064cdfc1bd2d$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));Ka.displayName=$0520064cdfc1bd2d$export$16ce288f89fa631c.displayName;var Xa=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($0520064cdfc1bd2d$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));Xa.displayName=$0520064cdfc1bd2d$export$371ab307eab489c0.displayName;var Za=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Za.displayName=$0520064cdfc1bd2d$export$b04be29aa201d4f5.displayName;var ei=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));ei.displayName=$0520064cdfc1bd2d$export$1ff3c3f08ae963c0.displayName;var ai=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($322c88a641701f3b$export$be92b6f5f03c0fe9,{ref:a,className:r("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...o},t,React__namespace.createElement(Vo,null)));ai.displayName=$322c88a641701f3b$export$be92b6f5f03c0fe9.displayName;var ii=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$54c2e3dc7acea9f5,{ref:o,className:r("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));ii.displayName=$322c88a641701f3b$export$54c2e3dc7acea9f5.displayName;var ni=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),si=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($322c88a641701f3b$export$41fb9f06171c75f4,{ref:a,className:r(ni(),"group",e),...o},t," ",React__namespace.createElement(ChevronDownIcon,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})));si.displayName=$322c88a641701f3b$export$41fb9f06171c75f4.displayName;var mi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$7c6e2c02157bb7d2,{ref:o,className:r("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));mi.displayName=$322c88a641701f3b$export$7c6e2c02157bb7d2.displayName;var Vo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:r("absolute left-0 top-full flex justify-center")},React__namespace.createElement($322c88a641701f3b$export$d5c6c08dc2d3ca7,{className:r("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:o,...t})));Vo.displayName=$322c88a641701f3b$export$d5c6c08dc2d3ca7.displayName;var li=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$adb584737d712b70,{ref:o,className:r("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t},React__namespace.createElement("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})));li.displayName=$322c88a641701f3b$export$adb584737d712b70.displayName;var ci=React__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,...a},i)=>React__namespace.createElement($cb5cc270b50c6fcd$export$602eac185826482c,null,React__namespace.createElement($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2,{ref:i,align:t,sideOffset:o,className:r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})));ci.displayName=$cb5cc270b50c6fcd$export$7c6e2c02157bb7d2.displayName;var pi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($f99a8c78507165f7$export$be92b6f5f03c0fe9,{className:r("grid gap-2",e),...t,ref:o}));pi.displayName=$f99a8c78507165f7$export$be92b6f5f03c0fe9.displayName;var fi=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($f99a8c78507165f7$export$6d08773d2e66f8f2,{ref:a,className:r("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...o},React__namespace.createElement($f99a8c78507165f7$export$adb584737d712b70,{className:"flex items-center justify-center"},React__namespace.createElement(CheckIcon$1,{className:"h-3.5 w-3.5 fill-primary"}))));fi.displayName=$f99a8c78507165f7$export$6d08773d2e66f8f2.displayName;var ui=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($57acba87d6e25586$export$be92b6f5f03c0fe9,{ref:a,className:r("relative overflow-hidden",e),...o},React__namespace.createElement($57acba87d6e25586$export$d5c6c08dc2d3ca7,{className:"h-full w-full rounded-[inherit]"},t),React__namespace.createElement(Bo,null),React__namespace.createElement($57acba87d6e25586$export$ac61190d9fc311a9,null)));ui.displayName=$57acba87d6e25586$export$be92b6f5f03c0fe9.displayName;var Bo=React__namespace.forwardRef(({className:e,orientation:t="vertical",...o},a)=>React__namespace.createElement($57acba87d6e25586$export$2fabd85d0eba3c57,{ref:a,orientation:t,className:r("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},React__namespace.createElement($57acba87d6e25586$export$9fba1154677d7cd2,{className:"relative flex-1 rounded-full bg-border"})));Bo.displayName=$57acba87d6e25586$export$2fabd85d0eba3c57.displayName;var et=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($cc7e05a45900e73f$export$41fb9f06171c75f4,{ref:a,className:r("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...o},t,React__namespace.createElement($cc7e05a45900e73f$export$f04a61298a47a40f,{asChild:!0},React__namespace.createElement(CaretSortIcon,{className:"h-4 w-4 opacity-50"}))));et.displayName=$cc7e05a45900e73f$export$41fb9f06171c75f4.displayName;var tt=React__namespace.forwardRef(({className:e,children:t,position:o="popper",...a},i)=>React__namespace.createElement($cc7e05a45900e73f$export$602eac185826482c,null,React__namespace.createElement($cc7e05a45900e73f$export$7c6e2c02157bb7d2,{ref:i,className:r("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...a},React__namespace.createElement($cc7e05a45900e73f$export$d5c6c08dc2d3ca7,{className:r("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t))));tt.displayName=$cc7e05a45900e73f$export$7c6e2c02157bb7d2.displayName;var vi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cc7e05a45900e73f$export$b04be29aa201d4f5,{ref:o,className:r("px-2 py-1.5 text-sm font-semibold",e),...t}));vi.displayName=$cc7e05a45900e73f$export$b04be29aa201d4f5.displayName;var ee=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($cc7e05a45900e73f$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($cc7e05a45900e73f$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),React__namespace.createElement($cc7e05a45900e73f$export$d6e5bf9c43ea9319,null,t)));ee.displayName=$cc7e05a45900e73f$export$6d08773d2e66f8f2.displayName;var bi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cc7e05a45900e73f$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));bi.displayName=$cc7e05a45900e73f$export$1ff3c3f08ae963c0.displayName;var xi=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...a},i)=>React__namespace.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9,{ref:i,decorative:o,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));xi.displayName=$89eedd556c436f6a$export$be92b6f5f03c0fe9.displayName;var hi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($faa2e61a3361514f$export$be92b6f5f03c0fe9,{ref:o,className:r("relative flex w-full touch-none select-none items-center",e),...t},React__namespace.createElement($faa2e61a3361514f$export$13921ac0cc260818,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},React__namespace.createElement($faa2e61a3361514f$export$9a58ef0d7ad3278c,{className:"absolute h-full bg-primary"})),React__namespace.createElement($faa2e61a3361514f$export$6521433ed15a34db,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})));hi.displayName=$faa2e61a3361514f$export$be92b6f5f03c0fe9.displayName;var yi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($6be4966fd9bbc698$export$be92b6f5f03c0fe9,{className:r("peer inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},React__namespace.createElement($6be4966fd9bbc698$export$6521433ed15a34db,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})));yi.displayName=$6be4966fd9bbc698$export$be92b6f5f03c0fe9.displayName;var Pi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5,{ref:o,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Pi.displayName=$69cb30bb0017df05$export$54c2e3dc7acea9f5.displayName;var Ti=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$41fb9f06171c75f4,{ref:o,className:r("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ti.displayName=$69cb30bb0017df05$export$41fb9f06171c75f4.displayName;var Ni=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2,{ref:o,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ni.displayName=$69cb30bb0017df05$export$7c6e2c02157bb7d2.displayName;var no=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));no.displayName="Textarea";var so=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$d5c6c08dc2d3ca7,{ref:o,className:r("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));so.displayName=$054eb8030ebde76e$export$d5c6c08dc2d3ca7.displayName;var Ci=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),mo=React__namespace.forwardRef(({className:e,variant:t,...o},a)=>React__namespace.createElement($054eb8030ebde76e$export$be92b6f5f03c0fe9,{ref:a,className:r(Ci({variant:t}),e),...o}));mo.displayName=$054eb8030ebde76e$export$be92b6f5f03c0fe9.displayName;var wi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$e19cd5f9376f8cee,{ref:o,className:r("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));wi.displayName=$054eb8030ebde76e$export$e19cd5f9376f8cee.displayName;var lo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$f39c2d165cd861fe,{ref:o,className:r("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"})));lo.displayName=$054eb8030ebde76e$export$f39c2d165cd861fe.displayName;var co=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$f99233281efd08a0,{ref:o,className:r("text-sm font-semibold [&+div]:text-xs",e),...t}));co.displayName=$054eb8030ebde76e$export$f99233281efd08a0.displayName;var po=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$393edc798c47379d,{ref:o,className:r("text-sm opacity-90",e),...t}));po.displayName=$054eb8030ebde76e$export$393edc798c47379d.displayName;var Oi=cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),ki=React__namespace.forwardRef(({className:e,variant:t,size:o,...a},i)=>React__namespace.createElement($b3bbe2732c13b576$export$be92b6f5f03c0fe9,{ref:i,className:r(Oi({variant:t,size:o,className:e})),...a}));ki.displayName=$b3bbe2732c13b576$export$be92b6f5f03c0fe9.displayName;var Ro=(i=>(i.buyer="buyer",i.seller="seller",i.buyerSeller="buyer-seller",i.broker="broker",i))(Ro||{});var n=class n{};n.ESTIMATES_ENDPOINT_URL="https://api-dev.liberty.percyai.io/property/v1/estimates",n.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",n.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",n.ESTIMATED_VALUES_DIALOG_DESCRIPTION="The values generated here are based on automated computer modeling from public records and may not represent the true value of the home.",n.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",n.FORM_TITLE="Learn more about my options",n.FORM_DESCRIPTION="Get more insights on how your property valuation",n.FORM_FIRST_NAME_LABEL="First Name *",n.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",n.FORM_EMAIL_ADDRESS_LABEL="Email Address *",n.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",n.FORM_LAST_NAME_LABEL="Last Name *",n.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",n.FORM_PHONE_NUMBER_LABEL="Phone Number *",n.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",n.FORM_USER_TYPE_LABEL="I am: *",n.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",n.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",n.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",n.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",n.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",n.FORM_ACTION_BUTTOM="Submit",n.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",n.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",n.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",n.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",n.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",n.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",n.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",n.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",n.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",n.BUYER="A Buyer",n.SELLER="A Seller",n.BUYER_SELLER="A Buyer and Seller",n.BROKER="A Broker/Agent",n.PERIOD_1="Immediately",n.PERIOD_2="1 to 3 Months",n.PERIOD_3="3 to 6 Months",n.PERIOD_4="6 to 12 Months",n.PERIOD_5="12+ Months",n.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",n.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",n.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",n.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",n.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",n.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",n.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",n.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",n.sellerBuyerSharedContent=[{label:n.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:n.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:n.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:n.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:n.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],n.DYNAMIC_VALUES={buyer:[{label:n.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:n.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:n.sellerBuyerSharedContent,"buyer-seller":n.sellerBuyerSharedContent,broker:[{label:n.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:n.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var l=n;function nt({className:e}){return React__namespace.createElement("svg",{className:r("-ml-1 mr-3 h-5 w-5 animate-spin text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},React__namespace.createElement("circle",{className:r("stroke-brand-400 opacity-25"),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),React__namespace.createElement("path",{className:r("fill-brand-500 dark:fill-brand-900 opacity-75"),fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))}nt.displayName="Spinner";var en=nativeEnumType(Ro,{required_error:l.IAM_REQUIRED_VALIDATION_MESSAGE});objectType({firstName:stringType().min(2,{message:l.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:stringType({required_error:l.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:l.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:stringType().min(2,{message:l.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:stringType().min(2,{message:l.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:en,agent:booleanType().optional(),agentName:stringType().optional(),dynamicValues:arrayType(objectType({homeAddress:stringType().min(2,{message:l.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:stringType().optional()})).optional()});var v=class{static EQUITY_MORTGAGE_DETAILS_BANNER_DESCRIPTION(t,o,a,i,s){return `Public records show a ${t} year loan at ${o} for ${a} from ${i}, giving you an estimated loan balance of ${s}. All calculations on this report are based on these numbers, so we want to make sure we get this right!`}static HOW_CALCULATE_INFORMATION_DESCRIPTION(t,o,a,i){return `These numbers are all based on your ${a} year loan at ${t} for ${o} from ${i}.`}};v.ACTION_OK_BUTTON_LABEL="OK",v.DESCRIPTION_YEARS_LABEL="Years",v.NO_DATA_AVAILABLE_LABEL="No Data Available",v.CONFIGURATION_ERROR_LABEL="Configuration Error",v.CONFIGURATION_ERROR_KEY_EXPIRED_LABEL="Key is expired",v.EQUITY_MORTGAGE_DETAILS_HEADER_TITLE="Equity In Your Home",v.EQUITY_MORTGAGE_DETAILS_DESCRIPTION="Equity is your home's worth to you!",v.EQUITY_MORTGAGE_DETAILS_EDIT_DETAILS="Edit Details",v.EQUITY_MORTGAGE_DETAILS_ALL_GOOD_BUTTON="All Good",v.EQUITY_MORTGAGE_DETAILS_BANNER_TITLE="Verify Your Mortgage Details",v.EQUITY_MORTGAGE_DETAILS_TITLE="Estimated Equity Today",v.EQUITY_MORTGAGE_DETAILS_HOW_CALCULATED="How is this calculated?",v.EQUITY_MORTGAGE_DETAILS_ACTION_BUTTON_LABEL="Which option is best for me?",v.EQUITY_MORTGAGE_DETAILS_DISCLAIMER="Disclaimer",v.EDIT_MORTGAGE_DETAILS_FORM_TITLE="Edit Mortgage Info",v.EDIT_MORTGAGE_DETAILS_LOAN_START_DATE_LABEL="Loan Start Date",v.EDIT_MORTGAGE_DETAILS_LOAN_TERM_LABEL="Loan Term",v.EDIT_MORTGAGE_DETAILS_INTEREST_RATE_LABEL="Interest Rate",v.EDIT_MORTGAGE_DETAILS_ORIGINAL_LOAN_AMOUNT_LABEL="Original Loan Amount",v.EDIT_MORTGAGE_DETAILS_BALANCE_LABEL="Estimated Mortgage Balance",v.EDIT_MORTGAGE_DETAILS_DISCLAIMER_TEXT="This message is for information purposes only and is not an advertisement to extend customer credit as defined by Section 12 CFR 1026.2 Regulation Z. Program rates, terms, and conditions are subject to change at any time. All examples of potential mortgage products above are estimates for illustration purposes only. All programs and mortgage products are subject to borrower income, credit, and property approval. Not all borrowers will qualify. This is not an offer for extension of credit or a commitment to lend. Home valuations are estimates purchased from a third-party data provider. Actual appraised value at the time of a transaction may vary. Equal Housing Lender. Interest rates used are based on a reasonably current index and margin from the Freddie Mac Primary Mortgage Market Survey.",v.HOW_CALCULATE_TITLE="How Is My Net Worth Calculated?",v.HOW_CALCULATE_DESCRIPTION='Your net worth ("equity") is made up of two things.',v.HOW_CALCULATE_HOME_VALUE_LABEL="Home Value",v.HOW_CALCULATE_LOAN_BALANCE_LABEL="Loan Balance",v.HOW_CALCULATE_YOUR_NET_WORTH_LABEL="Your Net Worth",v.HOW_CALCULATE_INFORMATION_SUBTITLE="Where does this information come from?",v.HOW_CALCULATE_NOTE_DESCRIPTION="Note: Only the first lien mortgage and resale are used to calculate the balance of your loan.";function St({children:e}){return React__namespace.createElement("div",{className:r("flex justify-center w-full")},e)}function nr({trigger:e,content:t,title:o,asChild:a=!1,actionButtomLabel:i=v.ACTION_OK_BUTTON_LABEL}){return React__namespace.createElement(Co,null,React__namespace.createElement(wo,{asChild:a},e),React__namespace.createElement(jt,{className:r("flex flex-col gap-2 p-6","h-screen lg:h-auto md:h-auto overflow-y-auto")},o&&React__namespace.createElement(qt,null,o),t,React__namespace.createElement(Jt,null,React__namespace.createElement(Qt,null,i))))}function sr({title:e,infoTitle:t,icon:o,infoDescription:a,titleDescription:i}){let s=React__namespace.cloneElement(o,{className:"w-6 h-6"});return React__namespace.createElement("div",{className:r("flex flex-col items-start")},React__namespace.createElement("div",{className:r("flex flex-row items-center gap-2")},React__namespace.createElement("div",{className:r("flex flex-col items-center bg-slate-50 rounded-[100px] p-2")},s),React__namespace.createElement("h3",{className:r("font-semibold leading-8 text-xl md:text-2xl lg:text-2xl text-gray-700")},e),React__namespace.createElement(nr,{asChild:!0,title:t,trigger:React__namespace.createElement(Info,{className:r("w-5 h-5 text-gray-400")}),content:a})),i&&React__namespace.createElement("p",{className:r("text-gray-400 ml-[50px] text-xs md:text-sm lg:text-sm")},i))}function Mt({icon:e,infoDescription:t,title:o,titleDescription:a,infoTitle:i,actions:s}){return React__namespace.createElement("div",{className:r("flex flex-row justify-between items-stretch")},React__namespace.createElement(sr,{title:o,titleDescription:a,infoTitle:i,icon:e,infoDescription:t}),s&&s)}var Lt=({clientKey:e,apiKey:t})=>{let[o,a]=React__namespace.useState(!0),[i,s]=React__namespace.useState(),R=!!e;React__namespace.useEffect(()=>{async function d(){let m=await _t({clientKey:e});s(m);}d();},[]);let c=React__namespace.useCallback(async d=>{let{url:m,requestInit:E}=d,{headers:W,...D}=E??{},k=i;!i?.token&&e&&(k=await _t({clientKey:e}));let z={"Content-Type":"application/json",...k?.token&&{Authorization:`Bearer ${k?.token}`},...t&&{"x-api-key":t},...W},A=await fetch(m,{headers:z,...D});try{a(!0);let L=await A.json();return a(!1),k?.token&&s(k),L}catch(L){console.error(`Error requesting ${m}`,L),a(!1);return}},[i,e,t]);return {isLoading:o,tokens:i,request:c,isExternal:R}};var gr="AIzaSyCDNlq-LeVQGoubUXL_a8p6LYPXR5Bjs_Q";function un({apiKey:e,mapOptions:t,geoJsonLayerInput:o,markers:a,markersIcon:i,markerEvents:s}){let R=React__namespace.useRef(null),[c,d]=React__namespace.useState(null),[m,E]=React__namespace.useState(!1);React__namespace.useEffect(()=>{R.current&&new Loader({apiKey:e??gr}).importLibrary("maps").then(()=>{t.center||(t.center={lat:39.8283,lng:-98.5795}),R.current&&W(R.current,t);});},[]);let W=(A,L)=>{d(new window.google.maps.Map(A,L)),o&&z(o),k(a),E(!0);},D=(A,L)=>{c&&(c.setCenter(A),c.setZoom(L));},k=A=>{if(!c||!A)return;let L=new google.maps.LatLngBounds;A.forEach((y,f)=>{L.extend(new google.maps.LatLng(y.lat,y.lng));let b=new google.maps.Marker({position:{lat:y.lat,lng:y.lng},map:c,icon:y.icon??i,label:y.label});s&&s(f,b);}),c.setCenter(L.getCenter()),c.setZoom(3);},z=({center:A,geoJson:L})=>{if(!c||!L)return;A&&(c.setCenter(A),new window.google.maps.Marker({position:A,map:c}));let y=new window.google.maps.Data;y.addGeoJson(L),y.setStyle(f=>({fillColor:f.getProperty("color")??"#FFFFCC",strokeWeight:1,fillOpacity:.5,strokeColor:"white"})),y.setMap(c);};return {mapRef:R,setGeojson:z,setMarkers:k,zoomHandler:D,isMapReady:m}}var Rr=un;var vr=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],br="https://api.liberty.percyai.io/location/v1/heatmap";function xr(){return React__namespace.createElement("div",{className:r("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},React__namespace.createElement("div",{className:r("flex justify-between")},React__namespace.createElement("div",{className:r("text-left text-xs")},"Active"),React__namespace.createElement("div",{className:r("text-right text-xs")},"Very Active")),React__namespace.createElement("div",{className:r("flex flex-col items-center space-y-2")},React__namespace.createElement("div",{className:r("flex")},vr.map((e,t)=>React__namespace.createElement("div",{key:t,className:r("w-4 h-4"),style:{backgroundColor:e}})))))}function cp({zipcode:e,url:t=br,zoomLevel:o=10,zoomControl:a=!0,googleApiKey:i,clientKey:s,apiKey:R,height:c="420px"}){let{request:d,isLoading:m,tokens:E}=Lt({clientKey:s,apiKey:R}),W=React__namespace.useMemo(()=>({zoom:o,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:a,mapId:""}),[o,a]),{mapRef:D,setGeojson:k,isMapReady:z}=Rr({mapOptions:W,apiKey:i});return React__namespace.useEffect(()=>{let A=!0;async function L(){let y=he(E?.meta,"color");if(e&&t&&A&&z){let f=new URL(t);f.searchParams.set("zipcode",e),y?.value&&f.searchParams.set("colors",y?.value);try{let b=await d({url:f.toString()});b&&A&&k(b.data);}catch(b){console.error("Error fetching heatmap data:",b);}}}return z&&L(),()=>{A=!1;}},[s,R,z]),React__namespace.createElement("div",{className:r("flex flex-col bg-white")},React__namespace.createElement(Mt,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:React__namespace.createElement(MapPin,null)}),React__namespace.createElement(St,null,React__namespace.createElement("div",{className:"relative w-full aspect-video rounded-md overflow-hidden",style:{height:c}},React__namespace.createElement("div",{ref:D,className:r("min-h-full w-full")}),React__namespace.createElement(xr,null),m&&React__namespace.createElement("div",{className:r("absolute inset-0 flex items-center justify-center")},React__namespace.createElement(nt,null)))))}
|
|
37410
|
+
function r(...e){return twMerge(clsx(e))}var zr="https://api-dev.liberty.percyai.io/key_service/v1/jwt/generate";var Zt=async({clientKey:e})=>{try{return e?await(await fetch(zr,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientKey:e})})).json():void 0}catch(t){console.error("Error requesting token:",t);return}};var W=(e,t)=>e?.config?e.config.find(o=>o.name===t):{};var He=cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ce=React__namespace.forwardRef(({className:e,variant:t,size:o,asChild:a=!1,...i},n)=>React__namespace.createElement(a?$5e63c961fc1ce211$export$8c6ed5c666ac1360$1:"button",{className:r(He({variant:t,size:o,className:e})),ref:n,...i}));ce.displayName="Button";var at=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));at.displayName="Card";var it=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("flex flex-col space-y-1.5 p-6",e),...t}));it.displayName="CardHeader";var qt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("h3",{ref:o,className:r("font-semibold leading-none tracking-tight",e),...t}));qt.displayName="CardTitle";var jr=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("p",{ref:o,className:r("text-sm text-muted-foreground",e),...t}));jr.displayName="CardDescription";var nt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("p-6 pt-0",e),...t}));nt.displayName="CardContent";var st=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("flex items-center p-6 pt-0",e),...t}));st.displayName="CardFooter";var Xt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$be92b6f5f03c0fe9,{ref:o,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Xt.displayName=$cddcb0b647441e34$export$be92b6f5f03c0fe9.displayName;var $r=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$3e431a229df88919,{ref:o,className:r("aspect-square h-full w-full",e),...t}));$r.displayName=$cddcb0b647441e34$export$3e431a229df88919.displayName;var Kt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cddcb0b647441e34$export$fb8d7f40caaeea67,{ref:o,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Kt.displayName=$cddcb0b647441e34$export$fb8d7f40caaeea67.displayName;var Qt=React__namespace.forwardRef(({className:e,value:t,...o},a)=>React__namespace.createElement($67824d98245208a0$export$be92b6f5f03c0fe9,{ref:a,className:r("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o},React__namespace.createElement($67824d98245208a0$export$adb584737d712b70,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Qt.displayName=$67824d98245208a0$export$be92b6f5f03c0fe9.displayName;var ct=React__namespace.forwardRef(({className:e,sideOffset:t=4,...o},a)=>React__namespace.createElement($a093c7e1ec25a057$export$7c6e2c02157bb7d2,{ref:a,sideOffset:t,className:r("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));ct.displayName=$a093c7e1ec25a057$export$7c6e2c02157bb7d2.displayName;var Bo=({className:e,...t})=>React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c$1,{className:r(e),...t});Bo.displayName=$5d3850c4d0b4e6c7$export$602eac185826482c$1.displayName;var Uo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1,{className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Uo.displayName=$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1.displayName;var Kr=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Qr=React__namespace.forwardRef(({side:e="right",className:t,children:o,...a},i)=>React__namespace.createElement(Bo,null,React__namespace.createElement(Uo,null),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1,{ref:i,className:r(Kr({side:e}),t),...a},o,React__namespace.createElement($5d3850c4d0b4e6c7$export$f39c2d165cd861fe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"}),React__namespace.createElement("span",{className:"sr-only"},"Close")))));Qr.displayName=$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1.displayName;var oa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold text-foreground",e),...t}));oa.displayName=$5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;var ra=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));ra.displayName=$5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;var eo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:"w-full overflow-auto"},React__namespace.createElement("table",{ref:o,className:r("w-full caption-bottom text-sm",e),...t})));eo.displayName="Table";var to=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("thead",{ref:o,className:r("[&_tr]:border-b",e),...t}));to.displayName="TableHeader";var oo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tbody",{ref:o,className:r("[&_tr:last-child]:border-0",e),...t}));oo.displayName="TableBody";var ro=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tfoot",{ref:o,className:r("bg-primary font-medium text-primary-foreground",e),...t}));ro.displayName="TableFooter";var dt=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("tr",{ref:o,className:r("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));dt.displayName="TableRow";var Le=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("th",{ref:o,className:r("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Le.displayName="TableHead";var Me=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("td",{ref:o,className:r("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Me.displayName="TableCell";var ao=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("caption",{ref:o,className:r("mt-4 text-sm text-muted-foreground",e),...t}));ao.displayName="TableCaption";var ia=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1bf158f521e1b1b4$export$6d08773d2e66f8f2,{ref:o,className:r("border-b",e),...t}));ia.displayName="AccordionItem";var na=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1bf158f521e1b1b4$export$8b251419efc915eb,{className:"flex"},React__namespace.createElement($1bf158f521e1b1b4$export$41fb9f06171c75f4,{ref:a,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,React__namespace.createElement(ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"}))));na.displayName=$1bf158f521e1b1b4$export$41fb9f06171c75f4.displayName;var sa=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1bf158f521e1b1b4$export$7c6e2c02157bb7d2,{ref:a,className:r("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o},React__namespace.createElement("div",{className:"pb-4 pt-0"},t)));sa.displayName=$1bf158f521e1b1b4$export$7c6e2c02157bb7d2.displayName;var ma=cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),io=React__namespace.forwardRef(({className:e,variant:t,...o},a)=>React__namespace.createElement("div",{ref:a,role:"alert",className:r(ma({variant:t}),e),...o}));io.displayName="Alert";var no=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("h5",{ref:o,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));no.displayName="AlertTitle";var so=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{ref:o,className:r("text-sm [&_p]:leading-relaxed",e),...t}));so.displayName="AlertDescription";var Wo=$905f4ae918aab1aa$export$be92b6f5f03c0fe9,zo=$905f4ae918aab1aa$export$41fb9f06171c75f4,Go=({className:e,...t})=>React__namespace.createElement($905f4ae918aab1aa$export$602eac185826482c,{className:r(e),...t});Go.displayName=$905f4ae918aab1aa$export$602eac185826482c.displayName;var Yo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$c6fdb837b070b4ff,{className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Yo.displayName=$905f4ae918aab1aa$export$c6fdb837b070b4ff.displayName;var lo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Go,null,React__namespace.createElement(Yo,null),React__namespace.createElement($905f4ae918aab1aa$export$7c6e2c02157bb7d2,{ref:o,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})));lo.displayName=$905f4ae918aab1aa$export$7c6e2c02157bb7d2.displayName;var mo=({className:e,...t})=>React__namespace.createElement("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mo.displayName="AlertDialogFooter";var co=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold",e),...t}));co.displayName=$905f4ae918aab1aa$export$f99233281efd08a0.displayName;var da=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));da.displayName=$905f4ae918aab1aa$export$393edc798c47379d.displayName;var po=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$e19cd5f9376f8cee,{ref:o,className:r(He(),e),...t}));po.displayName=$905f4ae918aab1aa$export$e19cd5f9376f8cee.displayName;var pa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($905f4ae918aab1aa$export$848c9b7ead0df967,{ref:o,className:r(He({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));pa.displayName=$905f4ae918aab1aa$export$848c9b7ead0df967.displayName;var fo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($e698a72e93240346$export$be92b6f5f03c0fe9,{ref:o,className:r("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},React__namespace.createElement($e698a72e93240346$export$adb584737d712b70,{className:r("flex items-center justify-center text-current")},React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))));fo.displayName=$e698a72e93240346$export$be92b6f5f03c0fe9.displayName;var jo=({className:e,...t})=>React__namespace.createElement($5d3850c4d0b4e6c7$export$602eac185826482c$1,{className:r(e),...t});jo.displayName=$5d3850c4d0b4e6c7$export$602eac185826482c$1.displayName;var $o=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1,{ref:o,className:r("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));$o.displayName=$5d3850c4d0b4e6c7$export$c6fdb837b070b4ff$1.displayName;var Ve=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement(jo,null,React__namespace.createElement($o,null),React__namespace.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1,{ref:a,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...o},t,React__namespace.createElement($5d3850c4d0b4e6c7$export$f39c2d165cd861fe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"}),React__namespace.createElement("span",{className:"sr-only"},"Close")))));Ve.displayName=$5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2$1.displayName;var vo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$f99233281efd08a0,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));vo.displayName=$5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;var ho=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));ho.displayName=$5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;var Jo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le$1,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Jo.displayName=Le$1.displayName;var xa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},React__namespace.createElement(MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),React__namespace.createElement(Le$1.Input,{ref:o,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));xa.displayName=Le$1.Input.displayName;var ya=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le$1.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ya.displayName=Le$1.List.displayName;var Pa=React__namespace.forwardRef((e,t)=>React__namespace.createElement(Le$1.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Pa.displayName=Le$1.Empty.displayName;var Ta=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le$1.Group,{ref:o,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Ta.displayName=Le$1.Group.displayName;var Ca=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le$1.Separator,{ref:o,className:r("-mx-1 h-px bg-border",e),...t}));Ca.displayName=Le$1.Separator.displayName;var Ea=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement(Le$1.Item,{ref:o,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Ea.displayName=Le$1.Item.displayName;var Ma=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($1b0217ee4a91d156$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));Ma.displayName=$1b0217ee4a91d156$export$2ea8a7a591ac5eac.displayName;var Sa=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Sa.displayName=$1b0217ee4a91d156$export$6d4de93b380beddf.displayName;var Da=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$602eac185826482c,null,React__namespace.createElement($1b0217ee4a91d156$export$7c6e2c02157bb7d2,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));Da.displayName=$1b0217ee4a91d156$export$7c6e2c02157bb7d2.displayName;var Ia=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Ia.displayName=$1b0217ee4a91d156$export$6d08773d2e66f8f2.displayName;var _a=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($1b0217ee4a91d156$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($1b0217ee4a91d156$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));_a.displayName=$1b0217ee4a91d156$export$16ce288f89fa631c.displayName;var ka=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($1b0217ee4a91d156$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));ka.displayName=$1b0217ee4a91d156$export$371ab307eab489c0.displayName;var Oa=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($1b0217ee4a91d156$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Oa.displayName=$1b0217ee4a91d156$export$b04be29aa201d4f5.displayName;var Ha=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($1b0217ee4a91d156$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-border",e),...t}));Ha.displayName=$1b0217ee4a91d156$export$1ff3c3f08ae963c0.displayName;var Wa=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($d08ef79370b62062$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));Wa.displayName=$d08ef79370b62062$export$2ea8a7a591ac5eac.displayName;var za=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($d08ef79370b62062$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));za.displayName=$d08ef79370b62062$export$6d4de93b380beddf.displayName;var Ro=React__namespace.forwardRef(({className:e,sideOffset:t=4,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$602eac185826482c,null,React__namespace.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2,{ref:a,sideOffset:t,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})));Ro.displayName=$d08ef79370b62062$export$7c6e2c02157bb7d2.displayName;var Ga=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Ga.displayName=$d08ef79370b62062$export$6d08773d2e66f8f2.displayName;var Ya=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($d08ef79370b62062$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($d08ef79370b62062$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));Ya.displayName=$d08ef79370b62062$export$16ce288f89fa631c.displayName;var ja=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($d08ef79370b62062$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));ja.displayName=$d08ef79370b62062$export$371ab307eab489c0.displayName;var $a=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($d08ef79370b62062$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));$a.displayName=$d08ef79370b62062$export$b04be29aa201d4f5.displayName;var Ja=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));Ja.displayName=$d08ef79370b62062$export$1ff3c3f08ae963c0.displayName;var Xa=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($b73a6c6685e72184$export$be92b6f5f03c0fe9,{ref:o,className:r(Xa(),e),...t}));xo.displayName=$b73a6c6685e72184$export$be92b6f5f03c0fe9.displayName;var Ko=React__namespace.createContext({}),Lt=()=>{let e=React__namespace.useContext(Ko),t=React__namespace.useContext(Qo),{getFieldState:o,formState:a}=useFormContext(),i=o(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:n}=t;return {id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...i}},Qo=React__namespace.createContext({}),ve=React__namespace.forwardRef(({className:e,...t},o)=>{let a=React__namespace.useId();return React__namespace.createElement(Qo.Provider,{value:{id:a}},React__namespace.createElement("div",{ref:o,className:r("space-y-2",e),...t}))});ve.displayName="FormItem";var Ce=React__namespace.forwardRef(({className:e,...t},o)=>{let{error:a,formItemId:i}=Lt();return React__namespace.createElement(xo,{ref:o,className:r(a&&"text-destructive",e),htmlFor:i,...t})});Ce.displayName="FormLabel";var he=React__namespace.forwardRef(({...e},t)=>{let{error:o,formItemId:a,formDescriptionId:i,formMessageId:n}=Lt();return React__namespace.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1,{ref:t,id:a,"aria-describedby":o?`${i} ${n}`:`${i}`,"aria-invalid":!!o,...e})});he.displayName="FormControl";var oi=React__namespace.forwardRef(({className:e,...t},o)=>{let{formDescriptionId:a}=Lt();return React__namespace.createElement("p",{ref:o,id:a,className:r("text-[0.8rem] text-muted-foreground",e),...t})});oi.displayName="FormDescription";var De=React__namespace.forwardRef(({className:e,children:t,...o},a)=>{let{error:i,formMessageId:n}=Lt(),f=i?String(i?.message):t;return f?React__namespace.createElement("p",{ref:a,id:n,className:r("text-[0.8rem] font-medium text-destructive",e),...o},f):null});De.displayName="FormMessage";var Re=React__namespace.forwardRef(({className:e,type:t,...o},a)=>React__namespace.createElement("input",{type:t,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));Re.displayName="Input";var ni=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$be92b6f5f03c0fe9,{ref:o,className:r("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));ni.displayName=$0520064cdfc1bd2d$export$be92b6f5f03c0fe9.displayName;var si=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$41fb9f06171c75f4,{ref:o,className:r("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));si.displayName=$0520064cdfc1bd2d$export$41fb9f06171c75f4.displayName;var li=React__namespace.forwardRef(({className:e,inset:t,children:o,...a},i)=>React__namespace.createElement($0520064cdfc1bd2d$export$2ea8a7a591ac5eac,{ref:i,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...a},o,React__namespace.createElement(ChevronRightIcon,{className:"ml-auto h-4 w-4"})));li.displayName=$0520064cdfc1bd2d$export$2ea8a7a591ac5eac.displayName;var mi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$6d4de93b380beddf,{ref:o,className:r("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));mi.displayName=$0520064cdfc1bd2d$export$6d4de93b380beddf.displayName;var ci=React__namespace.forwardRef(({className:e,align:t="start",alignOffset:o=-4,sideOffset:a=8,...i},n)=>React__namespace.createElement($0520064cdfc1bd2d$export$602eac185826482c,null,React__namespace.createElement($0520064cdfc1bd2d$export$7c6e2c02157bb7d2,{ref:n,align:t,alignOffset:o,sideOffset:a,className:r("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})));ci.displayName=$0520064cdfc1bd2d$export$7c6e2c02157bb7d2.displayName;var di=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));di.displayName=$0520064cdfc1bd2d$export$6d08773d2e66f8f2.displayName;var pi=React__namespace.forwardRef(({className:e,children:t,checked:o,...a},i)=>React__namespace.createElement($0520064cdfc1bd2d$export$16ce288f89fa631c,{ref:i,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($0520064cdfc1bd2d$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),t));pi.displayName=$0520064cdfc1bd2d$export$16ce288f89fa631c.displayName;var fi=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$371ab307eab489c0,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($0520064cdfc1bd2d$export$c3468e2714d175fa,null,React__namespace.createElement(DotFilledIcon,{className:"h-4 w-4 fill-current"}))),t));fi.displayName=$0520064cdfc1bd2d$export$371ab307eab489c0.displayName;var ui=React__namespace.forwardRef(({className:e,inset:t,...o},a)=>React__namespace.createElement($0520064cdfc1bd2d$export$b04be29aa201d4f5,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ui.displayName=$0520064cdfc1bd2d$export$b04be29aa201d4f5.displayName;var gi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($0520064cdfc1bd2d$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));gi.displayName=$0520064cdfc1bd2d$export$1ff3c3f08ae963c0.displayName;var bi=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($322c88a641701f3b$export$be92b6f5f03c0fe9,{ref:a,className:r("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...o},t,React__namespace.createElement(er,null)));bi.displayName=$322c88a641701f3b$export$be92b6f5f03c0fe9.displayName;var xi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$54c2e3dc7acea9f5,{ref:o,className:r("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));xi.displayName=$322c88a641701f3b$export$54c2e3dc7acea9f5.displayName;var yi=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Pi=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($322c88a641701f3b$export$41fb9f06171c75f4,{ref:a,className:r(yi(),"group",e),...o},t," ",React__namespace.createElement(ChevronDownIcon,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})));Pi.displayName=$322c88a641701f3b$export$41fb9f06171c75f4.displayName;var Ti=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$7c6e2c02157bb7d2,{ref:o,className:r("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));Ti.displayName=$322c88a641701f3b$export$7c6e2c02157bb7d2.displayName;var er=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("div",{className:r("absolute left-0 top-full flex justify-center")},React__namespace.createElement($322c88a641701f3b$export$d5c6c08dc2d3ca7,{className:r("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:o,...t})));er.displayName=$322c88a641701f3b$export$d5c6c08dc2d3ca7.displayName;var Ci=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($322c88a641701f3b$export$adb584737d712b70,{ref:o,className:r("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t},React__namespace.createElement("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})));Ci.displayName=$322c88a641701f3b$export$adb584737d712b70.displayName;var Ei=React__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,...a},i)=>React__namespace.createElement($cb5cc270b50c6fcd$export$602eac185826482c,null,React__namespace.createElement($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2,{ref:i,align:t,sideOffset:o,className:r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})));Ei.displayName=$cb5cc270b50c6fcd$export$7c6e2c02157bb7d2.displayName;var Ai=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($f99a8c78507165f7$export$be92b6f5f03c0fe9,{className:r("grid gap-2",e),...t,ref:o}));Ai.displayName=$f99a8c78507165f7$export$be92b6f5f03c0fe9.displayName;var wi=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($f99a8c78507165f7$export$6d08773d2e66f8f2,{ref:a,className:r("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...o},React__namespace.createElement($f99a8c78507165f7$export$adb584737d712b70,{className:"flex items-center justify-center"},React__namespace.createElement(CheckIcon$1,{className:"h-3.5 w-3.5 fill-primary"}))));wi.displayName=$f99a8c78507165f7$export$6d08773d2e66f8f2.displayName;var Li=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($57acba87d6e25586$export$be92b6f5f03c0fe9,{ref:a,className:r("relative overflow-hidden",e),...o},React__namespace.createElement($57acba87d6e25586$export$d5c6c08dc2d3ca7,{className:"h-full w-full rounded-[inherit]"},t),React__namespace.createElement(tr,null),React__namespace.createElement($57acba87d6e25586$export$ac61190d9fc311a9,null)));Li.displayName=$57acba87d6e25586$export$be92b6f5f03c0fe9.displayName;var tr=React__namespace.forwardRef(({className:e,orientation:t="vertical",...o},a)=>React__namespace.createElement($57acba87d6e25586$export$2fabd85d0eba3c57,{ref:a,orientation:t,className:r("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},React__namespace.createElement($57acba87d6e25586$export$9fba1154677d7cd2,{className:"relative flex-1 rounded-full bg-border"})));tr.displayName=$57acba87d6e25586$export$2fabd85d0eba3c57.displayName;var ut=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($cc7e05a45900e73f$export$41fb9f06171c75f4,{ref:a,className:r("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...o},t,React__namespace.createElement($cc7e05a45900e73f$export$f04a61298a47a40f,{asChild:!0},React__namespace.createElement(CaretSortIcon,{className:"h-4 w-4 opacity-50"}))));ut.displayName=$cc7e05a45900e73f$export$41fb9f06171c75f4.displayName;var gt=React__namespace.forwardRef(({className:e,children:t,position:o="popper",...a},i)=>React__namespace.createElement($cc7e05a45900e73f$export$602eac185826482c,null,React__namespace.createElement($cc7e05a45900e73f$export$7c6e2c02157bb7d2,{ref:i,className:r("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...a},React__namespace.createElement($cc7e05a45900e73f$export$d5c6c08dc2d3ca7,{className:r("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t))));gt.displayName=$cc7e05a45900e73f$export$7c6e2c02157bb7d2.displayName;var Di=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cc7e05a45900e73f$export$b04be29aa201d4f5,{ref:o,className:r("px-2 py-1.5 text-sm font-semibold",e),...t}));Di.displayName=$cc7e05a45900e73f$export$b04be29aa201d4f5.displayName;var me=React__namespace.forwardRef(({className:e,children:t,...o},a)=>React__namespace.createElement($cc7e05a45900e73f$export$6d08773d2e66f8f2,{ref:a,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},React__namespace.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},React__namespace.createElement($cc7e05a45900e73f$export$c3468e2714d175fa,null,React__namespace.createElement(CheckIcon$1,{className:"h-4 w-4"}))),React__namespace.createElement($cc7e05a45900e73f$export$d6e5bf9c43ea9319,null,t)));me.displayName=$cc7e05a45900e73f$export$6d08773d2e66f8f2.displayName;var Ii=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($cc7e05a45900e73f$export$1ff3c3f08ae963c0,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));Ii.displayName=$cc7e05a45900e73f$export$1ff3c3f08ae963c0.displayName;var _i=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...a},i)=>React__namespace.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9,{ref:i,decorative:o,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));_i.displayName=$89eedd556c436f6a$export$be92b6f5f03c0fe9.displayName;var ki=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($faa2e61a3361514f$export$be92b6f5f03c0fe9,{ref:o,className:r("relative flex w-full touch-none select-none items-center",e),...t},React__namespace.createElement($faa2e61a3361514f$export$13921ac0cc260818,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},React__namespace.createElement($faa2e61a3361514f$export$9a58ef0d7ad3278c,{className:"absolute h-full bg-primary"})),React__namespace.createElement($faa2e61a3361514f$export$6521433ed15a34db,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})));ki.displayName=$faa2e61a3361514f$export$be92b6f5f03c0fe9.displayName;var Oi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($6be4966fd9bbc698$export$be92b6f5f03c0fe9,{className:r("peer inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},React__namespace.createElement($6be4966fd9bbc698$export$6521433ed15a34db,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})));Oi.displayName=$6be4966fd9bbc698$export$be92b6f5f03c0fe9.displayName;var Hi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5,{ref:o,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Hi.displayName=$69cb30bb0017df05$export$54c2e3dc7acea9f5.displayName;var Vi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$41fb9f06171c75f4,{ref:o,className:r("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Vi.displayName=$69cb30bb0017df05$export$41fb9f06171c75f4.displayName;var Fi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2,{ref:o,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Fi.displayName=$69cb30bb0017df05$export$7c6e2c02157bb7d2.displayName;var Po=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Po.displayName="Textarea";var To=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$d5c6c08dc2d3ca7,{ref:o,className:r("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));To.displayName=$054eb8030ebde76e$export$d5c6c08dc2d3ca7.displayName;var Wi=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Co=React__namespace.forwardRef(({className:e,variant:t,...o},a)=>React__namespace.createElement($054eb8030ebde76e$export$be92b6f5f03c0fe9,{ref:a,className:r(Wi({variant:t}),e),...o}));Co.displayName=$054eb8030ebde76e$export$be92b6f5f03c0fe9.displayName;var zi=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$e19cd5f9376f8cee,{ref:o,className:r("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));zi.displayName=$054eb8030ebde76e$export$e19cd5f9376f8cee.displayName;var Eo=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$f39c2d165cd861fe,{ref:o,className:r("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t},React__namespace.createElement(Cross2Icon,{className:"h-4 w-4"})));Eo.displayName=$054eb8030ebde76e$export$f39c2d165cd861fe.displayName;var No=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$f99233281efd08a0,{ref:o,className:r("text-sm font-semibold [&+div]:text-xs",e),...t}));No.displayName=$054eb8030ebde76e$export$f99233281efd08a0.displayName;var Ao=React__namespace.forwardRef(({className:e,...t},o)=>React__namespace.createElement($054eb8030ebde76e$export$393edc798c47379d,{ref:o,className:r("text-sm opacity-90",e),...t}));Ao.displayName=$054eb8030ebde76e$export$393edc798c47379d.displayName;var qi=cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Xi=React__namespace.forwardRef(({className:e,variant:t,size:o,...a},i)=>React__namespace.createElement($b3bbe2732c13b576$export$be92b6f5f03c0fe9,{ref:i,className:r(qi({variant:t,size:o,className:e})),...a}));Xi.displayName=$b3bbe2732c13b576$export$be92b6f5f03c0fe9.displayName;var So=(i=>(i.buyer="buyer",i.seller="seller",i.buyerSeller="buyer-seller",i.broker="broker",i))(So||{});var s=class s{};s.ESTIMATES_ENDPOINT_URL="https://api-dev.liberty.percyai.io/property/v1/estimates",s.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",s.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",s.ESTIMATED_VALUES_DIALOG_DESCRIPTION="The values generated here are based on automated computer modeling from public records and may not represent the true value of the home.",s.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",s.FORM_TITLE="Learn more about my options",s.FORM_DESCRIPTION="Get more insights on how your property valuation",s.FORM_FIRST_NAME_LABEL="First Name *",s.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",s.FORM_EMAIL_ADDRESS_LABEL="Email Address *",s.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",s.FORM_LAST_NAME_LABEL="Last Name *",s.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",s.FORM_PHONE_NUMBER_LABEL="Phone Number *",s.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",s.FORM_USER_TYPE_LABEL="I am: *",s.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",s.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",s.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",s.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",s.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",s.FORM_ACTION_BUTTOM="Submit",s.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",s.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",s.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",s.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",s.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",s.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",s.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",s.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",s.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",s.BUYER="A Buyer",s.SELLER="A Seller",s.BUYER_SELLER="A Buyer and Seller",s.BROKER="A Broker/Agent",s.PERIOD_1="Immediately",s.PERIOD_2="1 to 3 Months",s.PERIOD_3="3 to 6 Months",s.PERIOD_4="6 to 12 Months",s.PERIOD_5="12+ Months",s.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",s.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",s.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",s.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",s.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",s.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",s.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",s.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",s.sellerBuyerSharedContent=[{label:s.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:s.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:s.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:s.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:s.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],s.DYNAMIC_VALUES={buyer:[{label:s.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:s.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:s.sellerBuyerSharedContent,"buyer-seller":s.sellerBuyerSharedContent,broker:[{label:s.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:s.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var u=s;function bt({className:e}){return React__namespace.createElement("svg",{className:r("-ml-1 mr-3 h-5 w-5 animate-spin text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},React__namespace.createElement("circle",{className:r("stroke-brand-400 opacity-25"),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),React__namespace.createElement("path",{className:r("fill-brand-500 dark:fill-brand-900 opacity-75"),fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))}bt.displayName="Spinner";var vn=nativeEnumType(So,{required_error:u.IAM_REQUIRED_VALIDATION_MESSAGE});objectType({firstName:stringType().min(2,{message:u.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:stringType({required_error:u.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:u.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:stringType().min(2,{message:u.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:stringType().min(2,{message:u.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:vn,agent:booleanType().optional(),agentName:stringType().optional(),dynamicValues:arrayType(objectType({homeAddress:stringType().min(2,{message:u.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:stringType().optional()})).optional()});var p=class{static EQUITY_MORTGAGE_DETAILS_BANNER_DESCRIPTION(t,o,a,i,n){return `Public records show a ${t} year loan at ${o} for ${a} from ${i}, giving you an estimated loan balance of ${n}. All calculations on this report are based on these numbers, so we want to make sure we get this right!`}static HOW_CALCULATE_INFORMATION_DESCRIPTION(t,o,a,i){return `These numbers are all based on your ${a} year loan at ${t} for ${o} from ${i}.`}static PAY_LITTLE_EXTRA_DESCRIPTION(t,o,a,i){return `Based on your ${t} year loan at ${o} for ${a} from ${i}`}static PAY_LITTLE_EXTRA_EARLIER_MESSAGE(t){return `You would also be done with the loan and no longer making payments ${t} earlier!`}};p.ACTION_OK_BUTTON_LABEL="OK",p.DESCRIPTION_YEARS_LABEL="Years",p.YEAR=" year",p.PLURAL="s ",p.AND=" and ",p.MONTH=" month",p.NO_DATA_AVAILABLE_LABEL="No Data Available",p.ACTION_BUTTON_BEST_OPTION_LABEL="Which option is best for me?",p.LEARN_MORE_LABEL="Learn more about this",p.EDIT_DETAILS_LABEL="Edit Details",p.WHY_PAY_MORE_LABEL="Why Pay More?",p.EARLY_LOAN_LABEL="Early Loan Payoff Information",p.CONFIGURATION_ERROR_LABEL="Configuration Error",p.CONFIGURATION_ERROR_KEY_EXPIRED_LABEL="Key is expired",p.EQUITY_MORTGAGE_DETAILS_HEADER_TITLE="Equity In Your Home",p.EQUITY_MORTGAGE_DETAILS_DESCRIPTION="Equity is your home's worth to you!",p.EQUITY_MORTGAGE_DETAILS_ALL_GOOD_BUTTON="All Good",p.EQUITY_MORTGAGE_DETAILS_BANNER_TITLE="Verify Your Mortgage Details",p.EQUITY_MORTGAGE_DETAILS_TITLE="Estimated Equity Today",p.EQUITY_MORTGAGE_DETAILS_HOW_CALCULATED="How is this calculated?",p.EQUITY_MORTGAGE_DETAILS_DISCLAIMER="Disclaimer",p.EDIT_MORTGAGE_DETAILS_FORM_TITLE="Edit Mortgage Info",p.EDIT_MORTGAGE_DETAILS_LOAN_START_DATE_LABEL="Loan Start Date",p.EDIT_MORTGAGE_DETAILS_LOAN_TERM_LABEL="Loan Term",p.EDIT_MORTGAGE_DETAILS_INTEREST_RATE_LABEL="Interest Rate",p.EDIT_MORTGAGE_DETAILS_ORIGINAL_LOAN_AMOUNT_LABEL="Original Loan Amount",p.EDIT_MORTGAGE_DETAILS_BALANCE_LABEL="Estimated Mortgage Balance",p.EDIT_MORTGAGE_DETAILS_DISCLAIMER_TEXT="This message is for information purposes only and is not an advertisement to extend customer credit as defined by Section 12 CFR 1026.2 Regulation Z. Program rates, terms, and conditions are subject to change at any time. All examples of potential mortgage products above are estimates for illustration purposes only. All programs and mortgage products are subject to borrower income, credit, and property approval. Not all borrowers will qualify. This is not an offer for extension of credit or a commitment to lend. Home valuations are estimates purchased from a third-party data provider. Actual appraised value at the time of a transaction may vary. Equal Housing Lender. Interest rates used are based on a reasonably current index and margin from the Freddie Mac Primary Mortgage Market Survey.",p.HOW_CALCULATE_TITLE="How Is My Net Worth Calculated?",p.HOW_CALCULATE_DESCRIPTION='Your net worth ("equity") is made up of two things.',p.HOW_CALCULATE_HOME_VALUE_LABEL="Home Value",p.HOW_CALCULATE_LOAN_BALANCE_LABEL="Loan Balance",p.HOW_CALCULATE_YOUR_NET_WORTH_LABEL="Your Net Worth",p.HOW_CALCULATE_INFORMATION_SUBTITLE="Where does this information come from?",p.HOW_CALCULATE_NOTE_DESCRIPTION="Note: Only the first lien mortgage and resale are used to calculate the balance of your loan.",p.PAY_LITTLE_EXTRA_HEADER_TITLE="Pay A Little Extra",p.PAY_LITTLE_EXTRA_SUBTITLE="How much more can you pay per month?",p.PAY_LITTLE_EXTRA_CALCULATION_IF_YOU_PAY="If you pay just",p.PAY_LITTLE_EXTRA_CALCULATION_MORE=" more each month, you could save",p.PAY_LITTLE_EXTRA_CALCULATION_DESCRIPTION="in interest over the rest of your loan",p.PAY_LITTLE_EXTRA_INFO_DESCRIPTION="You would also be done with the loan and no longer making payments 10 years and 2 months earlier!",p.PAY_LITTLE_EXTRA_PAYING_EXTRA="Paying extra can be an easy way to save.",p.PAY_LITTLE_EXTRA_PAYING_EXTRA_DESCRIPTION="Your mortgage payment is typically defined as your principal and interest payment. When you pay extra on your principal balance, you can reduce the amount of your loan and save money on interest.",p.PAY_LITTLE_EXTRA_PAYING_EXTRA_BEST_PART="The best part is that there's no paperwork, fees or headaches.",p.PAY_LITTLE_EXTRA_PAYING_EXTRA_IMPORTANT_TIP="*Important Tip* ",p.PAY_LITTLE_EXTRA_PAYING_EXTRA_IMPORTANT_TIP_DESCRIPTION="contact your mortgage servicer to indicate your extra payment is for principal reduction (to ensure it is not accidentally applied to an extra payment, extra interest, or towards escrow).",p.PAY_LITTLE_EXTRA_LENGTH_LOAN_REMAIN_MESSAGE="The length of your loan would remain unchanged with this extra payment.";function Ke({children:e}){return React__namespace.createElement("div",{className:r("flex justify-center w-full")},e)}function xr({trigger:e,content:t,title:o,asChild:a=!1,actionButtomLabel:i=p.ACTION_OK_BUTTON_LABEL}){return React__namespace.createElement(Wo,null,React__namespace.createElement(zo,{asChild:a},e),React__namespace.createElement(lo,{className:r("flex flex-col gap-2 p-6","h-screen lg:h-auto md:h-auto overflow-y-auto")},o&&React__namespace.createElement(co,null,o),t,React__namespace.createElement(mo,null,React__namespace.createElement(po,null,i))))}function yr({title:e,infoTitle:t,icon:o,infoDescription:a,titleDescription:i,showInfo:n=!0}){let f=React__namespace.cloneElement(o,{className:"w-6 h-6"});return React__namespace.createElement("div",{className:r("flex flex-col items-start")},React__namespace.createElement("div",{className:r("flex flex-row items-center gap-1")},React__namespace.createElement("div",{className:r("flex flex-col items-center bg-slate-50 rounded-[100px] p-2")},f),React__namespace.createElement("h3",{className:r("font-semibold leading-8 text-xl md:text-2xl lg:text-2xl text-gray-700")},e),n&&React__namespace.createElement(xr,{asChild:!0,title:t,trigger:React__namespace.createElement(Info,{className:r("w-5 h-5 text-gray-400")}),content:a})),i&&React__namespace.createElement("p",{className:r("text-gray-400 ml-[50px] text-xs md:text-sm lg:text-sm")},i))}function Qe({icon:e,infoDescription:t,title:o,titleDescription:a,infoTitle:i,actions:n,showInfo:f=!0}){return React__namespace.createElement("div",{className:r("flex flex-col md:flex-row lg:flex-row justify-between items-stretch py-3 shadow-sm ")},React__namespace.createElement(yr,{title:o,titleDescription:a,infoTitle:i,icon:e,infoDescription:t,showInfo:f}),n&&n)}var tt=({clientKey:e,apiKey:t})=>{let[o,a]=React__namespace.useState(!0),[i,n]=React__namespace.useState(),f=!!e;React__namespace.useEffect(()=>{async function c(){let l=await Zt({clientKey:e});n(l);}c();},[]);let m=React__namespace.useCallback(async c=>{let{url:l,requestInit:y}=c,{headers:k,...C}=y??{},L=i;!i?.token&&e&&(L=await Zt({clientKey:e}));let O={"Content-Type":"application/json",...L?.token&&{Authorization:`Bearer ${L?.token}`},...t&&{"x-api-key":t},...k},E=await fetch(l,{headers:O,...C});try{a(!0);let M=await E.json();return a(!1),L?.token&&n(L),M}catch(M){console.error(`Error requesting ${l}`,M),a(!1);return}},[i,e,t]);return {isLoading:o,tokens:i,request:m,isExternal:f}};var Lr="AIzaSyCDNlq-LeVQGoubUXL_a8p6LYPXR5Bjs_Q";function wn({apiKey:e,mapOptions:t,geoJsonLayerInput:o,markers:a,markersIcon:i,markerEvents:n}){let f=React__namespace.useRef(null),[m,c]=React__namespace.useState(null),[l,y]=React__namespace.useState(!1);React__namespace.useEffect(()=>{f.current&&new Loader({apiKey:e??Lr}).importLibrary("maps").then(()=>{t.center||(t.center={lat:39.8283,lng:-98.5795}),f.current&&k(f.current,t);});},[]);let k=(E,M)=>{c(new window.google.maps.Map(E,M)),o&&O(o),L(a),y(!0);},C=(E,M)=>{m&&(m.setCenter(E),m.setZoom(M));},L=(E,M,T)=>{if(!m||!E)return;let d=new google.maps.LatLngBounds;E.forEach((R,re)=>{d.extend(new google.maps.LatLng(R.lat,R.lng));let ae=new google.maps.Marker({position:{lat:R.lat,lng:R.lng},map:m,icon:R.icon??i,label:R.label});n&&n(re,ae);}),m.setCenter(d.getCenter()),m.setZoom(M??3),T&&new window.google.maps.Marker({position:d.getCenter(),map:m,icon:T});},O=({center:E,geoJson:M})=>{if(!m||!M)return;E&&(m.setCenter(E),new window.google.maps.Marker({position:E,map:m}));let T=new window.google.maps.Data;T.addGeoJson(M),T.setStyle(d=>({fillColor:d.getProperty("color")??"#FFFFCC",strokeWeight:1,fillOpacity:.5,strokeColor:"white"})),T.setMap(m);};return {mapRef:f,setGeojson:O,setMarkers:L,zoomHandler:C,isMapReady:l}}var Gt=wn;var Mr=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],Sr="https://api.liberty.percyai.io/location/v1/heatmap";function Dr(){return React__namespace.createElement("div",{className:r("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},React__namespace.createElement("div",{className:r("flex justify-between")},React__namespace.createElement("div",{className:r("text-left text-xs")},"Active"),React__namespace.createElement("div",{className:r("text-right text-xs")},"Very Active")),React__namespace.createElement("div",{className:r("flex flex-col items-center space-y-2")},React__namespace.createElement("div",{className:r("flex")},Mr.map((e,t)=>React__namespace.createElement("div",{key:t,className:r("w-4 h-4"),style:{backgroundColor:e}})))))}function Ap({zipcode:e,url:t=Sr,zoomLevel:o=10,zoomControl:a=!0,googleApiKey:i,clientKey:n,apiKey:f,height:m="420px"}){let{request:c,isLoading:l,tokens:y}=tt({clientKey:n,apiKey:f}),k=React__namespace.useMemo(()=>({zoom:o,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:a,mapId:""}),[o,a]),{mapRef:C,setGeojson:L,isMapReady:O}=Gt({mapOptions:k,apiKey:i});return React__namespace.useEffect(()=>{let E=!0;async function M(){let T=W(y?.meta,"color");if(e&&t&&E&&O){let d=new URL(t);d.searchParams.set("zipcode",e),T?.value&&d.searchParams.set("colors",T?.value);try{let R=await c({url:d.toString()});R&&E&&L(R.data);}catch(R){console.error("Error fetching heatmap data:",R);}}}return O&&M(),()=>{E=!1;}},[n,f,O]),React__namespace.createElement("div",{className:r("flex flex-col bg-white")},React__namespace.createElement(Qe,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:React__namespace.createElement(MapPin,null)}),React__namespace.createElement(Ke,null,React__namespace.createElement("div",{className:"relative w-full aspect-video rounded-md overflow-hidden",style:{height:m}},React__namespace.createElement("div",{ref:C,className:r("min-h-full w-full")}),React__namespace.createElement(Dr,null),l&&React__namespace.createElement("div",{className:r("absolute inset-0 flex items-center justify-center")},React__namespace.createElement(bt,null)))))}format(new Date,"yyyy-MM-dd");
|
|
35215
37411
|
|
|
35216
|
-
var t=p(
|
|
37412
|
+
var t=p$1(Ap,{props:{zipcode:"string",url:"string",zoomLevel:"number",zoomControl:"boolean",googleApiKey:"string",clientKey:"string",apiKey:"string"}});customElements&&customElements.define("heat-map",t);
|
|
35217
37413
|
|
|
35218
37414
|
}));
|
|
35219
37415
|
//# sourceMappingURL=heatmap.js.map
|