@das-fed/ui 1.1.4 → 6.3.0-beta.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 (152) hide show
  1. package/global/icons/index.local.js +1 -1
  2. package/global/style/index.css +1 -1
  3. package/global/style/scrollbar.css +22 -22
  4. package/global/theme/index.js +12 -12
  5. package/global/theme/module/color.js +31 -31
  6. package/global/theme/module/fontSize.js +5 -5
  7. package/global/theme/module/scrollbar.js +6 -6
  8. package/package.json +13 -7
  9. package/packages/business-components/app-container/index.js +154 -147
  10. package/packages/business-components/change-enterprises/index.css +1 -0
  11. package/packages/business-components/change-enterprises/index.js +241 -0
  12. package/packages/business-components/change-pwd/index.css +1 -0
  13. package/packages/business-components/change-pwd/index.js +330 -0
  14. package/packages/business-components/currency-page/index.css +1 -0
  15. package/packages/business-components/currency-page/index.js +99 -0
  16. package/packages/business-components/device-panel/index.css +1 -0
  17. package/packages/business-components/device-panel/index.js +115939 -0
  18. package/packages/business-components/echarts/index.js +93 -122
  19. package/packages/business-components/export-button/index.js +73 -66
  20. package/packages/business-components/import-button/index.js +213 -170
  21. package/packages/business-components/index.js +8 -1
  22. package/packages/business-components/layout-breadcrumb/index.js +82 -66
  23. package/packages/business-components/model-table-dialog/index.js +299 -289
  24. package/packages/business-components/process-configuration/index.css +1 -0
  25. package/packages/business-components/process-configuration/index.js +612 -0
  26. package/packages/business-components/process-form/index.css +1 -0
  27. package/packages/business-components/process-form/index.js +524 -0
  28. package/packages/business-components/process-search-form/index.js +73 -315
  29. package/packages/business-components/process-table/index.css +1 -1
  30. package/packages/business-components/process-table/index.js +186 -152
  31. package/packages/business-components/urgent-panel/index.css +1 -0
  32. package/packages/business-components/urgent-panel/index.js +3914 -0
  33. package/packages/business-components/user-org-dialog/index.js +466 -375
  34. package/packages/business-components/video-dialog/index.css +1 -0
  35. package/packages/business-components/video-dialog/index.js +1041 -0
  36. package/packages/business.js +1 -2
  37. package/packages/components/alert/index.js +449 -633
  38. package/packages/components/audio-video/index.css +1 -1
  39. package/packages/components/audio-video/index.js +312 -126
  40. package/packages/components/autocomplete/index.css +1 -1
  41. package/packages/components/autocomplete/index.js +312 -2923
  42. package/packages/components/breadcrumb/index.js +97 -82
  43. package/packages/components/button/index.css +1 -1
  44. package/packages/components/button/index.js +646 -787
  45. package/packages/components/calendar/index.css +1 -1
  46. package/packages/components/calendar/index.js +655 -3879
  47. package/packages/components/cascader/index.js +209 -203
  48. package/packages/components/checkbox/index.css +1 -1
  49. package/packages/components/checkbox/index.js +710 -872
  50. package/packages/components/collapse-panel/index.css +1 -1
  51. package/packages/components/collapse-panel/index.js +419 -601
  52. package/packages/components/collapse-transition/index.js +23 -21
  53. package/packages/components/collaspe/index.css +1 -1
  54. package/packages/components/collaspe/index.js +413 -595
  55. package/packages/components/color-picker/index.css +1 -1
  56. package/packages/components/color-picker/index.js +176 -133
  57. package/packages/components/custom-search-item/index.js +43 -37
  58. package/packages/components/date-picker/index.js +1338 -1459
  59. package/packages/components/dialog/index.js +441 -241
  60. package/packages/components/dimple-layout/index.css +1 -1
  61. package/packages/components/dimple-layout/index.js +1298 -1794
  62. package/packages/components/drawer/index.js +116 -101
  63. package/packages/components/dropdown/index.js +129 -109
  64. package/packages/components/edit-table/index.css +1 -1
  65. package/packages/components/edit-table/index.js +868 -752
  66. package/packages/components/empty/index.js +83 -78
  67. package/packages/components/form/index.js +22 -15
  68. package/packages/components/form-item/index.css +1 -1
  69. package/packages/components/form-item/index.js +601 -440
  70. package/packages/components/icon/index.css +1 -1
  71. package/packages/components/icon/index.js +38 -22
  72. package/packages/components/image-preview/index.css +1 -0
  73. package/packages/components/image-preview/index.js +2714 -0
  74. package/packages/components/image-upload/index.js +601 -765
  75. package/packages/components/image-viewer/index.css +1 -1
  76. package/packages/components/image-viewer/index.js +909 -990
  77. package/packages/components/index.js +2 -2
  78. package/packages/components/input/index.css +1 -1
  79. package/packages/components/input/index.js +284 -256
  80. package/packages/components/input-dialog-select/index.css +1 -1
  81. package/packages/components/input-dialog-select/index.js +179 -156
  82. package/packages/components/input-number/index.css +1 -1
  83. package/packages/components/input-number/index.js +157 -170
  84. package/packages/components/live-player/index.css +1 -0
  85. package/packages/components/live-player/index.js +170 -0
  86. package/packages/components/loading/index.js +17 -26
  87. package/packages/components/map/index.css +1 -1
  88. package/packages/components/map/index.js +18913 -461
  89. package/packages/components/menu-aside/index.css +1 -1
  90. package/packages/components/menu-aside/index.js +648 -713
  91. package/packages/components/menu-header/index.js +446 -629
  92. package/packages/components/message/index.js +25 -16
  93. package/packages/components/notification/index.js +386 -575
  94. package/packages/components/overlay/index.js +112 -103
  95. package/packages/components/pagination/index.js +260 -330
  96. package/packages/components/popover/index.js +104 -93
  97. package/packages/components/popup-mask/index.css +1 -1
  98. package/packages/components/popup-mask/index.js +77 -72
  99. package/packages/components/preview/index.js +33 -28
  100. package/packages/components/progress/index.js +214 -221
  101. package/packages/components/radio/index.css +1 -1
  102. package/packages/components/radio/index.js +699 -862
  103. package/packages/components/radio-tabs/index.js +144 -107
  104. package/packages/components/rich-editor/index.css +1 -1
  105. package/packages/components/rich-editor/index.js +105 -106
  106. package/packages/components/scrollbar/index.css +3 -2
  107. package/packages/components/scrollbar/index.js +2262 -1201
  108. package/packages/components/search/index.js +500 -664
  109. package/packages/components/search-form/index.css +1 -1
  110. package/packages/components/search-form/index.js +724 -626
  111. package/packages/components/select/index.css +1 -1
  112. package/packages/components/select/index.js +1052 -950
  113. package/packages/components/select-input/index.js +63 -53
  114. package/packages/components/select-list/index.css +1 -1
  115. package/packages/components/select-list/index.js +258 -235
  116. package/packages/components/special-range-picker-month/index.css +1 -1
  117. package/packages/components/special-range-picker-month/index.js +3068 -72555
  118. package/packages/components/special-range-picker-year/index.css +1 -1
  119. package/packages/components/special-range-picker-year/index.js +345 -339
  120. package/packages/components/spin/index.js +415 -594
  121. package/packages/components/split-panel/index.css +1 -1
  122. package/packages/components/split-panel/index.js +146 -127
  123. package/packages/components/step/index.js +414 -597
  124. package/packages/components/steps/index.js +407 -590
  125. package/packages/components/switch/index.js +23 -23
  126. package/packages/components/table/index.css +1 -1
  127. package/packages/components/table/index.js +80813 -27734
  128. package/packages/components/tabs/index.css +1 -1
  129. package/packages/components/tabs/index.js +620 -813
  130. package/packages/components/tag/index.js +63 -63
  131. package/packages/components/text-tooltip/index.css +9 -0
  132. package/packages/components/text-tooltip/index.js +2739 -33
  133. package/packages/components/time-line/index.js +464 -643
  134. package/packages/components/tooltip/index.css +1 -1
  135. package/packages/components/tooltip/index.js +108 -79
  136. package/packages/components/tree/index.css +1 -1
  137. package/packages/components/tree/index.js +840 -809
  138. package/packages/components/tree-select/index.js +271 -303
  139. package/packages/components/tree-table/index.js +461 -352
  140. package/packages/components/upload/index.js +682 -858
  141. package/packages/components/virtual-tree/index.css +1 -1
  142. package/packages/components/virtual-tree/index.js +144 -126
  143. package/packages/index.d.ts +1 -0
  144. package/packages/index.js +2 -2
  145. package/style/business.css +11 -4
  146. package/style/index.css +55 -45
  147. package/packages/business-components/low-code/index.css +0 -1
  148. package/packages/business-components/low-code/index.js +0 -60
  149. package/packages/components/audio-video-player/index.css +0 -1
  150. package/packages/components/audio-video-player/index.js +0 -83
  151. package/packages/components/table-column/index.css +0 -1
  152. package/packages/components/table-column/index.js +0 -82021
@@ -3,6 +3,2635 @@ import { getVarValue, getVar, setThemeRule } from '@das-fed/web';
3
3
  import { ref } from 'vue';
4
4
  import { useZIndex } from '@das-fed/utils/hooks/popup-manager/use-zindex';
5
5
 
