@wisemen/wise-invoicing-web 0.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/AddOpenBoundaryIcon-BEbt7idt.js +28 -0
  2. package/dist/AirlineIcon-CiRX64yU.js +31 -0
  3. package/dist/AirplaneIcon-ySlq4lyE.js +21 -0
  4. package/dist/AirportIcon-B84mgPeW.js +18 -0
  5. package/dist/AlertTriangleIcon-CBaygowk.js +24 -0
  6. package/dist/AllocationsIcon-BEq-KzFl.js +18 -0
  7. package/dist/ArrowNarrowRightIcon-CeV9G-PX.js +24 -0
  8. package/dist/AssetIcon-CgYKjgAv.js +18 -0
  9. package/dist/BarChartIcon-180sKdWD.js +24 -0
  10. package/dist/BellIcon-k_e3dHc9.js +23 -0
  11. package/dist/BillingDocumentDetailViewDataProvider.css +1 -0
  12. package/dist/BillingDocumentDetailViewDataProvider.vue_vue_type_script_setup_true_lang-CWKBYgXH.js +5161 -0
  13. package/dist/BuildingIcon-vsvoi83j.js +24 -0
  14. package/dist/ChargerIcon-Bp3Up7jS.js +18 -0
  15. package/dist/ChevronDownIcon-D9nXH3kA.js +24 -0
  16. package/dist/ChevronUpIcon-CkYZnNds.js +24 -0
  17. package/dist/ClockIcon-DltYwVJC.js +24 -0
  18. package/dist/ClockSnoozeIcon-x_plYT2B.js +24 -0
  19. package/dist/CopyIcon-DOqno1Gb.js +21 -0
  20. package/dist/CreditNoteDetailViewDataProvider-Dc_APzSS.js +873 -0
  21. package/dist/CreditNotePdfViewDataProvider-zdBDlMRD.js +36 -0
  22. package/dist/DownloadCloudIcon-CHztnC6f.js +24 -0
  23. package/dist/EditIcon-L73PCCiu.js +23 -0
  24. package/dist/EraserIcon-CRVRD-F9.js +24 -0
  25. package/dist/FileIcon-Fuwo_cD0.js +26 -0
  26. package/dist/FilterLinesIcon-CRaEthek.js +24 -0
  27. package/dist/GlobeIcon-UmFqS-_n.js +24 -0
  28. package/dist/HelpIcon-CyOF59jk.js +26 -0
  29. package/dist/HourGlassIcon-mbgmoOa_.js +24 -0
  30. package/dist/InfoCircleIcon-DdlwGcMV.js +24 -0
  31. package/dist/InvoiceDetailViewDataProvider-DeS1LPn1.js +1942 -0
  32. package/dist/InvoiceOverviewView-BELZjC4d.js +14297 -0
  33. package/dist/InvoicePdfViewDataProvider-CzzbJS9s.js +36 -0
  34. package/dist/InvoicePublicPdfViewDataProvider-B7fszuGq.js +4 -0
  35. package/dist/InvoiceSettlementStatusBadge.vue_vue_type_script_setup_true_lang-YngYVFcS.js +196 -0
  36. package/dist/IssuerSettingsViewDataProvider-CbKj-AK2.js +250 -0
  37. package/dist/KeyboardIcon-BYex7WoL.js +24 -0
  38. package/dist/LinkExternalIcon-QJt5WMfk.js +24 -0
  39. package/dist/LinkIcon-D9WPvO58.js +24 -0
  40. package/dist/MarkerIcon-Dacom7sa.js +31 -0
  41. package/dist/MobileBatteryIcon-i1TxVu66.js +18 -0
  42. package/dist/MonitorIcon-B6-by77x.js +24 -0
  43. package/dist/NotificationIcon-D5mgxQ3P.js +21 -0
  44. package/dist/ParkingIcon-DJzqSxFU.js +29 -0
  45. package/dist/PlanningIcon-Dj8UH1Cl.js +18 -0
  46. package/dist/PreferenceIcon-DrDfTl-0.js +24 -0
  47. package/dist/ReceiptCheckIcon-DfUkv_G6.js +24 -0
  48. package/dist/RefreshIcon-CykNw3qm.js +24 -0
  49. package/dist/RemoveOpenBoundaryIcon-8vTxISBg.js +31 -0
  50. package/dist/RewindIcon-K0KiISjE.js +24 -0
  51. package/dist/SettingsIcon-BA4bIP5a.js +28 -0
  52. package/dist/ShieldIcon-B6OfkWmr.js +21 -0
  53. package/dist/ShieldOffIcon-RppEweJ9.js +24 -0
  54. package/dist/SignOutIcon-C6x_Sv0W.js +23 -0
  55. package/dist/SlashCircleIcon-CbwLUV0p.js +24 -0
  56. package/dist/StandIcon-DW1SUHPC.js +24 -0
  57. package/dist/StarsIcon-I4S_hN5F.js +26 -0
  58. package/dist/StopwatchIcon-D8KogezG.js +24 -0
  59. package/dist/TargetIcon-DZL7Hi3v.js +24 -0
  60. package/dist/ThreeDotsIcon-CKO5p_ZD.js +32 -0
  61. package/dist/ToolIcon-Dbvw1D-H.js +24 -0
  62. package/dist/TrashIcon-02miWCrc.js +21 -0
  63. package/dist/TurnaroundIcon-Dee23oaX.js +30 -0
  64. package/dist/UploadCloudIcon-DhtpTfwc.js +24 -0
  65. package/dist/UserIcon-DbdAYeNN.js +24 -0
  66. package/dist/UsersIcon-CHaIEI5X.js +24 -0
  67. package/dist/VerifiedIcon-CTveuqDt.js +26 -0
  68. package/dist/WifiIcon-DHt-RpM2.js +24 -0
  69. package/dist/WifiOffIcon-D8xUKqLP.js +24 -0
  70. package/dist/ZapIcon-C95VuzXS.js +24 -0
  71. package/dist/ZoomInIcon-qDywyLfc.js +24 -0
  72. package/dist/ZoomOutIcon-KL3_B-6s.js +24 -0
  73. package/dist/_plugin-vue_export-helper-3S5xkc9H.js +453 -0
  74. package/dist/creditNoteDetail.query-JGvG5yYz.js +159 -0
  75. package/dist/formango.util-D66mMTWb.js +12 -0
  76. package/dist/index-Beg0OAsI.js +8082 -0
  77. package/dist/index-DCE3vzbe.js +7 -0
  78. package/dist/index.css +1 -0
  79. package/dist/index.d.ts +1608 -0
  80. package/dist/index.js +40 -0
  81. package/dist/invoiceDetail.query-C3Llz0nF.js +13 -0
  82. package/dist/issuerSettings.query-H83T7-h9.js +130 -0
  83. package/dist/style.css +1 -0
  84. package/dist/style.d.ts +1 -0
  85. package/package.json +103 -0
