smart-web-ui 1.0.0 → 1.0.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.
- package/dist/BuildingList.js +8 -0
- package/dist/CategoryPieChart.js +435 -0
- package/dist/ChartModel.js +46 -0
- package/dist/ChartTable.js +162 -0
- package/dist/CircularPieChart.js +314 -0
- package/dist/CloseButtonA.js +39 -0
- package/dist/ColumnDiagram.js +352 -0
- package/dist/DataColumnDiagram.js +275 -0
- package/dist/DatePicker.js +142 -0
- package/dist/DateTimePicker.js +146 -0
- package/dist/DateYearPicker.js +152 -0
- package/dist/DayTimerShaft.js +894 -0
- package/dist/DoubleColumnDiagram.js +360 -0
- package/dist/DoubleLineChart.js +410 -0
- package/dist/DoubleStraightLineChart.js +405 -0
- package/dist/EffectLoading.js +15 -0
- package/dist/GradientCircularPieChart.js +372 -0
- package/dist/GradientPieChart.js +501 -0
- package/dist/HikPlayer.js +10 -0
- package/dist/ImaginaryAndRealLineChart.js +405 -0
- package/dist/InfiniteScrollingTable.js +2150 -0
- package/dist/JessibucaPlayer.js +181 -0
- package/dist/LineChart.js +279 -0
- package/dist/MenuOne.js +75 -0
- package/dist/MultiDataColumnDiagram.js +398 -0
- package/dist/MultigraphChart.js +392 -0
- package/dist/MultitermBorderColumnDiagram.js +384 -0
- package/dist/MultitermColumnDiagram.js +359 -0
- package/dist/MyButton.js +8 -0
- package/dist/MyInput.js +42 -0
- package/dist/OnlinePieChart.js +365 -0
- package/dist/PantiltControl.js +147 -0
- package/dist/PictorialChart.js +205 -0
- package/dist/PieChart.js +252 -0
- package/dist/PieChartLegendCustom.js +251 -0
- package/dist/PieChartOne.js +438 -0
- package/dist/PopupFrame.js +131 -0
- package/dist/RangTimePicker.js +160 -0
- package/dist/RangePicker.js +156 -0
- package/dist/SingleLineChart.js +405 -0
- package/dist/SplitPie.js +242 -0
- package/dist/SplitPieChart.js +294 -0
- package/dist/StacketColumnDiagram.js +345 -0
- package/dist/TechnologyBlueFrameworkOne.js +183 -0
- package/dist/TimerShaft.js +229 -0
- package/dist/ToroidalPieChart.js +318 -0
- package/dist/WordCloudOne.js +138 -0
- package/dist/WordCloudTwo.js +157 -0
- package/dist/chunks/BuildingList-CU-EXKgo.js +126 -0
- package/dist/chunks/HikPlayer-DKfQRkh6.js +422 -0
- package/dist/chunks/MyButton-DvqgvXGG.js +36 -0
- package/dist/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/chunks/dayjs.min-CQFNnJKC.js +285 -0
- package/dist/chunks/debounce-DmrysiyS.js +84 -0
- package/dist/chunks/index-CBkwld9S.js +43886 -0
- package/dist/chunks/index-CYrEZgNC.js +334 -0
- package/dist/chunks/isObject-Bhos3v62.js +33 -0
- package/dist/chunks/merge-H4ZkNr1T.js +487 -0
- package/dist/chunks/wordCloud-uiqgdIRk.js +737 -0
- package/dist/chunks/zh_CN-BUEgxmeh.js +79 -0
- package/dist/css/BuildingList-Bdnl0gBJ.css +1 -0
- package/dist/css/CategoryPieChart-DBMhOWSp.css +1 -0
- package/dist/css/ChartModel-Dv4h1lb5.css +1 -0
- package/dist/css/ChartTable-Cr0oTeRE.css +1 -0
- package/dist/css/CircularPieChart-C3BGd8fm.css +1 -0
- package/dist/css/CloseButtonA-DY2NFd49.css +1 -0
- package/dist/css/ColumnDiagram-Dis9ikD8.css +1 -0
- package/dist/css/DataColumnDiagram-BT2JWzYV.css +1 -0
- package/dist/css/DatePicker-BcnVF2a0.css +1 -0
- package/dist/css/DateTimePicker-ogqIcJbR.css +1 -0
- package/dist/css/DateYearPicker-Cxi6LOU5.css +1 -0
- package/dist/css/DayTimerShaft-CgF_vvOC.css +1 -0
- package/dist/css/DoubleColumnDiagram-BxutsIuM.css +1 -0
- package/dist/css/DoubleLineChart-BDAn7Vm_.css +1 -0
- package/dist/css/DoubleStraightLineChart-DIRVxSDN.css +1 -0
- package/dist/css/EffectLoading-Ctm_V9PA.css +1 -0
- package/dist/css/GradientCircularPieChart-DwvudWRO.css +1 -0
- package/dist/css/GradientPieChart-BIbCGRqo.css +1 -0
- package/dist/css/HikPlayer-CZ3Esf6X.css +1 -0
- package/dist/css/ImaginaryAndRealLineChart-DM6nwp5j.css +1 -0
- package/dist/css/InfiniteScrollingTable-DI-gbfBL.css +1 -0
- package/dist/css/JessibucaPlayer-DYHP4jB_.css +1 -0
- package/dist/css/LineChart-BMK43A6-.css +1 -0
- package/dist/css/MenuOne-DZagmMAX.css +1 -0
- package/dist/css/MultiDataColumnDiagram-D1yx69tf.css +1 -0
- package/dist/css/MultigraphChart-C4dh2No_.css +1 -0
- package/dist/css/MultitermBorderColumnDiagram-DAn4G2De.css +1 -0
- package/dist/css/MultitermColumnDiagram-CF0BvPJO.css +1 -0
- package/dist/css/MyButton-CE8oLA-0.css +1 -0
- package/dist/css/MyInput-CauB72eE.css +1 -0
- package/dist/css/OnlinePieChart-DjGjF_9i.css +1 -0
- package/dist/css/PantiltControl-DS0BWsLg.css +1 -0
- package/dist/css/PictorialChart-D_NmyxMl.css +1 -0
- package/dist/css/PieChart-ijJKQrDc.css +1 -0
- package/dist/css/PieChartLegendCustom-BIQtqA8m.css +1 -0
- package/dist/css/PieChartOne-D1gY-q_Q.css +1 -0
- package/dist/css/PopupFrame-BuPG741n.css +1 -0
- package/dist/css/RangTimePicker-BhS_Fhaj.css +1 -0
- package/dist/css/RangePicker-Cmdpil97.css +1 -0
- package/dist/css/SingleLineChart-YXl29ldj.css +1 -0
- package/dist/css/SplitPie-vGvTEPG-.css +1 -0
- package/dist/css/SplitPieChart-yTrBBQxd.css +1 -0
- package/dist/css/StacketColumnDiagram-BvMIqlC_.css +1 -0
- package/dist/css/TechnologyBlueFrameworkOne-CMF1mCbl.css +1 -0
- package/dist/css/TimerShaft-LaGF129n.css +1 -0
- package/dist/css/ToroidalPieChart-CcfTDUUR.css +1 -0
- package/dist/css/WordCloudOne-CsMA5RxS.css +1 -0
- package/dist/css/WordCloudTwo-LSvh51aP.css +1 -0
- package/dist/css/index-jBItPHyv.css +1 -0
- package/dist/favicon.svg +1 -0
- package/dist/index.js +151 -0
- package/package.json +51 -50
- package/dist/assets/fonts/D-DIN.otf +0 -0
- package/dist/assets/fonts/PingFangSC.woff2 +0 -0
- package/dist/assets/fonts/SourceHanSansCN-Regular.woff +0 -0
- package/dist/assets/fonts/ysbth.woff +0 -0
- package/dist/smart-web-ui.css +0 -1
- package/dist/smart-web-ui.es.js +0 -67
- package/dist/smart-web-ui.umd.js +0 -1
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { isRef as G, toRefs as I, customRef as F, toValue as p, watch as B, getCurrentScope as U, onScopeDispose as N, onMounted as D, nextTick as q, getCurrentInstance as z, ref as k, computed as E, unref as J, shallowRef as R } from "vue";
|
|
2
|
+
function Y(e) {
|
|
3
|
+
return U() ? (N(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const L = typeof window < "u" && typeof document < "u";
|
|
6
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
+
const K = (e) => e != null, Q = Object.prototype.toString, Z = (e) => Q.call(e) === "[object Object]";
|
|
8
|
+
function P(e) {
|
|
9
|
+
return Array.isArray(e) ? e : [e];
|
|
10
|
+
}
|
|
11
|
+
function j(e) {
|
|
12
|
+
return z();
|
|
13
|
+
}
|
|
14
|
+
function ee(e, r = {}) {
|
|
15
|
+
if (!G(e))
|
|
16
|
+
return I(e);
|
|
17
|
+
const c = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
18
|
+
for (const a in e.value)
|
|
19
|
+
c[a] = F(() => ({
|
|
20
|
+
get() {
|
|
21
|
+
return e.value[a];
|
|
22
|
+
},
|
|
23
|
+
set(d) {
|
|
24
|
+
var l;
|
|
25
|
+
if ((l = p(r.replaceRef)) != null ? l : !0)
|
|
26
|
+
if (Array.isArray(e.value)) {
|
|
27
|
+
const n = [...e.value];
|
|
28
|
+
n[a] = d, e.value = n;
|
|
29
|
+
} else {
|
|
30
|
+
const n = { ...e.value, [a]: d };
|
|
31
|
+
Object.setPrototypeOf(n, Object.getPrototypeOf(e.value)), e.value = n;
|
|
32
|
+
}
|
|
33
|
+
else
|
|
34
|
+
e.value[a] = d;
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
return c;
|
|
38
|
+
}
|
|
39
|
+
function te(e, r = !0, c) {
|
|
40
|
+
j() ? D(e, c) : r ? e() : q(e);
|
|
41
|
+
}
|
|
42
|
+
function ne(e, r, c) {
|
|
43
|
+
return B(
|
|
44
|
+
e,
|
|
45
|
+
r,
|
|
46
|
+
{
|
|
47
|
+
...c,
|
|
48
|
+
immediate: !0
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const W = L ? window : void 0;
|
|
53
|
+
function O(e) {
|
|
54
|
+
var r;
|
|
55
|
+
const c = p(e);
|
|
56
|
+
return (r = c == null ? void 0 : c.$el) != null ? r : c;
|
|
57
|
+
}
|
|
58
|
+
function C(...e) {
|
|
59
|
+
const r = [], c = () => {
|
|
60
|
+
r.forEach((n) => n()), r.length = 0;
|
|
61
|
+
}, a = (n, u, s, i) => (n.addEventListener(u, s, i), () => n.removeEventListener(u, s, i)), d = E(() => {
|
|
62
|
+
const n = P(p(e[0])).filter((u) => u != null);
|
|
63
|
+
return n.every((u) => typeof u != "string") ? n : void 0;
|
|
64
|
+
}), l = ne(
|
|
65
|
+
() => {
|
|
66
|
+
var n, u;
|
|
67
|
+
return [
|
|
68
|
+
(u = (n = d.value) == null ? void 0 : n.map((s) => O(s))) != null ? u : [W].filter((s) => s != null),
|
|
69
|
+
P(p(d.value ? e[1] : e[0])),
|
|
70
|
+
P(J(d.value ? e[2] : e[1])),
|
|
71
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
72
|
+
p(d.value ? e[3] : e[2])
|
|
73
|
+
];
|
|
74
|
+
},
|
|
75
|
+
([n, u, s, i]) => {
|
|
76
|
+
if (c(), !(n != null && n.length) || !(u != null && u.length) || !(s != null && s.length))
|
|
77
|
+
return;
|
|
78
|
+
const o = Z(i) ? { ...i } : i;
|
|
79
|
+
r.push(
|
|
80
|
+
...n.flatMap(
|
|
81
|
+
(f) => u.flatMap(
|
|
82
|
+
(h) => s.map((g) => a(f, h, g, o))
|
|
83
|
+
)
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
},
|
|
87
|
+
{ flush: "post" }
|
|
88
|
+
), v = () => {
|
|
89
|
+
l(), c();
|
|
90
|
+
};
|
|
91
|
+
return Y(c), v;
|
|
92
|
+
}
|
|
93
|
+
function oe() {
|
|
94
|
+
const e = R(!1), r = z();
|
|
95
|
+
return r && D(() => {
|
|
96
|
+
e.value = !0;
|
|
97
|
+
}, r), e;
|
|
98
|
+
}
|
|
99
|
+
function $(e) {
|
|
100
|
+
const r = oe();
|
|
101
|
+
return E(() => (r.value, !!e()));
|
|
102
|
+
}
|
|
103
|
+
function re(e, r, c = {}) {
|
|
104
|
+
const { window: a = W, ...d } = c;
|
|
105
|
+
let l;
|
|
106
|
+
const v = $(() => a && "MutationObserver" in a), n = () => {
|
|
107
|
+
l && (l.disconnect(), l = void 0);
|
|
108
|
+
}, u = E(() => {
|
|
109
|
+
const f = p(e), h = P(f).map(O).filter(K);
|
|
110
|
+
return new Set(h);
|
|
111
|
+
}), s = B(
|
|
112
|
+
() => u.value,
|
|
113
|
+
(f) => {
|
|
114
|
+
n(), v.value && f.size && (l = new MutationObserver(r), f.forEach((h) => l.observe(h, d)));
|
|
115
|
+
},
|
|
116
|
+
{ immediate: !0, flush: "post" }
|
|
117
|
+
), i = () => l == null ? void 0 : l.takeRecords(), o = () => {
|
|
118
|
+
s(), n();
|
|
119
|
+
};
|
|
120
|
+
return Y(o), {
|
|
121
|
+
isSupported: v,
|
|
122
|
+
stop: o,
|
|
123
|
+
takeRecords: i
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function ie(e, r, c = {}) {
|
|
127
|
+
const { window: a = W, initialValue: d, observe: l = !1 } = c, v = R(d), n = E(() => {
|
|
128
|
+
var s;
|
|
129
|
+
return O(r) || ((s = a == null ? void 0 : a.document) == null ? void 0 : s.documentElement);
|
|
130
|
+
});
|
|
131
|
+
function u() {
|
|
132
|
+
var s;
|
|
133
|
+
const i = p(e), o = p(n);
|
|
134
|
+
if (o && a && i) {
|
|
135
|
+
const f = (s = a.getComputedStyle(o).getPropertyValue(i)) == null ? void 0 : s.trim();
|
|
136
|
+
v.value = f || v.value || d;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return l && re(n, u, {
|
|
140
|
+
attributeFilter: ["style", "class"],
|
|
141
|
+
window: a
|
|
142
|
+
}), B(
|
|
143
|
+
[n, () => p(e)],
|
|
144
|
+
(s, i) => {
|
|
145
|
+
i[0] && i[1] && i[0].style.removeProperty(i[1]), u();
|
|
146
|
+
},
|
|
147
|
+
{ immediate: !0 }
|
|
148
|
+
), B(
|
|
149
|
+
[v, n],
|
|
150
|
+
([s, i]) => {
|
|
151
|
+
const o = p(e);
|
|
152
|
+
i != null && i.style && o && (s == null ? i.style.removeProperty(o) : i.style.setProperty(o, s));
|
|
153
|
+
},
|
|
154
|
+
{ immediate: !0 }
|
|
155
|
+
), v;
|
|
156
|
+
}
|
|
157
|
+
function ce(e, r = {}) {
|
|
158
|
+
var c;
|
|
159
|
+
const {
|
|
160
|
+
pointerTypes: a,
|
|
161
|
+
preventDefault: d,
|
|
162
|
+
stopPropagation: l,
|
|
163
|
+
exact: v,
|
|
164
|
+
onMove: n,
|
|
165
|
+
onEnd: u,
|
|
166
|
+
onStart: s,
|
|
167
|
+
initialValue: i,
|
|
168
|
+
axis: o = "both",
|
|
169
|
+
draggingElement: f = W,
|
|
170
|
+
containerElement: h,
|
|
171
|
+
handle: g = e,
|
|
172
|
+
buttons: w = [0]
|
|
173
|
+
} = r, y = k(
|
|
174
|
+
(c = p(i)) != null ? c : { x: 0, y: 0 }
|
|
175
|
+
), b = k(), A = (t) => a ? a.includes(t.pointerType) : !0, H = (t) => {
|
|
176
|
+
p(d) && t.preventDefault(), p(l) && t.stopPropagation();
|
|
177
|
+
}, _ = (t) => {
|
|
178
|
+
var m;
|
|
179
|
+
if (!p(w).includes(t.button) || p(r.disabled) || !A(t) || p(v) && t.target !== p(e))
|
|
180
|
+
return;
|
|
181
|
+
const x = p(h), S = (m = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : m.call(x), M = p(e).getBoundingClientRect(), V = {
|
|
182
|
+
x: t.clientX - (x ? M.left - S.left + x.scrollLeft : M.left),
|
|
183
|
+
y: t.clientY - (x ? M.top - S.top + x.scrollTop : M.top)
|
|
184
|
+
};
|
|
185
|
+
(s == null ? void 0 : s(V, t)) !== !1 && (b.value = V, H(t));
|
|
186
|
+
}, T = (t) => {
|
|
187
|
+
if (p(r.disabled) || !A(t) || !b.value)
|
|
188
|
+
return;
|
|
189
|
+
const m = p(h), x = p(e).getBoundingClientRect();
|
|
190
|
+
let { x: S, y: M } = y.value;
|
|
191
|
+
(o === "x" || o === "both") && (S = t.clientX - b.value.x, m && (S = Math.min(Math.max(0, S), m.scrollWidth - x.width))), (o === "y" || o === "both") && (M = t.clientY - b.value.y, m && (M = Math.min(Math.max(0, M), m.scrollHeight - x.height))), y.value = {
|
|
192
|
+
x: S,
|
|
193
|
+
y: M
|
|
194
|
+
}, n == null || n(y.value, t), H(t);
|
|
195
|
+
}, X = (t) => {
|
|
196
|
+
p(r.disabled) || !A(t) || b.value && (b.value = void 0, u == null || u(y.value, t), H(t));
|
|
197
|
+
};
|
|
198
|
+
if (L) {
|
|
199
|
+
const t = () => {
|
|
200
|
+
var m;
|
|
201
|
+
return {
|
|
202
|
+
capture: (m = r.capture) != null ? m : !0,
|
|
203
|
+
passive: !p(d)
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
C(g, "pointerdown", _, t), C(f, "pointermove", T, t), C(f, "pointerup", X, t);
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
...ee(y),
|
|
210
|
+
position: y,
|
|
211
|
+
isDragging: E(() => !!b.value),
|
|
212
|
+
style: E(
|
|
213
|
+
() => `left:${y.value.x}px;top:${y.value.y}px;`
|
|
214
|
+
)
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function se(e, r, c = {}) {
|
|
218
|
+
const { window: a = W, ...d } = c;
|
|
219
|
+
let l;
|
|
220
|
+
const v = $(() => a && "ResizeObserver" in a), n = () => {
|
|
221
|
+
l && (l.disconnect(), l = void 0);
|
|
222
|
+
}, u = E(() => {
|
|
223
|
+
const o = p(e);
|
|
224
|
+
return Array.isArray(o) ? o.map((f) => O(f)) : [O(o)];
|
|
225
|
+
}), s = B(
|
|
226
|
+
u,
|
|
227
|
+
(o) => {
|
|
228
|
+
if (n(), v.value && a) {
|
|
229
|
+
l = new ResizeObserver(r);
|
|
230
|
+
for (const f of o)
|
|
231
|
+
f && l.observe(f, d);
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{ immediate: !0, flush: "post" }
|
|
235
|
+
), i = () => {
|
|
236
|
+
n(), s();
|
|
237
|
+
};
|
|
238
|
+
return Y(i), {
|
|
239
|
+
isSupported: v,
|
|
240
|
+
stop: i
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function ae(e, r = { width: 0, height: 0 }, c = {}) {
|
|
244
|
+
const { window: a = W, box: d = "content-box" } = c, l = E(() => {
|
|
245
|
+
var o, f;
|
|
246
|
+
return (f = (o = O(e)) == null ? void 0 : o.namespaceURI) == null ? void 0 : f.includes("svg");
|
|
247
|
+
}), v = R(r.width), n = R(r.height), { stop: u } = se(
|
|
248
|
+
e,
|
|
249
|
+
([o]) => {
|
|
250
|
+
const f = d === "border-box" ? o.borderBoxSize : d === "content-box" ? o.contentBoxSize : o.devicePixelContentBoxSize;
|
|
251
|
+
if (a && l.value) {
|
|
252
|
+
const h = O(e);
|
|
253
|
+
if (h) {
|
|
254
|
+
const g = h.getBoundingClientRect();
|
|
255
|
+
v.value = g.width, n.value = g.height;
|
|
256
|
+
}
|
|
257
|
+
} else if (f) {
|
|
258
|
+
const h = P(f);
|
|
259
|
+
v.value = h.reduce((g, { inlineSize: w }) => g + w, 0), n.value = h.reduce((g, { blockSize: w }) => g + w, 0);
|
|
260
|
+
} else
|
|
261
|
+
v.value = o.contentRect.width, n.value = o.contentRect.height;
|
|
262
|
+
},
|
|
263
|
+
c
|
|
264
|
+
);
|
|
265
|
+
te(() => {
|
|
266
|
+
const o = O(e);
|
|
267
|
+
o && (v.value = "offsetWidth" in o ? o.offsetWidth : r.width, n.value = "offsetHeight" in o ? o.offsetHeight : r.height);
|
|
268
|
+
});
|
|
269
|
+
const s = B(
|
|
270
|
+
() => O(e),
|
|
271
|
+
(o) => {
|
|
272
|
+
v.value = o ? r.width : 0, n.value = o ? r.height : 0;
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
function i() {
|
|
276
|
+
u(), s();
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
width: v,
|
|
280
|
+
height: n,
|
|
281
|
+
stop: i
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const le = {
|
|
285
|
+
page: (e) => [e.pageX, e.pageY],
|
|
286
|
+
client: (e) => [e.clientX, e.clientY],
|
|
287
|
+
screen: (e) => [e.screenX, e.screenY],
|
|
288
|
+
movement: (e) => e instanceof MouseEvent ? [e.movementX, e.movementY] : null
|
|
289
|
+
};
|
|
290
|
+
function fe(e = {}) {
|
|
291
|
+
const {
|
|
292
|
+
type: r = "page",
|
|
293
|
+
touch: c = !0,
|
|
294
|
+
resetOnTouchEnds: a = !1,
|
|
295
|
+
initialValue: d = { x: 0, y: 0 },
|
|
296
|
+
window: l = W,
|
|
297
|
+
target: v = l,
|
|
298
|
+
scroll: n = !0,
|
|
299
|
+
eventFilter: u
|
|
300
|
+
} = e;
|
|
301
|
+
let s = null, i = 0, o = 0;
|
|
302
|
+
const f = R(d.x), h = R(d.y), g = R(null), w = typeof r == "function" ? r : le[r], y = (t) => {
|
|
303
|
+
const m = w(t);
|
|
304
|
+
s = t, m && ([f.value, h.value] = m, g.value = "mouse"), l && (i = l.scrollX, o = l.scrollY);
|
|
305
|
+
}, b = (t) => {
|
|
306
|
+
if (t.touches.length > 0) {
|
|
307
|
+
const m = w(t.touches[0]);
|
|
308
|
+
m && ([f.value, h.value] = m, g.value = "touch");
|
|
309
|
+
}
|
|
310
|
+
}, A = () => {
|
|
311
|
+
if (!s || !l)
|
|
312
|
+
return;
|
|
313
|
+
const t = w(s);
|
|
314
|
+
s instanceof MouseEvent && t && (f.value = t[0] + l.scrollX - i, h.value = t[1] + l.scrollY - o);
|
|
315
|
+
}, H = () => {
|
|
316
|
+
f.value = d.x, h.value = d.y;
|
|
317
|
+
}, _ = u ? (t) => u(() => y(t), {}) : (t) => y(t), T = u ? (t) => u(() => b(t), {}) : (t) => b(t), X = u ? () => u(() => A(), {}) : () => A();
|
|
318
|
+
if (v) {
|
|
319
|
+
const t = { passive: !0 };
|
|
320
|
+
C(v, ["mousemove", "dragover"], _, t), c && r !== "movement" && (C(v, ["touchstart", "touchmove"], T, t), a && C(v, "touchend", H, t)), n && r === "page" && C(l, "scroll", X, t);
|
|
321
|
+
}
|
|
322
|
+
return {
|
|
323
|
+
x: f,
|
|
324
|
+
y: h,
|
|
325
|
+
sourceType: g
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
export {
|
|
329
|
+
re as a,
|
|
330
|
+
ce as b,
|
|
331
|
+
ie as c,
|
|
332
|
+
fe as d,
|
|
333
|
+
ae as u
|
|
334
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var f = typeof global == "object" && global && global.Object === Object && global, l = typeof self == "object" && self && self.Object === Object && self, g = f || l || Function("return this")(), n = g.Symbol, a = Object.prototype, j = a.hasOwnProperty, s = a.toString, e = n ? n.toStringTag : void 0;
|
|
2
|
+
function u(t) {
|
|
3
|
+
var r = j.call(t, e), i = t[e];
|
|
4
|
+
try {
|
|
5
|
+
t[e] = void 0;
|
|
6
|
+
var c = !0;
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
var b = s.call(t);
|
|
10
|
+
return c && (r ? t[e] = i : delete t[e]), b;
|
|
11
|
+
}
|
|
12
|
+
var y = Object.prototype, O = y.toString;
|
|
13
|
+
function d(t) {
|
|
14
|
+
return O.call(t);
|
|
15
|
+
}
|
|
16
|
+
var T = "[object Null]", p = "[object Undefined]", o = n ? n.toStringTag : void 0;
|
|
17
|
+
function v(t) {
|
|
18
|
+
return t == null ? t === void 0 ? p : T : o && o in Object(t) ? u(t) : d(t);
|
|
19
|
+
}
|
|
20
|
+
function h(t) {
|
|
21
|
+
return t != null && typeof t == "object";
|
|
22
|
+
}
|
|
23
|
+
function m(t) {
|
|
24
|
+
var r = typeof t;
|
|
25
|
+
return t != null && (r == "object" || r == "function");
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
h as a,
|
|
29
|
+
v as b,
|
|
30
|
+
f,
|
|
31
|
+
m as i,
|
|
32
|
+
g as r
|
|
33
|
+
};
|