@shelf/global-renderer 1.0.0-beta.0 → 1.0.0

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 (57) hide show
  1. package/CHANGELOG.md +45 -2367
  2. package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +2 -2
  3. package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +11483 -47
  4. package/lib/DecisionTreeContent/components/Condition.d.ts +2 -2
  5. package/lib/DecisionTreeContent/components/ContentTable.d.ts +2 -2
  6. package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +3 -3
  7. package/lib/DecisionTreeContent/components/Link.d.ts +2 -2
  8. package/lib/DecisionTreeContent/components/Question.d.ts +2 -2
  9. package/lib/DecisionTreeContent/components/Solution.d.ts +2 -2
  10. package/lib/DecisionTreeContent/components/StepHeader.d.ts +2 -2
  11. package/lib/DecisionTreeContent/helpers.d.ts +4 -4
  12. package/lib/DecisionTreeContent/types.d.ts +1 -1
  13. package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +2 -2
  14. package/lib/index.js +20383 -4
  15. package/package.json +19 -16
  16. package/lib/DecisionTreeContent/DecisionTreeContent.js +0 -84
  17. package/lib/DecisionTreeContent/DecisionTreeContent.styled.js +0 -225
  18. package/lib/DecisionTreeContent/components/Condition.js +0 -73
  19. package/lib/DecisionTreeContent/components/ContentTable.js +0 -26
  20. package/lib/DecisionTreeContent/components/ExportedMeta.js +0 -29
  21. package/lib/DecisionTreeContent/components/Link.js +0 -18
  22. package/lib/DecisionTreeContent/components/Question.js +0 -55
  23. package/lib/DecisionTreeContent/components/Solution.js +0 -20
  24. package/lib/DecisionTreeContent/components/StepHeader.js +0 -46
  25. package/lib/DecisionTreeContent/components/StepTypeIcon.js +0 -30
  26. package/lib/DecisionTreeContent/helpers.js +0 -56
  27. package/lib/DecisionTreeContent/renderDTContent.js +0 -12
  28. package/lib/DecisionTreeDiagram/StaticTreeContainer.js +0 -27
  29. package/lib/DecisionTreeDiagram/renderStaticDTDiagram.js +0 -26
  30. package/lib/_virtual/_commonjsHelpers.js +0 -4
  31. package/lib/_virtual/advancedFormat.js +0 -4
  32. package/lib/_virtual/client.js +0 -4
  33. package/lib/_virtual/dayjs.min.js +0 -4
  34. package/lib/_virtual/index.js +0 -4
  35. package/lib/_virtual/index2.js +0 -4
  36. package/lib/_virtual/localeData.js +0 -4
  37. package/lib/_virtual/localizedFormat.js +0 -4
  38. package/lib/_virtual/react-dom.development.js +0 -4
  39. package/lib/_virtual/react-dom.production.min.js +0 -4
  40. package/lib/_virtual/scheduler.development.js +0 -4
  41. package/lib/_virtual/scheduler.production.min.js +0 -4
  42. package/lib/i18next/index.js +0 -18
  43. package/lib/node_modules/@shelf/datetime/lib/getDateFormatTemplates.js +0 -15
  44. package/lib/node_modules/@shelf/datetime/lib/getDateWithCustomFormat.js +0 -10
  45. package/lib/node_modules/@shelf/datetime/lib/getTimeFormatTemplates.js +0 -17
  46. package/lib/node_modules/@shelf/datetime/lib/isDate.js +0 -4
  47. package/lib/node_modules/@shelf/datetime/node_modules/dayjs/dayjs.min.js +0 -295
  48. package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/advancedFormat.js +0 -54
  49. package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localeData.js +0 -82
  50. package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localizedFormat.js +0 -28
  51. package/lib/node_modules/react-dom/cjs/react-dom.development.js +0 -12880
  52. package/lib/node_modules/react-dom/cjs/react-dom.production.min.js +0 -5643
  53. package/lib/node_modules/react-dom/client.js +0 -28
  54. package/lib/node_modules/react-dom/index.js +0 -17
  55. package/lib/node_modules/scheduler/cjs/scheduler.development.js +0 -278
  56. package/lib/node_modules/scheduler/cjs/scheduler.production.min.js +0 -231
  57. package/lib/node_modules/scheduler/index.js +0 -12