6
+ /*!
7
+ * OverlayScrollbars
8
+ * Version: 2.8.3
9
+ *
10
+ * Copyright (c) Rene Haas | KingSora.
11
+ * https://github.com/KingSora
12
+ *
13
+ * Released under the MIT license.
14
+ */
15
+ const createCache = (t, n) => {
16
+ const {o: o, i: s, u: e} = t;
17
+ let c = o;
18
+ let r;
19
+ const cacheUpdateContextual = (t, n) => {
20
+ const o = c;
21
+ const l = t;
22
+ const i = n || (s ? !s(o, l) : o !== l);
23
+ if (i || e) {
24
+ c = l;
25
+ r = o;
26
+ }
27
+ return [ c, i, r ];
28
+ };
29
+ const cacheUpdateIsolated = t => cacheUpdateContextual(n(c, r), t);
30
+ const getCurrentCache = t => [ c, !!t, r ];
31
+ return [ n ? cacheUpdateIsolated : cacheUpdateContextual, getCurrentCache ];
32
+ };
33
+
34
+ const t = typeof window !== "undefined" && typeof document !== "undefined";
35
+
36
+ const n = t ? window : {};
37
+
38
+ const o = Math.max;
39
+
40
+ const s = Math.min;
41
+
42
+ const e = Math.round;
43
+
44
+ const c = Math.abs;
45
+
46
+ const r = Math.sign;
47
+
48
+ const l = n.cancelAnimationFrame;
49
+
50
+ const i = n.requestAnimationFrame;
51
+
52
+ const a = n.setTimeout;
53
+
54
+ const u = n.clearTimeout;
55
+
56
+ const getApi = t => typeof n[t] !== "undefined" ? n[t] : void 0;
57
+
58
+ const _ = getApi("MutationObserver");
59
+
60
+ const d = getApi("IntersectionObserver");
61
+
62
+ const f = getApi("ResizeObserver");
63
+
64
+ const p = getApi("ScrollTimeline");
65
+
66
+ const v = t && Node.ELEMENT_NODE;
67
+
68
+ const {toString: h, hasOwnProperty: g} = Object.prototype;
69
+
70
+ const isUndefined = t => t === void 0;
71
+
72
+ const isNull = t => t === null;
73
+
74
+ const isNumber = t => typeof t === "number";
75
+
76
+ const isString = t => typeof t === "string";
77
+
78
+ const isBoolean = t => typeof t === "boolean";
79
+
80
+ const isFunction = t => typeof t === "function";
81
+
82
+ const isArray = t => Array.isArray(t);
83
+
84
+ const isObject = t => typeof t === "object" && !isArray(t) && !isNull(t);
85
+
86
+ const isArrayLike = t => {
87
+ const n = !!t && t.length;
88
+ const o = isNumber(n) && n > -1 && n % 1 == 0;
89
+ return isArray(t) || !isFunction(t) && o ? n > 0 && isObject(t) ? n - 1 in t : true : false;
90
+ };
91
+
92
+ const isPlainObject = t => {
93
+ if (!t || !isObject(t)) {
94
+ return false;
95
+ }
96
+ let n;
97
+ const o = "constructor";
98
+ const s = t[o];
99
+ const e = s && s.prototype;
100
+ const c = g.call(t, o);
101
+ const r = e && g.call(e, "isPrototypeOf");
102
+ if (s && !c && !r) {
103
+ return false;
104
+ }
105
+ for (n in t) {}
106
+ return isUndefined(n) || g.call(t, n);
107
+ };
108
+
109
+ const isHTMLElement = t => {
110
+ const n = HTMLElement;
111
+ return t ? n ? t instanceof n : t.nodeType === v : false;
112
+ };
113
+
114
+ const isElement = t => {
115
+ const n = Element;
116
+ return t ? n ? t instanceof n : t.nodeType === v : false;
117
+ };
118
+
119
+ function each(t, n) {
120
+ if (isArrayLike(t)) {
121
+ for (let o = 0; o < t.length; o++) {
122
+ if (n(t[o], o, t) === false) {
123
+ break;
124
+ }
125
+ }
126
+ } else if (t) {
127
+ each(Object.keys(t), (o => n(t[o], o, t)));
128
+ }
129
+ return t;
130
+ }
131
+
132
+ const inArray = (t, n) => t.indexOf(n) >= 0;
133
+
134
+ const concat = (t, n) => t.concat(n);
135
+
136
+ const push = (t, n, o) => {
137
+ !isString(n) && isArrayLike(n) ? Array.prototype.push.apply(t, n) : t.push(n);
138
+ return t;
139
+ };
140
+
141
+ const from = t => Array.from(t || []);
142
+
143
+ const createOrKeepArray = t => isArray(t) ? t : [ t ];
144
+
145
+ const isEmptyArray = t => !!t && !t.length;
146
+
147
+ const deduplicateArray = t => from(new Set(t));
148
+
149
+ const runEachAndClear = (t, n, o) => {
150
+ const runFn = t => t && t.apply(void 0, n || []);
151
+ each(t, runFn);
152
+ !o && (t.length = 0);
153
+ };
154
+
155
+ const b = "paddingTop";
156
+
157
+ const w = "paddingRight";
158
+
159
+ const y = "paddingLeft";
160
+
161
+ const m = "paddingBottom";
162
+
163
+ const S = "marginLeft";
164
+
165
+ const O = "marginRight";
166
+
167
+ const $ = "marginBottom";
168
+
169
+ const C = "overflowX";
170
+
171
+ const x = "overflowY";
172
+
173
+ const H = "width";
174
+
175
+ const E = "height";
176
+
177
+ const z = "visible";
178
+
179
+ const I = "hidden";
180
+
181
+ const A = "scroll";
182
+
183
+ const capitalizeFirstLetter = t => {
184
+ const n = String(t || "");
185
+ return n ? n[0].toUpperCase() + n.slice(1) : "";
186
+ };
187
+
188
+ const equal = (t, n, o, s) => {
189
+ if (t && n) {
190
+ let e = true;
191
+ each(o, (o => {
192
+ const c = t[o];
193
+ const r = n[o];
194
+ if (c !== r) {
195
+ e = false;
196
+ }
197
+ }));
198
+ return e;
199
+ }
200
+ return false;
201
+ };
202
+
203
+ const equalWH = (t, n) => equal(t, n, [ "w", "h" ]);
204
+
205
+ const equalXY = (t, n) => equal(t, n, [ "x", "y" ]);
206
+
207
+ const equalTRBL = (t, n) => equal(t, n, [ "t", "r", "b", "l" ]);
208
+
209
+ const noop = () => {};
210
+
211
+ const bind = (t, ...n) => t.bind(0, ...n);
212
+
213
+ const selfClearTimeout = t => {
214
+ let n;
215
+ const o = t ? a : i;
216
+ const s = t ? u : l;
217
+ return [ e => {
218
+ s(n);
219
+ n = o((() => e()), isFunction(t) ? t() : t);
220
+ }, () => s(n) ];
221
+ };
222
+
223
+ const debounce = (t, n) => {
224
+ const {_: o, p: s, v: e, m: c} = n || {};
225
+ let r;
226
+ let _;
227
+ let d;
228
+ let f;
229
+ let p = noop;
230
+ const v = function invokeFunctionToDebounce(n) {
231
+ p();
232
+ u(r);
233
+ f = r = _ = void 0;
234
+ p = noop;
235
+ t.apply(this, n);
236
+ };
237
+ const mergeParms = t => c && _ ? c(_, t) : t;
238
+ const flush = () => {
239
+ if (p !== noop) {
240
+ v(mergeParms(d) || d);
241
+ }
242
+ };
243
+ const h = function debouncedFn() {
244
+ const t = from(arguments);
245
+ const n = isFunction(o) ? o() : o;
246
+ const c = isNumber(n) && n >= 0;
247
+ if (c) {
248
+ const o = isFunction(s) ? s() : s;
249
+ const c = isNumber(o) && o >= 0;
250
+ const h = n > 0 ? a : i;
251
+ const g = n > 0 ? u : l;
252
+ const b = mergeParms(t);
253
+ const w = b || t;
254
+ const y = v.bind(0, w);
255
+ let m;
256
+ p();
257
+ if (e && !f) {
258
+ y();
259
+ f = true;
260
+ m = h((() => f = void 0), n);
261
+ } else {
262
+ m = h(y, n);
263
+ if (c && !r) {
264
+ r = a(flush, o);
265
+ }
266
+ }
267
+ p = () => g(m);
268
+ _ = d = w;
269
+ } else {
270
+ v(t);
271
+ }
272
+ };
273
+ h.S = flush;
274
+ return h;
275
+ };
276
+
277
+ const hasOwnProperty = (t, n) => Object.prototype.hasOwnProperty.call(t, n);
278
+
279
+ const keys = t => t ? Object.keys(t) : [];
280
+
281
+ const assignDeep = (t, n, o, s, e, c, r) => {
282
+ const l = [ n, o, s, e, c, r ];
283
+ if ((typeof t !== "object" || isNull(t)) && !isFunction(t)) {
284
+ t = {};
285
+ }
286
+ each(l, (n => {
287
+ each(n, ((o, s) => {
288
+ const e = n[s];
289
+ if (t === e) {
290
+ return true;
291
+ }
292
+ const c = isArray(e);
293
+ if (e && isPlainObject(e)) {
294
+ const n = t[s];
295
+ let o = n;
296
+ if (c && !isArray(n)) {
297
+ o = [];
298
+ } else if (!c && !isPlainObject(n)) {
299
+ o = {};
300
+ }
301
+ t[s] = assignDeep(o, e);
302
+ } else {
303
+ t[s] = c ? e.slice() : e;
304
+ }
305
+ }));
306
+ }));
307
+ return t;
308
+ };
309
+
310
+ const removeUndefinedProperties = (t, n) => each(assignDeep({}, t), ((t, o, s) => {
311
+ if (t === void 0) {
312
+ delete s[o];
313
+ } else if (t && isPlainObject(t)) {
314
+ s[o] = removeUndefinedProperties(t);
315
+ }
316
+ }));
317
+
318
+ const isEmptyObject = t => {
319
+ for (const n in t) {
320
+ return false;
321
+ }
322
+ return true;
323
+ };
324
+
325
+ const capNumber = (t, n, e) => o(t, s(n, e));
326
+
327
+ const getDomTokensArray = t => from(new Set((isArray(t) ? t : (t || "").split(" ")).filter((t => t))));
328
+
329
+ const getAttr = (t, n) => t && t.getAttribute(n);
330
+
331
+ const hasAttr = (t, n) => t && t.hasAttribute(n);
332
+
333
+ const setAttrs = (t, n, o) => {
334
+ each(getDomTokensArray(n), (n => {
335
+ t && t.setAttribute(n, String(o || ""));
336
+ }));
337
+ };
338
+
339
+ const removeAttrs = (t, n) => {
340
+ each(getDomTokensArray(n), (n => t && t.removeAttribute(n)));
341
+ };
342
+
343
+ const domTokenListAttr = (t, n) => {
344
+ const o = getDomTokensArray(getAttr(t, n));
345
+ const s = bind(setAttrs, t, n);
346
+ const domTokenListOperation = (t, n) => {
347
+ const s = new Set(o);
348
+ each(getDomTokensArray(t), (t => {
349
+ s[n](t);
350
+ }));
351
+ return from(s).join(" ");
352
+ };
353
+ return {
354
+ O: t => s(domTokenListOperation(t, "delete")),
355
+ $: t => s(domTokenListOperation(t, "add")),
356
+ C: t => {
357
+ const n = getDomTokensArray(t);
358
+ return n.reduce(((t, n) => t && o.includes(n)), n.length > 0);
359
+ }
360
+ };
361
+ };
362
+
363
+ const removeAttrClass = (t, n, o) => {
364
+ domTokenListAttr(t, n).O(o);
365
+ return bind(addAttrClass, t, n, o);
366
+ };
367
+
368
+ const addAttrClass = (t, n, o) => {
369
+ domTokenListAttr(t, n).$(o);
370
+ return bind(removeAttrClass, t, n, o);
371
+ };
372
+
373
+ const addRemoveAttrClass = (t, n, o, s) => (s ? addAttrClass : removeAttrClass)(t, n, o);
374
+
375
+ const hasAttrClass = (t, n, o) => domTokenListAttr(t, n).C(o);
376
+
377
+ const createDomTokenListClass = t => domTokenListAttr(t, "class");
378
+
379
+ const removeClass = (t, n) => {
380
+ createDomTokenListClass(t).O(n);
381
+ };
382
+
383
+ const addClass = (t, n) => {
384
+ createDomTokenListClass(t).$(n);
385
+ return bind(removeClass, t, n);
386
+ };
387
+
388
+ const find = (t, n) => {
389
+ const o = [];
390
+ const s = n ? isElement(n) && n : document;
391
+ return s ? push(o, s.querySelectorAll(t)) : o;
392
+ };
393
+
394
+ const findFirst = (t, n) => {
395
+ const o = n ? isElement(n) && n : document;
396
+ return o ? o.querySelector(t) : null;
397
+ };
398
+
399
+ const is = (t, n) => {
400
+ if (isElement(t)) {
401
+ return t.matches(n);
402
+ }
403
+ return false;
404
+ };
405
+
406
+ const isBodyElement = t => is(t, "body");
407
+
408
+ const contents = t => t ? from(t.childNodes) : [];
409
+
410
+ const parent = t => t && t.parentElement;
411
+
412
+ const closest = (t, n) => isElement(t) && t.closest(n);
413
+
414
+ const getFocusedElement = t => (document).activeElement;
415
+
416
+ const liesBetween = (t, n, o) => {
417
+ const s = closest(t, n);
418
+ const e = t && findFirst(o, s);
419
+ const c = closest(e, n) === s;
420
+ return s && e ? s === t || e === t || c && closest(closest(t, o), n) !== s : false;
421
+ };
422
+
423
+ const removeElements = t => {
424
+ if (isArrayLike(t)) {
425
+ each(from(t), (t => removeElements(t)));
426
+ } else if (t) {
427
+ const n = parent(t);
428
+ n && n.removeChild(t);
429
+ }
430
+ };
431
+
432
+ const before = (t, n, o) => {
433
+ if (o && t) {
434
+ let s = n;
435
+ let e;
436
+ if (isArrayLike(o)) {
437
+ e = document.createDocumentFragment();
438
+ each(o, (t => {
439
+ if (t === s) {
440
+ s = t.previousSibling;
441
+ }
442
+ e.appendChild(t);
443
+ }));
444
+ } else {
445
+ e = o;
446
+ }
447
+ if (n) {
448
+ if (!s) {
449
+ s = t.firstChild;
450
+ } else if (s !== n) {
451
+ s = s.nextSibling;
452
+ }
453
+ }
454
+ t.insertBefore(e, s || null);
455
+ return () => removeElements(o);
456
+ }
457
+ return noop;
458
+ };
459
+
460
+ const appendChildren = (t, n) => before(t, null, n);
461
+
462
+ const insertAfter = (t, n) => before(parent(t), t && t.nextSibling, n);
463
+
464
+ const createDiv = t => {
465
+ const n = document.createElement("div");
466
+ setAttrs(n, "class", t);
467
+ return n;
468
+ };
469
+
470
+ const createDOM = t => {
471
+ const n = createDiv();
472
+ n.innerHTML = t.trim();
473
+ return each(contents(n), (t => removeElements(t)));
474
+ };
475
+
476
+ const T = /^--/;
477
+
478
+ const getCSSVal = (t, n) => t.getPropertyValue(n) || t[n] || "";
479
+
480
+ const validFiniteNumber = t => {
481
+ const n = t || 0;
482
+ return isFinite(n) ? n : 0;
483
+ };
484
+
485
+ const parseToZeroOrNumber = t => validFiniteNumber(parseFloat(t || ""));
486
+
487
+ const ratioToCssPercent = t => `${(validFiniteNumber(t) * 100).toFixed(3)}%`;
488
+
489
+ const numberToCssPx = t => `${validFiniteNumber(t)}px`;
490
+
491
+ function setStyles(t, n) {
492
+ t && n && each(n, ((n, o) => {
493
+ try {
494
+ const s = t.style;
495
+ const e = isNumber(n) ? numberToCssPx(n) : (n || "") + "";
496
+ if (T.test(o)) {
497
+ s.setProperty(o, e);
498
+ } else {
499
+ s[o] = e;
500
+ }
501
+ } catch (s) {}
502
+ }));
503
+ }
504
+
505
+ function getStyles(t, o, s) {
506
+ const e = isString(o);
507
+ let c = e ? "" : {};
508
+ if (t) {
509
+ const r = n.getComputedStyle(t, s) || t.style;
510
+ c = e ? getCSSVal(r, o) : from(o).reduce(((t, n) => {
511
+ t[n] = getCSSVal(r, n);
512
+ return t;
513
+ }), c);
514
+ }
515
+ return c;
516
+ }
517
+
518
+ const topRightBottomLeft = (t, n, o) => {
519
+ const s = n ? `${n}-` : "";
520
+ const e = o ? `-${o}` : "";
521
+ const c = `${s}top${e}`;
522
+ const r = `${s}right${e}`;
523
+ const l = `${s}bottom${e}`;
524
+ const i = `${s}left${e}`;
525
+ const a = getStyles(t, [ c, r, l, i ]);
526
+ return {
527
+ t: parseToZeroOrNumber(a[c]),
528
+ r: parseToZeroOrNumber(a[r]),
529
+ b: parseToZeroOrNumber(a[l]),
530
+ l: parseToZeroOrNumber(a[i])
531
+ };
532
+ };
533
+
534
+ const getTrasformTranslateValue = (t, n) => `translate${isObject(t) ? `(${t.x},${t.y})` : `${n ? "X" : "Y"}(${t})`}`;
535
+
536
+ const elementHasDimensions = t => !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length);
537
+
538
+ const D = {
539
+ w: 0,
540
+ h: 0
541
+ };
542
+
543
+ const getElmWidthHeightProperty = (t, n) => n ? {
544
+ w: n[`${t}Width`],
545
+ h: n[`${t}Height`]
546
+ } : D;
547
+
548
+ const getWindowSize = t => getElmWidthHeightProperty("inner", t || n);
549
+
550
+ const k = bind(getElmWidthHeightProperty, "offset");
551
+
552
+ const M = bind(getElmWidthHeightProperty, "client");
553
+
554
+ const R = bind(getElmWidthHeightProperty, "scroll");
555
+
556
+ const getFractionalSize = t => {
557
+ const n = parseFloat(getStyles(t, H)) || 0;
558
+ const o = parseFloat(getStyles(t, E)) || 0;
559
+ return {
560
+ w: n - e(n),
561
+ h: o - e(o)
562
+ };
563
+ };
564
+
565
+ const getBoundingClientRect = t => t.getBoundingClientRect();
566
+
567
+ const hasDimensions = t => !!t && elementHasDimensions(t);
568
+
569
+ const domRectHasDimensions = t => !!(t && (t[E] || t[H]));
570
+
571
+ const domRectAppeared = (t, n) => {
572
+ const o = domRectHasDimensions(t);
573
+ const s = domRectHasDimensions(n);
574
+ return !s && o;
575
+ };
576
+
577
+ const removeEventListener = (t, n, o, s) => {
578
+ each(getDomTokensArray(n), (n => {
579
+ t && t.removeEventListener(n, o, s);
580
+ }));
581
+ };
582
+
583
+ const addEventListener = (t, n, o, s) => {
584
+ var e;
585
+ const c = (e = s && s.H) != null ? e : true;
586
+ const r = s && s.I || false;
587
+ const l = s && s.A || false;
588
+ const i = {
589
+ passive: c,
590
+ capture: r
591
+ };
592
+ return bind(runEachAndClear, getDomTokensArray(n).map((n => {
593
+ const s = l ? e => {
594
+ removeEventListener(t, n, s, r);
595
+ o && o(e);
596
+ } : o;
597
+ t && t.addEventListener(n, s, i);
598
+ return bind(removeEventListener, t, n, s, r);
599
+ })));
600
+ };
601
+
602
+ const stopPropagation = t => t.stopPropagation();
603
+
604
+ const preventDefault = t => t.preventDefault();
605
+
606
+ const stopAndPrevent = t => stopPropagation(t) || preventDefault(t);
607
+
608
+ const scrollElementTo = (t, n) => {
609
+ const {x: o, y: s} = isNumber(n) ? {
610
+ x: n,
611
+ y: n
612
+ } : n || {};
613
+ isNumber(o) && (t.scrollLeft = o);
614
+ isNumber(s) && (t.scrollTop = s);
615
+ };
616
+
617
+ const getElementScroll = t => ({
618
+ x: t.scrollLeft,
619
+ y: t.scrollTop
620
+ });
621
+
622
+ const getZeroScrollCoordinates = () => ({
623
+ T: {
624
+ x: 0,
625
+ y: 0
626
+ },
627
+ D: {
628
+ x: 0,
629
+ y: 0
630
+ }
631
+ });
632
+
633
+ const sanitizeScrollCoordinates = (t, n) => {
634
+ const {T: o, D: s} = t;
635
+ const {w: e, h: l} = n;
636
+ const sanitizeAxis = (t, n, o) => {
637
+ let s = r(t) * o;
638
+ let e = r(n) * o;
639
+ if (s === e) {
640
+ const o = c(t);
641
+ const r = c(n);
642
+ e = o > r ? 0 : e;
643
+ s = o < r ? 0 : s;
644
+ }
645
+ s = s === e ? 0 : s;
646
+ return [ s + 0, e + 0 ];
647
+ };
648
+ const [i, a] = sanitizeAxis(o.x, s.x, e);
649
+ const [u, _] = sanitizeAxis(o.y, s.y, l);
650
+ return {
651
+ T: {
652
+ x: i,
653
+ y: u
654
+ },
655
+ D: {
656
+ x: a,
657
+ y: _
658
+ }
659
+ };
660
+ };
661
+
662
+ const isDefaultDirectionScrollCoordinates = ({T: t, D: n}) => {
663
+ const getAxis = (t, n) => t === 0 && t <= n;
664
+ return {
665
+ x: getAxis(t.x, n.x),
666
+ y: getAxis(t.y, n.y)
667
+ };
668
+ };
669
+
670
+ const getScrollCoordinatesPercent = ({T: t, D: n}, o) => {
671
+ const getAxis = (t, n, o) => capNumber(0, 1, (t - o) / (t - n) || 0);
672
+ return {
673
+ x: getAxis(t.x, n.x, o.x),
674
+ y: getAxis(t.y, n.y, o.y)
675
+ };
676
+ };
677
+
678
+ const focusElement = t => {
679
+ if (t && t.focus) {
680
+ t.focus({
681
+ preventScroll: true
682
+ });
683
+ }
684
+ };
685
+
686
+ const manageListener = (t, n) => {
687
+ each(createOrKeepArray(n), t);
688
+ };
689
+
690
+ const createEventListenerHub = t => {
691
+ const n = new Map;
692
+ const removeEvent = (t, o) => {
693
+ if (t) {
694
+ const s = n.get(t);
695
+ manageListener((t => {
696
+ if (s) {
697
+ s[t ? "delete" : "clear"](t);
698
+ }
699
+ }), o);
700
+ } else {
701
+ n.forEach((t => {
702
+ t.clear();
703
+ }));
704
+ n.clear();
705
+ }
706
+ };
707
+ const addEvent = (t, o) => {
708
+ if (isString(t)) {
709
+ const s = n.get(t) || new Set;
710
+ n.set(t, s);
711
+ manageListener((t => {
712
+ isFunction(t) && s.add(t);
713
+ }), o);
714
+ return bind(removeEvent, t, o);
715
+ }
716
+ if (isBoolean(o) && o) {
717
+ removeEvent();
718
+ }
719
+ const s = keys(t);
720
+ const e = [];
721
+ each(s, (n => {
722
+ const o = t[n];
723
+ o && push(e, addEvent(n, o));
724
+ }));
725
+ return bind(runEachAndClear, e);
726
+ };
727
+ const triggerEvent = (t, o) => {
728
+ each(from(n.get(t)), (t => {
729
+ if (o && !isEmptyArray(o)) {
730
+ t.apply(0, o);
731
+ } else {
732
+ t();
733
+ }
734
+ }));
735
+ };
736
+ addEvent(t || {});
737
+ return [ addEvent, removeEvent, triggerEvent ];
738
+ };
739
+
740
+ const opsStringify = t => JSON.stringify(t, ((t, n) => {
741
+ if (isFunction(n)) {
742
+ throw 0;
743
+ }
744
+ return n;
745
+ }));
746
+
747
+ const getPropByPath = (t, n) => t ? `${n}`.split(".").reduce(((t, n) => t && hasOwnProperty(t, n) ? t[n] : void 0), t) : void 0;
748
+
749
+ const V = {
750
+ paddingAbsolute: false,
751
+ showNativeOverlaidScrollbars: false,
752
+ update: {
753
+ elementEvents: [ [ "img", "load" ] ],
754
+ debounce: [ 0, 33 ],
755
+ attributes: null,
756
+ ignoreMutation: null
757
+ },
758
+ overflow: {
759
+ x: "scroll",
760
+ y: "scroll"
761
+ },
762
+ scrollbars: {
763
+ theme: "os-theme-dark",
764
+ visibility: "auto",
765
+ autoHide: "never",
766
+ autoHideDelay: 1300,
767
+ autoHideSuspend: false,
768
+ dragScroll: true,
769
+ clickScroll: false,
770
+ pointers: [ "mouse", "touch", "pen" ]
771
+ }
772
+ };
773
+
774
+ const getOptionsDiff = (t, n) => {
775
+ const o = {};
776
+ const s = concat(keys(n), keys(t));
777
+ each(s, (s => {
778
+ const e = t[s];
779
+ const c = n[s];
780
+ if (isObject(e) && isObject(c)) {
781
+ assignDeep(o[s] = {}, getOptionsDiff(e, c));
782
+ if (isEmptyObject(o[s])) {
783
+ delete o[s];
784
+ }
785
+ } else if (hasOwnProperty(n, s) && c !== e) {
786
+ let t = true;
787
+ if (isArray(e) || isArray(c)) {
788
+ try {
789
+ if (opsStringify(e) === opsStringify(c)) {
790
+ t = false;
791
+ }
792
+ } catch (r) {}
793
+ }
794
+ if (t) {
795
+ o[s] = c;
796
+ }
797
+ }
798
+ }));
799
+ return o;
800
+ };
801
+
802
+ const createOptionCheck = (t, n, o) => s => [ getPropByPath(t, s), o || getPropByPath(n, s) !== void 0 ];
803
+
804
+ const L = `data-overlayscrollbars`;
805
+
806
+ const P = "os-environment";
807
+
808
+ const U = `${P}-scrollbar-hidden`;
809
+
810
+ const N = `${L}-initialize`;
811
+
812
+ const q = "noClipping";
813
+
814
+ const B = `${L}-body`;
815
+
816
+ const F = L;
817
+
818
+ const j = "host";
819
+
820
+ const X = `${L}-viewport`;
821
+
822
+ const Y = C;
823
+
824
+ const W = x;
825
+
826
+ const J = "arrange";
827
+
828
+ const K = "measuring";
829
+
830
+ const G = "scrollbarHidden";
831
+
832
+ const Q = "scrollbarPressed";
833
+
834
+ const Z = "noContent";
835
+
836
+ const tt = `${L}-padding`;
837
+
838
+ const nt = `${L}-content`;
839
+
840
+ const ot = "os-size-observer";
841
+
842
+ const st = `${ot}-appear`;
843
+
844
+ const et = `${ot}-listener`;
845
+
846
+ const it = "os-trinsic-observer";
847
+
848
+ const at = "os-theme-none";
849
+
850
+ const ut = "os-scrollbar";
851
+
852
+ const _t = `${ut}-rtl`;
853
+
854
+ const dt = `${ut}-horizontal`;
855
+
856
+ const ft = `${ut}-vertical`;
857
+
858
+ const pt = `${ut}-track`;
859
+
860
+ const vt = `${ut}-handle`;
861
+
862
+ const ht = `${ut}-visible`;
863
+
864
+ const gt = `${ut}-cornerless`;
865
+
866
+ const bt = `${ut}-interaction`;
867
+
868
+ const wt = `${ut}-unusable`;
869
+
870
+ const yt = `${ut}-auto-hide`;
871
+
872
+ const mt = `${yt}-hidden`;
873
+
874
+ const St = `${ut}-wheel`;
875
+
876
+ const Ot = `${pt}-interactive`;
877
+
878
+ const $t = `${vt}-interactive`;
879
+
880
+ let Ct;
881
+
882
+ const createEnvironment = () => {
883
+ const getNativeScrollbarSize = (t, n, o) => {
884
+ appendChildren(document.body, t);
885
+ appendChildren(document.body, t);
886
+ const s = M(t);
887
+ const e = k(t);
888
+ const c = getFractionalSize(n);
889
+ o && removeElements(t);
890
+ return {
891
+ x: e.h - s.h + c.h,
892
+ y: e.w - s.w + c.w
893
+ };
894
+ };
895
+ const getNativeScrollbarsHiding = t => {
896
+ let n = false;
897
+ const o = addClass(t, U);
898
+ try {
899
+ n = getStyles(t, "scrollbar-width") === "none" || getStyles(t, "display", "::-webkit-scrollbar") === "none";
900
+ } catch (s) {}
901
+ o();
902
+ return n;
903
+ };
904
+ const t = `.${P}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${P} div{width:200%;height:200%;margin:10px 0}.${U}{scrollbar-width:none!important}.${U}::-webkit-scrollbar,.${U}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`;
905
+ const o = createDOM(`<div class="${P}"><div></div><style>${t}</style></div>`);
906
+ const s = o[0];
907
+ const e = s.firstChild;
908
+ const [c, , r] = createEventListenerHub();
909
+ const [l, i] = createCache({
910
+ o: getNativeScrollbarSize(s, e),
911
+ i: equalXY
912
+ }, bind(getNativeScrollbarSize, s, e, true));
913
+ const [a] = i();
914
+ const u = getNativeScrollbarsHiding(s);
915
+ const _ = {
916
+ x: a.x === 0,
917
+ y: a.y === 0
918
+ };
919
+ const d = {
920
+ elements: {
921
+ host: null,
922
+ padding: !u,
923
+ viewport: t => u && isBodyElement(t) && t,
924
+ content: false
925
+ },
926
+ scrollbars: {
927
+ slot: true
928
+ },
929
+ cancel: {
930
+ nativeScrollbarsOverlaid: false,
931
+ body: null
932
+ }
933
+ };
934
+ const f = assignDeep({}, V);
935
+ const v = bind(assignDeep, {}, f);
936
+ const h = bind(assignDeep, {}, d);
937
+ const g = {
938
+ k: a,
939
+ M: _,
940
+ R: u,
941
+ V: !!p,
942
+ L: bind(c, "r"),
943
+ P: h,
944
+ U: t => assignDeep(d, t) && h(),
945
+ N: v,
946
+ q: t => assignDeep(f, t) && v(),
947
+ B: assignDeep({}, d),
948
+ F: assignDeep({}, f)
949
+ };
950
+ removeAttrs(s, "style");
951
+ removeElements(s);
952
+ addEventListener(n, "resize", (() => {
953
+ r("r", []);
954
+ }));
955
+ if (isFunction(n.matchMedia) && !u && (!_.x || !_.y)) {
956
+ const addZoomListener = t => {
957
+ const o = n.matchMedia(`(resolution: ${n.devicePixelRatio}dppx)`);
958
+ addEventListener(o, "change", (() => {
959
+ t();
960
+ addZoomListener(t);
961
+ }), {
962
+ A: true
963
+ });
964
+ };
965
+ addZoomListener((() => {
966
+ const [t, n] = l();
967
+ assignDeep(g.k, t);
968
+ r("r", [ n ]);
969
+ }));
970
+ }
971
+ return g;
972
+ };
973
+
974
+ const getEnvironment = () => {
975
+ if (!Ct) {
976
+ Ct = createEnvironment();
977
+ }
978
+ return Ct;
979
+ };
980
+
981
+ const resolveInitialization = (t, n) => isFunction(n) ? n.apply(0, t) : n;
982
+
983
+ const staticInitializationElement = (t, n, o, s) => {
984
+ const e = isUndefined(s) ? o : s;
985
+ const c = resolveInitialization(t, e);
986
+ return c || n.apply(0, t);
987
+ };
988
+
989
+ const dynamicInitializationElement = (t, n, o, s) => {
990
+ const e = isUndefined(s) ? o : s;
991
+ const c = resolveInitialization(t, e);
992
+ return !!c && (isHTMLElement(c) ? c : n.apply(0, t));
993
+ };
994
+
995
+ const cancelInitialization = (t, n) => {
996
+ const {nativeScrollbarsOverlaid: o, body: s} = n || {};
997
+ const {M: e, R: c, P: r} = getEnvironment();
998
+ const {nativeScrollbarsOverlaid: l, body: i} = r().cancel;
999
+ const a = o != null ? o : l;
1000
+ const u = isUndefined(s) ? i : s;
1001
+ const _ = (e.x || e.y) && a;
1002
+ const d = t && (isNull(u) ? !c : u);
1003
+ return !!_ || !!d;
1004
+ };
1005
+
1006
+ const xt = new WeakMap;
1007
+
1008
+ const addInstance = (t, n) => {
1009
+ xt.set(t, n);
1010
+ };
1011
+
1012
+ const removeInstance = t => {
1013
+ xt.delete(t);
1014
+ };
1015
+
1016
+ const getInstance = t => xt.get(t);
1017
+
1018
+ const createEventContentChange = (t, n, o) => {
1019
+ let s = false;
1020
+ const e = o ? new WeakMap : false;
1021
+ const destroy = () => {
1022
+ s = true;
1023
+ };
1024
+ const updateElements = c => {
1025
+ if (e && o) {
1026
+ const r = o.map((n => {
1027
+ const [o, s] = n || [];
1028
+ const e = s && o ? (c || find)(o, t) : [];
1029
+ return [ e, s ];
1030
+ }));
1031
+ each(r, (o => each(o[0], (c => {
1032
+ const r = o[1];
1033
+ const l = e.get(c) || [];
1034
+ const i = t.contains(c);
1035
+ if (i && r) {
1036
+ const t = addEventListener(c, r, (o => {
1037
+ if (s) {
1038
+ t();
1039
+ e.delete(c);
1040
+ } else {
1041
+ n(o);
1042
+ }
1043
+ }));
1044
+ e.set(c, push(l, t));
1045
+ } else {
1046
+ runEachAndClear(l);
1047
+ e.delete(c);
1048
+ }
1049
+ }))));
1050
+ }
1051
+ };
1052
+ updateElements();
1053
+ return [ destroy, updateElements ];
1054
+ };
1055
+
1056
+ const createDOMObserver = (t, n, o, s) => {
1057
+ let e = false;
1058
+ const {j: c, X: r, Y: l, W: i, J: a, K: u} = s || {};
1059
+ const d = debounce((() => e && o(true)), {
1060
+ _: 33,
1061
+ p: 99
1062
+ });
1063
+ const [f, p] = createEventContentChange(t, d, l);
1064
+ const v = c || [];
1065
+ const h = r || [];
1066
+ const g = concat(v, h);
1067
+ const observerCallback = (e, c) => {
1068
+ if (!isEmptyArray(c)) {
1069
+ const r = a || noop;
1070
+ const l = u || noop;
1071
+ const _ = [];
1072
+ const d = [];
1073
+ let f = false;
1074
+ let v = false;
1075
+ each(c, (o => {
1076
+ const {attributeName: e, target: c, type: a, oldValue: u, addedNodes: p, removedNodes: g} = o;
1077
+ const b = a === "attributes";
1078
+ const w = a === "childList";
1079
+ const y = t === c;
1080
+ const m = b && e;
1081
+ const S = m && getAttr(c, e || "");
1082
+ const O = isString(S) ? S : null;
1083
+ const $ = m && u !== O;
1084
+ const C = inArray(h, e) && $;
1085
+ if (n && (w || !y)) {
1086
+ const n = b && $;
1087
+ const a = n && i && is(c, i);
1088
+ const d = a ? !r(c, e, u, O) : !b || n;
1089
+ const f = d && !l(o, !!a, t, s);
1090
+ each(p, (t => push(_, t)));
1091
+ each(g, (t => push(_, t)));
1092
+ v = v || f;
1093
+ }
1094
+ if (!n && y && $ && !r(c, e, u, O)) {
1095
+ push(d, e);
1096
+ f = f || C;
1097
+ }
1098
+ }));
1099
+ p((t => deduplicateArray(_).reduce(((n, o) => {
1100
+ push(n, find(t, o));
1101
+ return is(o, t) ? push(n, o) : n;
1102
+ }), [])));
1103
+ if (n) {
1104
+ !e && v && o(false);
1105
+ return [ false ];
1106
+ }
1107
+ if (!isEmptyArray(d) || f) {
1108
+ const t = [ deduplicateArray(d), f ];
1109
+ !e && o.apply(0, t);
1110
+ return t;
1111
+ }
1112
+ }
1113
+ };
1114
+ const b = new _(bind(observerCallback, false));
1115
+ return [ () => {
1116
+ b.observe(t, {
1117
+ attributes: true,
1118
+ attributeOldValue: true,
1119
+ attributeFilter: g,
1120
+ subtree: n,
1121
+ childList: n,
1122
+ characterData: n
1123
+ });
1124
+ e = true;
1125
+ return () => {
1126
+ if (e) {
1127
+ f();
1128
+ b.disconnect();
1129
+ e = false;
1130
+ }
1131
+ };
1132
+ }, () => {
1133
+ if (e) {
1134
+ d.S();
1135
+ return observerCallback(true, b.takeRecords());
1136
+ }
1137
+ } ];
1138
+ };
1139
+
1140
+ const Ht = {};
1141
+
1142
+ const Et = {};
1143
+
1144
+ const addPlugins = t => {
1145
+ each(t, (t => each(t, ((n, o) => {
1146
+ Ht[o] = t[o];
1147
+ }))));
1148
+ };
1149
+
1150
+ const registerPluginModuleInstances = (t, n, o) => keys(t).map((s => {
1151
+ const {static: e, instance: c} = t[s];
1152
+ const [r, l, i] = o || [];
1153
+ const a = o ? c : e;
1154
+ if (a) {
1155
+ const t = o ? a(r, l, n) : a(n);
1156
+ return (i || Et)[s] = t;
1157
+ }
1158
+ }));
1159
+
1160
+ const getStaticPluginModuleInstance = t => Et[t];
1161
+
1162
+ const zt = "__osOptionsValidationPlugin";
1163
+
1164
+ const It = "__osSizeObserverPlugin";
1165
+
1166
+ const getShowNativeOverlaidScrollbars = (t, n) => {
1167
+ const {M: o} = n;
1168
+ const [s, e] = t("showNativeOverlaidScrollbars");
1169
+ return [ s && o.x && o.y, e ];
1170
+ };
1171
+
1172
+ const overflowIsVisible = t => t.indexOf(z) === 0;
1173
+
1174
+ const createViewportOverflowState = (t, n) => {
1175
+ const getAxisOverflowStyle = (t, n, o, s) => {
1176
+ const e = t === z ? I : t.replace(`${z}-`, "");
1177
+ const c = overflowIsVisible(t);
1178
+ const r = overflowIsVisible(o);
1179
+ if (!n && !s) {
1180
+ return I;
1181
+ }
1182
+ if (c && r) {
1183
+ return z;
1184
+ }
1185
+ if (c) {
1186
+ const t = n ? z : I;
1187
+ return n && s ? e : t;
1188
+ }
1189
+ const l = r && s ? z : I;
1190
+ return n ? e : l;
1191
+ };
1192
+ const o = {
1193
+ x: getAxisOverflowStyle(n.x, t.x, n.y, t.y),
1194
+ y: getAxisOverflowStyle(n.y, t.y, n.x, t.x)
1195
+ };
1196
+ return {
1197
+ G: o,
1198
+ Z: {
1199
+ x: o.x === A,
1200
+ y: o.y === A
1201
+ }
1202
+ };
1203
+ };
1204
+
1205
+ const Tt = "__osScrollbarsHidingPlugin";
1206
+
1207
+ const kt = "__osClickScrollPlugin";
1208
+
1209
+ const createSizeObserver = (t, n, o) => {
1210
+ const {dt: s} = o || {};
1211
+ const e = getStaticPluginModuleInstance(It);
1212
+ const [c] = createCache({
1213
+ o: false,
1214
+ u: true
1215
+ });
1216
+ return () => {
1217
+ const o = [];
1218
+ const r = createDOM(`<div class="${ot}"><div class="${et}"></div></div>`);
1219
+ const l = r[0];
1220
+ const i = l.firstChild;
1221
+ const onSizeChangedCallbackProxy = t => {
1222
+ const o = t instanceof ResizeObserverEntry;
1223
+ let s = false;
1224
+ let e = false;
1225
+ if (o) {
1226
+ const [n, , o] = c(t.contentRect);
1227
+ const r = domRectHasDimensions(n);
1228
+ e = domRectAppeared(n, o);
1229
+ s = !e && !r;
1230
+ } else {
1231
+ e = t === true;
1232
+ }
1233
+ if (!s) {
1234
+ n({
1235
+ ft: true,
1236
+ dt: e
1237
+ });
1238
+ }
1239
+ };
1240
+ if (f) {
1241
+ const t = new f((t => onSizeChangedCallbackProxy(t.pop())));
1242
+ t.observe(i);
1243
+ push(o, (() => {
1244
+ t.disconnect();
1245
+ }));
1246
+ } else if (e) {
1247
+ const [t, n] = e(i, onSizeChangedCallbackProxy, s);
1248
+ push(o, concat([ addClass(l, st), addEventListener(l, "animationstart", t) ], n));
1249
+ } else {
1250
+ return noop;
1251
+ }
1252
+ return bind(runEachAndClear, push(o, appendChildren(t, l)));
1253
+ };
1254
+ };
1255
+
1256
+ const createTrinsicObserver = (t, n) => {
1257
+ let o;
1258
+ const isHeightIntrinsic = t => t.h === 0 || t.isIntersecting || t.intersectionRatio > 0;
1259
+ const s = createDiv(it);
1260
+ const [e] = createCache({
1261
+ o: false
1262
+ });
1263
+ const triggerOnTrinsicChangedCallback = (t, o) => {
1264
+ if (t) {
1265
+ const s = e(isHeightIntrinsic(t));
1266
+ const [, c] = s;
1267
+ return c && !o && n(s) && [ s ];
1268
+ }
1269
+ };
1270
+ const intersectionObserverCallback = (t, n) => triggerOnTrinsicChangedCallback(n.pop(), t);
1271
+ return [ () => {
1272
+ const n = [];
1273
+ if (d) {
1274
+ o = new d(bind(intersectionObserverCallback, false), {
1275
+ root: t
1276
+ });
1277
+ o.observe(s);
1278
+ push(n, (() => {
1279
+ o.disconnect();
1280
+ }));
1281
+ } else {
1282
+ const onSizeChanged = () => {
1283
+ const t = k(s);
1284
+ triggerOnTrinsicChangedCallback(t);
1285
+ };
1286
+ push(n, createSizeObserver(s, onSizeChanged)());
1287
+ onSizeChanged();
1288
+ }
1289
+ return bind(runEachAndClear, push(n, appendChildren(t, s)));
1290
+ }, () => o && intersectionObserverCallback(true, o.takeRecords()) ];
1291
+ };
1292
+
1293
+ const createObserversSetup = (t, n, o, s) => {
1294
+ let e;
1295
+ let c;
1296
+ let r;
1297
+ let l;
1298
+ let i;
1299
+ let a;
1300
+ const u = `[${F}]`;
1301
+ const _ = `[${X}]`;
1302
+ const d = [];
1303
+ const p = [ "wrap", "cols", "rows" ];
1304
+ const v = [ "id", "class", "style", "open" ];
1305
+ const {vt: h, ht: g, ot: b, gt: w, bt: y, wt: m, nt: S, yt: O, St: $, Ot: C} = t;
1306
+ const getDirectionIsRTL = t => getStyles(t, "direction") === "rtl";
1307
+ const x = {
1308
+ $t: false,
1309
+ ct: getDirectionIsRTL(h)
1310
+ };
1311
+ const H = getEnvironment();
1312
+ const E = getStaticPluginModuleInstance(Tt);
1313
+ const [z] = createCache({
1314
+ i: equalWH,
1315
+ o: {
1316
+ w: 0,
1317
+ h: 0
1318
+ }
1319
+ }, (() => {
1320
+ const s = E && E.tt(t, n, x, H, o).ut;
1321
+ const e = O && S;
1322
+ const c = !e && hasAttrClass(g, F, q);
1323
+ const r = !S && $(J);
1324
+ const l = r && getElementScroll(w);
1325
+ const i = C(K, c);
1326
+ const a = r && s && s()[0];
1327
+ const u = R(b);
1328
+ const _ = getFractionalSize(b);
1329
+ a && a();
1330
+ scrollElementTo(w, l);
1331
+ c && i();
1332
+ return {
1333
+ w: u.w + _.w,
1334
+ h: u.h + _.h
1335
+ };
1336
+ }));
1337
+ const I = m ? p : concat(v, p);
1338
+ const A = debounce(s, {
1339
+ _: () => e,
1340
+ p: () => c,
1341
+ m(t, n) {
1342
+ const [o] = t;
1343
+ const [s] = n;
1344
+ return [ concat(keys(o), keys(s)).reduce(((t, n) => {
1345
+ t[n] = o[n] || s[n];
1346
+ return t;
1347
+ }), {}) ];
1348
+ }
1349
+ });
1350
+ const setDirection = t => {
1351
+ const n = getDirectionIsRTL(h);
1352
+ assignDeep(t, {
1353
+ Ct: a !== n
1354
+ });
1355
+ assignDeep(x, {
1356
+ ct: n
1357
+ });
1358
+ a = n;
1359
+ };
1360
+ const onTrinsicChanged = (t, n) => {
1361
+ const [o, e] = t;
1362
+ const c = {
1363
+ xt: e
1364
+ };
1365
+ assignDeep(x, {
1366
+ $t: o
1367
+ });
1368
+ !n && s(c);
1369
+ return c;
1370
+ };
1371
+ const onSizeChanged = ({ft: t, dt: n}) => {
1372
+ const o = t && !n;
1373
+ const e = !o && H.R ? A : s;
1374
+ const c = {
1375
+ ft: t || n,
1376
+ dt: n
1377
+ };
1378
+ setDirection(c);
1379
+ e(c);
1380
+ };
1381
+ const onContentMutation = (t, n) => {
1382
+ const [, o] = z();
1383
+ const e = {
1384
+ Ht: o
1385
+ };
1386
+ setDirection(e);
1387
+ const c = t ? s : A;
1388
+ o && !n && c(e);
1389
+ return e;
1390
+ };
1391
+ const onHostMutation = (t, n, o) => {
1392
+ const s = {
1393
+ Et: n
1394
+ };
1395
+ setDirection(s);
1396
+ if (n && !o) {
1397
+ A(s);
1398
+ }
1399
+ return s;
1400
+ };
1401
+ const [T, D] = y ? createTrinsicObserver(g, onTrinsicChanged) : [];
1402
+ const k = !S && createSizeObserver(g, onSizeChanged, {
1403
+ dt: true
1404
+ });
1405
+ const [M, V] = createDOMObserver(g, false, onHostMutation, {
1406
+ X: v,
1407
+ j: concat(v, d)
1408
+ });
1409
+ const L = S && f && new f((t => {
1410
+ const n = t[t.length - 1].contentRect;
1411
+ onSizeChanged({
1412
+ ft: true,
1413
+ dt: domRectAppeared(n, i)
1414
+ });
1415
+ i = n;
1416
+ }));
1417
+ const P = debounce((() => {
1418
+ const [, t] = z();
1419
+ s({
1420
+ Ht: t
1421
+ });
1422
+ }), {
1423
+ _: 222,
1424
+ v: true
1425
+ });
1426
+ return [ () => {
1427
+ L && L.observe(g);
1428
+ const t = k && k();
1429
+ const n = T && T();
1430
+ const o = M();
1431
+ const s = H.L((t => {
1432
+ if (t) {
1433
+ A({
1434
+ zt: t
1435
+ });
1436
+ } else {
1437
+ P();
1438
+ }
1439
+ }));
1440
+ return () => {
1441
+ L && L.disconnect();
1442
+ t && t();
1443
+ n && n();
1444
+ l && l();
1445
+ o();
1446
+ s();
1447
+ };
1448
+ }, ({It: t, At: n, Tt: o}) => {
1449
+ const s = {};
1450
+ const [i] = t("update.ignoreMutation");
1451
+ const [a, d] = t("update.attributes");
1452
+ const [f, p] = t("update.elementEvents");
1453
+ const [v, h] = t("update.debounce");
1454
+ const g = p || d;
1455
+ const w = n || o;
1456
+ const ignoreMutationFromOptions = t => isFunction(i) && i(t);
1457
+ if (g) {
1458
+ r && r();
1459
+ l && l();
1460
+ const [t, n] = createDOMObserver(y || b, true, onContentMutation, {
1461
+ j: concat(I, a || []),
1462
+ Y: f,
1463
+ W: u,
1464
+ K: (t, n) => {
1465
+ const {target: o, attributeName: s} = t;
1466
+ const e = !n && s && !S ? liesBetween(o, u, _) : false;
1467
+ return e || !!closest(o, `.${ut}`) || !!ignoreMutationFromOptions(t);
1468
+ }
1469
+ });
1470
+ l = t();
1471
+ r = n;
1472
+ }
1473
+ if (h) {
1474
+ A.S();
1475
+ if (isArray(v)) {
1476
+ const t = v[0];
1477
+ const n = v[1];
1478
+ e = isNumber(t) && t;
1479
+ c = isNumber(n) && n;
1480
+ } else if (isNumber(v)) {
1481
+ e = v;
1482
+ c = false;
1483
+ } else {
1484
+ e = false;
1485
+ c = false;
1486
+ }
1487
+ }
1488
+ if (w) {
1489
+ const t = V();
1490
+ const n = D && D();
1491
+ const o = r && r();
1492
+ t && assignDeep(s, onHostMutation(t[0], t[1], w));
1493
+ n && assignDeep(s, onTrinsicChanged(n[0], w));
1494
+ o && assignDeep(s, onContentMutation(o[0], w));
1495
+ }
1496
+ setDirection(s);
1497
+ return s;
1498
+ }, x ];
1499
+ };
1500
+
1501
+ const createScrollbarsSetupElements = (t, n, o, s) => {
1502
+ const {P: e} = getEnvironment();
1503
+ const {scrollbars: c} = e();
1504
+ const {slot: r} = c;
1505
+ const {vt: l, ht: i, ot: a, Dt: u, gt: _, yt: d, nt: f} = n;
1506
+ const {scrollbars: v} = u ? {} : t;
1507
+ const {slot: h} = v || {};
1508
+ const g = new Map;
1509
+ const initScrollTimeline = t => p && new p({
1510
+ source: _,
1511
+ axis: t
1512
+ });
1513
+ const b = {
1514
+ x: initScrollTimeline("x"),
1515
+ y: initScrollTimeline("y")
1516
+ };
1517
+ const w = dynamicInitializationElement([ l, i, a ], (() => f && d ? l : i), r, h);
1518
+ const getScrollbarHandleLengthRatio = (t, n) => {
1519
+ if (n) {
1520
+ const o = t ? H : E;
1521
+ const {kt: s, Mt: e} = n;
1522
+ const c = getBoundingClientRect(e)[o];
1523
+ const r = getBoundingClientRect(s)[o];
1524
+ return capNumber(0, 1, c / r || 0);
1525
+ }
1526
+ const s = t ? "x" : "y";
1527
+ const {Rt: e, Vt: c} = o;
1528
+ const r = c[s];
1529
+ const l = e[s];
1530
+ return capNumber(0, 1, r / (r + l) || 0);
1531
+ };
1532
+ const getScrollbarHandleOffsetRatio = (t, n, o) => {
1533
+ const s = getScrollbarHandleLengthRatio(o, t);
1534
+ return 1 / s * (1 - s) * n;
1535
+ };
1536
+ const addDirectionRTLKeyframes = t => assignDeep(t, {
1537
+ clear: [ "left" ]
1538
+ });
1539
+ const cancelElementAnimations = t => {
1540
+ g.forEach(((n, o) => {
1541
+ const s = t ? inArray(createOrKeepArray(t), o) : true;
1542
+ if (s) {
1543
+ each(n || [], (t => {
1544
+ t && t.cancel();
1545
+ }));
1546
+ g.delete(o);
1547
+ }
1548
+ }));
1549
+ };
1550
+ const setElementAnimation = (t, n, o, s) => {
1551
+ const e = g.get(t) || [];
1552
+ const c = e.find((t => t && t.timeline === n));
1553
+ if (c) {
1554
+ c.effect = new KeyframeEffect(t, o, {
1555
+ composite: s
1556
+ });
1557
+ } else {
1558
+ g.set(t, concat(e, [ t.animate(o, {
1559
+ timeline: n,
1560
+ composite: s
1561
+ }) ]));
1562
+ }
1563
+ };
1564
+ const scrollbarStructureAddRemoveClass = (t, n, o) => {
1565
+ const s = o ? addClass : removeClass;
1566
+ each(t, (t => {
1567
+ s(t.Lt, n);
1568
+ }));
1569
+ };
1570
+ const scrollbarStyle = (t, n) => {
1571
+ each(t, (t => {
1572
+ const [o, s] = n(t);
1573
+ setStyles(o, s);
1574
+ }));
1575
+ };
1576
+ const scrollbarStructureRefreshHandleLength = (t, n) => {
1577
+ scrollbarStyle(t, (t => {
1578
+ const {Mt: o} = t;
1579
+ return [ o, {
1580
+ [n ? H : E]: ratioToCssPercent(getScrollbarHandleLengthRatio(n))
1581
+ } ];
1582
+ }));
1583
+ };
1584
+ const scrollbarStructureRefreshHandleOffset = (t, n) => {
1585
+ const {Pt: s} = o;
1586
+ const e = n ? "x" : "y";
1587
+ const c = b[e];
1588
+ const r = isDefaultDirectionScrollCoordinates(s)[e];
1589
+ const getAxisTransformValue = (t, o) => getTrasformTranslateValue(ratioToCssPercent(getScrollbarHandleOffsetRatio(t, r ? o : 1 - o, n)), n);
1590
+ if (c) {
1591
+ each(t, (t => {
1592
+ const {Mt: n} = t;
1593
+ setElementAnimation(n, c, addDirectionRTLKeyframes({
1594
+ transform: [ 0, 1 ].map((n => getAxisTransformValue(t, n)))
1595
+ }));
1596
+ }));
1597
+ } else {
1598
+ scrollbarStyle(t, (t => [ t.Mt, {
1599
+ transform: getAxisTransformValue(t, getScrollCoordinatesPercent(s, getElementScroll(_))[e])
1600
+ } ]));
1601
+ }
1602
+ };
1603
+ const doRefreshScrollbarOffset = t => f && !d && parent(t) === a;
1604
+ const y = [];
1605
+ const m = [];
1606
+ const S = [];
1607
+ const scrollbarsAddRemoveClass = (t, n, o) => {
1608
+ const s = isBoolean(o);
1609
+ const e = s ? o : true;
1610
+ const c = s ? !o : true;
1611
+ e && scrollbarStructureAddRemoveClass(m, t, n);
1612
+ c && scrollbarStructureAddRemoveClass(S, t, n);
1613
+ };
1614
+ const refreshScrollbarsHandleLength = () => {
1615
+ scrollbarStructureRefreshHandleLength(m, true);
1616
+ scrollbarStructureRefreshHandleLength(S);
1617
+ };
1618
+ const refreshScrollbarsHandleOffset = () => {
1619
+ scrollbarStructureRefreshHandleOffset(m, true);
1620
+ scrollbarStructureRefreshHandleOffset(S);
1621
+ };
1622
+ const refreshScrollbarsScrollbarOffset = () => {
1623
+ if (f) {
1624
+ const {Rt: t, Pt: n} = o;
1625
+ const s = isDefaultDirectionScrollCoordinates(n);
1626
+ const e = .5;
1627
+ if (b.x && b.y) {
1628
+ each(concat(S, m), (({Lt: n}) => {
1629
+ if (doRefreshScrollbarOffset(n)) {
1630
+ const setScrollbarElementAnimation = o => setElementAnimation(n, b[o], addDirectionRTLKeyframes({
1631
+ transform: [ 0, s[o] ? 1 : -1 ].map((n => getTrasformTranslateValue(numberToCssPx(n * (t[o] - e)), o === "x")))
1632
+ }), "add");
1633
+ setScrollbarElementAnimation("x");
1634
+ setScrollbarElementAnimation("y");
1635
+ } else {
1636
+ cancelElementAnimations(n);
1637
+ }
1638
+ }));
1639
+ } else {
1640
+ const o = getScrollCoordinatesPercent(n, getElementScroll(_));
1641
+ const styleScrollbarPosition = n => {
1642
+ const {Lt: e} = n;
1643
+ const c = doRefreshScrollbarOffset(e) && e;
1644
+ const getTranslateValue = (t, n, o) => {
1645
+ const s = n * t;
1646
+ return numberToCssPx(o ? s : -s);
1647
+ };
1648
+ return [ c, c && {
1649
+ transform: getTrasformTranslateValue({
1650
+ x: getTranslateValue(o.x, t.x, s.x),
1651
+ y: getTranslateValue(o.y, t.y, s.y)
1652
+ })
1653
+ } ];
1654
+ };
1655
+ scrollbarStyle(m, styleScrollbarPosition);
1656
+ scrollbarStyle(S, styleScrollbarPosition);
1657
+ }
1658
+ }
1659
+ };
1660
+ const generateScrollbarDOM = t => {
1661
+ const n = t ? dt : ft;
1662
+ const o = createDiv(`${ut} ${n}`);
1663
+ const e = createDiv(pt);
1664
+ const c = createDiv(vt);
1665
+ const r = {
1666
+ Lt: o,
1667
+ kt: e,
1668
+ Mt: c
1669
+ };
1670
+ push(t ? m : S, r);
1671
+ push(y, [ appendChildren(o, e), appendChildren(e, c), bind(removeElements, o), cancelElementAnimations, s(r, scrollbarsAddRemoveClass, scrollbarStructureRefreshHandleOffset, t) ]);
1672
+ return r;
1673
+ };
1674
+ const O = bind(generateScrollbarDOM, true);
1675
+ const $ = bind(generateScrollbarDOM, false);
1676
+ const appendElements = () => {
1677
+ appendChildren(w, m[0].Lt);
1678
+ appendChildren(w, S[0].Lt);
1679
+ return bind(runEachAndClear, y);
1680
+ };
1681
+ O();
1682
+ $();
1683
+ return [ {
1684
+ Ut: refreshScrollbarsHandleLength,
1685
+ Nt: refreshScrollbarsHandleOffset,
1686
+ qt: refreshScrollbarsScrollbarOffset,
1687
+ Bt: scrollbarsAddRemoveClass,
1688
+ Ft: {
1689
+ V: b.x,
1690
+ jt: m,
1691
+ Xt: O,
1692
+ Yt: bind(scrollbarStyle, m)
1693
+ },
1694
+ Wt: {
1695
+ V: b.y,
1696
+ jt: S,
1697
+ Xt: $,
1698
+ Yt: bind(scrollbarStyle, S)
1699
+ }
1700
+ }, appendElements ];
1701
+ };
1702
+
1703
+ const createScrollbarsSetupEvents = (t, n, o, s) => (r, l, i, u) => {
1704
+ const {ht: _, ot: d, nt: f, gt: p, Jt: v, Ot: h} = n;
1705
+ const {Lt: g, kt: b, Mt: w} = r;
1706
+ const [y, m] = selfClearTimeout(333);
1707
+ const [S, O] = selfClearTimeout(444);
1708
+ const [$, C] = selfClearTimeout();
1709
+ const x = bind(i, [ r ], u);
1710
+ const scrollOffsetElementScrollBy = t => {
1711
+ isFunction(p.scrollBy) && p.scrollBy({
1712
+ behavior: "smooth",
1713
+ left: t.x,
1714
+ top: t.y
1715
+ });
1716
+ };
1717
+ const z = u ? H : E;
1718
+ const createInteractiveScrollEvents = () => {
1719
+ const n = "pointerup pointercancel lostpointercapture";
1720
+ const s = `client${u ? "X" : "Y"}`;
1721
+ const r = u ? "left" : "top";
1722
+ const l = u ? "w" : "h";
1723
+ const i = u ? "x" : "y";
1724
+ const createRelativeHandleMove = (t, n) => s => {
1725
+ const {Rt: e} = o;
1726
+ const c = k(b)[l] - k(w)[l];
1727
+ const r = n * s / c;
1728
+ const a = r * e[i];
1729
+ scrollElementTo(p, {
1730
+ [i]: t + a
1731
+ });
1732
+ };
1733
+ return addEventListener(b, "pointerdown", (o => {
1734
+ const a = closest(o.target, `.${vt}`) === w;
1735
+ const u = a ? w : b;
1736
+ const _ = t.scrollbars;
1737
+ const {button: d, isPrimary: f, pointerType: g} = o;
1738
+ const {pointers: y} = _;
1739
+ const m = d === 0 && f && _[a ? "dragScroll" : "clickScroll"] && (y || []).includes(g);
1740
+ if (m) {
1741
+ O();
1742
+ const t = !a && o.shiftKey;
1743
+ const _ = bind(getBoundingClientRect, w);
1744
+ const d = bind(getBoundingClientRect, b);
1745
+ const getHandleOffset = (t, n) => (t || _())[r] - (n || d())[r];
1746
+ const f = e(getBoundingClientRect(p)[z]) / k(p)[l] || 1;
1747
+ const g = createRelativeHandleMove(getElementScroll(p)[i], 1 / f);
1748
+ const y = o[s];
1749
+ const m = _();
1750
+ const $ = d();
1751
+ const C = m[z];
1752
+ const x = getHandleOffset(m, $) + C / 2;
1753
+ const H = y - $[r];
1754
+ const E = a ? 0 : H - x;
1755
+ const releasePointerCapture = t => {
1756
+ runEachAndClear(A);
1757
+ u.releasePointerCapture(t.pointerId);
1758
+ };
1759
+ const addScrollbarPressedClass = () => h(Q, true);
1760
+ const I = addScrollbarPressedClass();
1761
+ const A = [ () => {
1762
+ const t = getElementScroll(p);
1763
+ I();
1764
+ const n = getElementScroll(p);
1765
+ const o = {
1766
+ x: n.x - t.x,
1767
+ y: n.y - t.y
1768
+ };
1769
+ if (c(o.x) > 3 || c(o.y) > 3) {
1770
+ addScrollbarPressedClass();
1771
+ scrollElementTo(p, t);
1772
+ scrollOffsetElementScrollBy(o);
1773
+ S(I);
1774
+ }
1775
+ }, addEventListener(v, n, releasePointerCapture), addEventListener(v, "selectstart", (t => preventDefault(t)), {
1776
+ H: false
1777
+ }), addEventListener(b, n, releasePointerCapture), addEventListener(b, "pointermove", (n => {
1778
+ const o = n[s] - y;
1779
+ if (a || t) {
1780
+ g(E + o);
1781
+ }
1782
+ })) ];
1783
+ u.setPointerCapture(o.pointerId);
1784
+ if (t) {
1785
+ g(E);
1786
+ } else if (!a) {
1787
+ const t = getStaticPluginModuleInstance(kt);
1788
+ t && push(A, t(g, getHandleOffset, E, C, H));
1789
+ }
1790
+ }
1791
+ }));
1792
+ };
1793
+ let I = true;
1794
+ const isAffectingTransition = t => t.propertyName.indexOf(z) > -1;
1795
+ return bind(runEachAndClear, [ addEventListener(w, "pointermove pointerleave", s), addEventListener(g, "pointerenter", (() => {
1796
+ l(bt, true);
1797
+ })), addEventListener(g, "pointerleave pointercancel", (() => {
1798
+ l(bt, false);
1799
+ })), !f && addEventListener(g, "mousedown", (() => {
1800
+ const t = getFocusedElement();
1801
+ if (hasAttr(t, X) || hasAttr(t, F) || t === document.body) {
1802
+ a(bind(focusElement, d), 25);
1803
+ }
1804
+ })), addEventListener(g, "wheel", (t => {
1805
+ const {deltaX: n, deltaY: o, deltaMode: s} = t;
1806
+ if (I && s === 0 && parent(g) === _) {
1807
+ scrollOffsetElementScrollBy({
1808
+ x: n,
1809
+ y: o
1810
+ });
1811
+ }
1812
+ I = false;
1813
+ l(St, true);
1814
+ y((() => {
1815
+ I = true;
1816
+ l(St);
1817
+ }));
1818
+ preventDefault(t);
1819
+ }), {
1820
+ H: false,
1821
+ I: true
1822
+ }), addEventListener(w, "transitionstart", (t => {
1823
+ if (isAffectingTransition(t)) {
1824
+ const animateHandleOffset = () => {
1825
+ x();
1826
+ $(animateHandleOffset);
1827
+ };
1828
+ animateHandleOffset();
1829
+ }
1830
+ })), addEventListener(w, "transitionend transitioncancel", (t => {
1831
+ if (isAffectingTransition(t)) {
1832
+ C();
1833
+ x();
1834
+ }
1835
+ })), addEventListener(g, "pointerdown", bind(addEventListener, v, "click", stopAndPrevent, {
1836
+ A: true,
1837
+ I: true,
1838
+ H: false
1839
+ }), {
1840
+ I: true
1841
+ }), createInteractiveScrollEvents(), m, O, C ]);
1842
+ };
1843
+
1844
+ const createScrollbarsSetup = (t, n, o, s, e, c) => {
1845
+ let r;
1846
+ let l;
1847
+ let i;
1848
+ let a;
1849
+ let u;
1850
+ let _ = noop;
1851
+ let d = 0;
1852
+ const isHoverablePointerType = t => t.pointerType === "mouse";
1853
+ const [f, p] = selfClearTimeout();
1854
+ const [v, h] = selfClearTimeout(100);
1855
+ const [g, b] = selfClearTimeout(100);
1856
+ const [w, y] = selfClearTimeout((() => d));
1857
+ const [m, S] = createScrollbarsSetupElements(t, e, s, createScrollbarsSetupEvents(n, e, s, (t => isHoverablePointerType(t) && manageScrollbarsAutoHideInstantInteraction())));
1858
+ const {ht: O, Kt: $, yt: C} = e;
1859
+ const {Bt: x, Ut: H, Nt: E, qt: I} = m;
1860
+ const manageScrollbarsAutoHide = (t, n) => {
1861
+ y();
1862
+ if (t) {
1863
+ x(mt);
1864
+ } else {
1865
+ const t = bind(x, mt, true);
1866
+ if (d > 0 && !n) {
1867
+ w(t);
1868
+ } else {
1869
+ t();
1870
+ }
1871
+ }
1872
+ };
1873
+ const manageScrollbarsAutoHideInstantInteraction = () => {
1874
+ if (i ? !r : !a) {
1875
+ manageScrollbarsAutoHide(true);
1876
+ v((() => {
1877
+ manageScrollbarsAutoHide(false);
1878
+ }));
1879
+ }
1880
+ };
1881
+ const manageAutoHideSuspension = t => {
1882
+ x(yt, t, true);
1883
+ x(yt, t, false);
1884
+ };
1885
+ const onHostMouseEnter = t => {
1886
+ if (isHoverablePointerType(t)) {
1887
+ r = i;
1888
+ i && manageScrollbarsAutoHide(true);
1889
+ }
1890
+ };
1891
+ const T = [ y, h, b, p, () => _(), addEventListener(O, "pointerover", onHostMouseEnter, {
1892
+ A: true
1893
+ }), addEventListener(O, "pointerenter", onHostMouseEnter), addEventListener(O, "pointerleave", (t => {
1894
+ if (isHoverablePointerType(t)) {
1895
+ r = false;
1896
+ i && manageScrollbarsAutoHide(false);
1897
+ }
1898
+ })), addEventListener(O, "pointermove", (t => {
1899
+ isHoverablePointerType(t) && l && manageScrollbarsAutoHideInstantInteraction();
1900
+ })), addEventListener($, "scroll", (t => {
1901
+ f((() => {
1902
+ E();
1903
+ manageScrollbarsAutoHideInstantInteraction();
1904
+ }));
1905
+ c(t);
1906
+ I();
1907
+ })) ];
1908
+ return [ () => bind(runEachAndClear, push(T, S())), ({It: t, Tt: n, Gt: e, Qt: c}) => {
1909
+ const {Zt: r, tn: f, nn: p, sn: v} = c || {};
1910
+ const {Ct: h, dt: b} = e || {};
1911
+ const {ct: w} = o;
1912
+ const {M: y} = getEnvironment();
1913
+ const {G: m, en: S} = s;
1914
+ const [O, T] = t("showNativeOverlaidScrollbars");
1915
+ const [D, k] = t("scrollbars.theme");
1916
+ const [M, R] = t("scrollbars.visibility");
1917
+ const [V, L] = t("scrollbars.autoHide");
1918
+ const [P, U] = t("scrollbars.autoHideSuspend");
1919
+ const [N] = t("scrollbars.autoHideDelay");
1920
+ const [q, B] = t("scrollbars.dragScroll");
1921
+ const [F, j] = t("scrollbars.clickScroll");
1922
+ const [X, Y] = t("overflow");
1923
+ const W = b && !n;
1924
+ const J = S.x || S.y;
1925
+ const K = r || f || v || h || n;
1926
+ const G = p || R || Y;
1927
+ const Q = O && y.x && y.y;
1928
+ const setScrollbarVisibility = (t, n, o) => {
1929
+ const s = t.includes(A) && (M === z || M === "auto" && n === A);
1930
+ x(ht, s, o);
1931
+ return s;
1932
+ };
1933
+ d = N;
1934
+ if (W) {
1935
+ if (P && J) {
1936
+ manageAutoHideSuspension(false);
1937
+ _();
1938
+ g((() => {
1939
+ _ = addEventListener($, "scroll", bind(manageAutoHideSuspension, true), {
1940
+ A: true
1941
+ });
1942
+ }));
1943
+ } else {
1944
+ manageAutoHideSuspension(true);
1945
+ }
1946
+ }
1947
+ if (T) {
1948
+ x(at, Q);
1949
+ }
1950
+ if (k) {
1951
+ x(u);
1952
+ x(D, true);
1953
+ u = D;
1954
+ }
1955
+ if (U && !P) {
1956
+ manageAutoHideSuspension(true);
1957
+ }
1958
+ if (L) {
1959
+ l = V === "move";
1960
+ i = V === "leave";
1961
+ a = V === "never";
1962
+ manageScrollbarsAutoHide(a, true);
1963
+ }
1964
+ if (B) {
1965
+ x($t, q);
1966
+ }
1967
+ if (j) {
1968
+ x(Ot, F);
1969
+ }
1970
+ if (G) {
1971
+ const t = setScrollbarVisibility(X.x, m.x, true);
1972
+ const n = setScrollbarVisibility(X.y, m.y, false);
1973
+ const o = t && n;
1974
+ x(gt, !o);
1975
+ }
1976
+ if (K) {
1977
+ H();
1978
+ E();
1979
+ I();
1980
+ x(wt, !S.x, true);
1981
+ x(wt, !S.y, false);
1982
+ x(_t, w && !C);
1983
+ }
1984
+ }, {}, m ];
1985
+ };
1986
+
1987
+ const createStructureSetupElements = t => {
1988
+ const o = getEnvironment();
1989
+ const {P: s, R: e} = o;
1990
+ const {elements: c} = s();
1991
+ const {host: r, padding: l, viewport: i, content: a} = c;
1992
+ const u = isHTMLElement(t);
1993
+ const _ = u ? {} : t;
1994
+ const {elements: d} = _;
1995
+ const {host: f, padding: p, viewport: v, content: h} = d || {};
1996
+ const g = u ? t : _.target;
1997
+ const b = isBodyElement(g);
1998
+ const w = is(g, "textarea");
1999
+ const y = g.ownerDocument;
2000
+ const m = y.documentElement;
2001
+ const getDocumentWindow = () => y.defaultView || n;
2002
+ const S = bind(staticInitializationElement, [ g ]);
2003
+ const O = bind(dynamicInitializationElement, [ g ]);
2004
+ const $ = bind(createDiv, "");
2005
+ const C = bind(S, $, i);
2006
+ const x = bind(O, $, a);
2007
+ const H = C(v);
2008
+ const E = H === g;
2009
+ const z = E && b;
2010
+ const I = !E && x(h);
2011
+ const A = !E && H === I;
2012
+ const T = z ? m : H;
2013
+ const D = w ? S($, r, f) : g;
2014
+ const k = z ? T : D;
2015
+ const M = !E && O($, l, p);
2016
+ const R = !A && I;
2017
+ const V = [ R, T, M, k ].map((t => isHTMLElement(t) && !parent(t) && t));
2018
+ const elementIsGenerated = t => t && inArray(V, t);
2019
+ const L = elementIsGenerated(T) ? g : T;
2020
+ const P = {
2021
+ vt: g,
2022
+ ht: k,
2023
+ ot: T,
2024
+ cn: M,
2025
+ bt: R,
2026
+ gt: z ? m : T,
2027
+ Kt: z ? y : T,
2028
+ rn: b ? m : L,
2029
+ Jt: y,
2030
+ wt: w,
2031
+ yt: b,
2032
+ Dt: u,
2033
+ nt: E,
2034
+ ln: getDocumentWindow,
2035
+ St: t => hasAttrClass(T, X, t),
2036
+ Ot: (t, n) => addRemoveAttrClass(T, X, t, n)
2037
+ };
2038
+ const {vt: U, ht: q, cn: Y, ot: W, bt: J} = P;
2039
+ const K = [ () => {
2040
+ removeAttrs(q, [ F, N ]);
2041
+ removeAttrs(U, N);
2042
+ if (b) {
2043
+ removeAttrs(m, [ N, F ]);
2044
+ }
2045
+ } ];
2046
+ const Q = w && elementIsGenerated(q);
2047
+ let Z = w ? U : contents([ J, W, Y, q, U ].find((t => t && !elementIsGenerated(t))));
2048
+ const ot = z ? U : J || W;
2049
+ const st = bind(runEachAndClear, K);
2050
+ const appendElements = () => {
2051
+ const t = getDocumentWindow();
2052
+ const n = getFocusedElement();
2053
+ const unwrap = t => {
2054
+ appendChildren(parent(t), contents(t));
2055
+ removeElements(t);
2056
+ };
2057
+ const prepareWrapUnwrapFocus = t => addEventListener(t, "focusin focusout focus blur", stopAndPrevent, {
2058
+ I: true,
2059
+ H: false
2060
+ });
2061
+ const o = "tabindex";
2062
+ const s = getAttr(W, o);
2063
+ const c = prepareWrapUnwrapFocus(n);
2064
+ setAttrs(q, F, E ? "" : j);
2065
+ setAttrs(Y, tt, "");
2066
+ setAttrs(W, X, "");
2067
+ setAttrs(J, nt, "");
2068
+ if (!E) {
2069
+ setAttrs(W, o, s || "-1");
2070
+ b && setAttrs(m, B, "");
2071
+ }
2072
+ if (Q) {
2073
+ insertAfter(U, q);
2074
+ push(K, (() => {
2075
+ insertAfter(q, U);
2076
+ removeElements(q);
2077
+ }));
2078
+ }
2079
+ appendChildren(ot, Z);
2080
+ appendChildren(q, Y);
2081
+ appendChildren(Y || q, !E && W);
2082
+ appendChildren(W, J);
2083
+ push(K, [ c, () => {
2084
+ const t = getFocusedElement();
2085
+ const n = elementIsGenerated(W);
2086
+ const e = n && t === W ? U : t;
2087
+ const c = prepareWrapUnwrapFocus(e);
2088
+ removeAttrs(Y, tt);
2089
+ removeAttrs(J, nt);
2090
+ removeAttrs(W, X);
2091
+ b && removeAttrs(m, B);
2092
+ s ? setAttrs(W, o, s) : removeAttrs(W, o);
2093
+ elementIsGenerated(J) && unwrap(J);
2094
+ n && unwrap(W);
2095
+ elementIsGenerated(Y) && unwrap(Y);
2096
+ focusElement(e);
2097
+ c();
2098
+ } ]);
2099
+ if (e && !E) {
2100
+ addAttrClass(W, X, G);
2101
+ push(K, bind(removeAttrs, W, X));
2102
+ }
2103
+ focusElement(!E && b && n === U && t.top === t ? W : n);
2104
+ c();
2105
+ Z = 0;
2106
+ return st;
2107
+ };
2108
+ return [ P, appendElements, st ];
2109
+ };
2110
+
2111
+ const createTrinsicUpdateSegment = ({bt: t}) => ({Gt: n, an: o, Tt: s}) => {
2112
+ const {xt: e} = n || {};
2113
+ const {$t: c} = o;
2114
+ const r = t && (e || s);
2115
+ if (r) {
2116
+ setStyles(t, {
2117
+ [E]: c && "100%"
2118
+ });
2119
+ }
2120
+ };
2121
+
2122
+ const createPaddingUpdateSegment = ({ht: t, cn: n, ot: o, nt: s}, e) => {
2123
+ const [c, r] = createCache({
2124
+ i: equalTRBL,
2125
+ o: topRightBottomLeft()
2126
+ }, bind(topRightBottomLeft, t, "padding", ""));
2127
+ return ({It: t, Gt: l, an: i, Tt: a}) => {
2128
+ let [u, _] = r(a);
2129
+ const {R: d} = getEnvironment();
2130
+ const {ft: f, Ht: p, Ct: v} = l || {};
2131
+ const {ct: h} = i;
2132
+ const [g, C] = t("paddingAbsolute");
2133
+ const x = a || p;
2134
+ if (f || _ || x) {
2135
+ [u, _] = c(a);
2136
+ }
2137
+ const E = !s && (C || v || _);
2138
+ if (E) {
2139
+ const t = !g || !n && !d;
2140
+ const s = u.r + u.l;
2141
+ const c = u.t + u.b;
2142
+ const r = {
2143
+ [O]: t && !h ? -s : 0,
2144
+ [$]: t ? -c : 0,
2145
+ [S]: t && h ? -s : 0,
2146
+ top: t ? -u.t : 0,
2147
+ right: t ? h ? -u.r : "auto" : 0,
2148
+ left: t ? h ? "auto" : -u.l : 0,
2149
+ [H]: t && `calc(100% + ${s}px)`
2150
+ };
2151
+ const l = {
2152
+ [b]: t ? u.t : 0,
2153
+ [w]: t ? u.r : 0,
2154
+ [m]: t ? u.b : 0,
2155
+ [y]: t ? u.l : 0
2156
+ };
2157
+ setStyles(n || o, r);
2158
+ setStyles(o, l);
2159
+ assignDeep(e, {
2160
+ cn: u,
2161
+ un: !t,
2162
+ rt: n ? l : assignDeep({}, r, l)
2163
+ });
2164
+ }
2165
+ return {
2166
+ _n: E
2167
+ };
2168
+ };
2169
+ };
2170
+
2171
+ const createOverflowUpdateSegment = (t, s) => {
2172
+ const e = getEnvironment();
2173
+ const {ht: c, cn: r, ot: l, nt: a, Kt: u, gt: _, yt: d, Ot: f, ln: p} = t;
2174
+ const {R: v} = e;
2175
+ const h = d && a;
2176
+ const g = bind(o, 0);
2177
+ const b = [ "display", "direction", "flexDirection", "writingMode" ];
2178
+ const w = {
2179
+ i: equalWH,
2180
+ o: {
2181
+ w: 0,
2182
+ h: 0
2183
+ }
2184
+ };
2185
+ const y = {
2186
+ i: equalXY,
2187
+ o: {}
2188
+ };
2189
+ const setMeasuringMode = t => {
2190
+ f(K, !h && t);
2191
+ };
2192
+ const getOverflowAmount = (t, o) => {
2193
+ const s = n.devicePixelRatio % 1 !== 0 ? 1 : 0;
2194
+ const e = {
2195
+ w: g(t.w - o.w),
2196
+ h: g(t.h - o.h)
2197
+ };
2198
+ return {
2199
+ w: e.w > s ? e.w : 0,
2200
+ h: e.h > s ? e.h : 0
2201
+ };
2202
+ };
2203
+ const [m, S] = createCache(w, bind(getFractionalSize, l));
2204
+ const [O, $] = createCache(w, bind(R, l));
2205
+ const [C, x] = createCache(w);
2206
+ const [H] = createCache(y);
2207
+ const [E, T] = createCache(w);
2208
+ const [D] = createCache(y);
2209
+ const [k] = createCache({
2210
+ i: (t, n) => equal(t, n, b),
2211
+ o: {}
2212
+ }, (() => hasDimensions(l) ? getStyles(l, b) : {}));
2213
+ const [V, L] = createCache({
2214
+ i: (t, n) => equalXY(t.T, n.T) && equalXY(t.D, n.D),
2215
+ o: getZeroScrollCoordinates()
2216
+ }, (() => {
2217
+ setMeasuringMode(true);
2218
+ const t = getElementScroll(_);
2219
+ const n = f(Z, true);
2220
+ const o = addEventListener(u, A, (n => {
2221
+ const o = getElementScroll(_);
2222
+ if (n.isTrusted && o.x === t.x && o.y === t.y) {
2223
+ stopPropagation(n);
2224
+ }
2225
+ }), {
2226
+ I: true,
2227
+ A: true
2228
+ });
2229
+ scrollElementTo(_, {
2230
+ x: 0,
2231
+ y: 0
2232
+ });
2233
+ n();
2234
+ const s = getElementScroll(_);
2235
+ const e = R(_);
2236
+ scrollElementTo(_, {
2237
+ x: e.w,
2238
+ y: e.h
2239
+ });
2240
+ const c = getElementScroll(_);
2241
+ scrollElementTo(_, {
2242
+ x: c.x - s.x < 1 && -e.w,
2243
+ y: c.y - s.y < 1 && -e.h
2244
+ });
2245
+ const r = getElementScroll(_);
2246
+ scrollElementTo(_, t);
2247
+ i((() => o()));
2248
+ return {
2249
+ T: s,
2250
+ D: r
2251
+ };
2252
+ }));
2253
+ const P = getStaticPluginModuleInstance(Tt);
2254
+ const createViewportOverflowStyleClassName = (t, n) => {
2255
+ const o = n ? Y : W;
2256
+ return `${o}${capitalizeFirstLetter(t)}`;
2257
+ };
2258
+ const setViewportOverflowStyle = t => {
2259
+ const createAllOverflowStyleClassNames = t => [ z, I, A ].map((n => createViewportOverflowStyleClassName(n, t)));
2260
+ const n = createAllOverflowStyleClassNames(true).concat(createAllOverflowStyleClassNames()).join(" ");
2261
+ f(n);
2262
+ f(keys(t).map((n => createViewportOverflowStyleClassName(t[n], n === "x"))).join(" "), true);
2263
+ };
2264
+ return ({It: n, Gt: o, an: i, Tt: a}, {_n: u}) => {
2265
+ const {ft: _, Ht: d, Ct: b, dt: w, zt: y} = o || {};
2266
+ const z = P && P.tt(t, s, i, e, n);
2267
+ const {it: I, ut: A, _t: R} = z || {};
2268
+ const [U, N] = getShowNativeOverlaidScrollbars(n, e);
2269
+ const [B, j] = n("overflow");
2270
+ const X = overflowIsVisible(B.x);
2271
+ const Y = overflowIsVisible(B.y);
2272
+ const W = _ || u || d || b || y || N;
2273
+ let J = S(a);
2274
+ let K = $(a);
2275
+ let Q = x(a);
2276
+ let Z = T(a);
2277
+ if (N && v) {
2278
+ f(G, !U);
2279
+ }
2280
+ if (W) {
2281
+ if (hasAttrClass(c, F, q)) {
2282
+ setMeasuringMode(true);
2283
+ }
2284
+ const [t] = A ? A() : [];
2285
+ const [n] = J = m(a);
2286
+ const [o] = K = O(a);
2287
+ const s = M(l);
2288
+ const e = h && getWindowSize(p());
2289
+ const r = {
2290
+ w: g(o.w + n.w),
2291
+ h: g(o.h + n.h)
2292
+ };
2293
+ const i = {
2294
+ w: g((e ? e.w : s.w + g(s.w - o.w)) + n.w),
2295
+ h: g((e ? e.h : s.h + g(s.h - o.h)) + n.h)
2296
+ };
2297
+ t && t();
2298
+ Z = E(i);
2299
+ Q = C(getOverflowAmount(r, i), a);
2300
+ }
2301
+ const [nt, ot] = Z;
2302
+ const [st, et] = Q;
2303
+ const [ct, rt] = K;
2304
+ const [lt, it] = J;
2305
+ const [at, ut] = H({
2306
+ x: st.w > 0,
2307
+ y: st.h > 0
2308
+ });
2309
+ const _t = X && Y && (at.x || at.y) || X && at.x && !at.y || Y && at.y && !at.x;
2310
+ const dt = u || b || y || it || rt || ot || et || j || N || W;
2311
+ const ft = createViewportOverflowState(at, B);
2312
+ const [pt, vt] = D(ft.G);
2313
+ const [, ht] = k(a);
2314
+ const gt = b || w || ht || ut || a;
2315
+ const [bt, wt] = gt ? V(a) : L();
2316
+ if (dt) {
2317
+ vt && setViewportOverflowStyle(ft.G);
2318
+ if (R && I) {
2319
+ setStyles(l, R(ft, i, I(ft, ct, lt)));
2320
+ }
2321
+ }
2322
+ setMeasuringMode(false);
2323
+ addRemoveAttrClass(c, F, q, _t);
2324
+ addRemoveAttrClass(r, tt, q, _t);
2325
+ assignDeep(s, {
2326
+ G: pt,
2327
+ Vt: {
2328
+ x: nt.w,
2329
+ y: nt.h
2330
+ },
2331
+ Rt: {
2332
+ x: st.w,
2333
+ y: st.h
2334
+ },
2335
+ en: at,
2336
+ Pt: sanitizeScrollCoordinates(bt, st)
2337
+ });
2338
+ return {
2339
+ nn: vt,
2340
+ Zt: ot,
2341
+ tn: et,
2342
+ sn: wt || et,
2343
+ dn: gt
2344
+ };
2345
+ };
2346
+ };
2347
+
2348
+ const createStructureSetup = t => {
2349
+ const [n, o, s] = createStructureSetupElements(t);
2350
+ const e = {
2351
+ cn: {
2352
+ t: 0,
2353
+ r: 0,
2354
+ b: 0,
2355
+ l: 0
2356
+ },
2357
+ un: false,
2358
+ rt: {
2359
+ [O]: 0,
2360
+ [$]: 0,
2361
+ [S]: 0,
2362
+ [b]: 0,
2363
+ [w]: 0,
2364
+ [m]: 0,
2365
+ [y]: 0
2366
+ },
2367
+ Vt: {
2368
+ x: 0,
2369
+ y: 0
2370
+ },
2371
+ Rt: {
2372
+ x: 0,
2373
+ y: 0
2374
+ },
2375
+ G: {
2376
+ x: I,
2377
+ y: I
2378
+ },
2379
+ en: {
2380
+ x: false,
2381
+ y: false
2382
+ },
2383
+ Pt: getZeroScrollCoordinates()
2384
+ };
2385
+ const {vt: c, gt: r, nt: l} = n;
2386
+ const {R: i, M: a} = getEnvironment();
2387
+ const u = !i && (a.x || a.y);
2388
+ const _ = [ createTrinsicUpdateSegment(n), createPaddingUpdateSegment(n, e), createOverflowUpdateSegment(n, e) ];
2389
+ return [ o, t => {
2390
+ const n = {};
2391
+ const o = u;
2392
+ const s = o && getElementScroll(r);
2393
+ each(_, (o => {
2394
+ assignDeep(n, o(t, n) || {});
2395
+ }));
2396
+ scrollElementTo(r, s);
2397
+ !l && scrollElementTo(c, 0);
2398
+ return n;
2399
+ }, e, n, s ];
2400
+ };
2401
+
2402
+ const createSetups = (t, n, o, s, e) => {
2403
+ const c = createOptionCheck(n, {});
2404
+ const [r, l, i, a, u] = createStructureSetup(t);
2405
+ const [_, d, f] = createObserversSetup(a, i, c, (t => {
2406
+ update({}, t);
2407
+ }));
2408
+ const [p, v, , h] = createScrollbarsSetup(t, n, f, i, a, e);
2409
+ const updateHintsAreTruthy = t => keys(t).some((n => !!t[n]));
2410
+ const update = (t, e) => {
2411
+ if (o()) {
2412
+ return false;
2413
+ }
2414
+ const {fn: c, Tt: r, At: i, pn: a} = t;
2415
+ const u = c || {};
2416
+ const _ = !!r;
2417
+ const p = {
2418
+ It: createOptionCheck(n, u, _),
2419
+ fn: u,
2420
+ Tt: _
2421
+ };
2422
+ if (a) {
2423
+ v(p);
2424
+ return false;
2425
+ }
2426
+ const h = e || d(assignDeep({}, p, {
2427
+ At: i
2428
+ }));
2429
+ const g = l(assignDeep({}, p, {
2430
+ an: f,
2431
+ Gt: h
2432
+ }));
2433
+ v(assignDeep({}, p, {
2434
+ Gt: h,
2435
+ Qt: g
2436
+ }));
2437
+ const b = updateHintsAreTruthy(h);
2438
+ const w = updateHintsAreTruthy(g);
2439
+ const y = b || w || !isEmptyObject(u) || _;
2440
+ y && s(t, {
2441
+ Gt: h,
2442
+ Qt: g
2443
+ });
2444
+ return y;
2445
+ };
2446
+ return [ () => {
2447
+ const {rn: t, gt: n} = a;
2448
+ const o = getElementScroll(t);
2449
+ const s = [ _(), r(), p() ];
2450
+ scrollElementTo(n, o);
2451
+ return bind(runEachAndClear, s);
2452
+ }, update, () => ({
2453
+ vn: f,
2454
+ hn: i
2455
+ }), {
2456
+ gn: a,
2457
+ bn: h
2458
+ }, u ];
2459
+ };
2460
+
2461
+ const OverlayScrollbars = (t, n, o) => {
2462
+ const {N: s} = getEnvironment();
2463
+ const e = isHTMLElement(t);
2464
+ const c = e ? t : t.target;
2465
+ const r = getInstance(c);
2466
+ if (n && !r) {
2467
+ let r = false;
2468
+ const l = [];
2469
+ const i = {};
2470
+ const validateOptions = t => {
2471
+ const n = removeUndefinedProperties(t);
2472
+ const o = getStaticPluginModuleInstance(zt);
2473
+ return o ? o(n, true) : n;
2474
+ };
2475
+ const a = assignDeep({}, s(), validateOptions(n));
2476
+ const [u, _, d] = createEventListenerHub();
2477
+ const [f, p, v] = createEventListenerHub(o);
2478
+ const triggerEvent = (t, n) => {
2479
+ v(t, n);
2480
+ d(t, n);
2481
+ };
2482
+ const [h, g, b, w, y] = createSetups(t, a, (() => r), (({fn: t, Tt: n}, {Gt: o, Qt: s}) => {
2483
+ const {ft: e, Ct: c, xt: r, Ht: l, Et: i, dt: a} = o;
2484
+ const {Zt: u, tn: _, nn: d, sn: f} = s;
2485
+ triggerEvent("updated", [ m, {
2486
+ updateHints: {
2487
+ sizeChanged: !!e,
2488
+ directionChanged: !!c,
2489
+ heightIntrinsicChanged: !!r,
2490
+ overflowEdgeChanged: !!u,
2491
+ overflowAmountChanged: !!_,
2492
+ overflowStyleChanged: !!d,
2493
+ scrollCoordinatesChanged: !!f,
2494
+ contentMutation: !!l,
2495
+ hostMutation: !!i,
2496
+ appear: !!a
2497
+ },
2498
+ changedOptions: t || {},
2499
+ force: !!n
2500
+ } ]);
2501
+ }), (t => triggerEvent("scroll", [ m, t ])));
2502
+ const destroy = t => {
2503
+ removeInstance(c);
2504
+ runEachAndClear(l);
2505
+ r = true;
2506
+ triggerEvent("destroyed", [ m, t ]);
2507
+ _();
2508
+ p();
2509
+ };
2510
+ const m = {
2511
+ options(t, n) {
2512
+ if (t) {
2513
+ const o = n ? s() : {};
2514
+ const e = getOptionsDiff(a, assignDeep(o, validateOptions(t)));
2515
+ if (!isEmptyObject(e)) {
2516
+ assignDeep(a, e);
2517
+ g({
2518
+ fn: e
2519
+ });
2520
+ }
2521
+ }
2522
+ return assignDeep({}, a);
2523
+ },
2524
+ on: f,
2525
+ off: (t, n) => {
2526
+ t && n && p(t, n);
2527
+ },
2528
+ state() {
2529
+ const {vn: t, hn: n} = b();
2530
+ const {ct: o} = t;
2531
+ const {Vt: s, Rt: e, G: c, en: l, cn: i, un: a, Pt: u} = n;
2532
+ return assignDeep({}, {
2533
+ overflowEdge: s,
2534
+ overflowAmount: e,
2535
+ overflowStyle: c,
2536
+ hasOverflow: l,
2537
+ scrollCoordinates: {
2538
+ start: u.T,
2539
+ end: u.D
2540
+ },
2541
+ padding: i,
2542
+ paddingAbsolute: a,
2543
+ directionRTL: o,
2544
+ destroyed: r
2545
+ });
2546
+ },
2547
+ elements() {
2548
+ const {vt: t, ht: n, cn: o, ot: s, bt: e, gt: c, Kt: r} = w.gn;
2549
+ const {Ft: l, Wt: i} = w.bn;
2550
+ const translateScrollbarStructure = t => {
2551
+ const {Mt: n, kt: o, Lt: s} = t;
2552
+ return {
2553
+ scrollbar: s,
2554
+ track: o,
2555
+ handle: n
2556
+ };
2557
+ };
2558
+ const translateScrollbarsSetupElement = t => {
2559
+ const {jt: n, Xt: o} = t;
2560
+ const s = translateScrollbarStructure(n[0]);
2561
+ return assignDeep({}, s, {
2562
+ clone: () => {
2563
+ const t = translateScrollbarStructure(o());
2564
+ g({
2565
+ pn: true
2566
+ });
2567
+ return t;
2568
+ }
2569
+ });
2570
+ };
2571
+ return assignDeep({}, {
2572
+ target: t,
2573
+ host: n,
2574
+ padding: o || s,
2575
+ viewport: s,
2576
+ content: e || s,
2577
+ scrollOffsetElement: c,
2578
+ scrollEventElement: r,
2579
+ scrollbarHorizontal: translateScrollbarsSetupElement(l),
2580
+ scrollbarVertical: translateScrollbarsSetupElement(i)
2581
+ });
2582
+ },
2583
+ update: t => g({
2584
+ Tt: t,
2585
+ At: true
2586
+ }),
2587
+ destroy: bind(destroy, false),
2588
+ plugin: t => i[keys(t)[0]]
2589
+ };
2590
+ push(l, [ y ]);
2591
+ addInstance(c, m);
2592
+ registerPluginModuleInstances(Ht, OverlayScrollbars, [ m, u, i ]);
2593
+ if (cancelInitialization(w.gn.yt, !e && t.cancel)) {
2594
+ destroy(true);
2595
+ return m;
2596
+ }
2597
+ push(l, h());
2598
+ triggerEvent("initialized", [ m ]);
2599
+ m.update(true);
2600
+ return m;
2601
+ }
2602
+ return r;
2603
+ };
2604
+
2605
+ OverlayScrollbars.plugin = t => {
2606
+ const n = isArray(t);
2607
+ const o = n ? t : [ t ];
2608
+ const s = o.map((t => registerPluginModuleInstances(t, OverlayScrollbars)[0]));
2609
+ addPlugins(o);
2610
+ return n ? s : s[0];
2611
+ };
2612
+
2613
+ OverlayScrollbars.valid = t => {
2614
+ const n = t && t.elements;
2615
+ const o = isFunction(n) && n();
2616
+ return isPlainObject(o) && !!getInstance(o.target);
2617
+ };
2618
+
2619
+ OverlayScrollbars.env = () => {
2620
+ const {k: t, M: n, R: o, V: s, B: e, F: c, P: r, U: l, N: i, q: a} = getEnvironment();
2621
+ return assignDeep({}, {
2622
+ scrollbarsSize: t,
2623
+ scrollbarsOverlaid: n,
2624
+ scrollbarsHiding: o,
2625
+ scrollTimeline: s,
2626
+ staticDefaultInitialization: e,
2627
+ staticDefaultOptions: c,
2628
+ getDefaultInitialization: r,
2629
+ setDefaultInitialization: l,
2630
+ getDefaultOptions: i,
2631
+ setDefaultOptions: a
2632
+ });
2633
+ };
2634
+
6
2635
  const toolTipZindex = ref(999999);
