@xuda.io/xuda-widget-plugin-xuda-drive 1.0.64 → 1.0.65

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.
@@ -0,0 +1,504 @@
1
+ !(function (t, e) {
2
+ "object" == typeof exports && "undefined" != typeof module
3
+ ? e(exports, require("@floating-ui/core"))
4
+ : "function" == typeof define && define.amd
5
+ ? define(["exports", "@floating-ui/core"], e)
6
+ : e(
7
+ ((t =
8
+ "undefined" != typeof globalThis
9
+ ? globalThis
10
+ : t || self).FloatingUIDOM = {}),
11
+ t.FloatingUICore
12
+ );
13
+ })(this, function (t, e) {
14
+ "use strict";
15
+ function n(t) {
16
+ var e;
17
+ return (null == (e = t.ownerDocument) ? void 0 : e.defaultView) || window;
18
+ }
19
+ function o(t) {
20
+ return n(t).getComputedStyle(t);
21
+ }
22
+ const i = Math.min,
23
+ r = Math.max,
24
+ l = Math.round;
25
+ function c(t) {
26
+ const e = o(t);
27
+ let n = parseFloat(e.width),
28
+ i = parseFloat(e.height);
29
+ const r = t.offsetWidth,
30
+ c = t.offsetHeight,
31
+ f = l(n) !== r || l(i) !== c;
32
+ return f && ((n = r), (i = c)), { width: n, height: i, fallback: f };
33
+ }
34
+ function f(t) {
35
+ return h(t) ? (t.nodeName || "").toLowerCase() : "";
36
+ }
37
+ let s;
38
+ function u() {
39
+ if (s) return s;
40
+ const t = navigator.userAgentData;
41
+ return t && Array.isArray(t.brands)
42
+ ? ((s = t.brands.map((t) => t.brand + "/" + t.version).join(" ")), s)
43
+ : navigator.userAgent;
44
+ }
45
+ function a(t) {
46
+ return t instanceof n(t).HTMLElement;
47
+ }
48
+ function d(t) {
49
+ return t instanceof n(t).Element;
50
+ }
51
+ function h(t) {
52
+ return t instanceof n(t).Node;
53
+ }
54
+ function p(t) {
55
+ if ("undefined" == typeof ShadowRoot) return !1;
56
+ return t instanceof n(t).ShadowRoot || t instanceof ShadowRoot;
57
+ }
58
+ function g(t) {
59
+ const { overflow: e, overflowX: n, overflowY: i, display: r } = o(t);
60
+ return (
61
+ /auto|scroll|overlay|hidden|clip/.test(e + i + n) &&
62
+ !["inline", "contents"].includes(r)
63
+ );
64
+ }
65
+ function m(t) {
66
+ return ["table", "td", "th"].includes(f(t));
67
+ }
68
+ function y(t) {
69
+ const e = /firefox/i.test(u()),
70
+ n = o(t),
71
+ i = n.backdropFilter || n.WebkitBackdropFilter;
72
+ return (
73
+ "none" !== n.transform ||
74
+ "none" !== n.perspective ||
75
+ (!!i && "none" !== i) ||
76
+ (e && "filter" === n.willChange) ||
77
+ (e && !!n.filter && "none" !== n.filter) ||
78
+ ["transform", "perspective"].some((t) => n.willChange.includes(t)) ||
79
+ ["paint", "layout", "strict", "content"].some((t) => {
80
+ const e = n.contain;
81
+ return null != e && e.includes(t);
82
+ })
83
+ );
84
+ }
85
+ function w() {
86
+ return !/^((?!chrome|android).)*safari/i.test(u());
87
+ }
88
+ function x(t) {
89
+ return ["html", "body", "#document"].includes(f(t));
90
+ }
91
+ function b(t) {
92
+ return d(t) ? t : t.contextElement;
93
+ }
94
+ const v = { x: 1, y: 1 };
95
+ function L(t) {
96
+ const e = b(t);
97
+ if (!a(e)) return v;
98
+ const n = e.getBoundingClientRect(),
99
+ { width: o, height: i, fallback: r } = c(e);
100
+ let f = (r ? l(n.width) : n.width) / o,
101
+ s = (r ? l(n.height) : n.height) / i;
102
+ return (
103
+ (f && Number.isFinite(f)) || (f = 1),
104
+ (s && Number.isFinite(s)) || (s = 1),
105
+ { x: f, y: s }
106
+ );
107
+ }
108
+ function T(t, e, o, i) {
109
+ var r, l;
110
+ void 0 === e && (e = !1), void 0 === o && (o = !1);
111
+ const c = t.getBoundingClientRect(),
112
+ f = b(t);
113
+ let s = v;
114
+ e && (i ? d(i) && (s = L(i)) : (s = L(t)));
115
+ const u = f ? n(f) : window,
116
+ a = !w() && o;
117
+ let h =
118
+ (c.left +
119
+ ((a && (null == (r = u.visualViewport) ? void 0 : r.offsetLeft)) ||
120
+ 0)) /
121
+ s.x,
122
+ p =
123
+ (c.top +
124
+ ((a && (null == (l = u.visualViewport) ? void 0 : l.offsetTop)) ||
125
+ 0)) /
126
+ s.y,
127
+ g = c.width / s.x,
128
+ m = c.height / s.y;
129
+ if (f) {
130
+ const t = n(f),
131
+ e = i && d(i) ? n(i) : i;
132
+ let o = t.frameElement;
133
+ for (; o && i && e !== t; ) {
134
+ const t = L(o),
135
+ e = o.getBoundingClientRect(),
136
+ i = getComputedStyle(o);
137
+ (e.x += (o.clientLeft + parseFloat(i.paddingLeft)) * t.x),
138
+ (e.y += (o.clientTop + parseFloat(i.paddingTop)) * t.y),
139
+ (h *= t.x),
140
+ (p *= t.y),
141
+ (g *= t.x),
142
+ (m *= t.y),
143
+ (h += e.x),
144
+ (p += e.y),
145
+ (o = n(o).frameElement);
146
+ }
147
+ }
148
+ return {
149
+ width: g,
150
+ height: m,
151
+ top: p,
152
+ right: h + g,
153
+ bottom: p + m,
154
+ left: h,
155
+ x: h,
156
+ y: p,
157
+ };
158
+ }
159
+ function R(t) {
160
+ return (
161
+ (h(t) ? t.ownerDocument : t.document) || window.document
162
+ ).documentElement;
163
+ }
164
+ function O(t) {
165
+ return d(t)
166
+ ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop }
167
+ : { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset };
168
+ }
169
+ function P(t) {
170
+ return T(R(t)).left + O(t).scrollLeft;
171
+ }
172
+ function E(t) {
173
+ if ("html" === f(t)) return t;
174
+ const e = t.assignedSlot || t.parentNode || (p(t) && t.host) || R(t);
175
+ return p(e) ? e.host : e;
176
+ }
177
+ function C(t) {
178
+ const e = E(t);
179
+ return x(e) ? e.ownerDocument.body : a(e) && g(e) ? e : C(e);
180
+ }
181
+ function j(t, e) {
182
+ var o;
183
+ void 0 === e && (e = []);
184
+ const i = C(t),
185
+ r = i === (null == (o = t.ownerDocument) ? void 0 : o.body),
186
+ l = n(i);
187
+ return r
188
+ ? e.concat(l, l.visualViewport || [], g(i) ? i : [])
189
+ : e.concat(i, j(i));
190
+ }
191
+ function F(t, i, l) {
192
+ return "viewport" === i
193
+ ? e.rectToClientRect(
194
+ (function (t, e) {
195
+ const o = n(t),
196
+ i = R(t),
197
+ r = o.visualViewport;
198
+ let l = i.clientWidth,
199
+ c = i.clientHeight,
200
+ f = 0,
201
+ s = 0;
202
+ if (r) {
203
+ (l = r.width), (c = r.height);
204
+ const t = w();
205
+ (t || (!t && "fixed" === e)) &&
206
+ ((f = r.offsetLeft), (s = r.offsetTop));
207
+ }
208
+ return { width: l, height: c, x: f, y: s };
209
+ })(t, l)
210
+ )
211
+ : d(i)
212
+ ? e.rectToClientRect(
213
+ (function (t, e) {
214
+ const n = T(t, !0, "fixed" === e),
215
+ o = n.top + t.clientTop,
216
+ i = n.left + t.clientLeft,
217
+ r = a(t) ? L(t) : { x: 1, y: 1 };
218
+ return {
219
+ width: t.clientWidth * r.x,
220
+ height: t.clientHeight * r.y,
221
+ x: i * r.x,
222
+ y: o * r.y,
223
+ };
224
+ })(i, l)
225
+ )
226
+ : e.rectToClientRect(
227
+ (function (t) {
228
+ const e = R(t),
229
+ n = O(t),
230
+ i = t.ownerDocument.body,
231
+ l = r(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth),
232
+ c = r(
233
+ e.scrollHeight,
234
+ e.clientHeight,
235
+ i.scrollHeight,
236
+ i.clientHeight
237
+ );
238
+ let f = -n.scrollLeft + P(t);
239
+ const s = -n.scrollTop;
240
+ return (
241
+ "rtl" === o(i).direction &&
242
+ (f += r(e.clientWidth, i.clientWidth) - l),
243
+ { width: l, height: c, x: f, y: s }
244
+ );
245
+ })(R(t))
246
+ );
247
+ }
248
+ function D(t) {
249
+ return a(t) && "fixed" !== o(t).position ? t.offsetParent : null;
250
+ }
251
+ function S(t) {
252
+ const e = n(t);
253
+ let i = D(t);
254
+ for (; i && m(i) && "static" === o(i).position; ) i = D(i);
255
+ return i &&
256
+ ("html" === f(i) ||
257
+ ("body" === f(i) && "static" === o(i).position && !y(i)))
258
+ ? e
259
+ : i ||
260
+ (function (t) {
261
+ let e = E(t);
262
+ for (; a(e) && !x(e); ) {
263
+ if (y(e)) return e;
264
+ e = E(e);
265
+ }
266
+ return null;
267
+ })(t) ||
268
+ e;
269
+ }
270
+ function W(t, e, n) {
271
+ const o = a(e),
272
+ i = R(e),
273
+ r = T(t, !0, "fixed" === n, e);
274
+ let l = { scrollLeft: 0, scrollTop: 0 };
275
+ const c = { x: 0, y: 0 };
276
+ if (o || (!o && "fixed" !== n))
277
+ if ((("body" !== f(e) || g(i)) && (l = O(e)), a(e))) {
278
+ const t = T(e, !0);
279
+ (c.x = t.x + e.clientLeft), (c.y = t.y + e.clientTop);
280
+ } else i && (c.x = P(i));
281
+ return {
282
+ x: r.left + l.scrollLeft - c.x,
283
+ y: r.top + l.scrollTop - c.y,
284
+ width: r.width,
285
+ height: r.height,
286
+ };
287
+ }
288
+ const A = {
289
+ getClippingRect: function (t) {
290
+ let { element: e, boundary: n, rootBoundary: l, strategy: c } = t;
291
+ const s =
292
+ "clippingAncestors" === n
293
+ ? (function (t, e) {
294
+ const n = e.get(t);
295
+ if (n) return n;
296
+ let i = j(t).filter((t) => d(t) && "body" !== f(t)),
297
+ r = null;
298
+ const l = "fixed" === o(t).position;
299
+ let c = l ? E(t) : t;
300
+ for (; d(c) && !x(c); ) {
301
+ const t = o(c),
302
+ e = y(c);
303
+ (
304
+ l
305
+ ? e || r
306
+ : e ||
307
+ "static" !== t.position ||
308
+ !r ||
309
+ !["absolute", "fixed"].includes(r.position)
310
+ )
311
+ ? (r = t)
312
+ : (i = i.filter((t) => t !== c)),
313
+ (c = E(c));
314
+ }
315
+ return e.set(t, i), i;
316
+ })(e, this._c)
317
+ : [].concat(n),
318
+ u = [...s, l],
319
+ a = u[0],
320
+ h = u.reduce((t, n) => {
321
+ const o = F(e, n, c);
322
+ return (
323
+ (t.top = r(o.top, t.top)),
324
+ (t.right = i(o.right, t.right)),
325
+ (t.bottom = i(o.bottom, t.bottom)),
326
+ (t.left = r(o.left, t.left)),
327
+ t
328
+ );
329
+ }, F(e, a, c));
330
+ return {
331
+ width: h.right - h.left,
332
+ height: h.bottom - h.top,
333
+ x: h.left,
334
+ y: h.top,
335
+ };
336
+ },
337
+ convertOffsetParentRelativeRectToViewportRelativeRect: function (t) {
338
+ let { rect: e, offsetParent: n, strategy: o } = t;
339
+ const i = a(n),
340
+ r = R(n);
341
+ if (n === r) return e;
342
+ let l = { scrollLeft: 0, scrollTop: 0 },
343
+ c = { x: 1, y: 1 };
344
+ const s = { x: 0, y: 0 };
345
+ if (
346
+ (i || (!i && "fixed" !== o)) &&
347
+ (("body" !== f(n) || g(r)) && (l = O(n)), a(n))
348
+ ) {
349
+ const t = T(n);
350
+ (c = L(n)), (s.x = t.x + n.clientLeft), (s.y = t.y + n.clientTop);
351
+ }
352
+ return {
353
+ width: e.width * c.x,
354
+ height: e.height * c.y,
355
+ x: e.x * c.x - l.scrollLeft * c.x + s.x,
356
+ y: e.y * c.y - l.scrollTop * c.y + s.y,
357
+ };
358
+ },
359
+ isElement: d,
360
+ getDimensions: function (t) {
361
+ return a(t) ? c(t) : t.getBoundingClientRect();
362
+ },
363
+ getOffsetParent: S,
364
+ getDocumentElement: R,
365
+ getScale: L,
366
+ async getElementRects(t) {
367
+ let { reference: e, floating: n, strategy: o } = t;
368
+ const i = this.getOffsetParent || S,
369
+ r = this.getDimensions;
370
+ return {
371
+ reference: W(e, await i(n), o),
372
+ floating: { x: 0, y: 0, ...(await r(n)) },
373
+ };
374
+ },
375
+ getClientRects: (t) => Array.from(t.getClientRects()),
376
+ isRTL: (t) => "rtl" === o(t).direction,
377
+ };
378
+ Object.defineProperty(t, "arrow", {
379
+ enumerable: !0,
380
+ get: function () {
381
+ return e.arrow;
382
+ },
383
+ }),
384
+ Object.defineProperty(t, "autoPlacement", {
385
+ enumerable: !0,
386
+ get: function () {
387
+ return e.autoPlacement;
388
+ },
389
+ }),
390
+ Object.defineProperty(t, "detectOverflow", {
391
+ enumerable: !0,
392
+ get: function () {
393
+ return e.detectOverflow;
394
+ },
395
+ }),
396
+ Object.defineProperty(t, "flip", {
397
+ enumerable: !0,
398
+ get: function () {
399
+ return e.flip;
400
+ },
401
+ }),
402
+ Object.defineProperty(t, "hide", {
403
+ enumerable: !0,
404
+ get: function () {
405
+ return e.hide;
406
+ },
407
+ }),
408
+ Object.defineProperty(t, "inline", {
409
+ enumerable: !0,
410
+ get: function () {
411
+ return e.inline;
412
+ },
413
+ }),
414
+ Object.defineProperty(t, "limitShift", {
415
+ enumerable: !0,
416
+ get: function () {
417
+ return e.limitShift;
418
+ },
419
+ }),
420
+ Object.defineProperty(t, "offset", {
421
+ enumerable: !0,
422
+ get: function () {
423
+ return e.offset;
424
+ },
425
+ }),
426
+ Object.defineProperty(t, "shift", {
427
+ enumerable: !0,
428
+ get: function () {
429
+ return e.shift;
430
+ },
431
+ }),
432
+ Object.defineProperty(t, "size", {
433
+ enumerable: !0,
434
+ get: function () {
435
+ return e.size;
436
+ },
437
+ }),
438
+ (t.autoUpdate = function (t, e, n, o) {
439
+ void 0 === o && (o = {});
440
+ const {
441
+ ancestorScroll: i = !0,
442
+ ancestorResize: r = !0,
443
+ elementResize: l = !0,
444
+ animationFrame: c = !1,
445
+ } = o,
446
+ f = i && !c,
447
+ s =
448
+ f || r
449
+ ? [
450
+ ...(d(t) ? j(t) : t.contextElement ? j(t.contextElement) : []),
451
+ ...j(e),
452
+ ]
453
+ : [];
454
+ s.forEach((t) => {
455
+ f && t.addEventListener("scroll", n, { passive: !0 }),
456
+ r && t.addEventListener("resize", n);
457
+ });
458
+ let u,
459
+ a = null;
460
+ if (l) {
461
+ let o = !0;
462
+ (a = new ResizeObserver(() => {
463
+ o || n(), (o = !1);
464
+ })),
465
+ d(t) && !c && a.observe(t),
466
+ d(t) || !t.contextElement || c || a.observe(t.contextElement),
467
+ a.observe(e);
468
+ }
469
+ let h = c ? T(t) : null;
470
+ return (
471
+ c &&
472
+ (function e() {
473
+ const o = T(t);
474
+ !h ||
475
+ (o.x === h.x &&
476
+ o.y === h.y &&
477
+ o.width === h.width &&
478
+ o.height === h.height) ||
479
+ n();
480
+ (h = o), (u = requestAnimationFrame(e));
481
+ })(),
482
+ n(),
483
+ () => {
484
+ var t;
485
+ s.forEach((t) => {
486
+ f && t.removeEventListener("scroll", n),
487
+ r && t.removeEventListener("resize", n);
488
+ }),
489
+ null == (t = a) || t.disconnect(),
490
+ (a = null),
491
+ c && cancelAnimationFrame(u);
492
+ }
493
+ );
494
+ }),
495
+ (t.computePosition = (t, n, o) => {
496
+ const i = new Map(),
497
+ r = { platform: A, ...o },
498
+ l = { ...r.platform, _c: i };
499
+ return e.computePosition(t, n, { ...r, platform: l });
500
+ }),
501
+ (t.getOverflowAncestors = j),
502
+ (t.platform = A),
503
+ Object.defineProperty(t, "__esModule", { value: !0 });
504
+ });