@@ -0,0 +1,26 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as C } from "vue";
2
+ import { _ as r } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const n = {}, L = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 16 16",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function i(s, e) {
11
+ return o(), t("svg", L, [...e[0] || (e[0] = [
12
+ C("g", { "clip-path": "url(#clip0_19238_6603)" }, [
13
+ C("path", {
14
+ d: "M6.00016 7.99998L7.3335 9.33331L10.3335 6.33331M11.9343 3.33232C12.0716 3.66433 12.3351 3.92825 12.6669 4.06603L13.8303 4.54796C14.1624 4.6855 14.4261 4.94931 14.5637 5.28135C14.7012 5.6134 14.7012 5.98648 14.5637 6.31852L14.0821 7.48118C13.9445 7.81337 13.9443 8.18683 14.0825 8.51886L14.5633 9.68118C14.6315 9.84563 14.6666 10.0219 14.6666 10.1999C14.6666 10.378 14.6316 10.5543 14.5634 10.7187C14.4953 10.8832 14.3955 11.0327 14.2696 11.1585C14.1436 11.2844 13.9942 11.3842 13.8297 11.4523L12.6671 11.9339C12.3351 12.0712 12.0712 12.3347 11.9334 12.6665L11.4515 13.83C11.3139 14.162 11.0501 14.4258 10.7181 14.5634C10.3861 14.7009 10.013 14.7009 9.68097 14.5634L8.51835 14.0818C8.18631 13.9446 7.81338 13.9449 7.48155 14.0826L6.31809 14.5638C5.98624 14.701 5.6135 14.7009 5.28174 14.5635C4.94998 14.4261 4.68633 14.1626 4.5487 13.8309L4.06664 12.667C3.92936 12.335 3.66586 12.0711 3.33406 11.9333L2.17061 11.4514C1.83872 11.3139 1.575 11.0503 1.43742 10.7184C1.29984 10.3866 1.29965 10.0137 1.4369 9.68168L1.91847 8.51901C2.05567 8.18696 2.05539 7.81401 1.91769 7.48217L1.43681 6.31784C1.36863 6.15338 1.33352 5.9771 1.3335 5.79907C1.33347 5.62104 1.36852 5.44475 1.43664 5.28027C1.50477 5.11579 1.60464 4.96635 1.73054 4.84048C1.85644 4.71462 2.00591 4.61479 2.17041 4.54672L3.33303 4.06512C3.66474 3.92796 3.92849 3.66478 4.06637 3.33335L4.54828 2.16985C4.68582 1.83781 4.94961 1.574 5.28164 1.43647C5.61368 1.29893 5.98674 1.29893 6.31877 1.43647L7.48139 1.91806C7.81343 2.05525 8.18637 2.05497 8.5182 1.91728L9.68214 1.43721C10.0141 1.29975 10.3871 1.29978 10.7191 1.43729C11.051 1.5748 11.3148 1.83853 11.4524 2.17049L11.9344 3.33433L11.9343 3.33232Z",
15
+ stroke: "currentColor",
16
+ "stroke-width": "1.33",
17
+ "stroke-linecap": "round",
18
+ "stroke-linejoin": "round"
19
+ })
20
+ ], -1)
21
+ ])]);
22
+ }
23
+ const d = /* @__PURE__ */ r(n, [["render", i]]);
24
+ export {
25
+ d as default
26
+ };
@@ -0,0 +1,24 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as r } from "vue";
2
+ import { _ as n } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const s = {}, i = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function c(l, e) {
11
+ return o(), t("svg", i, [...e[0] || (e[0] = [
12
+ r("path", {
13
+ d: "M12 19.5H12.01M22.8064 8.70076C19.9595 6.09199 16.1656 4.5 11.9999 4.5C7.83414 4.5 4.04023 6.09199 1.19336 8.70076M4.73193 12.243C6.67006 10.5357 9.21407 9.5 12 9.5C14.7859 9.5 17.3299 10.5357 19.268 12.243M15.6983 15.7751C14.6792 14.9763 13.3952 14.5 11.9999 14.5C10.5835 14.5 9.28172 14.9908 8.25537 15.8116",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const _ = /* @__PURE__ */ n(s, [["render", c]]);
22
+ export {
23
+ _ as default
24
+ };
@@ -0,0 +1,24 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as r } from "vue";
2
+ import { _ as n } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const s = {}, i = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function c(l, e) {
11
+ return o(), t("svg", i, [...e[0] || (e[0] = [
12
+ r("path", {
13
+ d: "M15.3119 10C16.6802 10.4263 17.9624 11.1191 19.08 12.05M22.5799 8.49997C19.6575 5.92394 15.8956 4.50262 11.9999 4.50262C11.3949 4.50262 10.7931 4.5369 10.1972 4.60447M8.52979 15.61C9.54499 14.8888 10.7595 14.5013 12.0048 14.5013C13.2501 14.5013 14.4646 14.8888 15.4798 15.61M12 19.5H12.01M1.19336 8.70076C2.52697 7.47869 4.06839 6.47975 5.75851 5.76306M4.73193 12.243C6.12934 11.012 7.84172 10.1302 9.73265 9.73393M15.6983 15.7751C14.6792 14.9763 13.3952 14.5 11.9999 14.5C10.5835 14.5 9.28172 14.9908 8.25537 15.8116M3 3L21 21",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const C = /* @__PURE__ */ n(s, [["render", c]]);
22
+ export {
23
+ C as default
24
+ };
@@ -0,0 +1,24 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as r } from "vue";
2
+ import { _ as n } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const s = {}, c = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function i(l, e) {
11
+ return o(), t("svg", c, [...e[0] || (e[0] = [
12
+ r("path", {
13
+ d: "M13 2L4.09344 12.6879C3.74463 13.1064 3.57023 13.3157 3.56756 13.4925C3.56524 13.6461 3.63372 13.7923 3.75324 13.8889C3.89073 14 4.16316 14 4.70802 14H12L11 22L19.9065 11.3121C20.2553 10.8936 20.4297 10.6843 20.4324 10.5075C20.4347 10.3539 20.3663 10.2077 20.2467 10.1111C20.1092 10 19.8368 10 19.292 10H12L13 2Z",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const _ = /* @__PURE__ */ n(s, [["render", i]]);
22
+ export {
23
+ _ as default
24
+ };
@@ -0,0 +1,24 @@
1
+ import { openBlock as e, createElementBlock as t, createElementVNode as n } from "vue";
2
+ import { _ as r } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const s = {}, c = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function i(l, o) {
11
+ return e(), t("svg", c, [...o[0] || (o[0] = [
12
+ n("path", {
13
+ d: "M21 21L16.65 16.65M11 8V14M8 11H14M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const _ = /* @__PURE__ */ r(s, [["render", i]]);
22
+ export {
23
+ _ as default
24
+ };
@@ -0,0 +1,24 @@
1
+ import { openBlock as e, createElementBlock as t, createElementVNode as r } from "vue";
2
+ import { _ as n } from "./_plugin-vue_export-helper-3S5xkc9H.js";
3
+ const s = {}, c = {
4
+ width: "100%",
5
+ height: "100%",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function i(l, o) {
11
+ return e(), t("svg", c, [...o[0] || (o[0] = [
12
+ r("path", {
13
+ d: "M21 21L16.65 16.65M8 11H14M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const _ = /* @__PURE__ */ n(s, [["render", i]]);
22
+ export {
23
+ _ as default
24
+ };
@@ -0,0 +1,453 @@
1
+ import { computed as w, ref as J } from "vue";
2
+ import { Temporal as f } from "temporal-polyfill";
3
+ import { useI18n as Q } from "vue-i18n";
4
+ import g from "zod";
5
+ import { n as O, e as m } from "./index-Beg0OAsI.js";
6
+ var C = class {
7
+ static getCurrentLocale() {
8
+ let e = typeof navigator < "u" ? navigator.language : void 0;
9
+ return Intl.DateTimeFormat(e).resolvedOptions().locale;
10
+ }
11
+ }, h = class {
12
+ static earliest(...e) {
13
+ if (e.length === 0) throw Error("earliest() requires at least one date");
14
+ return e.reduce((t, a) => a.epochMilliseconds < t.epochMilliseconds ? a : t);
15
+ }
16
+ static getNow() {
17
+ return f.Now.instant();
18
+ }
19
+ static instantFrom(e) {
20
+ return f.Instant.from(e);
21
+ }
22
+ static instantFromDateAndTime(e, t, a) {
23
+ return e.toPlainDateTime(t).toZonedDateTime(a).toInstant();
24
+ }
25
+ static instantToPlainDate(e, t) {
26
+ return e.toZonedDateTimeISO(t).toPlainDate();
27
+ }
28
+ static instantToPlainTime(e, t) {
29
+ return e.toZonedDateTimeISO(t).toPlainTime();
30
+ }
31
+ static instantToZonedDateTime(e, t) {
32
+ return e.toZonedDateTimeISO(t);
33
+ }
34
+ static isAfter(e, t) {
35
+ return e.epochMilliseconds > t.epochMilliseconds;
36
+ }
37
+ static isBefore(e, t) {
38
+ return e.epochMilliseconds < t.epochMilliseconds;
39
+ }
40
+ static isEqual(e, t) {
41
+ return e.epochMilliseconds === t.epochMilliseconds;
42
+ }
43
+ static latest(...e) {
44
+ if (e.length === 0) throw Error("latest() requires at least one date");
45
+ return e.reduce((t, a) => a.epochMilliseconds > t.epochMilliseconds ? a : t);
46
+ }
47
+ static plainDateRangeToDateTimeInstantRange(e) {
48
+ return e.from === null || e.until === null ? null : {
49
+ from: e.from.toZonedDateTime({ timeZone: S.getCurrentTimeZone() }).toInstant(),
50
+ until: e.until.toZonedDateTime({ timeZone: S.getCurrentTimeZone() }).with({
51
+ hour: 23,
52
+ millisecond: 999,
53
+ minute: 59,
54
+ second: 59
55
+ }).toInstant()
56
+ };
57
+ }
58
+ static plainDateTimeFromDateAndTime(e, t) {
59
+ return f.PlainDate.from(e).toPlainDateTime(f.PlainTime.from(t));
60
+ }
61
+ static plainDateToInstant(e, t) {
62
+ return e.toZonedDateTime(t).toInstant();
63
+ }
64
+ }, S = class {
65
+ static getAvailableTimeZones() {
66
+ return typeof Intl.supportedValuesOf == "function" ? Intl.supportedValuesOf("timeZone") : [];
67
+ }
68
+ static getCurrentTimeZone() {
69
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
70
+ }
71
+ static getOffset(e) {
72
+ let { offset: t } = h.getNow().toZonedDateTimeISO(e);
73
+ return `GMT${t}`;
74
+ }
75
+ static getTimeZoneLabel(e, t) {
76
+ return new Intl.DateTimeFormat(t, {
77
+ timeZone: e,
78
+ timeZoneName: "long"
79
+ }).formatToParts(/* @__PURE__ */ new Date()).find((a) => a.type === "timeZoneName")?.value ?? e;
80
+ }
81
+ }, _ = null;
82
+ function W() {
83
+ return _ === null && (_ = J({
84
+ appLanguage: C.getCurrentLocale(),
85
+ hourCycle: "locale-default",
86
+ locale: C.getCurrentLocale(),
87
+ timeZone: S.getCurrentTimeZone()
88
+ })), _;
89
+ }
90
+ function X() {
91
+ let e = W();
92
+ function t(a) {
93
+ e.value = {
94
+ ...e.value,
95
+ ...a
96
+ };
97
+ }
98
+ return {
99
+ appLanguage: w(() => e.value.appLanguage),
100
+ hourCycle: w(() => e.value.hourCycle),
101
+ locale: w(() => e.value.locale),
102
+ timeZone: w(() => e.value.timeZone),
103
+ update: t
104
+ };
105
+ }
106
+ var L = class k {
107
+ static getDefaultHourCycleForLocale(t) {
108
+ let { hourCycle: a } = new Intl.DateTimeFormat(t, { hour: "2-digit" }).resolvedOptions();
109
+ return a === "h11" || a === "h12" ? "12-hour" : "24-hour";
110
+ }
111
+ static getTimeFormatOptions(t, a, T) {
112
+ return {
113
+ hour: "2-digit",
114
+ hourCycle: (function() {
115
+ switch (t) {
116
+ case "12-hour":
117
+ return "h12";
118
+ case "24-hour":
119
+ return "h23";
120
+ case "locale-default":
121
+ return k.getDefaultHourCycleForLocale(C.getCurrentLocale()) === "12-hour" ? "h12" : "h23";
122
+ }
123
+ })(),
124
+ minute: "2-digit",
125
+ second: T ? "2-digit" : void 0,
126
+ timeZone: a
127
+ };
128
+ }
129
+ }, $ = {
130
+ day: "2-digit",
131
+ month: "2-digit",
132
+ year: "numeric"
133
+ };
134
+ function re() {
135
+ let e = Q(), { appLanguage: t, hourCycle: a, locale: T, timeZone: r } = X();
136
+ function q(n) {
137
+ return f.PlainDate.from(n).toLocaleString(T.value, $);
138
+ }
139
+ function V(n) {
140
+ let s = f.Now.plainDateISO().year, i = n.from?.year !== s || n.until?.year !== s;
141
+ function o(u) {
142
+ return Z(h.plainDateToInstant(u, r.value), i);
143
+ }
144
+ let l = n.from == null ? "…" : o(n.from), c = n.until == null ? "…" : o(n.until);
145
+ return l === c ? l : `${l} - ${c}`;
146
+ }
147
+ function y(n, s = !1) {
148
+ let i = new Intl.DateTimeFormat(T.value, L.getTimeFormatOptions(a.value, r.value, s)), o = h.instantToZonedDateTime(n, r.value);
149
+ return i.format(o.epochMilliseconds);
150
+ }
151
+ function Y(n, s = !1) {
152
+ let i = n.from, o = n.until, l = h.getNow().toZonedDateTimeISO(r.value), c = l.year;
153
+ if (i === "infinity" && o !== "infinity") {
154
+ let I = o.toZonedDateTimeISO(r.value), F = I.year === c;
155
+ return e.t("date_time_format.until", { value: `${Z(o)}${F ? "" : ` ${I.year}`}, ${y(o)}` });
156
+ }
157
+ if (i !== "infinity" && o === "infinity") {
158
+ let I = i.toZonedDateTimeISO(r.value), F = I.year === c;
159
+ return e.t("date_time_format.from", { value: `${Z(i)}${F ? "" : ` ${I.year}`}, ${y(i)}` });
160
+ }
161
+ if (i === "infinity" && o === "infinity") return "∞";
162
+ let u = i, v = o, p = u.toZonedDateTimeISO(r.value), d = v.toZonedDateTimeISO(r.value), D = p.toPlainDate().equals(d.toPlainDate()), A = p.year === l.year, P = d.year === l.year;
163
+ return !D || s ? `${Z(u)}${A ? "" : ` ${p.year}`}, ${y(u)} - ${Z(v)}${P ? "" : ` ${d.year}`}, ${y(v)}` : `${y(u)} - ${y(v)}`;
164
+ }
165
+ function x(n, s = "long") {
166
+ let i = Math.round(n.until.since(n.from).total("seconds")), { days: o, hours: l, minutes: c, months: u, seconds: v, years: p } = f.Duration.from({ seconds: i }).round({
167
+ largestUnit: "year",
168
+ relativeTo: n.from.toZonedDateTimeISO(r.value)
169
+ });
170
+ function d(A, P, I = s) {
171
+ return new Intl.NumberFormat(t.value, {
172
+ style: "unit",
173
+ unit: P,
174
+ unitDisplay: I
175
+ }).format(A);
176
+ }
177
+ if (i < 60) return d(v, "second");
178
+ if (p === 0 && u === 0 && o === 0 && l === 0) return d(c, "minute");
179
+ let D = [];
180
+ return p > 0 && D.push(d(p, "year", "narrow")), u > 0 && D.push(d(u, "month", "narrow")), o > 0 && D.push(d(o, "day", "narrow")), l > 0 && p === 0 && D.push(d(l, "hour", "narrow")), c > 0 && p === 0 && D.push(d(c, "minute", "narrow")), D.join(" ");
181
+ }
182
+ function z(n) {
183
+ let s = new Intl.DateTimeFormat(T.value, {
184
+ ...$,
185
+ timeZone: r.value
186
+ }), i = h.instantToZonedDateTime(n, r.value);
187
+ return s.format(i.epochMilliseconds);
188
+ }
189
+ function U(n, s = !1) {
190
+ let i = new Intl.DateTimeFormat(T.value, {
191
+ ...$,
192
+ ...L.getTimeFormatOptions(a.value, r.value, s),
193
+ timeZone: r.value
194
+ }), o = h.instantToZonedDateTime(n, r.value);
195
+ return i.format(o.epochMilliseconds);
196
+ }
197
+ function H(n, s = h.getNow()) {
198
+ let i = new Intl.RelativeTimeFormat(t.value, {
199
+ numeric: "auto",
200
+ style: "long"
201
+ }), o = n.epochMilliseconds - s.epochMilliseconds, l = [
202
+ {
203
+ ms: 1e3 * 60 * 60 * 24 * 365,
204
+ unit: "year"
205
+ },
206
+ {
207
+ ms: 1e3 * 60 * 60 * 24 * 30,
208
+ unit: "month"
209
+ },
210
+ {
211
+ ms: 1e3 * 60 * 60 * 24 * 7,
212
+ unit: "week"
213
+ },
214
+ {
215
+ ms: 1e3 * 60 * 60 * 24,
216
+ unit: "day"
217
+ },
218
+ {
219
+ ms: 1e3 * 60 * 60,
220
+ unit: "hour"
221
+ },
222
+ {
223
+ ms: 1e3 * 60,
224
+ unit: "minute"
225
+ },
226
+ {
227
+ ms: 1e3,
228
+ unit: "second"
229
+ }
230
+ ];
231
+ if (Math.abs(o) < 6e4) return e.t("date_time_format.now");
232
+ for (let { ms: c, unit: u } of l) {
233
+ let v = Math.round(o / c);
234
+ if (Math.abs(v) >= 1) return i.format(v, u);
235
+ }
236
+ return i.format(0, "second");
237
+ }
238
+ function B(n) {
239
+ let s = new Intl.DateTimeFormat(T.value, {
240
+ day: "2-digit",
241
+ month: "2-digit",
242
+ timeZone: r.value
243
+ }), i = h.instantToZonedDateTime(n, r.value);
244
+ return s.format(i.epochMilliseconds);
245
+ }
246
+ function Z(n, s) {
247
+ let i = new Intl.DateTimeFormat(t.value, {
248
+ day: "numeric",
249
+ month: "short",
250
+ timeZone: r.value,
251
+ year: s === !0 ? "numeric" : void 0
252
+ }), o = h.instantToZonedDateTime(n, r.value);
253
+ return i.format(o.epochMilliseconds);
254
+ }
255
+ function G(n) {
256
+ let s = new Intl.DateTimeFormat(T.value, {
257
+ month: "2-digit",
258
+ timeZone: r.value,
259
+ year: "numeric"
260
+ }), i = h.instantToZonedDateTime(n, r.value);
261
+ return s.format(i.epochMilliseconds);
262
+ }
263
+ return {
264
+ formatPlainDate: q,
265
+ toDate: z,
266
+ toDateTime: U,
267
+ toRelativeTime: H,
268
+ toTime: y,
269
+ formatPlainDateRange: V,
270
+ rangeToDuration: x,
271
+ toDayAndMonth: B,
272
+ toMonthAndYear: G,
273
+ toNamedDayAndMonth: Z,
274
+ toTimeRange: Y
275
+ };
276
+ }
277
+ var K = g.instanceof(f.PlainDate, { error: () => "Invalid date format" }), j = g.instanceof(f.PlainTime, { error: () => "Invalid time format" }), E = g.object({
278
+ date: K,
279
+ time: j
280
+ }), R = g.object({
281
+ date: K.nullable(),
282
+ time: j.nullable()
283
+ }).superRefine(({ date: e, time: t }, a) => {
284
+ e === null != (t === null) && a.addIssue({
285
+ code: "custom",
286
+ message: "Date and time must both be filled in or both be empty",
287
+ path: [e === null ? "date" : "time"]
288
+ });
289
+ });
290
+ function N(e) {
291
+ return f.PlainDate.from(e.date).toPlainDateTime(f.PlainTime.from(e.time));
292
+ }
293
+ function M(e, t) {
294
+ return N(e).since(N(t)).total("seconds") < 0;
295
+ }
296
+ g.object({
297
+ from: E,
298
+ until: E
299
+ }).superRefine(({ from: e, until: t }, a) => {
300
+ M(e, t) || a.addIssue({
301
+ code: "custom",
302
+ message: "End date/time must be after start date/time",
303
+ path: ["until", "time"]
304
+ });
305
+ });
306
+ g.object({
307
+ from: R,
308
+ until: R
309
+ }).superRefine(({ from: e, until: t }, a) => {
310
+ e.date === null || e.time === null || t.date === null || t.time === null || M(e, t) || a.addIssue({
311
+ code: "custom",
312
+ message: "End date/time must be after start date/time",
313
+ path: ["until", "time"]
314
+ });
315
+ });
316
+ g.object({
317
+ from: R,
318
+ until: E
319
+ }).superRefine(({ from: e, until: t }, a) => {
320
+ e.time === null || t.date === null || M(e, t) || a.addIssue({
321
+ code: "custom",
322
+ message: "End date/time must be after start date/time",
323
+ path: ["until", "time"]
324
+ });
325
+ });
326
+ g.object({
327
+ from: E,
328
+ until: R
329
+ }).superRefine(({ from: e, until: t }, a) => {
330
+ t.date === null || t.time === null || M(e, t) || a.addIssue({
331
+ code: "custom",
332
+ message: "End date/time must be after start date/time",
333
+ path: ["until", "time"]
334
+ });
335
+ });
336
+ const b = {
337
+ [m.CREDITED]: {
338
+ isEditable: !1,
339
+ isRefreshable: !1,
340
+ isTerminal: !0,
341
+ actions: [],
342
+ tone: "success",
343
+ translationKey: "wise_invoicing.invoice.status.credited"
344
+ },
345
+ [m.DRAFT]: {
346
+ isEditable: !0,
347
+ isRefreshable: !1,
348
+ isTerminal: !1,
349
+ actions: [
350
+ "markAsReady"
351
+ ],
352
+ tone: "gray",
353
+ translationKey: "wise_invoicing.invoice.status.draft"
354
+ },
355
+ [m.FINALIZED]: {
356
+ isEditable: !1,
357
+ isRefreshable: !0,
358
+ isTerminal: !1,
359
+ actions: [],
360
+ tone: "brand",
361
+ translationKey: "wise_invoicing.invoice.status.finalized"
362
+ },
363
+ [m.OVERDUE]: {
364
+ isEditable: !1,
365
+ isRefreshable: !0,
366
+ isTerminal: !1,
367
+ actions: [
368
+ "markAsProtested",
369
+ "markAsCredited",
370
+ "markAsPaid"
371
+ ],
372
+ tone: "error",
373
+ translationKey: "wise_invoicing.invoice.status.overdue"
374
+ },
375
+ [m.OVERPAID]: {
376
+ isEditable: !1,
377
+ isRefreshable: !1,
378
+ isTerminal: !0,
379
+ actions: [],
380
+ tone: "warning",
381
+ translationKey: "wise_invoicing.invoice.status.overpaid"
382
+ },
383
+ [m.PAID]: {
384
+ isEditable: !1,
385
+ isRefreshable: !1,
386
+ isTerminal: !0,
387
+ actions: [],
388
+ tone: "success",
389
+ translationKey: "wise_invoicing.invoice.status.paid"
390
+ },
391
+ [m.PROTESTED]: {
392
+ isEditable: !1,
393
+ isRefreshable: !0,
394
+ isTerminal: !1,
395
+ actions: [
396
+ "withdrawProtest",
397
+ "markAsCredited",
398
+ "markAsPaid"
399
+ ],
400
+ tone: "warning",
401
+ translationKey: "wise_invoicing.invoice.status.protested"
402
+ },
403
+ [m.READY]: {
404
+ isEditable: !0,
405
+ isRefreshable: !1,
406
+ isTerminal: !1,
407
+ actions: [
408
+ "markAsDraft",
409
+ "finalize"
410
+ ],
411
+ tone: "blue",
412
+ translationKey: "wise_invoicing.invoice.status.ready"
413
+ },
414
+ [m.SENT]: {
415
+ isEditable: !1,
416
+ isRefreshable: !0,
417
+ isTerminal: !1,
418
+ actions: [
419
+ "markAsProtested",
420
+ "markAsCredited",
421
+ "markAsPaid"
422
+ ],
423
+ tone: "purple",
424
+ translationKey: "wise_invoicing.invoice.status.sent"
425
+ }
426
+ }, ee = {
427
+ [O.DRAFT]: b[m.DRAFT],
428
+ [O.FINALIZED]: b[m.FINALIZED],
429
+ [O.READY]: b[m.READY]
430
+ };
431
+ class se {
432
+ static getLifecycleMetadata(t) {
433
+ return ee[t];
434
+ }
435
+ static getMetadata(t) {
436
+ return b[t];
437
+ }
438
+ static isEditable(t) {
439
+ return b[t].isEditable;
440
+ }
441
+ }
442
+ const le = (e, t) => {
443
+ const a = e.__vccOpts || e;
444
+ for (const [T, r] of t)
445
+ a[T] = r;
446
+ return a;
447
+ };
448
+ export {
449
+ se as I,
450
+ le as _,
451
+ K as m,
452
+ re as p
453
+ };