@@ -1,56 +0,0 @@
1
- import { isEmpty as d, mapKeys as c, compact as x, uniq as l, sortBy as f } from "lodash";
2
- import b from "../node_modules/@shelf/datetime/lib/getDateWithCustomFormat.js";
3
- import T from "../node_modules/@shelf/datetime/lib/getDateFormatTemplates.js";
4
- import y from "../node_modules/@shelf/datetime/lib/getTimeFormatTemplates.js";
5
- const g = ["Question", "Condition"], F = (r) => r.map((o) => {
6
- const m = r.filter(
7
- (n) => n.linkedSteps?.map((i) => i.id).includes(o.id)
8
- ), s = l(m.map(({ id: n, number: i }) => ({ id: n, number: i })));
9
- return {
10
- ...o,
11
- parentSteps: f(s, "number")
12
- };
13
- }), C = (r) => {
14
- if (d(r))
15
- return [];
16
- const o = r.find(({ isFirstStep: t }) => !!t), s = (o ? [o, ...r.filter(({ isFirstStep: t }) => !t)] : [...r]).map((t, p) => ({
17
- ...t,
18
- number: p + 1
19
- })), n = c(s, "id"), i = s.map((t) => {
20
- const p = t?.question?.answers, a = t?.conditions;
21
- if (!g.includes(t?.type) || d(p) && d(a))
22
- return t;
23
- const u = p?.map((e) => ({
24
- ...e,
25
- nextStep: e?.nextStep?.id && n[e.nextStep.id] ? { ...e.nextStep, number: n[e.nextStep.id]?.number } : e.nextStep
26
- })), S = a?.map((e) => ({
27
- ...e,
28
- nextStep: e?.nextStep?.id && n[e.nextStep.id] ? { ...e.nextStep, number: n[e.nextStep.id]?.number } : e.nextStep
29
- }));
30
- return {
31
- ...t,
32
- question: { ...t.question, answers: u },
33
- linkedSteps: x(u?.map((e) => e.nextStep)),
34
- ...a ? { conditions: S } : {},
35
- ...t.defaultNextStep && n[t.defaultNextStep?.id] ? {
36
- defaultNextStep: {
37
- ...t.defaultNextStep,
38
- number: n[t.defaultNextStep.id]?.number
39
- }
40
- } : {}
41
- };
42
- });
43
- return F(i);
44
- }, D = (r) => {
45
- const o = T()?.medium ?? "MMM d, yyyy", m = y()?.short ?? "h:m a";
46
- return b({
47
- date: r,
48
- dateFormat: `${o} ${m}`
49
- });
50
- };
51
- export {
52
- g as TYPES_TO_LINK,
53
- C as convertStepToRenderFormat,
54
- D as getDateAndTime,
55
- F as getTreeWithParentSteps
56
- };
@@ -1,12 +0,0 @@
1
- import t from "react";
2
- import "../node_modules/react-dom/client.js";
3
- import n from "./DecisionTreeContent.js";
4
- import i from "../i18next/index.js";
5
- import { __exports as m } from "../_virtual/client.js";
6
- const u = (e, o = "#root") => {
7
- const r = document.querySelector(o);
8
- e.language && i.changeLanguage(e.language), m.createRoot(r).render(t.createElement(n, e, null));
9
- };
10
- export {
11
- u as renderDTContent
12
- };
@@ -1,27 +0,0 @@
1
- import { I18nextProvider as n } from "react-i18next";
2
- import { StaticTree as a } from "@shelf/decision-tree-editor-components";
3
- import t from "../i18next/index.js";
4
- import { jsx as e } from "react/jsx-runtime";
5
- const p = ({
6
- tree: r,
7
- variables: o
8
- }) => {
9
- const i = {
10
- conditionDefaultTitle: t.t("pdf-viewer.exportDTPDF.conditionDefaultTitle"),
11
- containsLabel: t.t("pdf-viewer.exportDTPDF.contains"),
12
- notContainsLabel: t.t("pdf-viewer.exportDTPDF.notContains"),
13
- andOperator: t.t("pdf-viewer.exportDTPDF.andOperator"),
14
- orOperator: t.t("pdf-viewer.exportDTPDF.orOperator")
15
- };
16
- return /* @__PURE__ */ e(n, {
17
- i18n: t,
18
- children: /* @__PURE__ */ e(a, {
19
- tree: r,
20
- ...i,
21
- variables: o
22
- })
23
- });
24
- }, s = p;
25
- export {
26
- s as default
27
- };
@@ -1,26 +0,0 @@
1
- import n from "react";
2
- import "../node_modules/react-dom/client.js";
3
- import m from "./StaticTreeContainer.js";
4
- import a from "../i18next/index.js";
5
- import { __exports as c } from "../_virtual/client.js";
6
- const u = ({
7
- language: r,
8
- tree: e,
9
- variables: t,
10
- containerSelector: o = "#diagram-container"
11
- }) => {
12
- const i = document.querySelector(o);
13
- r && a.changeLanguage(r), c.createRoot(i).render(
14
- n.createElement(
15
- m,
16
- {
17
- tree: e,
18
- variables: t
19
- },
20
- null
21
- )
22
- );
23
- };
24
- export {
25
- u as renderStaticDTDiagram
26
- };
@@ -1,4 +0,0 @@
1
- var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- export {
3
- e as commonjsGlobal
4
- };
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a as d
4
- };
@@ -1,4 +0,0 @@
1
- var r = { exports: {} };
2
- export {
3
- r
4
- };
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as s
4
- };
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a as l
4
- };
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a as l
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var o = {};
2
- export {
3
- o as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,18 +0,0 @@
1
- import { resources as n } from "@shelf/i18n/lib/bundles/pdf-viewer";
2
- import { initReactI18next as e } from "react-i18next";
3
- import r from "i18next";
4
- import { defaultInterpolation as i } from "@shelf/i18n/lib/helpers";
5
- const t = r.createInstance();
6
- t.init({
7
- lng: "en",
8
- resources: n,
9
- fallbackLng: "en",
10
- interpolation: i,
11
- missingKeyHandler: () => "\u26D4\uFE0F"
12
- });
13
- t.use(e);
14
- const l = t;
15
- export {
16
- l as default,
17
- t as i18next
18
- };
@@ -1,15 +0,0 @@
1
- import a from "../node_modules/dayjs/dayjs.min.js";
2
- import o from "../node_modules/dayjs/plugin/localeData.js";
3
- a.extend(o);
4
- const r = () => {
5
- const t = a().localeData();
6
- return {
7
- full: t.longDateFormat("LL"),
8
- long: t.longDateFormat("LL"),
9
- medium: t.longDateFormat("LL"),
10
- short: t.longDateFormat("L")
11
- };
12
- };
13
- export {
14
- r as default
15
- };
@@ -1,10 +0,0 @@
1
- import t from "../node_modules/dayjs/dayjs.min.js";
2
- import m from "../node_modules/dayjs/plugin/localizedFormat.js";
3
- import e from "../node_modules/dayjs/plugin/advancedFormat.js";
4
- import a from "./isDate.js";
5
- t.extend(m);
6
- t.extend(e);
7
- const p = ({ date: r, dateFormat: o }) => a(r) ? t(r).format(o).toString() : "";
8
- export {
9
- p as default
10
- };
@@ -1,17 +0,0 @@
1
- import o from "../node_modules/dayjs/dayjs.min.js";
2
- import a from "../node_modules/dayjs/plugin/localeData.js";
3
- import e from "../node_modules/dayjs/plugin/localizedFormat.js";
4
- o.extend(a);
5
- o.extend(e);
6
- const n = () => {
7
- const t = o().localeData();
8
- return {
9
- full: t.longDateFormat("LTS"),
10
- long: t.longDateFormat("LTS"),
11
- medium: t.longDateFormat("LTS"),
12
- short: t.longDateFormat("LT")
13
- };
14
- };
15
- export {
16
- n as default
17
- };
@@ -1,4 +0,0 @@
1
- const e = (t) => t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
2
- export {
3
- e as default
4
- };
@@ -1,295 +0,0 @@
1
- import { commonjsGlobal as P } from "../../../../../_virtual/_commonjsHelpers.js";
2
- import { d as z } from "../../../../../_virtual/dayjs.min.js";
3
- (function(V, Q) {
4
- (function(A, k) {
5
- V.exports = k();
6
- })(P, function() {
7
- var A = 1e3, k = 6e4, U = 36e5, j = "millisecond", S = "second", w = "minute", O = "hour", M = "day", x = "week", m = "month", F = "quarter", v = "year", _ = "date", J = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
8
- var n = ["th", "st", "nd", "rd"], t = i % 100;
9
- return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
10
- } }, I = function(i, n, t) {
11
- var r = String(i);
12
- return !r || r.length >= n ? i : "" + Array(n + 1 - r.length).join(t) + i;
13
- }, G = { s: I, z: function(i) {
14
- var n = -i.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
15
- return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
16
- }, m: function i(n, t) {
17
- if (n.date() < t.date())
18
- return -i(t, n);
19
- var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), s = t - e < 0, u = n.clone().add(r + (s ? -1 : 1), m);
20
- return +(-(r + (t - e) / (s ? e - u : u - e)) || 0);
21
- }, a: function(i) {
22
- return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
23
- }, p: function(i) {
24
- return { M: m, y: v, w: x, d: M, D: _, h: O, m: w, s: S, ms: j, Q: F }[i] || String(i || "").toLowerCase().replace(/s$/, "");
25
- }, u: function(i) {
26
- return i === void 0;
27
- } }, Y = "en", g = {};
28
- g[Y] = E;
29
- var N = function(i) {
30
- return i instanceof W;
31
- }, L = function i(n, t, r) {
32
- var e;
33
- if (!n)
34
- return Y;
35
- if (typeof n == "string") {
36
- var s = n.toLowerCase();
37
- g[s] && (e = s), t && (g[s] = t, e = s);
38
- var u = n.split("-");
39
- if (!e && u.length > 1)
40
- return i(u[0]);
41
- } else {
42
- var o = n.name;
43
- g[o] = n, e = o;
44
- }
45
- return !r && e && (Y = e), e || !r && Y;
46
- }, f = function(i, n) {
47
- if (N(i))
48
- return i.clone();
49
- var t = typeof n == "object" ? n : {};
50
- return t.date = i, t.args = arguments, new W(t);
51
- }, a = G;
52
- a.l = L, a.i = N, a.w = function(i, n) {
53
- return f(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
54
- };
55
- var W = function() {
56
- function i(t) {
57
- this.$L = L(t.locale, null, !0), this.parse(t);
58
- }
59
- var n = i.prototype;
60
- return n.parse = function(t) {
61
- this.$d = function(r) {
62
- var e = r.date, s = r.utc;
63
- if (e === null)
64
- return new Date(NaN);
65
- if (a.u(e))
66
- return new Date();
67
- if (e instanceof Date)
68
- return new Date(e);
69
- if (typeof e == "string" && !/Z$/i.test(e)) {
70
- var u = e.match(q);
71
- if (u) {
72
- var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
73
- return s ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
74
- }
75
- }
76
- return new Date(e);
77
- }(t), this.$x = t.x || {}, this.init();
78
- }, n.init = function() {
79
- var t = this.$d;
80
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
81
- }, n.$utils = function() {
82
- return a;
83
- }, n.isValid = function() {
84
- return this.$d.toString() !== J;
85
- }, n.isSame = function(t, r) {
86
- var e = f(t);
87
- return this.startOf(r) <= e && e <= this.endOf(r);
88
- }, n.isAfter = function(t, r) {
89
- return f(t) < this.startOf(r);
90
- }, n.isBefore = function(t, r) {
91
- return this.endOf(r) < f(t);
92
- }, n.$g = function(t, r, e) {
93
- return a.u(t) ? this[r] : this.set(e, t);
94
- }, n.unix = function() {
95
- return Math.floor(this.valueOf() / 1e3);
96
- }, n.valueOf = function() {
97
- return this.$d.getTime();
98
- }, n.startOf = function(t, r) {
99
- var e = this, s = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
100
- var y = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
101
- return s ? y : y.endOf(M);
102
- }, c = function(p, $) {
103
- return a.w(e.toDate()[p].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
104
- }, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
105
- switch (u) {
106
- case v:
107
- return s ? o(1, 0) : o(31, 11);
108
- case m:
109
- return s ? o(1, d) : o(0, d + 1);
110
- case x:
111
- var D = this.$locale().weekStart || 0, H = (h < D ? h + 7 : h) - D;
112
- return o(s ? l - H : l + (6 - H), d);
113
- case M:
114
- case _:
115
- return c(b + "Hours", 0);
116
- case O:
117
- return c(b + "Minutes", 1);
118
- case w:
119
- return c(b + "Seconds", 2);
120
- case S:
121
- return c(b + "Milliseconds", 3);
122
- default:
123
- return this.clone();
124
- }
125
- }, n.endOf = function(t) {
126
- return this.startOf(t, !1);
127
- }, n.$set = function(t, r) {
128
- var e, s = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[v] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[j] = u + "Milliseconds", e)[s], c = s === M ? this.$D + (r - this.$W) : r;
129
- if (s === m || s === v) {
130
- var h = this.clone().set(_, 1);
131
- h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
132
- } else
133
- o && this.$d[o](c);
134
- return this.init(), this;
135
- }, n.set = function(t, r) {
136
- return this.clone().$set(t, r);
137
- }, n.get = function(t) {
138
- return this[a.p(t)]();
139
- }, n.add = function(t, r) {
140
- var e, s = this;
141
- t = Number(t);
142
- var u = a.p(r), o = function(d) {
143
- var l = f(s);
144
- return a.w(l.date(l.date() + Math.round(d * t)), s);
145
- };
146
- if (u === m)
147
- return this.set(m, this.$M + t);
148
- if (u === v)
149
- return this.set(v, this.$y + t);
150
- if (u === M)
151
- return o(1);
152
- if (u === x)
153
- return o(7);
154
- var c = (e = {}, e[w] = k, e[O] = U, e[S] = A, e)[u] || 1, h = this.$d.getTime() + t * c;
155
- return a.w(h, this);
156
- }, n.subtract = function(t, r) {
157
- return this.add(-1 * t, r);
158
- }, n.format = function(t) {
159
- var r = this, e = this.$locale();
160
- if (!this.isValid())
161
- return e.invalidDate || J;
162
- var s = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, D = function($, y, T, C) {
163
- return $ && ($[y] || $(r, s)) || T[y].slice(0, C);
164
- }, H = function($) {
165
- return a.s(o % 12 || 12, $, "0");
166
- }, p = b || function($, y, T) {
167
- var C = $ < 12 ? "AM" : "PM";
168
- return T ? C.toLowerCase() : C;
169
- };
170
- return s.replace(B, function($, y) {
171
- return y || function(T) {
172
- switch (T) {
173
- case "YY":
174
- return String(r.$y).slice(-2);
175
- case "YYYY":
176
- return a.s(r.$y, 4, "0");
177
- case "M":
178
- return h + 1;
179
- case "MM":
180
- return a.s(h + 1, 2, "0");
181
- case "MMM":
182
- return D(e.monthsShort, h, l, 3);
183
- case "MMMM":
184
- return D(l, h);
185
- case "D":
186
- return r.$D;
187
- case "DD":
188
- return a.s(r.$D, 2, "0");
189
- case "d":
190
- return String(r.$W);
191
- case "dd":
192
- return D(e.weekdaysMin, r.$W, d, 2);
193
- case "ddd":
194
- return D(e.weekdaysShort, r.$W, d, 3);
195
- case "dddd":
196
- return d[r.$W];
197
- case "H":
198
- return String(o);
199
- case "HH":
200
- return a.s(o, 2, "0");
201
- case "h":
202
- return H(1);
203
- case "hh":
204
- return H(2);
205
- case "a":
206
- return p(o, c, !0);
207
- case "A":
208
- return p(o, c, !1);
209
- case "m":
210
- return String(c);
211
- case "mm":
212
- return a.s(c, 2, "0");
213
- case "s":
214
- return String(r.$s);
215
- case "ss":
216
- return a.s(r.$s, 2, "0");
217
- case "SSS":
218
- return a.s(r.$ms, 3, "0");
219
- case "Z":
220
- return u;
221
- }
222
- return null;
223
- }($) || u.replace(":", "");
224
- });
225
- }, n.utcOffset = function() {
226
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
227
- }, n.diff = function(t, r, e) {
228
- var s, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
229
- return a.m(u, c);
230
- };
231
- switch (o) {
232
- case v:
233
- s = l() / 12;
234
- break;
235
- case m:
236
- s = l();
237
- break;
238
- case F:
239
- s = l() / 3;
240
- break;
241
- case x:
242
- s = (d - h) / 6048e5;
243
- break;
244
- case M:
245
- s = (d - h) / 864e5;
246
- break;
247
- case O:
248
- s = d / U;
249
- break;
250
- case w:
251
- s = d / k;
252
- break;
253
- case S:
254
- s = d / A;
255
- break;
256
- default:
257
- s = d;
258
- }
259
- return e ? s : a.a(s);
260
- }, n.daysInMonth = function() {
261
- return this.endOf(m).$D;
262
- }, n.$locale = function() {
263
- return g[this.$L];
264
- }, n.locale = function(t, r) {
265
- if (!t)
266
- return this.$L;
267
- var e = this.clone(), s = L(t, r, !0);
268
- return s && (e.$L = s), e;
269
- }, n.clone = function() {
270
- return a.w(this.$d, this);
271
- }, n.toDate = function() {
272
- return new Date(this.valueOf());
273
- }, n.toJSON = function() {
274
- return this.isValid() ? this.toISOString() : null;
275
- }, n.toISOString = function() {
276
- return this.$d.toISOString();
277
- }, n.toString = function() {
278
- return this.$d.toUTCString();
279
- }, i;
280
- }(), Z = W.prototype;
281
- return f.prototype = Z, [["$ms", j], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", v], ["$D", _]].forEach(function(i) {
282
- Z[i[1]] = function(n) {
283
- return this.$g(n, i[0], i[1]);
284
- };
285
- }), f.extend = function(i, n) {
286
- return i.$i || (i(n, W, f), i.$i = !0), f;
287
- }, f.locale = L, f.isDayjs = N, f.unix = function(i) {
288
- return f(1e3 * i);
289
- }, f.en = g[Y], f.Ls = g, f.p = {}, f;
290
- });
291
- })(z);
292
- const X = z.exports;
293
- export {
294
- X as default
295
- };
@@ -1,54 +0,0 @@
1
- import { commonjsGlobal as l } from "../../../../../../_virtual/_commonjsHelpers.js";
2
- import { a as i } from "../../../../../../_virtual/advancedFormat.js";
3
- (function(u, d) {
4
- (function(f, t) {
5
- u.exports = t();
6
- })(l, function() {
7
- return function(f, t) {
8
- var s = t.prototype, n = s.format;
9
- s.format = function(o) {
10
- var e = this, c = this.$locale();
11
- if (!this.isValid())
12
- return n.bind(this)(o);
13
- var a = this.$utils(), m = (o || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(r) {
14
- switch (r) {
15
- case "Q":
16
- return Math.ceil((e.$M + 1) / 3);
17
- case "Do":
18
- return c.ordinal(e.$D);
19
- case "gggg":
20
- return e.weekYear();
21
- case "GGGG":
22
- return e.isoWeekYear();
23
- case "wo":
24
- return c.ordinal(e.week(), "W");
25
- case "w":
26
- case "ww":
27
- return a.s(e.week(), r === "w" ? 1 : 2, "0");
28
- case "W":
29
- case "WW":
30
- return a.s(e.isoWeek(), r === "W" ? 1 : 2, "0");
31
- case "k":
32
- case "kk":
33
- return a.s(String(e.$H === 0 ? 24 : e.$H), r === "k" ? 1 : 2, "0");
34
- case "X":
35
- return Math.floor(e.$d.getTime() / 1e3);
36
- case "x":
37
- return e.$d.getTime();
38
- case "z":
39
- return "[" + e.offsetName() + "]";
40
- case "zzz":
41
- return "[" + e.offsetName("long") + "]";
42
- default:
43
- return r;
44
- }
45
- });
46
- return n.bind(this)(m);
47
- };
48
- };
49
- });
50
- })(i);
51
- const k = i.exports;
52
- export {
53
- k as default
54
- };