7
2636
  const createTooltipStyle = () => {
8
2637
  createStyle("das-ui-text", [
@@ -14,8 +2643,8 @@ const createTooltipStyle = () => {
14
2643
  className: "#das-ui-text-tooltip",
15
2644
  style: {
16
2645
  position: "fixed",
17
- "z-index": toolTipZindex.value,
18
- "box-shadow": `0px 4px 10px 0px ${getVarValue("--das-ui-text-tooltip-shadow").value}`
2646
+ "z-index": toolTipZindex.value
2647
+ // 'box-shadow': `0px 4px 10px 0px ${getVarValue('--das-ui-text-tooltip-shadow').value}`,
19
2648
  }
20
2649
  },
21
2650
  {
@@ -30,7 +2659,8 @@ const createTooltipStyle = () => {
30
2659
  background: getVarValue("--das-ui-text-tooltip-bgcolor").value,
31
2660
  "border-radius": "2px",
32
2661
  "word-break": "break-all",
33
- "line-height": 1.5
2662
+ "line-height": 1.5,
2663
+ "overflow-y": "hidden"
34
2664
  }
35
2665
  },
36
2666
  {
@@ -39,29 +2669,59 @@ const createTooltipStyle = () => {
39
2669
  color: "#212121 !important"
40
2670
  }
41
2671
  },
2672
+ // {
2673
+ // className: '#das-ui-text-tooltip:after',
2674
+ // style: {
2675
+ // content: '',
2676
+ // position: 'absolute',
2677
+ // height: '12px',
2678
+ // width: '8px',
2679
+ // 'background-color': getVarValue('--das-ui-text-tooltip-bgcolor').value,
2680
+ // 'box-shadow': '3px 3px 5px rgba(0, 0, 0, 0.15)',
2681
+ // 'border-color': getVarValue('--das-ui-dropdown-bgff-color').value,
2682
+ // 'border-radius': '0',
2683
+ // 'z-index': '-1',
2684
+ // transform: 'rotate(45deg)',
2685
+ // bottom: '-4px',
2686
+ // left: '10px',
2687
+ // },
2688
+ // },
2689
+ {
2690
+ className: "#tooltip-scroll-content",
2691
+ style: {
2692
+ width: "100%",
2693
+ height: "100%"
2694
+ }
2695
+ },
42
2696
  {
43
- className: "#das-ui-text-tooltip:after",
2697
+ className: ".das-scrollbar",
44
2698
  style: {
45
- content: "",
46
- position: "absolute",
47
- height: "12px",
48
- width: "8px",
49
- "background-color": getVarValue("--das-ui-text-tooltip-bgcolor").value,
50
- "box-shadow": "3px 3px 5px rgba(0, 0, 0, 0.15)",
51
- "border-color": getVarValue("--das-ui-dropdown-bgff-color").value,
52
- "border-radius": "0",
53
- "z-index": "-1",
54
- transform: "rotate(45deg)",
55
- bottom: "-4px",
56
- left: "10px"
2699
+ " --os-handle-bg": getVarValue("--das-ui-scrollbar-thumb-color").value,
2700
+ "--os-handle-bg-hover": getVarValue("--das-ui-scrollbar-thumb-hover-color").value,
2701
+ "--os-handle-bg-active": getVarValue("--das-ui-scrollbar-thumb-hover-color").value,
2702
+ "--os-padding-perpendicular": getVarValue("--das-ui-scrollbar-padding").value,
2703
+ "--os-size": "10px",
2704
+ "box-sizing": "border-box",
2705
+ ":hover": {
2706
+ // 悬浮时滚动条变大
2707
+ "--os-padding-perpendicular": 0
2708
+ }
57
2709
  }
58
2710
  }
59
2711
  ]);
60
2712
  };
