@object-ui/plugin-charts 4.0.3 → 4.0.5
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/CHANGELOG.md +52 -0
- package/dist/index.js +645 -446
- package/dist/index.umd.cjs +2 -56
- package/package.json +6 -6
- package/dist/AdvancedChartImpl-BLyJ4LaI.js +0 -3981
- package/dist/BarChart-C9W1kOQ6.js +0 -16506
- package/dist/ChartImpl-AHzX3Kht.js +0 -134
- package/dist/shim-oa8knWTF.js +0 -284
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./shim-oa8knWTF.js";
|
|
2
|
-
import { Y as t, cn as n, d as r, f as i, t as a, tn as o, u as s, v as c } from "./BarChart-C9W1kOQ6.js";
|
|
3
|
-
//#region src/ChartImpl.tsx
|
|
4
|
-
var l = e();
|
|
5
|
-
function u({ data: e = [], dataKey: u = "value", xAxisKey: d = "name", height: f = 400, className: p = "", color: m = "hsl(var(--primary))" }) {
|
|
6
|
-
return /* @__PURE__ */ (0, l.jsx)("div", {
|
|
7
|
-
className: `p-2 sm:p-3 md:p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${p}`,
|
|
8
|
-
children: /* @__PURE__ */ (0, l.jsx)(n, {
|
|
9
|
-
width: "100%",
|
|
10
|
-
height: f,
|
|
11
|
-
children: /* @__PURE__ */ (0, l.jsxs)(a, {
|
|
12
|
-
data: e,
|
|
13
|
-
margin: {
|
|
14
|
-
top: 10,
|
|
15
|
-
right: 10,
|
|
16
|
-
left: 10,
|
|
17
|
-
bottom: 5
|
|
18
|
-
},
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ (0, l.jsxs)("defs", { children: [/* @__PURE__ */ (0, l.jsxs)("linearGradient", {
|
|
21
|
-
id: "barGradient",
|
|
22
|
-
x1: "0",
|
|
23
|
-
y1: "0",
|
|
24
|
-
x2: "0",
|
|
25
|
-
y2: "1",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ (0, l.jsx)("stop", {
|
|
28
|
-
offset: "0%",
|
|
29
|
-
stopColor: m,
|
|
30
|
-
stopOpacity: 1
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ (0, l.jsx)("stop", {
|
|
33
|
-
offset: "90%",
|
|
34
|
-
stopColor: m,
|
|
35
|
-
stopOpacity: .6
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ (0, l.jsx)("stop", {
|
|
38
|
-
offset: "100%",
|
|
39
|
-
stopColor: m,
|
|
40
|
-
stopOpacity: .3
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
}), /* @__PURE__ */ (0, l.jsxs)("filter", {
|
|
44
|
-
id: "glow",
|
|
45
|
-
height: "130%",
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ (0, l.jsx)("feGaussianBlur", {
|
|
48
|
-
in: "SourceAlpha",
|
|
49
|
-
stdDeviation: "3",
|
|
50
|
-
result: "blur"
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ (0, l.jsx)("feOffset", {
|
|
53
|
-
in: "blur",
|
|
54
|
-
dx: "0",
|
|
55
|
-
dy: "0",
|
|
56
|
-
result: "offsetBlur"
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ (0, l.jsx)("feFlood", {
|
|
59
|
-
floodColor: m,
|
|
60
|
-
floodOpacity: "0.5",
|
|
61
|
-
result: "offsetColor"
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ (0, l.jsx)("feComposite", {
|
|
64
|
-
in: "offsetColor",
|
|
65
|
-
in2: "offsetBlur",
|
|
66
|
-
operator: "in",
|
|
67
|
-
result: "offsetBlur"
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ (0, l.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, l.jsx)("feMergeNode", { in: "offsetBlur" }), /* @__PURE__ */ (0, l.jsx)("feMergeNode", { in: "SourceGraphic" })] })
|
|
70
|
-
]
|
|
71
|
-
})] }),
|
|
72
|
-
/* @__PURE__ */ (0, l.jsx)(c, {
|
|
73
|
-
strokeDasharray: "3 3",
|
|
74
|
-
stroke: "hsl(var(--border))",
|
|
75
|
-
vertical: !1
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ (0, l.jsx)(r, {
|
|
78
|
-
dataKey: d,
|
|
79
|
-
tick: {
|
|
80
|
-
fill: "hsl(var(--muted-foreground))",
|
|
81
|
-
fontSize: 12,
|
|
82
|
-
fontFamily: "monospace"
|
|
83
|
-
},
|
|
84
|
-
tickLine: !1,
|
|
85
|
-
axisLine: { stroke: "hsl(var(--border))" },
|
|
86
|
-
dy: 10
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ (0, l.jsx)(s, {
|
|
89
|
-
tick: {
|
|
90
|
-
fill: "hsl(var(--muted-foreground))",
|
|
91
|
-
fontSize: 12,
|
|
92
|
-
fontFamily: "monospace"
|
|
93
|
-
},
|
|
94
|
-
tickLine: !1,
|
|
95
|
-
axisLine: !1
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ (0, l.jsx)(t, {
|
|
98
|
-
cursor: {
|
|
99
|
-
fill: "hsl(var(--muted))",
|
|
100
|
-
opacity: .2
|
|
101
|
-
},
|
|
102
|
-
contentStyle: {
|
|
103
|
-
backgroundColor: "hsl(var(--popover))",
|
|
104
|
-
borderColor: "hsl(var(--border))",
|
|
105
|
-
color: "hsl(var(--popover-foreground))",
|
|
106
|
-
borderRadius: "8px",
|
|
107
|
-
fontFamily: "monospace",
|
|
108
|
-
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)"
|
|
109
|
-
},
|
|
110
|
-
itemStyle: { color: "hsl(var(--primary))" }
|
|
111
|
-
}),
|
|
112
|
-
/* @__PURE__ */ (0, l.jsx)(o, { wrapperStyle: {
|
|
113
|
-
paddingTop: "20px",
|
|
114
|
-
fontFamily: "monospace"
|
|
115
|
-
} }),
|
|
116
|
-
/* @__PURE__ */ (0, l.jsx)(i, {
|
|
117
|
-
dataKey: u,
|
|
118
|
-
fill: "url(#barGradient)",
|
|
119
|
-
radius: [
|
|
120
|
-
4,
|
|
121
|
-
4,
|
|
122
|
-
0,
|
|
123
|
-
0
|
|
124
|
-
],
|
|
125
|
-
filter: "url(#glow)",
|
|
126
|
-
animationDuration: 1500
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
})
|
|
130
|
-
})
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
|
-
export { u as default };
|
package/dist/shim-oa8knWTF.js
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
-
let r = {};
|
|
4
|
-
for (var i in e) t(r, i, {
|
|
5
|
-
get: e[i],
|
|
6
|
-
enumerable: !0
|
|
7
|
-
});
|
|
8
|
-
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
-
}, c = (e, i, o, s) => {
|
|
10
|
-
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
-
get: ((e) => i[e]).bind(null, d),
|
|
12
|
-
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
-
});
|
|
14
|
-
return e;
|
|
15
|
-
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
-
value: n,
|
|
17
|
-
enumerable: !0
|
|
18
|
-
}) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
19
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
-
}), d = /* @__PURE__ */ o(((e) => {
|
|
22
|
-
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
23
|
-
function r(e, n, r) {
|
|
24
|
-
var i = null;
|
|
25
|
-
if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
|
|
26
|
-
else r = n;
|
|
27
|
-
return n = r.ref, {
|
|
28
|
-
$$typeof: t,
|
|
29
|
-
type: e,
|
|
30
|
-
key: i,
|
|
31
|
-
ref: n === void 0 ? null : n,
|
|
32
|
-
props: r
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
36
|
-
})), f = /* @__PURE__ */ o(((e) => {
|
|
37
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
38
|
-
function t(e) {
|
|
39
|
-
if (e == null) return null;
|
|
40
|
-
if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
41
|
-
if (typeof e == "string") return e;
|
|
42
|
-
switch (e) {
|
|
43
|
-
case v: return "Fragment";
|
|
44
|
-
case b: return "Profiler";
|
|
45
|
-
case y: return "StrictMode";
|
|
46
|
-
case w: return "Suspense";
|
|
47
|
-
case T: return "SuspenseList";
|
|
48
|
-
case O: return "Activity";
|
|
49
|
-
}
|
|
50
|
-
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
51
|
-
case _: return "Portal";
|
|
52
|
-
case S: return e.displayName || "Context";
|
|
53
|
-
case x: return (e._context.displayName || "Context") + ".Consumer";
|
|
54
|
-
case C:
|
|
55
|
-
var n = e.render;
|
|
56
|
-
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
57
|
-
case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
58
|
-
case D:
|
|
59
|
-
n = e._payload, e = e._init;
|
|
60
|
-
try {
|
|
61
|
-
return t(e(n));
|
|
62
|
-
} catch {}
|
|
63
|
-
}
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
function n(e) {
|
|
67
|
-
return "" + e;
|
|
68
|
-
}
|
|
69
|
-
function r(e) {
|
|
70
|
-
try {
|
|
71
|
-
n(e);
|
|
72
|
-
var t = !1;
|
|
73
|
-
} catch {
|
|
74
|
-
t = !0;
|
|
75
|
-
}
|
|
76
|
-
if (t) {
|
|
77
|
-
t = console;
|
|
78
|
-
var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
79
|
-
return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function i(e) {
|
|
83
|
-
if (e === v) return "<>";
|
|
84
|
-
if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
|
|
85
|
-
try {
|
|
86
|
-
var n = t(e);
|
|
87
|
-
return n ? "<" + n + ">" : "<...>";
|
|
88
|
-
} catch {
|
|
89
|
-
return "<...>";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function a() {
|
|
93
|
-
var e = A.A;
|
|
94
|
-
return e === null ? null : e.getOwner();
|
|
95
|
-
}
|
|
96
|
-
function o() {
|
|
97
|
-
return Error("react-stack-top-frame");
|
|
98
|
-
}
|
|
99
|
-
function s(e) {
|
|
100
|
-
if (j.call(e, "key")) {
|
|
101
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
102
|
-
if (t && t.isReactWarning) return !1;
|
|
103
|
-
}
|
|
104
|
-
return e.key !== void 0;
|
|
105
|
-
}
|
|
106
|
-
function c(e, t) {
|
|
107
|
-
function n() {
|
|
108
|
-
P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
109
|
-
}
|
|
110
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
111
|
-
get: n,
|
|
112
|
-
configurable: !0
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
function l() {
|
|
116
|
-
var e = t(this.type);
|
|
117
|
-
return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
118
|
-
}
|
|
119
|
-
function d(e, t, n, r, i, a) {
|
|
120
|
-
var o = n.ref;
|
|
121
|
-
return e = {
|
|
122
|
-
$$typeof: g,
|
|
123
|
-
type: e,
|
|
124
|
-
key: t,
|
|
125
|
-
props: n,
|
|
126
|
-
_owner: r
|
|
127
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
128
|
-
enumerable: !1,
|
|
129
|
-
value: null
|
|
130
|
-
}) : Object.defineProperty(e, "ref", {
|
|
131
|
-
enumerable: !1,
|
|
132
|
-
get: l
|
|
133
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
134
|
-
configurable: !1,
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
writable: !0,
|
|
137
|
-
value: 0
|
|
138
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
139
|
-
configurable: !1,
|
|
140
|
-
enumerable: !1,
|
|
141
|
-
writable: !0,
|
|
142
|
-
value: null
|
|
143
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
144
|
-
configurable: !1,
|
|
145
|
-
enumerable: !1,
|
|
146
|
-
writable: !0,
|
|
147
|
-
value: i
|
|
148
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
149
|
-
configurable: !1,
|
|
150
|
-
enumerable: !1,
|
|
151
|
-
writable: !0,
|
|
152
|
-
value: a
|
|
153
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
154
|
-
}
|
|
155
|
-
function f(e, n, i, o, l, u) {
|
|
156
|
-
var f = n.children;
|
|
157
|
-
if (f !== void 0) if (o) if (M(f)) {
|
|
158
|
-
for (o = 0; o < f.length; o++) p(f[o]);
|
|
159
|
-
Object.freeze && Object.freeze(f);
|
|
160
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
161
|
-
else p(f);
|
|
162
|
-
if (j.call(n, "key")) {
|
|
163
|
-
f = t(e);
|
|
164
|
-
var m = Object.keys(n).filter(function(e) {
|
|
165
|
-
return e !== "key";
|
|
166
|
-
});
|
|
167
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), R[f + o] = !0);
|
|
168
|
-
}
|
|
169
|
-
if (f = null, i !== void 0 && (r(i), f = "" + i), s(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
170
|
-
else i = n;
|
|
171
|
-
return f && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, i, a(), l, u);
|
|
172
|
-
}
|
|
173
|
-
function p(e) {
|
|
174
|
-
m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
175
|
-
}
|
|
176
|
-
function m(e) {
|
|
177
|
-
return typeof e == "object" && !!e && e.$$typeof === g;
|
|
178
|
-
}
|
|
179
|
-
var h = u("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
180
|
-
return null;
|
|
181
|
-
};
|
|
182
|
-
h = { react_stack_bottom_frame: function(e) {
|
|
183
|
-
return e();
|
|
184
|
-
} };
|
|
185
|
-
var P, F = {}, I = h.react_stack_bottom_frame.bind(h, o)(), L = N(i(o)), R = {};
|
|
186
|
-
e.Fragment = v, e.jsx = function(e, t, n) {
|
|
187
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
188
|
-
return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
189
|
-
}, e.jsxs = function(e, t, n) {
|
|
190
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
191
|
-
return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
|
|
192
|
-
};
|
|
193
|
-
})();
|
|
194
|
-
})), p = /* @__PURE__ */ o(((e, t) => {
|
|
195
|
-
process.env.NODE_ENV === "production" ? t.exports = d() : t.exports = f();
|
|
196
|
-
})), m = /* @__PURE__ */ o(((e) => {
|
|
197
|
-
var t = u("react");
|
|
198
|
-
function n(e, t) {
|
|
199
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
200
|
-
}
|
|
201
|
-
var r = typeof Object.is == "function" ? Object.is : n, i = t.useState, a = t.useEffect, o = t.useLayoutEffect, s = t.useDebugValue;
|
|
202
|
-
function c(e, t) {
|
|
203
|
-
var n = t(), r = i({ inst: {
|
|
204
|
-
value: n,
|
|
205
|
-
getSnapshot: t
|
|
206
|
-
} }), c = r[0].inst, u = r[1];
|
|
207
|
-
return o(function() {
|
|
208
|
-
c.value = n, c.getSnapshot = t, l(c) && u({ inst: c });
|
|
209
|
-
}, [
|
|
210
|
-
e,
|
|
211
|
-
n,
|
|
212
|
-
t
|
|
213
|
-
]), a(function() {
|
|
214
|
-
return l(c) && u({ inst: c }), e(function() {
|
|
215
|
-
l(c) && u({ inst: c });
|
|
216
|
-
});
|
|
217
|
-
}, [e]), s(n), n;
|
|
218
|
-
}
|
|
219
|
-
function l(e) {
|
|
220
|
-
var t = e.getSnapshot;
|
|
221
|
-
e = e.value;
|
|
222
|
-
try {
|
|
223
|
-
var n = t();
|
|
224
|
-
return !r(e, n);
|
|
225
|
-
} catch {
|
|
226
|
-
return !0;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
function d(e, t) {
|
|
230
|
-
return t();
|
|
231
|
-
}
|
|
232
|
-
var f = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? d : c;
|
|
233
|
-
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? f : t.useSyncExternalStore;
|
|
234
|
-
})), h = /* @__PURE__ */ o(((e) => {
|
|
235
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
236
|
-
function t(e, t) {
|
|
237
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
238
|
-
}
|
|
239
|
-
function n(e, t) {
|
|
240
|
-
f || a.startTransition === void 0 || (f = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
241
|
-
var n = t();
|
|
242
|
-
if (!p) {
|
|
243
|
-
var i = t();
|
|
244
|
-
o(n, i) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), p = !0);
|
|
245
|
-
}
|
|
246
|
-
i = s({ inst: {
|
|
247
|
-
value: n,
|
|
248
|
-
getSnapshot: t
|
|
249
|
-
} });
|
|
250
|
-
var u = i[0].inst, m = i[1];
|
|
251
|
-
return l(function() {
|
|
252
|
-
u.value = n, u.getSnapshot = t, r(u) && m({ inst: u });
|
|
253
|
-
}, [
|
|
254
|
-
e,
|
|
255
|
-
n,
|
|
256
|
-
t
|
|
257
|
-
]), c(function() {
|
|
258
|
-
return r(u) && m({ inst: u }), e(function() {
|
|
259
|
-
r(u) && m({ inst: u });
|
|
260
|
-
});
|
|
261
|
-
}, [e]), d(n), n;
|
|
262
|
-
}
|
|
263
|
-
function r(e) {
|
|
264
|
-
var t = e.getSnapshot;
|
|
265
|
-
e = e.value;
|
|
266
|
-
try {
|
|
267
|
-
var n = t();
|
|
268
|
-
return !o(e, n);
|
|
269
|
-
} catch {
|
|
270
|
-
return !0;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
function i(e, t) {
|
|
274
|
-
return t();
|
|
275
|
-
}
|
|
276
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
277
|
-
var a = u("react"), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, d = a.useDebugValue, f = !1, p = !1, m = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
278
|
-
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? m : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
279
|
-
})();
|
|
280
|
-
})), g = /* @__PURE__ */ o(((e, t) => {
|
|
281
|
-
process.env.NODE_ENV === "production" ? t.exports = m() : t.exports = h();
|
|
282
|
-
}));
|
|
283
|
-
//#endregion
|
|
284
|
-
export { u as a, s as i, p as n, l as o, o as r, g as t };
|