@sunggang/ui-lib 0.1.50 → 0.1.51
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/index.esm.js +1204 -57
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -4,10 +4,15 @@ import React__default, { useMemo, useRef, useReducer, useEffect, useCallback, fo
|
|
|
4
4
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
|
-
import {
|
|
7
|
+
import { format, addDays } from 'date-fns';
|
|
8
|
+
import { Calendar as Calendar$1 } from 'lucide-react';
|
|
9
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
10
|
+
import { cva } from 'class-variance-authority';
|
|
11
|
+
import { DayPicker } from 'react-day-picker';
|
|
12
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
13
|
+
import { Calendar as Calendar$2, DateRange } from 'react-date-range';
|
|
8
14
|
import * as locales from 'react-date-range/dist/locale';
|
|
9
|
-
import
|
|
10
|
-
import format from 'date-fns/format';
|
|
15
|
+
import format$1 from 'date-fns/format';
|
|
11
16
|
|
|
12
17
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
13
18
|
function getDefaultExportFromCjs(x) {
|
|
@@ -66080,7 +66085,7 @@ function _iterableToArray$1(iter) {
|
|
|
66080
66085
|
function _arrayWithoutHoles$1(arr) {
|
|
66081
66086
|
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
66082
66087
|
}
|
|
66083
|
-
function ownKeys$
|
|
66088
|
+
function ownKeys$5(object, enumerableOnly) {
|
|
66084
66089
|
var keys = Object.keys(object);
|
|
66085
66090
|
if (Object.getOwnPropertySymbols) {
|
|
66086
66091
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -66093,9 +66098,9 @@ function ownKeys$4(object, enumerableOnly) {
|
|
|
66093
66098
|
function _objectSpread$1(target) {
|
|
66094
66099
|
for(var i = 1; i < arguments.length; i++){
|
|
66095
66100
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
66096
|
-
i % 2 ? ownKeys$
|
|
66101
|
+
i % 2 ? ownKeys$5(Object(source), !0).forEach(function(key) {
|
|
66097
66102
|
_defineProperty$1(target, key, source[key]);
|
|
66098
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
66103
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function(key) {
|
|
66099
66104
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
66100
66105
|
});
|
|
66101
66106
|
}
|
|
@@ -66489,7 +66494,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
66489
66494
|
function _arrayWithHoles(arr) {
|
|
66490
66495
|
if (Array.isArray(arr)) return arr;
|
|
66491
66496
|
}
|
|
66492
|
-
function ownKeys$
|
|
66497
|
+
function ownKeys$4(object, enumerableOnly) {
|
|
66493
66498
|
var keys = Object.keys(object);
|
|
66494
66499
|
if (Object.getOwnPropertySymbols) {
|
|
66495
66500
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -66502,9 +66507,9 @@ function ownKeys$3(object, enumerableOnly) {
|
|
|
66502
66507
|
function _objectSpread(target) {
|
|
66503
66508
|
for(var i = 1; i < arguments.length; i++){
|
|
66504
66509
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
66505
|
-
i % 2 ? ownKeys$
|
|
66510
|
+
i % 2 ? ownKeys$4(Object(source), !0).forEach(function(key) {
|
|
66506
66511
|
_defineProperty(target, key, source[key]);
|
|
66507
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
66512
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) {
|
|
66508
66513
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
66509
66514
|
});
|
|
66510
66515
|
}
|
|
@@ -67466,7 +67471,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
67466
67471
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
67467
67472
|
return Constructor;
|
|
67468
67473
|
}
|
|
67469
|
-
function _define_property$
|
|
67474
|
+
function _define_property$5(obj, key, value) {
|
|
67470
67475
|
if (key in obj) {
|
|
67471
67476
|
Object.defineProperty(obj, key, {
|
|
67472
67477
|
value: value,
|
|
@@ -67505,7 +67510,7 @@ function _instanceof(left, right) {
|
|
|
67505
67510
|
return left instanceof right;
|
|
67506
67511
|
}
|
|
67507
67512
|
}
|
|
67508
|
-
function _object_spread$
|
|
67513
|
+
function _object_spread$5(target) {
|
|
67509
67514
|
for(var i = 1; i < arguments.length; i++){
|
|
67510
67515
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
67511
67516
|
var ownKeys = Object.keys(source);
|
|
@@ -67515,12 +67520,12 @@ function _object_spread$2(target) {
|
|
|
67515
67520
|
}));
|
|
67516
67521
|
}
|
|
67517
67522
|
ownKeys.forEach(function(key) {
|
|
67518
|
-
_define_property$
|
|
67523
|
+
_define_property$5(target, key, source[key]);
|
|
67519
67524
|
});
|
|
67520
67525
|
}
|
|
67521
67526
|
return target;
|
|
67522
67527
|
}
|
|
67523
|
-
function ownKeys$
|
|
67528
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
67524
67529
|
var keys = Object.keys(object);
|
|
67525
67530
|
if (Object.getOwnPropertySymbols) {
|
|
67526
67531
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -67533,12 +67538,12 @@ function ownKeys$2(object, enumerableOnly) {
|
|
|
67533
67538
|
}
|
|
67534
67539
|
return keys;
|
|
67535
67540
|
}
|
|
67536
|
-
function _object_spread_props$
|
|
67541
|
+
function _object_spread_props$3(target, source) {
|
|
67537
67542
|
source = source != null ? source : {};
|
|
67538
67543
|
if (Object.getOwnPropertyDescriptors) {
|
|
67539
67544
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
67540
67545
|
} else {
|
|
67541
|
-
ownKeys$
|
|
67546
|
+
ownKeys$3(Object(source)).forEach(function(key) {
|
|
67542
67547
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
67543
67548
|
});
|
|
67544
67549
|
}
|
|
@@ -67646,8 +67651,8 @@ var defaultIconTransformations = Object.freeze({
|
|
|
67646
67651
|
vFlip: false,
|
|
67647
67652
|
hFlip: false
|
|
67648
67653
|
});
|
|
67649
|
-
var defaultIconProps = Object.freeze(_object_spread$
|
|
67650
|
-
var defaultExtendedIconProps = Object.freeze(_object_spread_props$
|
|
67654
|
+
var defaultIconProps = Object.freeze(_object_spread$5({}, defaultIconDimensions, defaultIconTransformations));
|
|
67655
|
+
var defaultExtendedIconProps = Object.freeze(_object_spread_props$3(_object_spread$5({}, defaultIconProps), {
|
|
67651
67656
|
body: "",
|
|
67652
67657
|
hidden: false
|
|
67653
67658
|
}));
|
|
@@ -67735,7 +67740,7 @@ function parseIconSet(data, callback) {
|
|
|
67735
67740
|
}
|
|
67736
67741
|
return names;
|
|
67737
67742
|
}
|
|
67738
|
-
var optionalPropertyDefaults = _object_spread$
|
|
67743
|
+
var optionalPropertyDefaults = _object_spread$5({
|
|
67739
67744
|
provider: "",
|
|
67740
67745
|
aliases: {},
|
|
67741
67746
|
not_found: {}
|
|
@@ -67804,7 +67809,7 @@ function addIconSet(storage, data) {
|
|
|
67804
67809
|
function addIconToStorage(storage, name, icon) {
|
|
67805
67810
|
try {
|
|
67806
67811
|
if (typeof icon.body === "string") {
|
|
67807
|
-
storage.icons[name] = _object_spread$
|
|
67812
|
+
storage.icons[name] = _object_spread$5({}, icon);
|
|
67808
67813
|
return true;
|
|
67809
67814
|
}
|
|
67810
67815
|
} catch (err) {}
|
|
@@ -67867,7 +67872,7 @@ var defaultIconSizeCustomisations = Object.freeze({
|
|
|
67867
67872
|
width: null,
|
|
67868
67873
|
height: null
|
|
67869
67874
|
});
|
|
67870
|
-
var defaultIconCustomisations = Object.freeze(_object_spread$
|
|
67875
|
+
var defaultIconCustomisations = Object.freeze(_object_spread$5({}, defaultIconSizeCustomisations, defaultIconTransformations));
|
|
67871
67876
|
var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
|
|
67872
67877
|
var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
67873
67878
|
function calculateSize(size, ratio, precision) {
|
|
@@ -67910,8 +67915,8 @@ var isUnsetKeyword = function(value) {
|
|
|
67910
67915
|
return value === "unset" || value === "undefined" || value === "none";
|
|
67911
67916
|
};
|
|
67912
67917
|
function iconToSVG(icon, customisations) {
|
|
67913
|
-
var fullIcon = _object_spread$
|
|
67914
|
-
var fullCustomisations = _object_spread$
|
|
67918
|
+
var fullIcon = _object_spread$5({}, defaultIconProps, icon);
|
|
67919
|
+
var fullCustomisations = _object_spread$5({}, defaultIconCustomisations, customisations);
|
|
67915
67920
|
var box = {
|
|
67916
67921
|
left: fullIcon.left,
|
|
67917
67922
|
top: fullIcon.top,
|
|
@@ -68533,7 +68538,7 @@ function sendQuery(config, payload, query, done) {
|
|
|
68533
68538
|
}
|
|
68534
68539
|
// src/index.ts
|
|
68535
68540
|
function initRedundancy(cfg) {
|
|
68536
|
-
var config = _object_spread$
|
|
68541
|
+
var config = _object_spread$5({}, defaultConfig, cfg);
|
|
68537
68542
|
var queries = [];
|
|
68538
68543
|
function cleanup() {
|
|
68539
68544
|
queries = queries.filter(function(item) {
|
|
@@ -68895,7 +68900,7 @@ var loadIcons = function(icons, callback) {
|
|
|
68895
68900
|
return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
|
|
68896
68901
|
};
|
|
68897
68902
|
function mergeCustomisations(defaults, item) {
|
|
68898
|
-
var result = _object_spread$
|
|
68903
|
+
var result = _object_spread$5({}, defaults);
|
|
68899
68904
|
for(var key in item){
|
|
68900
68905
|
var value = item[key];
|
|
68901
68906
|
var valueType = typeof value === "undefined" ? "undefined" : _type_of(value);
|
|
@@ -68990,7 +68995,7 @@ function cleanUpInnerHTML(html) {
|
|
|
68990
68995
|
}
|
|
68991
68996
|
return policy ? policy.createHTML(html) : html;
|
|
68992
68997
|
}
|
|
68993
|
-
var defaultExtendedIconCustomisations = _object_spread_props$
|
|
68998
|
+
var defaultExtendedIconCustomisations = _object_spread_props$3(_object_spread$5({}, defaultIconCustomisations), {
|
|
68994
68999
|
inline: false
|
|
68995
69000
|
});
|
|
68996
69001
|
/**
|
|
@@ -69031,7 +69036,7 @@ for(var prefix in propsToAddTo){
|
|
|
69031
69036
|
}
|
|
69032
69037
|
/**
|
|
69033
69038
|
* Default values for customisations for inline icon
|
|
69034
|
-
*/ var inlineDefaults = _object_spread_props$
|
|
69039
|
+
*/ var inlineDefaults = _object_spread_props$3(_object_spread$5({}, defaultExtendedIconCustomisations), {
|
|
69035
69040
|
inline: true
|
|
69036
69041
|
});
|
|
69037
69042
|
/**
|
|
@@ -69056,7 +69061,7 @@ ref) {
|
|
|
69056
69061
|
var style = {};
|
|
69057
69062
|
var customStyle = props.style || {};
|
|
69058
69063
|
// Create SVG component properties
|
|
69059
|
-
var componentProps = _object_spread_props$
|
|
69064
|
+
var componentProps = _object_spread_props$3(_object_spread$5({}, mode === "svg" ? svgDefaults : {}), {
|
|
69060
69065
|
ref: ref
|
|
69061
69066
|
});
|
|
69062
69067
|
// Get element properties
|
|
@@ -69122,7 +69127,7 @@ ref) {
|
|
|
69122
69127
|
}
|
|
69123
69128
|
if (mode === "svg") {
|
|
69124
69129
|
// Add style
|
|
69125
|
-
componentProps.style = _object_spread$
|
|
69130
|
+
componentProps.style = _object_spread$5({}, style, customStyle);
|
|
69126
69131
|
// Add icon stuff
|
|
69127
69132
|
Object.assign(componentProps, renderAttribs);
|
|
69128
69133
|
// Counter for ids based on "id" property to render icons consistently on server and client
|
|
@@ -69144,12 +69149,12 @@ ref) {
|
|
|
69144
69149
|
var body = icon.body, width = icon.width, height = icon.height;
|
|
69145
69150
|
var useMask = mode === "mask" || (mode === "bg" ? false : body.indexOf("currentColor") !== -1);
|
|
69146
69151
|
// Generate SVG
|
|
69147
|
-
var html = iconToHTML(body, _object_spread_props$
|
|
69152
|
+
var html = iconToHTML(body, _object_spread_props$3(_object_spread$5({}, renderAttribs), {
|
|
69148
69153
|
width: width + "",
|
|
69149
69154
|
height: height + ""
|
|
69150
69155
|
}));
|
|
69151
69156
|
// Generate style
|
|
69152
|
-
componentProps.style = _object_spread$
|
|
69157
|
+
componentProps.style = _object_spread$5(_object_spread_props$3(_object_spread$5({}, style), {
|
|
69153
69158
|
"--svg": svgToURL(html),
|
|
69154
69159
|
"width": fixSize(renderAttribs.width),
|
|
69155
69160
|
"height": fixSize(renderAttribs.height)
|
|
@@ -69361,12 +69366,12 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
|
|
|
69361
69366
|
// Add classes
|
|
69362
69367
|
var newProps = props;
|
|
69363
69368
|
if (icon.classes) {
|
|
69364
|
-
newProps = _object_spread_props$
|
|
69369
|
+
newProps = _object_spread_props$3(_object_spread$5({}, props), {
|
|
69365
69370
|
className: (typeof props.className === "string" ? props.className + " " : "") + icon.classes.join(" ")
|
|
69366
69371
|
});
|
|
69367
69372
|
}
|
|
69368
69373
|
// Render icon
|
|
69369
|
-
return render(_object_spread$
|
|
69374
|
+
return render(_object_spread$5({}, defaultIconProps, icon.data), newProps, props._inline, props._ref);
|
|
69370
69375
|
}
|
|
69371
69376
|
}
|
|
69372
69377
|
]);
|
|
@@ -69377,7 +69382,7 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
|
|
|
69377
69382
|
*
|
|
69378
69383
|
* @param props - Component properties
|
|
69379
69384
|
*/ var Icon = React__default.forwardRef(function Icon(props, ref) {
|
|
69380
|
-
var newProps = _object_spread_props$
|
|
69385
|
+
var newProps = _object_spread_props$3(_object_spread$5({}, props), {
|
|
69381
69386
|
_ref: ref,
|
|
69382
69387
|
_inline: false
|
|
69383
69388
|
});
|
|
@@ -69388,7 +69393,7 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
|
|
|
69388
69393
|
*
|
|
69389
69394
|
* @param props - Component properties
|
|
69390
69395
|
*/ React__default.forwardRef(function InlineIcon(props, ref) {
|
|
69391
|
-
var newProps = _object_spread_props$
|
|
69396
|
+
var newProps = _object_spread_props$3(_object_spread$5({}, props), {
|
|
69392
69397
|
_ref: ref,
|
|
69393
69398
|
_inline: true
|
|
69394
69399
|
});
|
|
@@ -69406,7 +69411,7 @@ function _array_with_holes$3(arr) {
|
|
|
69406
69411
|
function _array_without_holes(arr) {
|
|
69407
69412
|
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
69408
69413
|
}
|
|
69409
|
-
function _define_property$
|
|
69414
|
+
function _define_property$4(obj, key, value) {
|
|
69410
69415
|
if (key in obj) {
|
|
69411
69416
|
Object.defineProperty(obj, key, {
|
|
69412
69417
|
value: value,
|
|
@@ -69452,7 +69457,7 @@ function _non_iterable_rest$3() {
|
|
|
69452
69457
|
function _non_iterable_spread() {
|
|
69453
69458
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
69454
69459
|
}
|
|
69455
|
-
function _object_spread$
|
|
69460
|
+
function _object_spread$4(target) {
|
|
69456
69461
|
for(var i = 1; i < arguments.length; i++){
|
|
69457
69462
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
69458
69463
|
var ownKeys = Object.keys(source);
|
|
@@ -69462,12 +69467,12 @@ function _object_spread$1(target) {
|
|
|
69462
69467
|
}));
|
|
69463
69468
|
}
|
|
69464
69469
|
ownKeys.forEach(function(key) {
|
|
69465
|
-
_define_property$
|
|
69470
|
+
_define_property$4(target, key, source[key]);
|
|
69466
69471
|
});
|
|
69467
69472
|
}
|
|
69468
69473
|
return target;
|
|
69469
69474
|
}
|
|
69470
|
-
function ownKeys$
|
|
69475
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
69471
69476
|
var keys = Object.keys(object);
|
|
69472
69477
|
if (Object.getOwnPropertySymbols) {
|
|
69473
69478
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -69480,12 +69485,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
69480
69485
|
}
|
|
69481
69486
|
return keys;
|
|
69482
69487
|
}
|
|
69483
|
-
function _object_spread_props$
|
|
69488
|
+
function _object_spread_props$2(target, source) {
|
|
69484
69489
|
source = source != null ? source : {};
|
|
69485
69490
|
if (Object.getOwnPropertyDescriptors) {
|
|
69486
69491
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
69487
69492
|
} else {
|
|
69488
|
-
ownKeys$
|
|
69493
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
69489
69494
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69490
69495
|
});
|
|
69491
69496
|
}
|
|
@@ -69546,11 +69551,11 @@ var DropImage = function(param) {
|
|
|
69546
69551
|
return /*#__PURE__*/ jsxs("section", {
|
|
69547
69552
|
className: "w-full",
|
|
69548
69553
|
children: [
|
|
69549
|
-
/*#__PURE__*/ jsxs("div", _object_spread_props$
|
|
69554
|
+
/*#__PURE__*/ jsxs("div", _object_spread_props$2(_object_spread$4({}, getRootProps({
|
|
69550
69555
|
className: "dropzone"
|
|
69551
69556
|
})), {
|
|
69552
69557
|
children: [
|
|
69553
|
-
/*#__PURE__*/ jsx("input", _object_spread$
|
|
69558
|
+
/*#__PURE__*/ jsx("input", _object_spread$4({}, getInputProps())),
|
|
69554
69559
|
/*#__PURE__*/ jsx("div", {
|
|
69555
69560
|
className: "flex justify-between",
|
|
69556
69561
|
children: /*#__PURE__*/ jsx("div", {
|
|
@@ -69991,7 +69996,7 @@ function cn() {
|
|
|
69991
69996
|
return twMerge(clsx(inputs));
|
|
69992
69997
|
}
|
|
69993
69998
|
|
|
69994
|
-
function _define_property(obj, key, value) {
|
|
69999
|
+
function _define_property$3(obj, key, value) {
|
|
69995
70000
|
if (key in obj) {
|
|
69996
70001
|
Object.defineProperty(obj, key, {
|
|
69997
70002
|
value: value,
|
|
@@ -70004,7 +70009,7 @@ function _define_property(obj, key, value) {
|
|
|
70004
70009
|
}
|
|
70005
70010
|
return obj;
|
|
70006
70011
|
}
|
|
70007
|
-
function _object_spread(target) {
|
|
70012
|
+
function _object_spread$3(target) {
|
|
70008
70013
|
for(var i = 1; i < arguments.length; i++){
|
|
70009
70014
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
70010
70015
|
var ownKeys = Object.keys(source);
|
|
@@ -70014,12 +70019,12 @@ function _object_spread(target) {
|
|
|
70014
70019
|
}));
|
|
70015
70020
|
}
|
|
70016
70021
|
ownKeys.forEach(function(key) {
|
|
70017
|
-
_define_property(target, key, source[key]);
|
|
70022
|
+
_define_property$3(target, key, source[key]);
|
|
70018
70023
|
});
|
|
70019
70024
|
}
|
|
70020
70025
|
return target;
|
|
70021
70026
|
}
|
|
70022
|
-
function ownKeys(object, enumerableOnly) {
|
|
70027
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
70023
70028
|
var keys = Object.keys(object);
|
|
70024
70029
|
if (Object.getOwnPropertySymbols) {
|
|
70025
70030
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -70032,20 +70037,20 @@ function ownKeys(object, enumerableOnly) {
|
|
|
70032
70037
|
}
|
|
70033
70038
|
return keys;
|
|
70034
70039
|
}
|
|
70035
|
-
function _object_spread_props(target, source) {
|
|
70040
|
+
function _object_spread_props$1(target, source) {
|
|
70036
70041
|
source = source != null ? source : {};
|
|
70037
70042
|
if (Object.getOwnPropertyDescriptors) {
|
|
70038
70043
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
70039
70044
|
} else {
|
|
70040
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
70045
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
70041
70046
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
70042
70047
|
});
|
|
70043
70048
|
}
|
|
70044
70049
|
return target;
|
|
70045
70050
|
}
|
|
70046
|
-
function _object_without_properties(source, excluded) {
|
|
70051
|
+
function _object_without_properties$3(source, excluded) {
|
|
70047
70052
|
if (source == null) return {};
|
|
70048
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
70053
|
+
var target = _object_without_properties_loose$3(source, excluded);
|
|
70049
70054
|
var key, i;
|
|
70050
70055
|
if (Object.getOwnPropertySymbols) {
|
|
70051
70056
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -70058,7 +70063,7 @@ function _object_without_properties(source, excluded) {
|
|
|
70058
70063
|
}
|
|
70059
70064
|
return target;
|
|
70060
70065
|
}
|
|
70061
|
-
function _object_without_properties_loose(source, excluded) {
|
|
70066
|
+
function _object_without_properties_loose$3(source, excluded) {
|
|
70062
70067
|
if (source == null) return {};
|
|
70063
70068
|
var target = {};
|
|
70064
70069
|
var sourceKeys = Object.keys(source);
|
|
@@ -70071,10 +70076,10 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
70071
70076
|
return target;
|
|
70072
70077
|
}
|
|
70073
70078
|
var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
70074
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
70079
|
+
var className = _param.className, props = _object_without_properties$3(_param, [
|
|
70075
70080
|
"className"
|
|
70076
70081
|
]);
|
|
70077
|
-
return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props(_object_spread({
|
|
70082
|
+
return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$1(_object_spread$3({
|
|
70078
70083
|
className: cn("peer inline-flex h-5 w-9 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", className)
|
|
70079
70084
|
}, props), {
|
|
70080
70085
|
ref: ref,
|
|
@@ -70085,6 +70090,1148 @@ var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
70085
70090
|
});
|
|
70086
70091
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
70087
70092
|
|
|
70093
|
+
function _define_property$2(obj, key, value) {
|
|
70094
|
+
if (key in obj) {
|
|
70095
|
+
Object.defineProperty(obj, key, {
|
|
70096
|
+
value: value,
|
|
70097
|
+
enumerable: true,
|
|
70098
|
+
configurable: true,
|
|
70099
|
+
writable: true
|
|
70100
|
+
});
|
|
70101
|
+
} else {
|
|
70102
|
+
obj[key] = value;
|
|
70103
|
+
}
|
|
70104
|
+
return obj;
|
|
70105
|
+
}
|
|
70106
|
+
function _object_spread$2(target) {
|
|
70107
|
+
for(var i = 1; i < arguments.length; i++){
|
|
70108
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
70109
|
+
var ownKeys = Object.keys(source);
|
|
70110
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
70111
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
70112
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
70113
|
+
}));
|
|
70114
|
+
}
|
|
70115
|
+
ownKeys.forEach(function(key) {
|
|
70116
|
+
_define_property$2(target, key, source[key]);
|
|
70117
|
+
});
|
|
70118
|
+
}
|
|
70119
|
+
return target;
|
|
70120
|
+
}
|
|
70121
|
+
function _object_without_properties$2(source, excluded) {
|
|
70122
|
+
if (source == null) return {};
|
|
70123
|
+
var target = _object_without_properties_loose$2(source, excluded);
|
|
70124
|
+
var key, i;
|
|
70125
|
+
if (Object.getOwnPropertySymbols) {
|
|
70126
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
70127
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
70128
|
+
key = sourceSymbolKeys[i];
|
|
70129
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
70130
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
70131
|
+
target[key] = source[key];
|
|
70132
|
+
}
|
|
70133
|
+
}
|
|
70134
|
+
return target;
|
|
70135
|
+
}
|
|
70136
|
+
function _object_without_properties_loose$2(source, excluded) {
|
|
70137
|
+
if (source == null) return {};
|
|
70138
|
+
var target = {};
|
|
70139
|
+
var sourceKeys = Object.keys(source);
|
|
70140
|
+
var key, i;
|
|
70141
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
70142
|
+
key = sourceKeys[i];
|
|
70143
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
70144
|
+
target[key] = source[key];
|
|
70145
|
+
}
|
|
70146
|
+
return target;
|
|
70147
|
+
}
|
|
70148
|
+
var buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap 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", {
|
|
70149
|
+
variants: {
|
|
70150
|
+
variant: {
|
|
70151
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
70152
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
70153
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
70154
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
70155
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
70156
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
70157
|
+
},
|
|
70158
|
+
size: {
|
|
70159
|
+
default: "h-9 px-4 py-2",
|
|
70160
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
70161
|
+
lg: "h-10 rounded-md px-8",
|
|
70162
|
+
icon: "h-9 w-9"
|
|
70163
|
+
}
|
|
70164
|
+
},
|
|
70165
|
+
defaultVariants: {
|
|
70166
|
+
variant: "default",
|
|
70167
|
+
size: "default"
|
|
70168
|
+
}
|
|
70169
|
+
});
|
|
70170
|
+
var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
70171
|
+
var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties$2(_param, [
|
|
70172
|
+
"className",
|
|
70173
|
+
"variant",
|
|
70174
|
+
"size",
|
|
70175
|
+
"asChild"
|
|
70176
|
+
]);
|
|
70177
|
+
var Comp = asChild ? Slot : "button";
|
|
70178
|
+
return /*#__PURE__*/ jsx(Comp, _object_spread$2({
|
|
70179
|
+
className: cn(buttonVariants({
|
|
70180
|
+
variant: variant,
|
|
70181
|
+
size: size,
|
|
70182
|
+
className: className
|
|
70183
|
+
})),
|
|
70184
|
+
ref: ref
|
|
70185
|
+
}, props));
|
|
70186
|
+
});
|
|
70187
|
+
|
|
70188
|
+
var zhTW$1 = {
|
|
70189
|
+
exports: {}
|
|
70190
|
+
};
|
|
70191
|
+
|
|
70192
|
+
var interopRequireDefault = {
|
|
70193
|
+
exports: {}
|
|
70194
|
+
};
|
|
70195
|
+
|
|
70196
|
+
(function (module) {
|
|
70197
|
+
function _interopRequireDefault(obj) {
|
|
70198
|
+
return obj && obj.__esModule ? obj : {
|
|
70199
|
+
"default": obj
|
|
70200
|
+
};
|
|
70201
|
+
}
|
|
70202
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
70203
|
+
}(interopRequireDefault));
|
|
70204
|
+
|
|
70205
|
+
var formatDistance = {
|
|
70206
|
+
exports: {}
|
|
70207
|
+
};
|
|
70208
|
+
|
|
70209
|
+
(function (module, exports) {
|
|
70210
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70211
|
+
value: true
|
|
70212
|
+
});
|
|
70213
|
+
exports.default = void 0;
|
|
70214
|
+
var formatDistanceLocale = {
|
|
70215
|
+
lessThanXSeconds: {
|
|
70216
|
+
one: "少於 1 秒",
|
|
70217
|
+
other: "少於 {{count}} 秒"
|
|
70218
|
+
},
|
|
70219
|
+
xSeconds: {
|
|
70220
|
+
one: "1 秒",
|
|
70221
|
+
other: "{{count}} 秒"
|
|
70222
|
+
},
|
|
70223
|
+
halfAMinute: "半分鐘",
|
|
70224
|
+
lessThanXMinutes: {
|
|
70225
|
+
one: "少於 1 分鐘",
|
|
70226
|
+
other: "少於 {{count}} 分鐘"
|
|
70227
|
+
},
|
|
70228
|
+
xMinutes: {
|
|
70229
|
+
one: "1 分鐘",
|
|
70230
|
+
other: "{{count}} 分鐘"
|
|
70231
|
+
},
|
|
70232
|
+
xHours: {
|
|
70233
|
+
one: "1 小時",
|
|
70234
|
+
other: "{{count}} 小時"
|
|
70235
|
+
},
|
|
70236
|
+
aboutXHours: {
|
|
70237
|
+
one: "大約 1 小時",
|
|
70238
|
+
other: "大約 {{count}} 小時"
|
|
70239
|
+
},
|
|
70240
|
+
xDays: {
|
|
70241
|
+
one: "1 天",
|
|
70242
|
+
other: "{{count}} 天"
|
|
70243
|
+
},
|
|
70244
|
+
aboutXWeeks: {
|
|
70245
|
+
one: "大約 1 個星期",
|
|
70246
|
+
other: "大約 {{count}} 個星期"
|
|
70247
|
+
},
|
|
70248
|
+
xWeeks: {
|
|
70249
|
+
one: "1 個星期",
|
|
70250
|
+
other: "{{count}} 個星期"
|
|
70251
|
+
},
|
|
70252
|
+
aboutXMonths: {
|
|
70253
|
+
one: "大約 1 個月",
|
|
70254
|
+
other: "大約 {{count}} 個月"
|
|
70255
|
+
},
|
|
70256
|
+
xMonths: {
|
|
70257
|
+
one: "1 個月",
|
|
70258
|
+
other: "{{count}} 個月"
|
|
70259
|
+
},
|
|
70260
|
+
aboutXYears: {
|
|
70261
|
+
one: "大約 1 年",
|
|
70262
|
+
other: "大約 {{count}} 年"
|
|
70263
|
+
},
|
|
70264
|
+
xYears: {
|
|
70265
|
+
one: "1 年",
|
|
70266
|
+
other: "{{count}} 年"
|
|
70267
|
+
},
|
|
70268
|
+
overXYears: {
|
|
70269
|
+
one: "超過 1 年",
|
|
70270
|
+
other: "超過 {{count}} 年"
|
|
70271
|
+
},
|
|
70272
|
+
almostXYears: {
|
|
70273
|
+
one: "將近 1 年",
|
|
70274
|
+
other: "將近 {{count}} 年"
|
|
70275
|
+
}
|
|
70276
|
+
};
|
|
70277
|
+
var formatDistance = function formatDistance(token, count, options) {
|
|
70278
|
+
var result;
|
|
70279
|
+
var tokenValue = formatDistanceLocale[token];
|
|
70280
|
+
if (typeof tokenValue === "string") {
|
|
70281
|
+
result = tokenValue;
|
|
70282
|
+
} else if (count === 1) {
|
|
70283
|
+
result = tokenValue.one;
|
|
70284
|
+
} else {
|
|
70285
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
70286
|
+
}
|
|
70287
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
70288
|
+
if (options.comparison && options.comparison > 0) {
|
|
70289
|
+
return result + "內";
|
|
70290
|
+
} else {
|
|
70291
|
+
return result + "前";
|
|
70292
|
+
}
|
|
70293
|
+
}
|
|
70294
|
+
return result;
|
|
70295
|
+
};
|
|
70296
|
+
var _default = formatDistance;
|
|
70297
|
+
exports.default = _default;
|
|
70298
|
+
module.exports = exports.default;
|
|
70299
|
+
}(formatDistance, formatDistance.exports));
|
|
70300
|
+
|
|
70301
|
+
var formatLong = {
|
|
70302
|
+
exports: {}
|
|
70303
|
+
};
|
|
70304
|
+
|
|
70305
|
+
var buildFormatLongFn = {
|
|
70306
|
+
exports: {}
|
|
70307
|
+
};
|
|
70308
|
+
|
|
70309
|
+
(function (module, exports) {
|
|
70310
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70311
|
+
value: true
|
|
70312
|
+
});
|
|
70313
|
+
exports.default = buildFormatLongFn;
|
|
70314
|
+
function buildFormatLongFn(args) {
|
|
70315
|
+
return function() {
|
|
70316
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
70317
|
+
// TODO: Remove String()
|
|
70318
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
70319
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
70320
|
+
return format;
|
|
70321
|
+
};
|
|
70322
|
+
}
|
|
70323
|
+
module.exports = exports.default;
|
|
70324
|
+
}(buildFormatLongFn, buildFormatLongFn.exports));
|
|
70325
|
+
|
|
70326
|
+
(function (module, exports) {
|
|
70327
|
+
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
70328
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70329
|
+
value: true
|
|
70330
|
+
});
|
|
70331
|
+
exports.default = void 0;
|
|
70332
|
+
var _index = _interopRequireDefault(buildFormatLongFn.exports);
|
|
70333
|
+
var dateFormats = {
|
|
70334
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
70335
|
+
long: "y'年'M'月'd'日'",
|
|
70336
|
+
medium: "yyyy-MM-dd",
|
|
70337
|
+
short: "yy-MM-dd"
|
|
70338
|
+
};
|
|
70339
|
+
var timeFormats = {
|
|
70340
|
+
full: "zzzz a h:mm:ss",
|
|
70341
|
+
long: "z a h:mm:ss",
|
|
70342
|
+
medium: "a h:mm:ss",
|
|
70343
|
+
short: "a h:mm"
|
|
70344
|
+
};
|
|
70345
|
+
var dateTimeFormats = {
|
|
70346
|
+
full: "{{date}} {{time}}",
|
|
70347
|
+
long: "{{date}} {{time}}",
|
|
70348
|
+
medium: "{{date}} {{time}}",
|
|
70349
|
+
short: "{{date}} {{time}}"
|
|
70350
|
+
};
|
|
70351
|
+
var formatLong = {
|
|
70352
|
+
date: (0, _index.default)({
|
|
70353
|
+
formats: dateFormats,
|
|
70354
|
+
defaultWidth: "full"
|
|
70355
|
+
}),
|
|
70356
|
+
time: (0, _index.default)({
|
|
70357
|
+
formats: timeFormats,
|
|
70358
|
+
defaultWidth: "full"
|
|
70359
|
+
}),
|
|
70360
|
+
dateTime: (0, _index.default)({
|
|
70361
|
+
formats: dateTimeFormats,
|
|
70362
|
+
defaultWidth: "full"
|
|
70363
|
+
})
|
|
70364
|
+
};
|
|
70365
|
+
var _default = formatLong;
|
|
70366
|
+
exports.default = _default;
|
|
70367
|
+
module.exports = exports.default;
|
|
70368
|
+
}(formatLong, formatLong.exports));
|
|
70369
|
+
|
|
70370
|
+
var formatRelative = {
|
|
70371
|
+
exports: {}
|
|
70372
|
+
};
|
|
70373
|
+
|
|
70374
|
+
(function (module, exports) {
|
|
70375
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70376
|
+
value: true
|
|
70377
|
+
});
|
|
70378
|
+
exports.default = void 0;
|
|
70379
|
+
var formatRelativeLocale = {
|
|
70380
|
+
lastWeek: "'上個'eeee p",
|
|
70381
|
+
yesterday: "'昨天' p",
|
|
70382
|
+
today: "'今天' p",
|
|
70383
|
+
tomorrow: "'明天' p",
|
|
70384
|
+
nextWeek: "'下個'eeee p",
|
|
70385
|
+
other: "P"
|
|
70386
|
+
};
|
|
70387
|
+
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
70388
|
+
return formatRelativeLocale[token];
|
|
70389
|
+
};
|
|
70390
|
+
var _default = formatRelative;
|
|
70391
|
+
exports.default = _default;
|
|
70392
|
+
module.exports = exports.default;
|
|
70393
|
+
}(formatRelative, formatRelative.exports));
|
|
70394
|
+
|
|
70395
|
+
var localize = {
|
|
70396
|
+
exports: {}
|
|
70397
|
+
};
|
|
70398
|
+
|
|
70399
|
+
var buildLocalizeFn = {
|
|
70400
|
+
exports: {}
|
|
70401
|
+
};
|
|
70402
|
+
|
|
70403
|
+
(function (module, exports) {
|
|
70404
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70405
|
+
value: true
|
|
70406
|
+
});
|
|
70407
|
+
exports.default = buildLocalizeFn;
|
|
70408
|
+
function buildLocalizeFn(args) {
|
|
70409
|
+
return function(dirtyIndex, options) {
|
|
70410
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
70411
|
+
var valuesArray;
|
|
70412
|
+
if (context === "formatting" && args.formattingValues) {
|
|
70413
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
70414
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
70415
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
70416
|
+
} else {
|
|
70417
|
+
var _defaultWidth = args.defaultWidth;
|
|
70418
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
70419
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
70420
|
+
}
|
|
70421
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
70422
|
+
// @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!
|
|
70423
|
+
return valuesArray[index];
|
|
70424
|
+
};
|
|
70425
|
+
}
|
|
70426
|
+
module.exports = exports.default;
|
|
70427
|
+
}(buildLocalizeFn, buildLocalizeFn.exports));
|
|
70428
|
+
|
|
70429
|
+
(function (module, exports) {
|
|
70430
|
+
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
70431
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70432
|
+
value: true
|
|
70433
|
+
});
|
|
70434
|
+
exports.default = void 0;
|
|
70435
|
+
var _index = _interopRequireDefault(buildLocalizeFn.exports);
|
|
70436
|
+
var eraValues = {
|
|
70437
|
+
narrow: [
|
|
70438
|
+
"前",
|
|
70439
|
+
"公元"
|
|
70440
|
+
],
|
|
70441
|
+
abbreviated: [
|
|
70442
|
+
"前",
|
|
70443
|
+
"公元"
|
|
70444
|
+
],
|
|
70445
|
+
wide: [
|
|
70446
|
+
"公元前",
|
|
70447
|
+
"公元"
|
|
70448
|
+
]
|
|
70449
|
+
};
|
|
70450
|
+
var quarterValues = {
|
|
70451
|
+
narrow: [
|
|
70452
|
+
"1",
|
|
70453
|
+
"2",
|
|
70454
|
+
"3",
|
|
70455
|
+
"4"
|
|
70456
|
+
],
|
|
70457
|
+
abbreviated: [
|
|
70458
|
+
"第一刻",
|
|
70459
|
+
"第二刻",
|
|
70460
|
+
"第三刻",
|
|
70461
|
+
"第四刻"
|
|
70462
|
+
],
|
|
70463
|
+
wide: [
|
|
70464
|
+
"第一刻鐘",
|
|
70465
|
+
"第二刻鐘",
|
|
70466
|
+
"第三刻鐘",
|
|
70467
|
+
"第四刻鐘"
|
|
70468
|
+
]
|
|
70469
|
+
};
|
|
70470
|
+
var monthValues = {
|
|
70471
|
+
narrow: [
|
|
70472
|
+
"一",
|
|
70473
|
+
"二",
|
|
70474
|
+
"三",
|
|
70475
|
+
"四",
|
|
70476
|
+
"五",
|
|
70477
|
+
"六",
|
|
70478
|
+
"七",
|
|
70479
|
+
"八",
|
|
70480
|
+
"九",
|
|
70481
|
+
"十",
|
|
70482
|
+
"十一",
|
|
70483
|
+
"十二"
|
|
70484
|
+
],
|
|
70485
|
+
abbreviated: [
|
|
70486
|
+
"1月",
|
|
70487
|
+
"2月",
|
|
70488
|
+
"3月",
|
|
70489
|
+
"4月",
|
|
70490
|
+
"5月",
|
|
70491
|
+
"6月",
|
|
70492
|
+
"7月",
|
|
70493
|
+
"8月",
|
|
70494
|
+
"9月",
|
|
70495
|
+
"10月",
|
|
70496
|
+
"11月",
|
|
70497
|
+
"12月"
|
|
70498
|
+
],
|
|
70499
|
+
wide: [
|
|
70500
|
+
"一月",
|
|
70501
|
+
"二月",
|
|
70502
|
+
"三月",
|
|
70503
|
+
"四月",
|
|
70504
|
+
"五月",
|
|
70505
|
+
"六月",
|
|
70506
|
+
"七月",
|
|
70507
|
+
"八月",
|
|
70508
|
+
"九月",
|
|
70509
|
+
"十月",
|
|
70510
|
+
"十一月",
|
|
70511
|
+
"十二月"
|
|
70512
|
+
]
|
|
70513
|
+
};
|
|
70514
|
+
var dayValues = {
|
|
70515
|
+
narrow: [
|
|
70516
|
+
"日",
|
|
70517
|
+
"一",
|
|
70518
|
+
"二",
|
|
70519
|
+
"三",
|
|
70520
|
+
"四",
|
|
70521
|
+
"五",
|
|
70522
|
+
"六"
|
|
70523
|
+
],
|
|
70524
|
+
short: [
|
|
70525
|
+
"日",
|
|
70526
|
+
"一",
|
|
70527
|
+
"二",
|
|
70528
|
+
"三",
|
|
70529
|
+
"四",
|
|
70530
|
+
"五",
|
|
70531
|
+
"六"
|
|
70532
|
+
],
|
|
70533
|
+
abbreviated: [
|
|
70534
|
+
"週日",
|
|
70535
|
+
"週一",
|
|
70536
|
+
"週二",
|
|
70537
|
+
"週三",
|
|
70538
|
+
"週四",
|
|
70539
|
+
"週五",
|
|
70540
|
+
"週六"
|
|
70541
|
+
],
|
|
70542
|
+
wide: [
|
|
70543
|
+
"星期日",
|
|
70544
|
+
"星期一",
|
|
70545
|
+
"星期二",
|
|
70546
|
+
"星期三",
|
|
70547
|
+
"星期四",
|
|
70548
|
+
"星期五",
|
|
70549
|
+
"星期六"
|
|
70550
|
+
]
|
|
70551
|
+
};
|
|
70552
|
+
var dayPeriodValues = {
|
|
70553
|
+
narrow: {
|
|
70554
|
+
am: "上",
|
|
70555
|
+
pm: "下",
|
|
70556
|
+
midnight: "凌晨",
|
|
70557
|
+
noon: "午",
|
|
70558
|
+
morning: "早",
|
|
70559
|
+
afternoon: "下午",
|
|
70560
|
+
evening: "晚",
|
|
70561
|
+
night: "夜"
|
|
70562
|
+
},
|
|
70563
|
+
abbreviated: {
|
|
70564
|
+
am: "上午",
|
|
70565
|
+
pm: "下午",
|
|
70566
|
+
midnight: "凌晨",
|
|
70567
|
+
noon: "中午",
|
|
70568
|
+
morning: "早晨",
|
|
70569
|
+
afternoon: "中午",
|
|
70570
|
+
evening: "晚上",
|
|
70571
|
+
night: "夜間"
|
|
70572
|
+
},
|
|
70573
|
+
wide: {
|
|
70574
|
+
am: "上午",
|
|
70575
|
+
pm: "下午",
|
|
70576
|
+
midnight: "凌晨",
|
|
70577
|
+
noon: "中午",
|
|
70578
|
+
morning: "早晨",
|
|
70579
|
+
afternoon: "中午",
|
|
70580
|
+
evening: "晚上",
|
|
70581
|
+
night: "夜間"
|
|
70582
|
+
}
|
|
70583
|
+
};
|
|
70584
|
+
var formattingDayPeriodValues = {
|
|
70585
|
+
narrow: {
|
|
70586
|
+
am: "上",
|
|
70587
|
+
pm: "下",
|
|
70588
|
+
midnight: "凌晨",
|
|
70589
|
+
noon: "午",
|
|
70590
|
+
morning: "早",
|
|
70591
|
+
afternoon: "下午",
|
|
70592
|
+
evening: "晚",
|
|
70593
|
+
night: "夜"
|
|
70594
|
+
},
|
|
70595
|
+
abbreviated: {
|
|
70596
|
+
am: "上午",
|
|
70597
|
+
pm: "下午",
|
|
70598
|
+
midnight: "凌晨",
|
|
70599
|
+
noon: "中午",
|
|
70600
|
+
morning: "早晨",
|
|
70601
|
+
afternoon: "中午",
|
|
70602
|
+
evening: "晚上",
|
|
70603
|
+
night: "夜間"
|
|
70604
|
+
},
|
|
70605
|
+
wide: {
|
|
70606
|
+
am: "上午",
|
|
70607
|
+
pm: "下午",
|
|
70608
|
+
midnight: "凌晨",
|
|
70609
|
+
noon: "中午",
|
|
70610
|
+
morning: "早晨",
|
|
70611
|
+
afternoon: "中午",
|
|
70612
|
+
evening: "晚上",
|
|
70613
|
+
night: "夜間"
|
|
70614
|
+
}
|
|
70615
|
+
};
|
|
70616
|
+
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
|
|
70617
|
+
var number = Number(dirtyNumber);
|
|
70618
|
+
switch(options === null || options === void 0 ? void 0 : options.unit){
|
|
70619
|
+
case "date":
|
|
70620
|
+
return number + "日";
|
|
70621
|
+
case "hour":
|
|
70622
|
+
return number + "時";
|
|
70623
|
+
case "minute":
|
|
70624
|
+
return number + "分";
|
|
70625
|
+
case "second":
|
|
70626
|
+
return number + "秒";
|
|
70627
|
+
default:
|
|
70628
|
+
return "第 " + number;
|
|
70629
|
+
}
|
|
70630
|
+
};
|
|
70631
|
+
var localize = {
|
|
70632
|
+
ordinalNumber: ordinalNumber,
|
|
70633
|
+
era: (0, _index.default)({
|
|
70634
|
+
values: eraValues,
|
|
70635
|
+
defaultWidth: "wide"
|
|
70636
|
+
}),
|
|
70637
|
+
quarter: (0, _index.default)({
|
|
70638
|
+
values: quarterValues,
|
|
70639
|
+
defaultWidth: "wide",
|
|
70640
|
+
argumentCallback: function argumentCallback(quarter) {
|
|
70641
|
+
return quarter - 1;
|
|
70642
|
+
}
|
|
70643
|
+
}),
|
|
70644
|
+
month: (0, _index.default)({
|
|
70645
|
+
values: monthValues,
|
|
70646
|
+
defaultWidth: "wide"
|
|
70647
|
+
}),
|
|
70648
|
+
day: (0, _index.default)({
|
|
70649
|
+
values: dayValues,
|
|
70650
|
+
defaultWidth: "wide"
|
|
70651
|
+
}),
|
|
70652
|
+
dayPeriod: (0, _index.default)({
|
|
70653
|
+
values: dayPeriodValues,
|
|
70654
|
+
defaultWidth: "wide",
|
|
70655
|
+
formattingValues: formattingDayPeriodValues,
|
|
70656
|
+
defaultFormattingWidth: "wide"
|
|
70657
|
+
})
|
|
70658
|
+
};
|
|
70659
|
+
var _default = localize;
|
|
70660
|
+
exports.default = _default;
|
|
70661
|
+
module.exports = exports.default;
|
|
70662
|
+
}(localize, localize.exports));
|
|
70663
|
+
|
|
70664
|
+
var match = {
|
|
70665
|
+
exports: {}
|
|
70666
|
+
};
|
|
70667
|
+
|
|
70668
|
+
var buildMatchFn = {
|
|
70669
|
+
exports: {}
|
|
70670
|
+
};
|
|
70671
|
+
|
|
70672
|
+
(function (module, exports) {
|
|
70673
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70674
|
+
value: true
|
|
70675
|
+
});
|
|
70676
|
+
exports.default = buildMatchFn;
|
|
70677
|
+
function buildMatchFn(args) {
|
|
70678
|
+
return function(string) {
|
|
70679
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
70680
|
+
var width = options.width;
|
|
70681
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
70682
|
+
var matchResult = string.match(matchPattern);
|
|
70683
|
+
if (!matchResult) {
|
|
70684
|
+
return null;
|
|
70685
|
+
}
|
|
70686
|
+
var matchedString = matchResult[0];
|
|
70687
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
70688
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
70689
|
+
return pattern.test(matchedString);
|
|
70690
|
+
}) : findKey(parsePatterns, function(pattern) {
|
|
70691
|
+
return pattern.test(matchedString);
|
|
70692
|
+
});
|
|
70693
|
+
var value;
|
|
70694
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
70695
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
70696
|
+
var rest = string.slice(matchedString.length);
|
|
70697
|
+
return {
|
|
70698
|
+
value: value,
|
|
70699
|
+
rest: rest
|
|
70700
|
+
};
|
|
70701
|
+
};
|
|
70702
|
+
}
|
|
70703
|
+
function findKey(object, predicate) {
|
|
70704
|
+
for(var key in object){
|
|
70705
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
70706
|
+
return key;
|
|
70707
|
+
}
|
|
70708
|
+
}
|
|
70709
|
+
return undefined;
|
|
70710
|
+
}
|
|
70711
|
+
function findIndex(array, predicate) {
|
|
70712
|
+
for(var key = 0; key < array.length; key++){
|
|
70713
|
+
if (predicate(array[key])) {
|
|
70714
|
+
return key;
|
|
70715
|
+
}
|
|
70716
|
+
}
|
|
70717
|
+
return undefined;
|
|
70718
|
+
}
|
|
70719
|
+
module.exports = exports.default;
|
|
70720
|
+
}(buildMatchFn, buildMatchFn.exports));
|
|
70721
|
+
|
|
70722
|
+
var buildMatchPatternFn = {
|
|
70723
|
+
exports: {}
|
|
70724
|
+
};
|
|
70725
|
+
|
|
70726
|
+
(function (module, exports) {
|
|
70727
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70728
|
+
value: true
|
|
70729
|
+
});
|
|
70730
|
+
exports.default = buildMatchPatternFn;
|
|
70731
|
+
function buildMatchPatternFn(args) {
|
|
70732
|
+
return function(string) {
|
|
70733
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
70734
|
+
var matchResult = string.match(args.matchPattern);
|
|
70735
|
+
if (!matchResult) return null;
|
|
70736
|
+
var matchedString = matchResult[0];
|
|
70737
|
+
var parseResult = string.match(args.parsePattern);
|
|
70738
|
+
if (!parseResult) return null;
|
|
70739
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
70740
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
70741
|
+
var rest = string.slice(matchedString.length);
|
|
70742
|
+
return {
|
|
70743
|
+
value: value,
|
|
70744
|
+
rest: rest
|
|
70745
|
+
};
|
|
70746
|
+
};
|
|
70747
|
+
}
|
|
70748
|
+
module.exports = exports.default;
|
|
70749
|
+
}(buildMatchPatternFn, buildMatchPatternFn.exports));
|
|
70750
|
+
|
|
70751
|
+
(function (module, exports) {
|
|
70752
|
+
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
70753
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70754
|
+
value: true
|
|
70755
|
+
});
|
|
70756
|
+
exports.default = void 0;
|
|
70757
|
+
var _index = _interopRequireDefault(buildMatchFn.exports);
|
|
70758
|
+
var _index2 = _interopRequireDefault(buildMatchPatternFn.exports);
|
|
70759
|
+
var matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
|
|
70760
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
70761
|
+
var matchEraPatterns = {
|
|
70762
|
+
narrow: /^(前)/i,
|
|
70763
|
+
abbreviated: /^(前)/i,
|
|
70764
|
+
wide: /^(公元前|公元)/i
|
|
70765
|
+
};
|
|
70766
|
+
var parseEraPatterns = {
|
|
70767
|
+
any: [
|
|
70768
|
+
/^(前)/i,
|
|
70769
|
+
/^(公元)/i
|
|
70770
|
+
]
|
|
70771
|
+
};
|
|
70772
|
+
var matchQuarterPatterns = {
|
|
70773
|
+
narrow: /^[1234]/i,
|
|
70774
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
70775
|
+
wide: /^第[一二三四]刻鐘/i
|
|
70776
|
+
};
|
|
70777
|
+
var parseQuarterPatterns = {
|
|
70778
|
+
any: [
|
|
70779
|
+
/(1|一)/i,
|
|
70780
|
+
/(2|二)/i,
|
|
70781
|
+
/(3|三)/i,
|
|
70782
|
+
/(4|四)/i
|
|
70783
|
+
]
|
|
70784
|
+
};
|
|
70785
|
+
var matchMonthPatterns = {
|
|
70786
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
70787
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
70788
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
|
|
70789
|
+
};
|
|
70790
|
+
var parseMonthPatterns = {
|
|
70791
|
+
narrow: [
|
|
70792
|
+
/^一/i,
|
|
70793
|
+
/^二/i,
|
|
70794
|
+
/^三/i,
|
|
70795
|
+
/^四/i,
|
|
70796
|
+
/^五/i,
|
|
70797
|
+
/^六/i,
|
|
70798
|
+
/^七/i,
|
|
70799
|
+
/^八/i,
|
|
70800
|
+
/^九/i,
|
|
70801
|
+
/^十(?!(一|二))/i,
|
|
70802
|
+
/^十一/i,
|
|
70803
|
+
/^十二/i
|
|
70804
|
+
],
|
|
70805
|
+
any: [
|
|
70806
|
+
/^一|1/i,
|
|
70807
|
+
/^二|2/i,
|
|
70808
|
+
/^三|3/i,
|
|
70809
|
+
/^四|4/i,
|
|
70810
|
+
/^五|5/i,
|
|
70811
|
+
/^六|6/i,
|
|
70812
|
+
/^七|7/i,
|
|
70813
|
+
/^八|8/i,
|
|
70814
|
+
/^九|9/i,
|
|
70815
|
+
/^十(?!(一|二))|10/i,
|
|
70816
|
+
/^十一|11/i,
|
|
70817
|
+
/^十二|12/i
|
|
70818
|
+
]
|
|
70819
|
+
};
|
|
70820
|
+
var matchDayPatterns = {
|
|
70821
|
+
narrow: /^[一二三四五六日]/i,
|
|
70822
|
+
short: /^[一二三四五六日]/i,
|
|
70823
|
+
abbreviated: /^週[一二三四五六日]/i,
|
|
70824
|
+
wide: /^星期[一二三四五六日]/i
|
|
70825
|
+
};
|
|
70826
|
+
var parseDayPatterns = {
|
|
70827
|
+
any: [
|
|
70828
|
+
/日/i,
|
|
70829
|
+
/一/i,
|
|
70830
|
+
/二/i,
|
|
70831
|
+
/三/i,
|
|
70832
|
+
/四/i,
|
|
70833
|
+
/五/i,
|
|
70834
|
+
/六/i
|
|
70835
|
+
]
|
|
70836
|
+
};
|
|
70837
|
+
var matchDayPeriodPatterns = {
|
|
70838
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i
|
|
70839
|
+
};
|
|
70840
|
+
var parseDayPeriodPatterns = {
|
|
70841
|
+
any: {
|
|
70842
|
+
am: /^上午?/i,
|
|
70843
|
+
pm: /^下午?/i,
|
|
70844
|
+
midnight: /^午夜/i,
|
|
70845
|
+
noon: /^[中正]午/i,
|
|
70846
|
+
morning: /^早上/i,
|
|
70847
|
+
afternoon: /^下午/i,
|
|
70848
|
+
evening: /^晚上?/i,
|
|
70849
|
+
night: /^凌晨/i
|
|
70850
|
+
}
|
|
70851
|
+
};
|
|
70852
|
+
var match = {
|
|
70853
|
+
ordinalNumber: (0, _index2.default)({
|
|
70854
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
70855
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
70856
|
+
valueCallback: function valueCallback(value) {
|
|
70857
|
+
return parseInt(value, 10);
|
|
70858
|
+
}
|
|
70859
|
+
}),
|
|
70860
|
+
era: (0, _index.default)({
|
|
70861
|
+
matchPatterns: matchEraPatterns,
|
|
70862
|
+
defaultMatchWidth: "wide",
|
|
70863
|
+
parsePatterns: parseEraPatterns,
|
|
70864
|
+
defaultParseWidth: "any"
|
|
70865
|
+
}),
|
|
70866
|
+
quarter: (0, _index.default)({
|
|
70867
|
+
matchPatterns: matchQuarterPatterns,
|
|
70868
|
+
defaultMatchWidth: "wide",
|
|
70869
|
+
parsePatterns: parseQuarterPatterns,
|
|
70870
|
+
defaultParseWidth: "any",
|
|
70871
|
+
valueCallback: function valueCallback(index) {
|
|
70872
|
+
return index + 1;
|
|
70873
|
+
}
|
|
70874
|
+
}),
|
|
70875
|
+
month: (0, _index.default)({
|
|
70876
|
+
matchPatterns: matchMonthPatterns,
|
|
70877
|
+
defaultMatchWidth: "wide",
|
|
70878
|
+
parsePatterns: parseMonthPatterns,
|
|
70879
|
+
defaultParseWidth: "any"
|
|
70880
|
+
}),
|
|
70881
|
+
day: (0, _index.default)({
|
|
70882
|
+
matchPatterns: matchDayPatterns,
|
|
70883
|
+
defaultMatchWidth: "wide",
|
|
70884
|
+
parsePatterns: parseDayPatterns,
|
|
70885
|
+
defaultParseWidth: "any"
|
|
70886
|
+
}),
|
|
70887
|
+
dayPeriod: (0, _index.default)({
|
|
70888
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
70889
|
+
defaultMatchWidth: "any",
|
|
70890
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
70891
|
+
defaultParseWidth: "any"
|
|
70892
|
+
})
|
|
70893
|
+
};
|
|
70894
|
+
var _default = match;
|
|
70895
|
+
exports.default = _default;
|
|
70896
|
+
module.exports = exports.default;
|
|
70897
|
+
}(match, match.exports));
|
|
70898
|
+
|
|
70899
|
+
(function (module, exports) {
|
|
70900
|
+
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
70901
|
+
Object.defineProperty(exports, "__esModule", {
|
|
70902
|
+
value: true
|
|
70903
|
+
});
|
|
70904
|
+
exports.default = void 0;
|
|
70905
|
+
var _index = _interopRequireDefault(formatDistance.exports);
|
|
70906
|
+
var _index2 = _interopRequireDefault(formatLong.exports);
|
|
70907
|
+
var _index3 = _interopRequireDefault(formatRelative.exports);
|
|
70908
|
+
var _index4 = _interopRequireDefault(localize.exports);
|
|
70909
|
+
var _index5 = _interopRequireDefault(match.exports);
|
|
70910
|
+
/**
|
|
70911
|
+
* @type {Locale}
|
|
70912
|
+
* @category Locales
|
|
70913
|
+
* @summary Chinese Traditional locale.
|
|
70914
|
+
* @language Chinese Traditional
|
|
70915
|
+
* @iso-639-2 zho
|
|
70916
|
+
* @author tonypai [@tpai]{@link https://github.com/tpai}
|
|
70917
|
+
* @author Jack Hsu [@jackhsu978]{@link https://github.com/jackhsu978}
|
|
70918
|
+
* @author Terrence Lam [@skyuplam]{@link https://github.com/skyuplam}
|
|
70919
|
+
*/ var locale = {
|
|
70920
|
+
code: "zh-TW",
|
|
70921
|
+
formatDistance: _index.default,
|
|
70922
|
+
formatLong: _index2.default,
|
|
70923
|
+
formatRelative: _index3.default,
|
|
70924
|
+
localize: _index4.default,
|
|
70925
|
+
match: _index5.default,
|
|
70926
|
+
options: {
|
|
70927
|
+
weekStartsOn: 1 /* Monday */ ,
|
|
70928
|
+
firstWeekContainsDate: 4
|
|
70929
|
+
}
|
|
70930
|
+
};
|
|
70931
|
+
var _default = locale;
|
|
70932
|
+
exports.default = _default;
|
|
70933
|
+
module.exports = exports.default;
|
|
70934
|
+
}(zhTW$1, zhTW$1.exports));
|
|
70935
|
+
|
|
70936
|
+
var zhTW = /*@__PURE__*/getDefaultExportFromCjs(zhTW$1.exports);
|
|
70937
|
+
|
|
70938
|
+
function _define_property$1(obj, key, value) {
|
|
70939
|
+
if (key in obj) {
|
|
70940
|
+
Object.defineProperty(obj, key, {
|
|
70941
|
+
value: value,
|
|
70942
|
+
enumerable: true,
|
|
70943
|
+
configurable: true,
|
|
70944
|
+
writable: true
|
|
70945
|
+
});
|
|
70946
|
+
} else {
|
|
70947
|
+
obj[key] = value;
|
|
70948
|
+
}
|
|
70949
|
+
return obj;
|
|
70950
|
+
}
|
|
70951
|
+
function _extends() {
|
|
70952
|
+
_extends = Object.assign || function(target) {
|
|
70953
|
+
for(var i = 1; i < arguments.length; i++){
|
|
70954
|
+
var source = arguments[i];
|
|
70955
|
+
for(var key in source){
|
|
70956
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
70957
|
+
target[key] = source[key];
|
|
70958
|
+
}
|
|
70959
|
+
}
|
|
70960
|
+
}
|
|
70961
|
+
return target;
|
|
70962
|
+
};
|
|
70963
|
+
return _extends.apply(this, arguments);
|
|
70964
|
+
}
|
|
70965
|
+
function _object_destructuring_empty(o) {
|
|
70966
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
70967
|
+
return o;
|
|
70968
|
+
}
|
|
70969
|
+
function _object_spread$1(target) {
|
|
70970
|
+
for(var i = 1; i < arguments.length; i++){
|
|
70971
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
70972
|
+
var ownKeys = Object.keys(source);
|
|
70973
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
70974
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
70975
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
70976
|
+
}));
|
|
70977
|
+
}
|
|
70978
|
+
ownKeys.forEach(function(key) {
|
|
70979
|
+
_define_property$1(target, key, source[key]);
|
|
70980
|
+
});
|
|
70981
|
+
}
|
|
70982
|
+
return target;
|
|
70983
|
+
}
|
|
70984
|
+
function ownKeys(object, enumerableOnly) {
|
|
70985
|
+
var keys = Object.keys(object);
|
|
70986
|
+
if (Object.getOwnPropertySymbols) {
|
|
70987
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
70988
|
+
if (enumerableOnly) {
|
|
70989
|
+
symbols = symbols.filter(function(sym) {
|
|
70990
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
70991
|
+
});
|
|
70992
|
+
}
|
|
70993
|
+
keys.push.apply(keys, symbols);
|
|
70994
|
+
}
|
|
70995
|
+
return keys;
|
|
70996
|
+
}
|
|
70997
|
+
function _object_spread_props(target, source) {
|
|
70998
|
+
source = source != null ? source : {};
|
|
70999
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
71000
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
71001
|
+
} else {
|
|
71002
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
71003
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
71004
|
+
});
|
|
71005
|
+
}
|
|
71006
|
+
return target;
|
|
71007
|
+
}
|
|
71008
|
+
function _object_without_properties$1(source, excluded) {
|
|
71009
|
+
if (source == null) return {};
|
|
71010
|
+
var target = _object_without_properties_loose$1(source, excluded);
|
|
71011
|
+
var key, i;
|
|
71012
|
+
if (Object.getOwnPropertySymbols) {
|
|
71013
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
71014
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
71015
|
+
key = sourceSymbolKeys[i];
|
|
71016
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
71017
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
71018
|
+
target[key] = source[key];
|
|
71019
|
+
}
|
|
71020
|
+
}
|
|
71021
|
+
return target;
|
|
71022
|
+
}
|
|
71023
|
+
function _object_without_properties_loose$1(source, excluded) {
|
|
71024
|
+
if (source == null) return {};
|
|
71025
|
+
var target = {};
|
|
71026
|
+
var sourceKeys = Object.keys(source);
|
|
71027
|
+
var key, i;
|
|
71028
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
71029
|
+
key = sourceKeys[i];
|
|
71030
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
71031
|
+
target[key] = source[key];
|
|
71032
|
+
}
|
|
71033
|
+
return target;
|
|
71034
|
+
}
|
|
71035
|
+
function Calendar(_param) {
|
|
71036
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties$1(_param, [
|
|
71037
|
+
"className",
|
|
71038
|
+
"classNames",
|
|
71039
|
+
"showOutsideDays"
|
|
71040
|
+
]);
|
|
71041
|
+
return /*#__PURE__*/ jsx(DayPicker, _object_spread_props(_object_spread$1({
|
|
71042
|
+
showOutsideDays: showOutsideDays,
|
|
71043
|
+
className: cn("p-3", className),
|
|
71044
|
+
classNames: _object_spread$1({
|
|
71045
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
71046
|
+
month: "space-y-4",
|
|
71047
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
71048
|
+
caption_label: "text-sm font-medium",
|
|
71049
|
+
nav: "space-x-1 flex items-center",
|
|
71050
|
+
nav_button: cn(buttonVariants({
|
|
71051
|
+
variant: "outline"
|
|
71052
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
71053
|
+
nav_button_previous: "absolute left-1",
|
|
71054
|
+
nav_button_next: "absolute right-1",
|
|
71055
|
+
table: "w-full border-collapse space-y-1",
|
|
71056
|
+
head_row: "flex",
|
|
71057
|
+
head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
71058
|
+
row: "flex w-full mt-2",
|
|
71059
|
+
cell: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
|
|
71060
|
+
day: cn(buttonVariants({
|
|
71061
|
+
variant: "ghost"
|
|
71062
|
+
}), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
|
|
71063
|
+
day_range_start: "day-range-start",
|
|
71064
|
+
day_range_end: "day-range-end",
|
|
71065
|
+
day_selected: "bg-[#000] text-[#fff] hover:bg-[#000] hover:text-[#fff] focus:bg-[#000] focus:text-[#fff]",
|
|
71066
|
+
day_today: "bg-accent text-accent-foreground",
|
|
71067
|
+
day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
71068
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
71069
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
71070
|
+
day_hidden: "invisible"
|
|
71071
|
+
}, classNames),
|
|
71072
|
+
components: {
|
|
71073
|
+
IconLeft: function(_param) {
|
|
71074
|
+
_extends({}, _object_destructuring_empty(_param));
|
|
71075
|
+
return /*#__PURE__*/ jsx(Icon, {
|
|
71076
|
+
icon: "heroicons-solid:arrow-left",
|
|
71077
|
+
width: "1rem",
|
|
71078
|
+
height: "1rem"
|
|
71079
|
+
});
|
|
71080
|
+
},
|
|
71081
|
+
IconRight: function(_param) {
|
|
71082
|
+
_extends({}, _object_destructuring_empty(_param));
|
|
71083
|
+
return /*#__PURE__*/ jsx(Icon, {
|
|
71084
|
+
icon: "heroicons-solid:arrow-right",
|
|
71085
|
+
width: "1rem",
|
|
71086
|
+
height: "1rem"
|
|
71087
|
+
});
|
|
71088
|
+
}
|
|
71089
|
+
}
|
|
71090
|
+
}, props), {
|
|
71091
|
+
locale: zhTW
|
|
71092
|
+
}));
|
|
71093
|
+
}
|
|
71094
|
+
Calendar.displayName = "Calendar";
|
|
71095
|
+
|
|
71096
|
+
function _define_property(obj, key, value) {
|
|
71097
|
+
if (key in obj) {
|
|
71098
|
+
Object.defineProperty(obj, key, {
|
|
71099
|
+
value: value,
|
|
71100
|
+
enumerable: true,
|
|
71101
|
+
configurable: true,
|
|
71102
|
+
writable: true
|
|
71103
|
+
});
|
|
71104
|
+
} else {
|
|
71105
|
+
obj[key] = value;
|
|
71106
|
+
}
|
|
71107
|
+
return obj;
|
|
71108
|
+
}
|
|
71109
|
+
function _object_spread(target) {
|
|
71110
|
+
for(var i = 1; i < arguments.length; i++){
|
|
71111
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
71112
|
+
var ownKeys = Object.keys(source);
|
|
71113
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
71114
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
71115
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
71116
|
+
}));
|
|
71117
|
+
}
|
|
71118
|
+
ownKeys.forEach(function(key) {
|
|
71119
|
+
_define_property(target, key, source[key]);
|
|
71120
|
+
});
|
|
71121
|
+
}
|
|
71122
|
+
return target;
|
|
71123
|
+
}
|
|
71124
|
+
function _object_without_properties(source, excluded) {
|
|
71125
|
+
if (source == null) return {};
|
|
71126
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
71127
|
+
var key, i;
|
|
71128
|
+
if (Object.getOwnPropertySymbols) {
|
|
71129
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
71130
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
71131
|
+
key = sourceSymbolKeys[i];
|
|
71132
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
71133
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
71134
|
+
target[key] = source[key];
|
|
71135
|
+
}
|
|
71136
|
+
}
|
|
71137
|
+
return target;
|
|
71138
|
+
}
|
|
71139
|
+
function _object_without_properties_loose(source, excluded) {
|
|
71140
|
+
if (source == null) return {};
|
|
71141
|
+
var target = {};
|
|
71142
|
+
var sourceKeys = Object.keys(source);
|
|
71143
|
+
var key, i;
|
|
71144
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
71145
|
+
key = sourceKeys[i];
|
|
71146
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
71147
|
+
target[key] = source[key];
|
|
71148
|
+
}
|
|
71149
|
+
return target;
|
|
71150
|
+
}
|
|
71151
|
+
var Popover = PopoverPrimitive.Root;
|
|
71152
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
71153
|
+
var PopoverContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
71154
|
+
var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
71155
|
+
"className",
|
|
71156
|
+
"align",
|
|
71157
|
+
"sideOffset"
|
|
71158
|
+
]);
|
|
71159
|
+
return /*#__PURE__*/ jsx(PopoverPrimitive.Portal, {
|
|
71160
|
+
children: /*#__PURE__*/ jsx(PopoverPrimitive.Content, _object_spread({
|
|
71161
|
+
ref: ref,
|
|
71162
|
+
align: align,
|
|
71163
|
+
sideOffset: sideOffset,
|
|
71164
|
+
className: cn("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", className)
|
|
71165
|
+
}, props))
|
|
71166
|
+
});
|
|
71167
|
+
});
|
|
71168
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
71169
|
+
|
|
71170
|
+
function DateRangePicker(param) {
|
|
71171
|
+
var className = param.className, inputClassName = param.inputClassName, disable = param.disable, _param_isShowCleanBtn = param.isShowCleanBtn, isShowCleanBtn = _param_isShowCleanBtn === void 0 ? true : _param_isShowCleanBtn, onChange = param.onChange, dates = param.dates, setDates = param.setDates;
|
|
71172
|
+
var handleDateChange = function(newDate) {
|
|
71173
|
+
if (newDate) {
|
|
71174
|
+
setDates(newDate);
|
|
71175
|
+
if (onChange) onChange(newDate);
|
|
71176
|
+
}
|
|
71177
|
+
};
|
|
71178
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
71179
|
+
className: "flex gap-2 items-center",
|
|
71180
|
+
children: [
|
|
71181
|
+
/*#__PURE__*/ jsx("div", {
|
|
71182
|
+
className: cn("grid gap-2", className, disable ? "pointer-events-none opacity-55" : "pointer-events-auto opacity-100"),
|
|
71183
|
+
children: /*#__PURE__*/ jsxs(Popover, {
|
|
71184
|
+
children: [
|
|
71185
|
+
/*#__PURE__*/ jsx(PopoverTrigger, {
|
|
71186
|
+
asChild: true,
|
|
71187
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
71188
|
+
id: "date",
|
|
71189
|
+
variant: "outline",
|
|
71190
|
+
className: cn("w-[300px] justify-start text-left font-normal", !dates && "text-muted-foreground", inputClassName),
|
|
71191
|
+
children: [
|
|
71192
|
+
/*#__PURE__*/ jsx(Calendar$1, {
|
|
71193
|
+
className: "mr-2 h-4 w-4"
|
|
71194
|
+
}),
|
|
71195
|
+
(dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxs(Fragment$1, {
|
|
71196
|
+
children: [
|
|
71197
|
+
format(dates.from, "yyyy-MM-dd"),
|
|
71198
|
+
" -",
|
|
71199
|
+
" ",
|
|
71200
|
+
format(dates.to, "yyyy-MM-dd")
|
|
71201
|
+
]
|
|
71202
|
+
}) : format(dates.from, "yyyy-MM-dd") : /*#__PURE__*/ jsx("span", {
|
|
71203
|
+
children: "請選擇日期"
|
|
71204
|
+
})
|
|
71205
|
+
]
|
|
71206
|
+
})
|
|
71207
|
+
}),
|
|
71208
|
+
/*#__PURE__*/ jsx(PopoverContent, {
|
|
71209
|
+
className: "w-auto p-0",
|
|
71210
|
+
align: "start",
|
|
71211
|
+
children: /*#__PURE__*/ jsx(Calendar, {
|
|
71212
|
+
initialFocus: true,
|
|
71213
|
+
mode: "range",
|
|
71214
|
+
defaultMonth: dates === null || dates === void 0 ? void 0 : dates.from,
|
|
71215
|
+
selected: dates,
|
|
71216
|
+
onSelect: handleDateChange,
|
|
71217
|
+
numberOfMonths: 2
|
|
71218
|
+
})
|
|
71219
|
+
})
|
|
71220
|
+
]
|
|
71221
|
+
})
|
|
71222
|
+
}),
|
|
71223
|
+
isShowCleanBtn && /*#__PURE__*/ jsx(Button, {
|
|
71224
|
+
variant: "ghost",
|
|
71225
|
+
className: cn("justify-start text-left font-normal"),
|
|
71226
|
+
onClick: function() {
|
|
71227
|
+
return setDates(undefined);
|
|
71228
|
+
},
|
|
71229
|
+
children: "清除日期"
|
|
71230
|
+
})
|
|
71231
|
+
]
|
|
71232
|
+
});
|
|
71233
|
+
}
|
|
71234
|
+
|
|
70088
71235
|
function _array_like_to_array(arr, len) {
|
|
70089
71236
|
if (len == null || len > arr.length) len = arr.length;
|
|
70090
71237
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -70174,9 +71321,9 @@ var ReactDateRange = function(param) {
|
|
|
70174
71321
|
var formatDates = function() {
|
|
70175
71322
|
if (!range) return;
|
|
70176
71323
|
var startDate = range.startDate, endDate = range.endDate;
|
|
70177
|
-
return "".concat(format(startDate, "yyyy-MM-dd"), " ~ ").concat(format(endDate, "yyyy-MM-dd"));
|
|
71324
|
+
return "".concat(format$1(startDate, "yyyy-MM-dd"), " ~ ").concat(format$1(endDate, "yyyy-MM-dd"));
|
|
70178
71325
|
};
|
|
70179
|
-
var formatDate = calendarData ? format(calendarData, (item === null || item === void 0 ? void 0 : item.dateDisplayFormat) || "yyyy-MM-dd") : "";
|
|
71326
|
+
var formatDate = calendarData ? format$1(calendarData, (item === null || item === void 0 ? void 0 : item.dateDisplayFormat) || "yyyy-MM-dd") : "";
|
|
70180
71327
|
return /*#__PURE__*/ jsxs("div", {
|
|
70181
71328
|
className: [
|
|
70182
71329
|
className,
|
|
@@ -70203,7 +71350,7 @@ var ReactDateRange = function(param) {
|
|
|
70203
71350
|
className: "absolute top-[72px] left-0 z-50 shadow-md",
|
|
70204
71351
|
ref: refOne,
|
|
70205
71352
|
children: [
|
|
70206
|
-
open && (item === null || item === void 0 ? void 0 : item.type) === "date" && /*#__PURE__*/ jsx(Calendar, {
|
|
71353
|
+
open && (item === null || item === void 0 ? void 0 : item.type) === "date" && /*#__PURE__*/ jsx(Calendar$2, {
|
|
70207
71354
|
data: calendarData,
|
|
70208
71355
|
locale: locales[locale],
|
|
70209
71356
|
dateDisplayFormat: item === null || item === void 0 ? void 0 : item.dateDisplayFormat,
|
|
@@ -70231,4 +71378,4 @@ var ReactDateRange = function(param) {
|
|
|
70231
71378
|
});
|
|
70232
71379
|
};
|
|
70233
71380
|
|
|
70234
|
-
export { CkEditor, CustomUpload, DropImage, ReactDateRange, Spin, Switch, UiLibrary };
|
|
71381
|
+
export { CkEditor, CustomUpload, DateRangePicker, DropImage, ReactDateRange, Spin, Switch, UiLibrary };
|