2713
+ const handelMouseOverContent = (event) => {
2714
+ window.inTextTooltip = true;
2715
+ event.stopPropagation();
2716
+ };
61
2717
  const tooltipInstanceTotal = ref(0);
62
2718
  const hideTooltip = () => {
63
2719
  const kxmTooltipDom = document.getElementById("das-ui-text-tooltip");
64
2720
  kxmTooltipDom && document.body?.removeChild(kxmTooltipDom);
2721
+ window.inTextTooltip = false;
2722
+ const tooltipContext = document.getElementById("das-ui-text-tooltip-context");
2723
+ if (!tooltipContext) return;
2724
+ tooltipContext.removeEventListener("mouseover", handelMouseOverContent);
65
2725
  };
66
2726
  const handleMouseWheel = (event) => {
67
2727
  let tooltipDom = document.getElementById("das-ui-text-tooltip");
@@ -69,40 +2729,50 @@ const handleMouseWheel = (event) => {
69
2729
  const mouseY = event.clientY;
70
2730
  const rect = tooltipDom?.getBoundingClientRect();
71
2731
  if (tooltipDom && mouseX >= rect.left && mouseX <= rect.right && mouseY >= rect.top && mouseY <= rect.bottom) {
72
- return;
2732
+ return true;
73
2733
  }
74
2734
  hideTooltip();
75
2735
  };
2736
+ const getEl = async (el, options) => {
2737
+ let res = el;
2738
+ if (options.target) {
2739
+ if (typeof options.target === "string") res = options.target;
2740
+ if (typeof options.target === "function") res = await options.target(el);
2741
+ }
2742
+ return res;
2743
+ };
76
2744
  const vDasTooltip = {
77
2745
  beforeMount() {
78
2746
  createTooltipStyle();
79
2747
  },
80
- mounted(el) {
2748
+ async mounted(el, binding, vnode) {
2749
+ const options = (vnode ? binding.value : binding) || {};
2750
+ let isDeep = options?.deep !== void 0 ? options?.deep : true;
81
2751
  if (tooltipInstanceTotal.value === 0) {
82
2752
  window.addEventListener("wheel", handleMouseWheel);
83
2753
  }
84
2754
  tooltipInstanceTotal.value++;
85
- let textContext = el;
86
- const classList = textContext.classList;
2755
+ let targetEl = await getEl(el, options);
2756
+ const classList = targetEl.classList;
87
2757
  let isDelete = true;
88
2758
  if (!classList.contains("das-ui-text-context")) {
89
2759
  classList.add("das-ui-text-context");
90
2760
  }
91
- el.onmouseenter = (e) => {
2761
+ targetEl.onmouseenter = (e) => {
92
2762
  const path = e.composedPath();
93
2763
  const target = path[0];
94
- const { x, y, width } = target.getBoundingClientRect();
2764
+ const { x, y, width, height, top, left, bottom } = target.getBoundingClientRect();
95
2765
  const style = window.getComputedStyle(target, null);
96
2766
  const paddingL = parseFloat(style.getPropertyValue("padding-left"));
97
- textContext = el;
98
2767
  toolTipZindex.value = useZIndex().nextZIndex();
99
2768
  const range = document.createRange();
100
- range.setStart(textContext, 0);
101
- range.setEnd(textContext, textContext.childNodes.length);
2769
+ range.setStart(targetEl, 0);
2770
+ let lengthT = !isDeep ? 1 : targetEl.childNodes.length;
2771
+ range.setEnd(targetEl, lengthT);
102
2772
  const rangeWidth = Math.round(range.getBoundingClientRect().width);
103
- const clientWidth = Math.round(textContext.getBoundingClientRect().width);
2773
+ const clientWidth = Math.round(targetEl.getBoundingClientRect().width);
104
2774
  if (rangeWidth > clientWidth) {
105
- setTimeout(() => {
2775
+ setTimeout(async () => {
106
2776
  let kxmTooltipDom = document.getElementById("das-ui-text-tooltip");
107
2777
  if (!kxmTooltipDom) {
108
2778
  kxmTooltipDom = document.createElement("div");
@@ -110,15 +2780,51 @@ const vDasTooltip = {
110
2780
  kxmTooltipDom.setAttribute("id", "das-ui-text-tooltip");
111
2781
  const tooltipContext = document.createElement("div");
112
2782
  tooltipContext.setAttribute("id", "das-ui-text-tooltip-context");
113
- tooltipContext.setAttribute("class", "das-overlay");
2783
+ tooltipContext.addEventListener("mouseover", handelMouseOverContent);
2784
+ const tooltipContextTemp = document.createElement("div");
2785
+ tooltipContextTemp.setAttribute("id", "tooltip-scroll-content");
2786
+ tooltipContext.appendChild(tooltipContextTemp);
114
2787
  kxmTooltipDom.appendChild(tooltipContext);
115
2788
  document.body.appendChild(kxmTooltipDom);
2789
+ const defaultClassName = "os-theme-dark das-scrollbar";
2790
+ const message = document.getElementById("tooltip-scroll-content");
2791
+ if (!!message) {
2792
+ message.innerHTML = targetEl.innerHTML;
2793
+ OverlayScrollbars(tooltipContext, {
2794
+ scrollbars: {
2795
+ autoHide: "leave",
2796
+ // 鼠标移开自动隐藏
2797
+ autoHideDelay: 0,
2798
+ theme: defaultClassName
2799
+ },
2800
+ overflow: { y: "scroll" }
2801
+ });
2802
+ }
116
2803
  }
117
- const message = document.getElementById("das-ui-text-tooltip-context");
118
- if (!!message) {
119
- message.innerHTML = textContext.innerHTML;
2804
+ const tooltipTriangle = document.createElement("span");
2805
+ tooltipTriangle.textContent = "";
2806
+ tooltipTriangle.style.position = "absolute";
2807
+ tooltipTriangle.style.height = "12px";
2808
+ tooltipTriangle.style.width = "8px";
2809
+ tooltipTriangle.style.backgroundColor = getVarValue("--das-ui-text-tooltip-bgcolor").value;
2810
+ tooltipTriangle.style.boxShadow = "3px 3px 5px rgba(0, 0, 0, 0.15)";
2811
+ tooltipTriangle.style.borderColor = getVarValue("--das-ui-dropdown-bgff-color").value;
2812
+ tooltipTriangle.style.borderRadius = "0px";
2813
+ tooltipTriangle.style.zIndex = "-1";
2814
+ tooltipTriangle.style.transform = "rotate(45deg)";
2815
+ tooltipTriangle.style.left = "10px";
2816
+ kxmTooltipDom.appendChild(tooltipTriangle);
2817
+ let topNum = y - 10 - kxmTooltipDom.offsetHeight;
2818
+ if (topNum * 1 < 0) {
2819
+ kxmTooltipDom.style.top = `${bottom + 5}px`;
2820
+ tooltipTriangle.style.top = "-4px";
2821
+ tooltipTriangle.style.boxShadow = "3px -3px 5px rgba(0, 0, 0, 0.15)";
2822
+ kxmTooltipDom.style.boxShadow = `0px -4px 10px 0px ${getVarValue("--das-ui-text-tooltip-shadow").value}`;
2823
+ } else {
2824
+ kxmTooltipDom.style.top = `${topNum}px`;
2825
+ tooltipTriangle.style.bottom = "-4px";
2826
+ kxmTooltipDom.style.boxShadow = `0px 4px 10px 0px ${getVarValue("--das-ui-text-tooltip-shadow").value}`;
120
2827
  }
121
- kxmTooltipDom.style.top = `${y - 10 - kxmTooltipDom.offsetHeight}px`;
122
2828
  kxmTooltipDom.onmouseenter = (e2) => {
123
2829
  isDelete = false;
124
2830
  };
@@ -131,7 +2837,7 @@ const vDasTooltip = {
131
2837
  }, 200);
132
2838
  }
133
2839
  };
134
- el.onmouseleave = (e) => {
2840
+ targetEl.onmouseleave = (e) => {
135
2841
  setTimeout(() => {
136
2842
  if (isDelete) {
137
2843
  hideTooltip();