@vlrc-fe/components 1.0.7 → 1.0.8
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/MultiSelect/type.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +64 -41
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +46 -80
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +22 -60
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +1147 -43
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +30 -64
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +31 -147
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +93 -19
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +80 -25
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +9 -50
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +30 -156
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +350 -14
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +11 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +55 -60
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +430 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +36 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +28 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +14 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +156 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +19 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +67 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +118 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +36 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +13 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +44 -121
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +31 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +37 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +123 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +44 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +43 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +14 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +64 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +23 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +34 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +27 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +30 -12
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +26 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +157 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +34 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +46 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +142 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +125 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +26 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +88 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +221 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +166 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +8 -12
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +126 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +15 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +9 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +17 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +22 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +18 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +6 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +7 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +8 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +7 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +12 -112
- package/dist/index150.cjs +1 -0
- package/dist/index150.js +7 -0
- package/dist/index151.cjs +1 -0
- package/dist/index151.js +9 -0
- package/dist/index152.cjs +1 -0
- package/dist/index152.js +69 -0
- package/dist/index153.cjs +1 -0
- package/dist/index153.js +11 -0
- package/dist/index154.cjs +1 -0
- package/dist/index154.js +202 -0
- package/dist/index155.cjs +1 -0
- package/dist/index155.js +124 -0
- package/dist/index156.cjs +1 -0
- package/dist/index156.js +32 -0
- package/dist/index157.cjs +1 -0
- package/dist/index157.js +20 -0
- package/dist/index158.cjs +1 -0
- package/dist/index158.js +69 -0
- package/dist/index159.cjs +1 -0
- package/dist/index159.js +32 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +4 -726
- package/dist/index160.cjs +1 -0
- package/dist/index160.js +11 -0
- package/dist/index161.cjs +1 -0
- package/dist/index161.js +280 -0
- package/dist/index162.cjs +1 -0
- package/dist/index162.js +157 -0
- package/dist/index163.cjs +1 -0
- package/dist/index163.js +20 -0
- package/dist/index164.cjs +1 -0
- package/dist/index164.js +10 -0
- package/dist/index165.cjs +1 -0
- package/dist/index165.js +14 -0
- package/dist/index166.cjs +1 -0
- package/dist/index166.js +8 -0
- package/dist/index167.cjs +1 -0
- package/dist/index167.js +8 -0
- package/dist/index168.cjs +1 -0
- package/dist/index168.js +11 -0
- package/dist/index169.cjs +1 -0
- package/dist/index169.js +10 -0
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +79 -339
- package/dist/index170.cjs +1 -0
- package/dist/index170.js +6 -0
- package/dist/index171.cjs +1 -0
- package/dist/index171.js +8 -0
- package/dist/index172.cjs +1 -0
- package/dist/index172.js +8 -0
- package/dist/index173.cjs +1 -0
- package/dist/index173.js +10 -0
- package/dist/index174.cjs +1 -0
- package/dist/index174.js +11 -0
- package/dist/index175.cjs +1 -0
- package/dist/index175.js +15 -0
- package/dist/index176.cjs +1 -0
- package/dist/index176.js +11 -0
- package/dist/index177.cjs +1 -0
- package/dist/index177.js +11 -0
- package/dist/index178.cjs +1 -0
- package/dist/index178.js +6 -0
- package/dist/index179.cjs +1 -0
- package/dist/index179.js +43 -0
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +19 -66
- package/dist/index180.cjs +1 -0
- package/dist/index180.js +382 -0
- package/dist/index181.cjs +1 -0
- package/dist/index181.js +40 -0
- package/dist/index182.cjs +1 -0
- package/dist/index182.js +23 -0
- package/dist/index183.cjs +1 -0
- package/dist/index183.js +59 -0
- package/dist/index184.cjs +1 -0
- package/dist/index184.js +55 -0
- package/dist/index185.cjs +1 -0
- package/dist/index185.js +54 -0
- package/dist/index186.cjs +1 -0
- package/dist/index186.js +57 -0
- package/dist/index187.cjs +1 -0
- package/dist/index187.js +57 -0
- package/dist/index188.cjs +1 -0
- package/dist/index188.js +88 -0
- package/dist/index189.cjs +1 -0
- package/dist/index189.js +66 -0
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -8
- package/dist/index190.cjs +1 -0
- package/dist/index190.js +594 -0
- package/dist/index191.cjs +9 -0
- package/dist/index191.js +30 -0
- package/dist/index192.cjs +1 -0
- package/dist/index192.js +50 -0
- package/dist/index193.cjs +1 -0
- package/dist/index193.js +65 -0
- package/dist/index194.cjs +1 -0
- package/dist/index194.js +48 -0
- package/dist/index195.cjs +1 -0
- package/dist/index195.js +67 -0
- package/dist/index196.cjs +1 -0
- package/dist/index196.js +151 -0
- package/dist/index197.cjs +1 -0
- package/dist/index197.js +23 -0
- package/dist/index198.cjs +1 -0
- package/dist/index198.js +27 -0
- package/dist/index199.cjs +1 -0
- package/dist/index199.js +53 -0
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +51 -98
- package/dist/index200.cjs +1 -0
- package/dist/index200.js +161 -0
- package/dist/index201.cjs +1 -0
- package/dist/index201.js +16 -0
- package/dist/index202.cjs +1 -0
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +81 -28
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +64 -14
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +25 -22
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1014 -33
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +22 -96
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +108 -25
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +15 -9
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +20 -66
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +81 -11
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +91 -29
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +14 -41
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +93 -12
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +22 -62
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +84 -22
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +85 -33
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +407 -25
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +170 -25
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +28 -154
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +158 -33
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +104 -45
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +337 -140
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +96 -124
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +319 -23
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +205 -81
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +33 -220
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +161 -163
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +20 -125
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +24 -14
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +167 -7
- package/dist/index5.js +26 -14
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +44 -15
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +15 -18
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +3 -17
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +5 -5
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +19 -4
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +24 -6
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +66 -4
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +14 -5
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +4 -8
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +50 -67
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +85 -46
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +6 -10
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +25 -199
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +13 -122
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -30
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +3 -20
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +24 -66
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +68 -30
- package/dist/index67.cjs +38 -1
- package/dist/index67.js +3 -11
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +12 -279
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +50 -155
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +29 -85
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +115 -19
- package/dist/index71.cjs +4 -1
- package/dist/index71.js +6 -9
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +12 -12
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +539 -6
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +197 -6
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +120 -9
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +912 -8
- package/dist/index77.cjs +3 -1
- package/dist/index77.js +76 -4
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +120 -6
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +12 -6
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +35 -62
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +14 -8
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +113 -9
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +725 -13
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +346 -9
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +74 -9
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +148 -4
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +31 -42
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +12 -380
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +345 -37
- package/dist/index89.cjs +20 -1
- package/dist/index89.js +40 -18
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +85 -17
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +113 -56
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +272 -51
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +129 -50
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +13 -54
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +28 -55
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +525 -80
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +75 -61
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +67 -583
- package/dist/index98.cjs +1 -9
- package/dist/index98.js +32 -27
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +17 -49
- package/dist/ui/alert-dialog.d.ts +15 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert.d.ts +10 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/avatar.d.ts +7 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/breadcrumb.d.ts +12 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/carousel.d.ts +20 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/context-menu.d.ts +26 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/drawer.d.ts +14 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/index.d.ts +23 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/input-otp.d.ts +12 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/menubar.d.ts +27 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/pagination.d.ts +14 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/resizable.d.ts +9 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/sheet.d.ts +14 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sidebar.d.ts +70 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/toggle-group.d.ts +8 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle.d.ts +10 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/package.json +23 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index143.cjs");var t={date:e.buildFormatLongFn({formats:{full:`EEEE, 'ngày' d MMMM 'năm' y`,long:`'ngày' d MMMM 'năm' y`,medium:`d MMM 'năm' y`,short:`dd/MM/y`},defaultWidth:`full`}),time:e.buildFormatLongFn({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:e.buildFormatLongFn({formats:{full:`{{date}} {{time}}`,long:`{{date}} {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})};exports.formatLong=t;
|
package/dist/index160.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/vi/_lib/formatRelative.js
|
|
2
|
+
var e = {
|
|
3
|
+
lastWeek: "eeee 'tuần trước vào lúc' p",
|
|
4
|
+
yesterday: "'hôm qua vào lúc' p",
|
|
5
|
+
today: "'hôm nay vào lúc' p",
|
|
6
|
+
tomorrow: "'ngày mai vào lúc' p",
|
|
7
|
+
nextWeek: "eeee 'tới vào lúc' p",
|
|
8
|
+
other: "P"
|
|
9
|
+
}, t = (t, n, r, i) => e[t];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as formatRelative };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={lastWeek:`eeee 'tuần trước vào lúc' p`,yesterday:`'hôm qua vào lúc' p`,today:`'hôm nay vào lúc' p`,tomorrow:`'ngày mai vào lúc' p`,nextWeek:`eeee 'tới vào lúc' p`,other:`P`},t=(t,n,r,i)=>e[t];exports.formatRelative=t;
|
package/dist/index161.js
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { buildLocalizeFn as e } from "./index143.js";
|
|
2
|
+
var t = {
|
|
3
|
+
ordinalNumber: (e, t) => {
|
|
4
|
+
let n = Number(e), r = t?.unit;
|
|
5
|
+
if (r === "quarter") switch (n) {
|
|
6
|
+
case 1: return "I";
|
|
7
|
+
case 2: return "II";
|
|
8
|
+
case 3: return "III";
|
|
9
|
+
case 4: return "IV";
|
|
10
|
+
}
|
|
11
|
+
else if (r === "day") switch (n) {
|
|
12
|
+
case 1: return "thứ 2";
|
|
13
|
+
case 2: return "thứ 3";
|
|
14
|
+
case 3: return "thứ 4";
|
|
15
|
+
case 4: return "thứ 5";
|
|
16
|
+
case 5: return "thứ 6";
|
|
17
|
+
case 6: return "thứ 7";
|
|
18
|
+
case 7: return "chủ nhật";
|
|
19
|
+
}
|
|
20
|
+
else if (r === "week") return n === 1 ? "thứ nhất" : "thứ " + n;
|
|
21
|
+
else if (r === "dayOfYear") return n === 1 ? "đầu tiên" : "thứ " + n;
|
|
22
|
+
return String(n);
|
|
23
|
+
},
|
|
24
|
+
era: e({
|
|
25
|
+
values: {
|
|
26
|
+
narrow: ["TCN", "SCN"],
|
|
27
|
+
abbreviated: ["trước CN", "sau CN"],
|
|
28
|
+
wide: ["trước Công Nguyên", "sau Công Nguyên"]
|
|
29
|
+
},
|
|
30
|
+
defaultWidth: "wide"
|
|
31
|
+
}),
|
|
32
|
+
quarter: e({
|
|
33
|
+
values: {
|
|
34
|
+
narrow: [
|
|
35
|
+
"1",
|
|
36
|
+
"2",
|
|
37
|
+
"3",
|
|
38
|
+
"4"
|
|
39
|
+
],
|
|
40
|
+
abbreviated: [
|
|
41
|
+
"Q1",
|
|
42
|
+
"Q2",
|
|
43
|
+
"Q3",
|
|
44
|
+
"Q4"
|
|
45
|
+
],
|
|
46
|
+
wide: [
|
|
47
|
+
"Quý 1",
|
|
48
|
+
"Quý 2",
|
|
49
|
+
"Quý 3",
|
|
50
|
+
"Quý 4"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
defaultWidth: "wide",
|
|
54
|
+
formattingValues: {
|
|
55
|
+
narrow: [
|
|
56
|
+
"1",
|
|
57
|
+
"2",
|
|
58
|
+
"3",
|
|
59
|
+
"4"
|
|
60
|
+
],
|
|
61
|
+
abbreviated: [
|
|
62
|
+
"Q1",
|
|
63
|
+
"Q2",
|
|
64
|
+
"Q3",
|
|
65
|
+
"Q4"
|
|
66
|
+
],
|
|
67
|
+
wide: [
|
|
68
|
+
"quý I",
|
|
69
|
+
"quý II",
|
|
70
|
+
"quý III",
|
|
71
|
+
"quý IV"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
defaultFormattingWidth: "wide",
|
|
75
|
+
argumentCallback: (e) => e - 1
|
|
76
|
+
}),
|
|
77
|
+
month: e({
|
|
78
|
+
values: {
|
|
79
|
+
narrow: [
|
|
80
|
+
"1",
|
|
81
|
+
"2",
|
|
82
|
+
"3",
|
|
83
|
+
"4",
|
|
84
|
+
"5",
|
|
85
|
+
"6",
|
|
86
|
+
"7",
|
|
87
|
+
"8",
|
|
88
|
+
"9",
|
|
89
|
+
"10",
|
|
90
|
+
"11",
|
|
91
|
+
"12"
|
|
92
|
+
],
|
|
93
|
+
abbreviated: [
|
|
94
|
+
"Thg 1",
|
|
95
|
+
"Thg 2",
|
|
96
|
+
"Thg 3",
|
|
97
|
+
"Thg 4",
|
|
98
|
+
"Thg 5",
|
|
99
|
+
"Thg 6",
|
|
100
|
+
"Thg 7",
|
|
101
|
+
"Thg 8",
|
|
102
|
+
"Thg 9",
|
|
103
|
+
"Thg 10",
|
|
104
|
+
"Thg 11",
|
|
105
|
+
"Thg 12"
|
|
106
|
+
],
|
|
107
|
+
wide: [
|
|
108
|
+
"Tháng Một",
|
|
109
|
+
"Tháng Hai",
|
|
110
|
+
"Tháng Ba",
|
|
111
|
+
"Tháng Tư",
|
|
112
|
+
"Tháng Năm",
|
|
113
|
+
"Tháng Sáu",
|
|
114
|
+
"Tháng Bảy",
|
|
115
|
+
"Tháng Tám",
|
|
116
|
+
"Tháng Chín",
|
|
117
|
+
"Tháng Mười",
|
|
118
|
+
"Tháng Mười Một",
|
|
119
|
+
"Tháng Mười Hai"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
defaultWidth: "wide",
|
|
123
|
+
formattingValues: {
|
|
124
|
+
narrow: [
|
|
125
|
+
"01",
|
|
126
|
+
"02",
|
|
127
|
+
"03",
|
|
128
|
+
"04",
|
|
129
|
+
"05",
|
|
130
|
+
"06",
|
|
131
|
+
"07",
|
|
132
|
+
"08",
|
|
133
|
+
"09",
|
|
134
|
+
"10",
|
|
135
|
+
"11",
|
|
136
|
+
"12"
|
|
137
|
+
],
|
|
138
|
+
abbreviated: [
|
|
139
|
+
"thg 1",
|
|
140
|
+
"thg 2",
|
|
141
|
+
"thg 3",
|
|
142
|
+
"thg 4",
|
|
143
|
+
"thg 5",
|
|
144
|
+
"thg 6",
|
|
145
|
+
"thg 7",
|
|
146
|
+
"thg 8",
|
|
147
|
+
"thg 9",
|
|
148
|
+
"thg 10",
|
|
149
|
+
"thg 11",
|
|
150
|
+
"thg 12"
|
|
151
|
+
],
|
|
152
|
+
wide: [
|
|
153
|
+
"tháng 01",
|
|
154
|
+
"tháng 02",
|
|
155
|
+
"tháng 03",
|
|
156
|
+
"tháng 04",
|
|
157
|
+
"tháng 05",
|
|
158
|
+
"tháng 06",
|
|
159
|
+
"tháng 07",
|
|
160
|
+
"tháng 08",
|
|
161
|
+
"tháng 09",
|
|
162
|
+
"tháng 10",
|
|
163
|
+
"tháng 11",
|
|
164
|
+
"tháng 12"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
defaultFormattingWidth: "wide"
|
|
168
|
+
}),
|
|
169
|
+
day: e({
|
|
170
|
+
values: {
|
|
171
|
+
narrow: [
|
|
172
|
+
"CN",
|
|
173
|
+
"T2",
|
|
174
|
+
"T3",
|
|
175
|
+
"T4",
|
|
176
|
+
"T5",
|
|
177
|
+
"T6",
|
|
178
|
+
"T7"
|
|
179
|
+
],
|
|
180
|
+
short: [
|
|
181
|
+
"CN",
|
|
182
|
+
"Th 2",
|
|
183
|
+
"Th 3",
|
|
184
|
+
"Th 4",
|
|
185
|
+
"Th 5",
|
|
186
|
+
"Th 6",
|
|
187
|
+
"Th 7"
|
|
188
|
+
],
|
|
189
|
+
abbreviated: [
|
|
190
|
+
"CN",
|
|
191
|
+
"Thứ 2",
|
|
192
|
+
"Thứ 3",
|
|
193
|
+
"Thứ 4",
|
|
194
|
+
"Thứ 5",
|
|
195
|
+
"Thứ 6",
|
|
196
|
+
"Thứ 7"
|
|
197
|
+
],
|
|
198
|
+
wide: [
|
|
199
|
+
"Chủ Nhật",
|
|
200
|
+
"Thứ Hai",
|
|
201
|
+
"Thứ Ba",
|
|
202
|
+
"Thứ Tư",
|
|
203
|
+
"Thứ Năm",
|
|
204
|
+
"Thứ Sáu",
|
|
205
|
+
"Thứ Bảy"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
defaultWidth: "wide"
|
|
209
|
+
}),
|
|
210
|
+
dayPeriod: e({
|
|
211
|
+
values: {
|
|
212
|
+
narrow: {
|
|
213
|
+
am: "am",
|
|
214
|
+
pm: "pm",
|
|
215
|
+
midnight: "nửa đêm",
|
|
216
|
+
noon: "tr",
|
|
217
|
+
morning: "sg",
|
|
218
|
+
afternoon: "ch",
|
|
219
|
+
evening: "tối",
|
|
220
|
+
night: "đêm"
|
|
221
|
+
},
|
|
222
|
+
abbreviated: {
|
|
223
|
+
am: "AM",
|
|
224
|
+
pm: "PM",
|
|
225
|
+
midnight: "nửa đêm",
|
|
226
|
+
noon: "trưa",
|
|
227
|
+
morning: "sáng",
|
|
228
|
+
afternoon: "chiều",
|
|
229
|
+
evening: "tối",
|
|
230
|
+
night: "đêm"
|
|
231
|
+
},
|
|
232
|
+
wide: {
|
|
233
|
+
am: "SA",
|
|
234
|
+
pm: "CH",
|
|
235
|
+
midnight: "nửa đêm",
|
|
236
|
+
noon: "trưa",
|
|
237
|
+
morning: "sáng",
|
|
238
|
+
afternoon: "chiều",
|
|
239
|
+
evening: "tối",
|
|
240
|
+
night: "đêm"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
defaultWidth: "wide",
|
|
244
|
+
formattingValues: {
|
|
245
|
+
narrow: {
|
|
246
|
+
am: "am",
|
|
247
|
+
pm: "pm",
|
|
248
|
+
midnight: "nửa đêm",
|
|
249
|
+
noon: "tr",
|
|
250
|
+
morning: "sg",
|
|
251
|
+
afternoon: "ch",
|
|
252
|
+
evening: "tối",
|
|
253
|
+
night: "đêm"
|
|
254
|
+
},
|
|
255
|
+
abbreviated: {
|
|
256
|
+
am: "AM",
|
|
257
|
+
pm: "PM",
|
|
258
|
+
midnight: "nửa đêm",
|
|
259
|
+
noon: "trưa",
|
|
260
|
+
morning: "sáng",
|
|
261
|
+
afternoon: "chiều",
|
|
262
|
+
evening: "tối",
|
|
263
|
+
night: "đêm"
|
|
264
|
+
},
|
|
265
|
+
wide: {
|
|
266
|
+
am: "SA",
|
|
267
|
+
pm: "CH",
|
|
268
|
+
midnight: "nửa đêm",
|
|
269
|
+
noon: "giữa trưa",
|
|
270
|
+
morning: "vào buổi sáng",
|
|
271
|
+
afternoon: "vào buổi chiều",
|
|
272
|
+
evening: "vào buổi tối",
|
|
273
|
+
night: "vào ban đêm"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
defaultFormattingWidth: "wide"
|
|
277
|
+
})
|
|
278
|
+
};
|
|
279
|
+
//#endregion
|
|
280
|
+
export { t as localize };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index144.cjs");var t={ordinalNumber:(e,t)=>{let n=Number(e),r=t?.unit;if(r===`quarter`)switch(n){case 1:return`I`;case 2:return`II`;case 3:return`III`;case 4:return`IV`}else if(r===`day`)switch(n){case 1:return`thứ 2`;case 2:return`thứ 3`;case 3:return`thứ 4`;case 4:return`thứ 5`;case 5:return`thứ 6`;case 6:return`thứ 7`;case 7:return`chủ nhật`}else if(r===`week`)return n===1?`thứ nhất`:`thứ `+n;else if(r===`dayOfYear`)return n===1?`đầu tiên`:`thứ `+n;return String(n)},era:e.buildLocalizeFn({values:{narrow:[`TCN`,`SCN`],abbreviated:[`trước CN`,`sau CN`],wide:[`trước Công Nguyên`,`sau Công Nguyên`]},defaultWidth:`wide`}),quarter:e.buildLocalizeFn({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`Quý 1`,`Quý 2`,`Quý 3`,`Quý 4`]},defaultWidth:`wide`,formattingValues:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`quý I`,`quý II`,`quý III`,`quý IV`]},defaultFormattingWidth:`wide`,argumentCallback:e=>e-1}),month:e.buildLocalizeFn({values:{narrow:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`],abbreviated:[`Thg 1`,`Thg 2`,`Thg 3`,`Thg 4`,`Thg 5`,`Thg 6`,`Thg 7`,`Thg 8`,`Thg 9`,`Thg 10`,`Thg 11`,`Thg 12`],wide:[`Tháng Một`,`Tháng Hai`,`Tháng Ba`,`Tháng Tư`,`Tháng Năm`,`Tháng Sáu`,`Tháng Bảy`,`Tháng Tám`,`Tháng Chín`,`Tháng Mười`,`Tháng Mười Một`,`Tháng Mười Hai`]},defaultWidth:`wide`,formattingValues:{narrow:[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`],abbreviated:[`thg 1`,`thg 2`,`thg 3`,`thg 4`,`thg 5`,`thg 6`,`thg 7`,`thg 8`,`thg 9`,`thg 10`,`thg 11`,`thg 12`],wide:[`tháng 01`,`tháng 02`,`tháng 03`,`tháng 04`,`tháng 05`,`tháng 06`,`tháng 07`,`tháng 08`,`tháng 09`,`tháng 10`,`tháng 11`,`tháng 12`]},defaultFormattingWidth:`wide`}),day:e.buildLocalizeFn({values:{narrow:[`CN`,`T2`,`T3`,`T4`,`T5`,`T6`,`T7`],short:[`CN`,`Th 2`,`Th 3`,`Th 4`,`Th 5`,`Th 6`,`Th 7`],abbreviated:[`CN`,`Thứ 2`,`Thứ 3`,`Thứ 4`,`Thứ 5`,`Thứ 6`,`Thứ 7`],wide:[`Chủ Nhật`,`Thứ Hai`,`Thứ Ba`,`Thứ Tư`,`Thứ Năm`,`Thứ Sáu`,`Thứ Bảy`]},defaultWidth:`wide`}),dayPeriod:e.buildLocalizeFn({values:{narrow:{am:`am`,pm:`pm`,midnight:`nửa đêm`,noon:`tr`,morning:`sg`,afternoon:`ch`,evening:`tối`,night:`đêm`},abbreviated:{am:`AM`,pm:`PM`,midnight:`nửa đêm`,noon:`trưa`,morning:`sáng`,afternoon:`chiều`,evening:`tối`,night:`đêm`},wide:{am:`SA`,pm:`CH`,midnight:`nửa đêm`,noon:`trưa`,morning:`sáng`,afternoon:`chiều`,evening:`tối`,night:`đêm`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`am`,pm:`pm`,midnight:`nửa đêm`,noon:`tr`,morning:`sg`,afternoon:`ch`,evening:`tối`,night:`đêm`},abbreviated:{am:`AM`,pm:`PM`,midnight:`nửa đêm`,noon:`trưa`,morning:`sáng`,afternoon:`chiều`,evening:`tối`,night:`đêm`},wide:{am:`SA`,pm:`CH`,midnight:`nửa đêm`,noon:`giữa trưa`,morning:`vào buổi sáng`,afternoon:`vào buổi chiều`,evening:`vào buổi tối`,night:`vào ban đêm`}},defaultFormattingWidth:`wide`})};exports.localize=t;
|
package/dist/index162.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { buildMatchFn as e } from "./index144.js";
|
|
2
|
+
import { buildMatchPatternFn as t } from "./index145.js";
|
|
3
|
+
var n = {
|
|
4
|
+
ordinalNumber: t({
|
|
5
|
+
matchPattern: /^(\d+)/i,
|
|
6
|
+
parsePattern: /\d+/i,
|
|
7
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
8
|
+
}),
|
|
9
|
+
era: e({
|
|
10
|
+
matchPatterns: {
|
|
11
|
+
narrow: /^(tcn|scn)/i,
|
|
12
|
+
abbreviated: /^(trước CN|sau CN)/i,
|
|
13
|
+
wide: /^(trước Công Nguyên|sau Công Nguyên)/i
|
|
14
|
+
},
|
|
15
|
+
defaultMatchWidth: "wide",
|
|
16
|
+
parsePatterns: { any: [/^t/i, /^s/i] },
|
|
17
|
+
defaultParseWidth: "any"
|
|
18
|
+
}),
|
|
19
|
+
quarter: e({
|
|
20
|
+
matchPatterns: {
|
|
21
|
+
narrow: /^([1234]|i{1,3}v?)/i,
|
|
22
|
+
abbreviated: /^q([1234]|i{1,3}v?)/i,
|
|
23
|
+
wide: /^quý ([1234]|i{1,3}v?)/i
|
|
24
|
+
},
|
|
25
|
+
defaultMatchWidth: "wide",
|
|
26
|
+
parsePatterns: { any: [
|
|
27
|
+
/(1|i)$/i,
|
|
28
|
+
/(2|ii)$/i,
|
|
29
|
+
/(3|iii)$/i,
|
|
30
|
+
/(4|iv)$/i
|
|
31
|
+
] },
|
|
32
|
+
defaultParseWidth: "any",
|
|
33
|
+
valueCallback: (e) => e + 1
|
|
34
|
+
}),
|
|
35
|
+
month: e({
|
|
36
|
+
matchPatterns: {
|
|
37
|
+
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
|
|
38
|
+
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
|
|
39
|
+
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i
|
|
40
|
+
},
|
|
41
|
+
defaultMatchWidth: "wide",
|
|
42
|
+
parsePatterns: {
|
|
43
|
+
narrow: [
|
|
44
|
+
/0?1$/i,
|
|
45
|
+
/0?2/i,
|
|
46
|
+
/3/,
|
|
47
|
+
/4/,
|
|
48
|
+
/5/,
|
|
49
|
+
/6/,
|
|
50
|
+
/7/,
|
|
51
|
+
/8/,
|
|
52
|
+
/9/,
|
|
53
|
+
/10/,
|
|
54
|
+
/11/,
|
|
55
|
+
/12/
|
|
56
|
+
],
|
|
57
|
+
abbreviated: [
|
|
58
|
+
/^thg[ _]?0?1(?!\d)/i,
|
|
59
|
+
/^thg[ _]?0?2/i,
|
|
60
|
+
/^thg[ _]?0?3/i,
|
|
61
|
+
/^thg[ _]?0?4/i,
|
|
62
|
+
/^thg[ _]?0?5/i,
|
|
63
|
+
/^thg[ _]?0?6/i,
|
|
64
|
+
/^thg[ _]?0?7/i,
|
|
65
|
+
/^thg[ _]?0?8/i,
|
|
66
|
+
/^thg[ _]?0?9/i,
|
|
67
|
+
/^thg[ _]?10/i,
|
|
68
|
+
/^thg[ _]?11/i,
|
|
69
|
+
/^thg[ _]?12/i
|
|
70
|
+
],
|
|
71
|
+
wide: [
|
|
72
|
+
/^tháng ?(Một|0?1(?!\d))/i,
|
|
73
|
+
/^tháng ?(Hai|0?2)/i,
|
|
74
|
+
/^tháng ?(Ba|0?3)/i,
|
|
75
|
+
/^tháng ?(Tư|0?4)/i,
|
|
76
|
+
/^tháng ?(Năm|0?5)/i,
|
|
77
|
+
/^tháng ?(Sáu|0?6)/i,
|
|
78
|
+
/^tháng ?(Bảy|0?7)/i,
|
|
79
|
+
/^tháng ?(Tám|0?8)/i,
|
|
80
|
+
/^tháng ?(Chín|0?9)/i,
|
|
81
|
+
/^tháng ?(Mười|10)/i,
|
|
82
|
+
/^tháng ?(Mười ?Một|11)/i,
|
|
83
|
+
/^tháng ?(Mười ?Hai|12)/i
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
defaultParseWidth: "wide"
|
|
87
|
+
}),
|
|
88
|
+
day: e({
|
|
89
|
+
matchPatterns: {
|
|
90
|
+
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
|
|
91
|
+
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
|
|
92
|
+
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
|
|
93
|
+
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i
|
|
94
|
+
},
|
|
95
|
+
defaultMatchWidth: "wide",
|
|
96
|
+
parsePatterns: {
|
|
97
|
+
narrow: [
|
|
98
|
+
/CN/i,
|
|
99
|
+
/2/i,
|
|
100
|
+
/3/i,
|
|
101
|
+
/4/i,
|
|
102
|
+
/5/i,
|
|
103
|
+
/6/i,
|
|
104
|
+
/7/i
|
|
105
|
+
],
|
|
106
|
+
short: [
|
|
107
|
+
/CN/i,
|
|
108
|
+
/2/i,
|
|
109
|
+
/3/i,
|
|
110
|
+
/4/i,
|
|
111
|
+
/5/i,
|
|
112
|
+
/6/i,
|
|
113
|
+
/7/i
|
|
114
|
+
],
|
|
115
|
+
abbreviated: [
|
|
116
|
+
/CN/i,
|
|
117
|
+
/2/i,
|
|
118
|
+
/3/i,
|
|
119
|
+
/4/i,
|
|
120
|
+
/5/i,
|
|
121
|
+
/6/i,
|
|
122
|
+
/7/i
|
|
123
|
+
],
|
|
124
|
+
wide: [
|
|
125
|
+
/(Chủ|Chúa) ?Nhật/i,
|
|
126
|
+
/Hai/i,
|
|
127
|
+
/Ba/i,
|
|
128
|
+
/Tư/i,
|
|
129
|
+
/Năm/i,
|
|
130
|
+
/Sáu/i,
|
|
131
|
+
/Bảy/i
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
defaultParseWidth: "wide"
|
|
135
|
+
}),
|
|
136
|
+
dayPeriod: e({
|
|
137
|
+
matchPatterns: {
|
|
138
|
+
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
|
|
139
|
+
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
|
|
140
|
+
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i
|
|
141
|
+
},
|
|
142
|
+
defaultMatchWidth: "wide",
|
|
143
|
+
parsePatterns: { any: {
|
|
144
|
+
am: /^(a|sa)/i,
|
|
145
|
+
pm: /^(p|ch[^i]*)/i,
|
|
146
|
+
midnight: /nửa đêm/i,
|
|
147
|
+
noon: /trưa/i,
|
|
148
|
+
morning: /sáng/i,
|
|
149
|
+
afternoon: /chiều/i,
|
|
150
|
+
evening: /tối/i,
|
|
151
|
+
night: /^đêm/i
|
|
152
|
+
} },
|
|
153
|
+
defaultParseWidth: "any"
|
|
154
|
+
})
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
export { n as match };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index145.cjs");var t={ordinalNumber:require("./index146.cjs").buildMatchPatternFn({matchPattern:/^(\d+)/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:e.buildMatchFn({matchPatterns:{narrow:/^(tcn|scn)/i,abbreviated:/^(trước CN|sau CN)/i,wide:/^(trước Công Nguyên|sau Công Nguyên)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^t/i,/^s/i]},defaultParseWidth:`any`}),quarter:e.buildMatchFn({matchPatterns:{narrow:/^([1234]|i{1,3}v?)/i,abbreviated:/^q([1234]|i{1,3}v?)/i,wide:/^quý ([1234]|i{1,3}v?)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/(1|i)$/i,/(2|ii)$/i,/(3|iii)$/i,/(4|iv)$/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:e.buildMatchFn({matchPatterns:{narrow:/^(0?[2-9]|10|11|12|0?1)/i,abbreviated:/^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,wide:/^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/0?1$/i,/0?2/i,/3/,/4/,/5/,/6/,/7/,/8/,/9/,/10/,/11/,/12/],abbreviated:[/^thg[ _]?0?1(?!\d)/i,/^thg[ _]?0?2/i,/^thg[ _]?0?3/i,/^thg[ _]?0?4/i,/^thg[ _]?0?5/i,/^thg[ _]?0?6/i,/^thg[ _]?0?7/i,/^thg[ _]?0?8/i,/^thg[ _]?0?9/i,/^thg[ _]?10/i,/^thg[ _]?11/i,/^thg[ _]?12/i],wide:[/^tháng ?(Một|0?1(?!\d))/i,/^tháng ?(Hai|0?2)/i,/^tháng ?(Ba|0?3)/i,/^tháng ?(Tư|0?4)/i,/^tháng ?(Năm|0?5)/i,/^tháng ?(Sáu|0?6)/i,/^tháng ?(Bảy|0?7)/i,/^tháng ?(Tám|0?8)/i,/^tháng ?(Chín|0?9)/i,/^tháng ?(Mười|10)/i,/^tháng ?(Mười ?Một|11)/i,/^tháng ?(Mười ?Hai|12)/i]},defaultParseWidth:`wide`}),day:e.buildMatchFn({matchPatterns:{narrow:/^(CN|T2|T3|T4|T5|T6|T7)/i,short:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,abbreviated:/^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,wide:/^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],short:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],abbreviated:[/CN/i,/2/i,/3/i,/4/i,/5/i,/6/i,/7/i],wide:[/(Chủ|Chúa) ?Nhật/i,/Hai/i,/Ba/i,/Tư/i,/Năm/i,/Sáu/i,/Bảy/i]},defaultParseWidth:`wide`}),dayPeriod:e.buildMatchFn({matchPatterns:{narrow:/^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,abbreviated:/^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,wide:/^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i},defaultMatchWidth:`wide`,parsePatterns:{any:{am:/^(a|sa)/i,pm:/^(p|ch[^i]*)/i,midnight:/nửa đêm/i,noon:/trưa/i,morning:/sáng/i,afternoon:/chiều/i,evening:/tối/i,night:/^đêm/i}},defaultParseWidth:`any`})};exports.match=t;
|
package/dist/index163.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { formatDistance as e } from "./index158.js";
|
|
2
|
+
import { formatLong as t } from "./index159.js";
|
|
3
|
+
import { formatRelative as n } from "./index160.js";
|
|
4
|
+
import { localize as r } from "./index161.js";
|
|
5
|
+
import { match as i } from "./index162.js";
|
|
6
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/vi.js
|
|
7
|
+
var a = {
|
|
8
|
+
code: "vi",
|
|
9
|
+
formatDistance: e,
|
|
10
|
+
formatLong: t,
|
|
11
|
+
formatRelative: n,
|
|
12
|
+
localize: r,
|
|
13
|
+
match: i,
|
|
14
|
+
options: {
|
|
15
|
+
weekStartsOn: 1,
|
|
16
|
+
firstWeekContainsDate: 1
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { a as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index159.cjs"),t=require("./index160.cjs"),n=require("./index161.cjs"),r=require("./index162.cjs"),i=require("./index163.cjs");var a={code:`vi`,formatDistance:e.formatDistance,formatLong:t.formatLong,formatRelative:n.formatRelative,localize:r.localize,match:i.match,options:{weekStartsOn:1,firstWeekContainsDate:1}};exports.default=a;
|
package/dist/index164.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index152.cjs");function t(t,n){return e.default(t,{...n,weekStartsOn:1})}exports.default=t;
|
package/dist/index165.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import e from "./index147.js";
|
|
2
|
+
import t from "./index150.js";
|
|
3
|
+
import n from "./index164.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js
|
|
5
|
+
function r(r, i) {
|
|
6
|
+
let a = t(r, i?.in), o = a.getFullYear(), s = e(a, 0);
|
|
7
|
+
s.setFullYear(o + 1, 0, 4), s.setHours(0, 0, 0, 0);
|
|
8
|
+
let c = n(s), l = e(a, 0);
|
|
9
|
+
l.setFullYear(o, 0, 4), l.setHours(0, 0, 0, 0);
|
|
10
|
+
let u = n(l);
|
|
11
|
+
return a.getTime() >= c.getTime() ? o + 1 : a.getTime() >= u.getTime() ? o : o - 1;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index148.cjs"),t=require("./index151.cjs"),n=require("./index165.cjs");function r(r,i){let a=t.default(r,i?.in),o=a.getFullYear(),s=e.default(a,0);s.setFullYear(o+1,0,4),s.setHours(0,0,0,0);let c=n.default(s),l=e.default(a,0);l.setFullYear(o,0,4),l.setHours(0,0,0,0);let u=n.default(l);return a.getTime()>=c.getTime()?o+1:a.getTime()>=u.getTime()?o:o-1}exports.default=r;
|
package/dist/index166.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./index150.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = e(t), r = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds()));
|
|
5
|
+
return r.setUTCFullYear(n.getFullYear()), t - +r;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as getTimezoneOffsetInMilliseconds };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index151.cjs");function t(t){let n=e.default(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),t-+r}exports.getTimezoneOffsetInMilliseconds=t;
|
package/dist/index167.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index151.cjs");function t(t,n){let r=e.default(t,n?.in);return r.setHours(0,0,0,0),r}exports.default=t;
|
package/dist/index168.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { millisecondsInDay as e } from "./index146.js";
|
|
2
|
+
import { normalizeDates as t } from "./index148.js";
|
|
3
|
+
import { getTimezoneOffsetInMilliseconds as n } from "./index166.js";
|
|
4
|
+
import r from "./index167.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js
|
|
6
|
+
function i(i, a, o) {
|
|
7
|
+
let [s, c] = t(o?.in, i, a), l = r(s), u = r(c), d = +l - n(l), f = +u - n(u);
|
|
8
|
+
return Math.round((d - f) / e);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { i as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index147.cjs"),t=require("./index149.cjs"),n=require("./index167.cjs"),r=require("./index168.cjs");function i(i,a,o){let[s,c]=t.normalizeDates(o?.in,i,a),l=r.default(s),u=r.default(c),d=+l-n.getTimezoneOffsetInMilliseconds(l),f=+u-n.getTimezoneOffsetInMilliseconds(u);return Math.round((d-f)/e.millisecondsInDay)}exports.default=i;
|
package/dist/index169.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./index147.js";
|
|
2
|
+
import t from "./index164.js";
|
|
3
|
+
import n from "./index165.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js
|
|
5
|
+
function r(r, i) {
|
|
6
|
+
let a = n(r, i), o = e(i?.in || r, 0);
|
|
7
|
+
return o.setFullYear(a, 0, 4), o.setHours(0, 0, 0, 0), t(o);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as default };
|
package/dist/index17.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("lucide-react"),r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),o=require("@radix-ui/react-direction");var s=`FileUpload`,c=`FileUploadDropzone`,l=`FileUploadTrigger`,u=`FileUploadList`,d=`FileUploadItem`,f=`FileUploadItemPreview`,p=`FileUploadItemMetadata`,m=`FileUploadItemProgress`,h=`FileUploadItemDelete`,g=`FileUploadClear`;function _(e){let t=r.useRef(null);return t.current===null&&(t.current=e()),t}function v(e,t,n,r,i){let a={files:t,dragOver:!1,invalid:r};function o(e,r){switch(r.type){case`ADD_FILES`:for(let e of r.files)t.set(e,{file:e,progress:0,status:`idle`});return i&&i(Array.from(t.values()).map(e=>e.file)),{...e,files:t};case`SET_FILES`:{let n=new Set(r.files);for(let e of t.keys())n.has(e)||t.delete(e);for(let e of r.files)t.get(e)||t.set(e,{file:e,progress:0,status:`idle`});return{...e,files:t}}case`SET_PROGRESS`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,progress:r.progress,status:`uploading`}),{...e,files:t}}case`SET_SUCCESS`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,progress:100,status:`success`}),{...e,files:t}}case`SET_ERROR`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,error:r.error,status:`error`}),{...e,files:t}}case`REMOVE_FILE`:if(n){let e=n.get(r.file);e&&(URL.revokeObjectURL(e),n.delete(r.file))}return t.delete(r.file),i&&i(Array.from(t.values()).map(e=>e.file)),{...e,files:t};case`SET_DRAG_OVER`:return{...e,dragOver:r.dragOver};case`SET_INVALID`:return{...e,invalid:r.invalid};case`CLEAR`:if(n)for(let e of t.keys()){let t=n.get(e);t&&(URL.revokeObjectURL(t),n.delete(e))}return t.clear(),i&&i([]),{...e,files:t,invalid:!1};default:return e}}function s(){return a}function c(t){a=o(a,t);for(let t of e)t()}function l(t){return e.add(t),()=>e.delete(t)}return{getState:s,dispatch:c,subscribe:l}}var y=r.createContext(null);function b(e){let t=r.useContext(y);if(!t)throw Error(`\`${e}\` must be used within \`${s}\``);return t}function x(e){let t=b(`useStore`),n=_(()=>null),i=r.useCallback(()=>{let r=t.getState(),i=n.current;if(i&&i.state===r)return i.value;let a=e(r);return n.current={value:a,state:r},a},[t,e,n]);return r.useSyncExternalStore(t.subscribe,i,i)}var S=r.createContext(null);function C(e){let t=r.useContext(S);if(!t)throw Error(`\`${e}\` must be used within \`${s}\``);return t}function w(e){let{value:n,defaultValue:s,onValueChange:c,onAccept:l,onFileAccept:u,onFileReject:d,onFileValidate:f,onUpload:p,accept:m,maxFiles:h,maxSize:g,dir:b,label:x,name:C,asChild:w,disabled:T=!1,invalid:E=!1,multiple:D=!1,required:O=!1,children:k,className:A,...j}=e,M=r.useId(),N=r.useId(),P=r.useId(),F=r.useId(),I=(0,o.useDirection)(b),L=_(()=>new Set).current,R=_(()=>new Map).current,z=_(()=>new WeakMap).current,B=r.useRef(null),V=n!==void 0,H=r.useMemo(()=>v(L,R,z,E,c),[L,R,E,c,z]),U=r.useMemo(()=>m?.split(`,`).map(e=>e.trim())??null,[m]),W=_(()=>{let e=0;return(t,n)=>{e||=requestAnimationFrame(()=>{e=0,H.dispatch({type:`SET_PROGRESS`,file:t,progress:Math.min(Math.max(0,n),100)})})}}).current;r.useEffect(()=>{V?H.dispatch({type:`SET_FILES`,files:n}):s&&s.length>0&&!H.getState().files.size&&H.dispatch({type:`SET_FILES`,files:s})},[n,s,V,H]),r.useEffect(()=>()=>{for(let e of R.keys()){let t=z.get(e);t&&URL.revokeObjectURL(t)}},[R,z]);let G=r.useCallback(async e=>{try{for(let t of e)H.dispatch({type:`SET_PROGRESS`,file:t,progress:0});if(p)await p(e,{onProgress:W,onSuccess:e=>{H.dispatch({type:`SET_SUCCESS`,file:e})},onError:(e,t)=>{H.dispatch({type:`SET_ERROR`,file:e,error:t.message??`Upload failed`})}});else for(let t of e)H.dispatch({type:`SET_SUCCESS`,file:t})}catch(t){let n=t instanceof Error?t.message:`Upload failed`;for(let t of e)H.dispatch({type:`SET_ERROR`,file:t,error:n})}},[H,p,W]),K=r.useCallback(e=>{if(T)return;let t=[...e],n=!1;if(h){let e=H.getState().files.size;if(h===1&&e>0&&t.length>0)H.dispatch({type:`CLEAR`});else{let r=Math.max(0,h-e);if(r<t.length){let e=t.slice(r);n=!0,t=t.slice(0,r);for(let t of e){let e=`Maximum ${h} files allowed`;if(f){let n=f(t);n&&(e=n)}d?.(t,e)}}}}let r=[],i=[];for(let e of t){let t=!1,a=``;if(f){let r=f(e);if(r){a=r,d?.(e,a),t=!0,n=!0;continue}}if(U){let r=e.type,i=`.${e.name.split(`.`).pop()}`;U.some(e=>e===r||e===i||e.includes(`/*`)&&r.startsWith(e.replace(`/*`,`/`)))||(a=`File type not accepted`,d?.(e,a),t=!0,n=!0)}g&&e.size>g&&(a=`File too large`,d?.(e,a),t=!0,n=!0),t?i.push({file:e,message:a}):r.push(e)}if(n&&(H.dispatch({type:`SET_INVALID`,invalid:n}),setTimeout(()=>{H.dispatch({type:`SET_INVALID`,invalid:!1})},2e3)),r.length>0){H.dispatch({type:`ADD_FILES`,files:r}),V&&c&&c([...Array.from(H.getState().files.values()).map(e=>e.file)]),l&&l(r);for(let e of r)u?.(e);p&&requestAnimationFrame(()=>{G(r)})}},[H,V,c,l,u,p,G,h,f,d,U,g,T]),q=r.useCallback(e=>{K(Array.from(e.target.files??[])),e.target.value=``},[K]),J=r.useMemo(()=>({dropzoneId:N,inputId:M,listId:P,labelId:F,dir:I,disabled:T,inputRef:B,urlCache:z}),[N,M,P,F,I,T,z]),Y=w?a.Slot:`div`;return(0,i.jsx)(y.Provider,{value:H,children:(0,i.jsx)(S.Provider,{value:J,children:(0,i.jsxs)(Y,{"data-disabled":T?``:void 0,"data-slot":`file-upload`,dir:I,...j,className:t.cn(`relative flex flex-col gap-2`,A),children:[k,(0,i.jsx)(`input`,{type:`file`,id:M,"aria-labelledby":F,"aria-describedby":N,ref:B,tabIndex:-1,accept:m,name:C,className:`sr-only`,disabled:T,multiple:D,required:O,onChange:q}),(0,i.jsx)(`span`,{id:F,className:`sr-only`,children:x??`File upload`})]})})})}function T(e){let{asChild:n,className:o,onClick:s,onDragOver:l,onDragEnter:u,onDragLeave:d,onDrop:f,onPaste:p,onKeyDown:m,...h}=e,g=C(c),_=b(c),v=x(e=>e.dragOver),y=x(e=>e.invalid),S=r.useCallback(e=>{if(s?.(e),e.defaultPrevented)return;let t=e.target;t instanceof HTMLElement&&t.closest(`[data-slot="file-upload-trigger"]`)||g.inputRef.current?.click()},[g.inputRef,s]),w=r.useCallback(e=>{l?.(e),!e.defaultPrevented&&(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!0}))},[_,l]),T=r.useCallback(e=>{u?.(e),!e.defaultPrevented&&(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!0}))},[_,u]),E=r.useCallback(e=>{if(d?.(e),e.defaultPrevented)return;let t=e.relatedTarget;t&&t instanceof Node&&e.currentTarget.contains(t)||(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1}))},[_,d]),D=r.useCallback(e=>{if(f?.(e),e.defaultPrevented)return;e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1});let t=Array.from(e.dataTransfer.files),n=g.inputRef.current;if(!n)return;let r=new DataTransfer;for(let e of t)r.items.add(e);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))},[_,g.inputRef,f]),O=r.useCallback(e=>{if(p?.(e),e.defaultPrevented)return;e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1});let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r?.kind===`file`){let e=r.getAsFile();e&&n.push(e)}}if(n.length===0)return;let r=g.inputRef.current;if(!r)return;let i=new DataTransfer;for(let e of n)i.items.add(e);r.files=i.files,r.dispatchEvent(new Event(`change`,{bubbles:!0}))},[_,g.inputRef,p]),k=r.useCallback(e=>{m?.(e),!e.defaultPrevented&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g.inputRef.current?.click())},[g.inputRef,m]);return(0,i.jsx)(n?a.Slot:`div`,{role:`region`,id:g.dropzoneId,"aria-controls":`${g.inputId} ${g.listId}`,"aria-disabled":g.disabled,"aria-invalid":y,"data-disabled":g.disabled?``:void 0,"data-dragging":v?``:void 0,"data-invalid":y?``:void 0,"data-slot":`file-upload-dropzone`,dir:g.dir,tabIndex:g.disabled?void 0:0,...h,className:t.cn(`relative flex select-none flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-6 outline-none transition-colors hover:bg-accent/30 focus-visible:border-ring/50 data-disabled:pointer-events-none data-dragging:border-primary/30 data-invalid:border-destructive data-dragging:bg-accent/30 data-invalid:ring-destructive/20`,o),onClick:S,onDragEnter:T,onDragLeave:E,onDragOver:w,onDrop:D,onKeyDown:k,onPaste:O})}function E(e){let{asChild:t,onClick:n,...o}=e,s=C(l),c=r.useCallback(e=>{n?.(e),!e.defaultPrevented&&s.inputRef.current?.click()},[s.inputRef,n]);return(0,i.jsx)(t?a.Slot:`button`,{type:`button`,"aria-controls":s.inputId,"data-disabled":s.disabled?``:void 0,"data-slot":`file-upload-trigger`,...o,disabled:s.disabled,onClick:c})}function D(e){let{className:n,orientation:r=`vertical`,asChild:o,forceMount:s,...c}=e,l=C(u),d=x(e=>e.files.size),f=s||d>0;return f?(0,i.jsx)(o?a.Slot:`div`,{role:`list`,id:l.listId,"aria-orientation":r,"data-orientation":r,"data-slot":`file-upload-list`,"data-state":f?`active`:`inactive`,dir:l.dir,...c,className:t.cn(`data-[state=inactive]:fade-out-0 data-[state=active]:fade-in-0 data-[state=inactive]:slide-out-to-top-2 data-[state=active]:slide-in-from-top-2 flex flex-col gap-2 data-[state=active]:animate-in data-[state=inactive]:animate-out`,r===`horizontal`&&`flex-row overflow-x-auto p-1.5`,n)}):null}var O=r.createContext(null);function k(e){let t=r.useContext(O);if(!t)throw Error(`\`${e}\` must be used within \`${d}\``);return t}function A(e){let{value:n,asChild:o,className:s,...c}=e,l=r.useId(),u=`${l}-status`,f=`${l}-name`,p=`${l}-size`,m=`${l}-message`,h=C(d),g=x(e=>e.files.get(n)),_=x(e=>e.files.size),v=x(e=>Array.from(e.files.keys()).indexOf(n)+1),y=r.useMemo(()=>({id:l,fileState:g,nameId:f,sizeId:p,statusId:u,messageId:m}),[l,g,u,f,p,m]);if(!g)return null;let b=g.error?`Error: ${g.error}`:g.status===`uploading`?`Uploading: ${g.progress}% complete`:g.status===`success`?`Upload complete`:`Ready to upload`,S=o?a.Slot:`div`;return(0,i.jsx)(O.Provider,{value:y,children:(0,i.jsxs)(S,{role:`listitem`,id:l,"aria-setsize":_,"aria-posinset":v,"aria-describedby":`${f} ${p} ${u} ${g.error?m:``}`,"aria-labelledby":f,"data-slot":`file-upload-item`,dir:h.dir,...c,className:t.cn(`relative flex items-center gap-2.5 rounded-md border p-3`,s),children:[e.children,(0,i.jsx)(`span`,{id:u,className:`sr-only`,children:b})]})})}function j(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(+!!n)} ${t[n]}`}function M(e){let t=e.type,r=e.name.split(`.`).pop()?.toLowerCase()??``;return t.startsWith(`video/`)?(0,i.jsx)(n.FileVideoIcon,{}):t.startsWith(`audio/`)?(0,i.jsx)(n.FileAudioIcon,{}):t.startsWith(`text/`)||[`txt`,`md`,`rtf`,`pdf`].includes(r)?(0,i.jsx)(n.FileTextIcon,{}):[`html`,`css`,`js`,`jsx`,`ts`,`tsx`,`json`,`xml`,`php`,`py`,`rb`,`java`,`c`,`cpp`,`cs`].includes(r)?(0,i.jsx)(n.FileCodeIcon,{}):[`zip`,`rar`,`7z`,`tar`,`gz`,`bz2`].includes(r)?(0,i.jsx)(n.FileArchiveIcon,{}):[`exe`,`msi`,`app`,`apk`,`deb`,`rpm`].includes(r)||t.startsWith(`application/`)?(0,i.jsx)(n.FileCogIcon,{}):(0,i.jsx)(n.FileIcon,{})}function N(e){let{render:n,asChild:o,children:s,className:c,...l}=e,u=k(f),d=C(f),p=r.useCallback(e=>{if(u.fileState?.file.type.startsWith(`image/`)){let t=d.urlCache.get(e);return t||(t=URL.createObjectURL(e),d.urlCache.set(e,t)),(0,i.jsx)(`img`,{src:t,alt:e.name,className:`size-full object-cover`})}return M(e)},[u.fileState?.file.type,d.urlCache]),m=r.useCallback(e=>n?n(e,()=>p(e)):p(e),[n,p]);return u.fileState?(0,i.jsxs)(o?a.Slot:`div`,{"aria-labelledby":u.nameId,"data-slot":`file-upload-preview`,...l,className:t.cn(`relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded border bg-accent/50 [&>svg]:size-10`,c),children:[m(u.fileState.file),s]}):null}function P(e){let{asChild:n,size:r=`default`,children:o,className:s,...c}=e,l=C(p),u=k(p);return u.fileState?(0,i.jsx)(n?a.Slot:`div`,{"data-slot":`file-upload-metadata`,dir:l.dir,...c,className:t.cn(`flex min-w-0 flex-1 flex-col`,s),children:o??(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`span`,{id:u.nameId,className:t.cn(`truncate font-medium text-sm`,r===`sm`&&`font-normal text-[13px] leading-snug`),children:u.fileState.file.name}),(0,i.jsx)(`span`,{id:u.sizeId,className:t.cn(`truncate text-muted-foreground text-xs`,r===`sm`&&`text-[11px] leading-snug`),children:j(u.fileState.file.size)}),u.fileState.error&&(0,i.jsx)(`span`,{id:u.messageId,className:`text-destructive text-xs`,children:u.fileState.error})]})}):null}function F(e){let{variant:n=`linear`,size:r=40,asChild:o,forceMount:s,className:c,...l}=e,u=k(m);if(!u.fileState||!(s||u.fileState.progress!==100))return null;let d=o?a.Slot:`div`;switch(n){case`circular`:{let e=2*Math.PI*((r-4)/2),n=e-u.fileState.progress/100*e;return(0,i.jsx)(d,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u.fileState.progress,"aria-valuetext":`${u.fileState.progress}%`,"aria-labelledby":u.nameId,"data-slot":`file-upload-progress`,...l,className:t.cn(`-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2`,c),children:(0,i.jsxs)(`svg`,{className:`-rotate-90 transform`,width:r,height:r,viewBox:`0 0 ${r} ${r}`,fill:`none`,stroke:`currentColor`,children:[(0,i.jsx)(`circle`,{className:`text-primary/20`,strokeWidth:`2`,cx:r/2,cy:r/2,r:(r-4)/2}),(0,i.jsx)(`circle`,{className:`text-primary transition-[stroke-dashoffset] duration-300 ease-linear`,strokeWidth:`2`,strokeLinecap:`round`,strokeDasharray:e,strokeDashoffset:n,cx:r/2,cy:r/2,r:(r-4)/2})]})})}case`fill`:{let e=u.fileState.progress,n=100-e;return(0,i.jsx)(d,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,"aria-valuetext":`${e}%`,"aria-labelledby":u.nameId,"data-slot":`file-upload-progress`,...l,className:t.cn(`absolute inset-0 bg-primary/50 transition-[clip-path] duration-300 ease-linear`,c),style:{clipPath:`inset(${n}% 0% 0% 0%)`}})}default:return(0,i.jsx)(d,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u.fileState.progress,"aria-valuetext":`${u.fileState.progress}%`,"aria-labelledby":u.nameId,"data-slot":`file-upload-progress`,...l,className:t.cn(`relative h-1.5 w-full overflow-hidden rounded-full bg-primary/20`,c),children:(0,i.jsx)(`div`,{className:`h-full w-full flex-1 bg-primary transition-transform duration-300 ease-linear`,style:{transform:`translateX(-${100-u.fileState.progress}%)`}})})}}function I(e){let{asChild:t,onClick:n,...o}=e,s=b(h),c=k(h),l=r.useCallback(e=>{n?.(e),!(!c.fileState||e.defaultPrevented)&&s.dispatch({type:`REMOVE_FILE`,file:c.fileState.file})},[s,c.fileState,n]);return c.fileState?(0,i.jsx)(t?a.Slot:`button`,{type:`button`,"aria-controls":c.id,"aria-describedby":c.nameId,"data-slot":`file-upload-item-delete`,...o,onClick:l}):null}function L(e){let{asChild:t,forceMount:n,disabled:o,onClick:s,...c}=e,l=C(g),u=b(g),d=x(e=>e.files.size),f=o||l.disabled,p=r.useCallback(e=>{s?.(e),!e.defaultPrevented&&u.dispatch({type:`CLEAR`})},[u,s]);return n||d>0?(0,i.jsx)(t?a.Slot:`button`,{type:`button`,"aria-controls":l.listId,"data-slot":`file-upload-clear`,"data-disabled":f?``:void 0,...c,disabled:f,onClick:p}):null}exports.FileUploadClear=L,exports.FileUploadDropzone=T,exports.FileUploadItem=A,exports.FileUploadItemDelete=I,exports.FileUploadItemMetadata=P,exports.FileUploadItemPreview=N,exports.FileUploadItemProgress=F,exports.FileUploadList=D,exports.FileUploadRoot=w,exports.FileUploadTrigger=E,exports.useStore=x;
|
|
1
|
+
const e=require("./index2.cjs");let t=require("react");t=e.__toESM(t,1);var n=globalThis?.document?t.useLayoutEffect:()=>{};exports.useLayoutEffect2=n;
|