@pdg/react-admin-layout 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var material=require('@mui/material'),React=require('react'),reactRouterDom=require('react-router-dom'),iconsMaterial=require('@mui/icons-material');function _interopNamespaceDefault(e){var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var React__namespace=/*#__PURE__*/_interopNamespaceDefault(React);var CardLayoutDefaultProps = {
1
+ 'use strict';var material=require('@mui/material'),React=require('react'),reactRouterDom=require('react-router-dom'),iconsMaterial=require('@mui/icons-material'),SimpleBar=require('simplebar-react');require('simplebar-react/dist/simplebar.min.css');var CardLayoutDefaultProps = {
2
2
  backgroundColor: '#eff3f8',
3
3
  };var CardLayout = function (_a) {
4
4
  var children = _a.children, backgroundColor = _a.backgroundColor;
@@ -153,1565 +153,7 @@ var notEmpty = function (v) {
153
153
  var templateObject_1$3;var SideMenuList = function (_a) {
154
154
  var list = _a.list, badgeVariant = _a.badgeVariant, onClick = _a.onClick;
155
155
  return (React.createElement(StyledList, null, list.map(function (info, idx) { return (React.createElement(SideMenuListItem, { key: idx, info: info, badgeVariant: badgeVariant, onClick: onClick })); })));
156
- };/** Detect free variable `global` from Node.js. */
157
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
158
-
159
- var freeGlobal$1 = freeGlobal;/** Detect free variable `self`. */
160
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
161
-
162
- /** Used as a reference to the global object. */
163
- var root = freeGlobal$1 || freeSelf || Function('return this')();
164
-
165
- var root$1 = root;/** Built-in value references. */
166
- var Symbol = root$1.Symbol;
167
-
168
- var Symbol$1 = Symbol;/** Used for built-in method references. */
169
- var objectProto$1 = Object.prototype;
170
-
171
- /** Used to check objects for own properties. */
172
- var hasOwnProperty = objectProto$1.hasOwnProperty;
173
-
174
- /**
175
- * Used to resolve the
176
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
177
- * of values.
178
- */
179
- var nativeObjectToString$1 = objectProto$1.toString;
180
-
181
- /** Built-in value references. */
182
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
183
-
184
- /**
185
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
186
- *
187
- * @private
188
- * @param {*} value The value to query.
189
- * @returns {string} Returns the raw `toStringTag`.
190
- */
191
- function getRawTag(value) {
192
- var isOwn = hasOwnProperty.call(value, symToStringTag$1),
193
- tag = value[symToStringTag$1];
194
-
195
- try {
196
- value[symToStringTag$1] = undefined;
197
- var unmasked = true;
198
- } catch (e) {}
199
-
200
- var result = nativeObjectToString$1.call(value);
201
- if (unmasked) {
202
- if (isOwn) {
203
- value[symToStringTag$1] = tag;
204
- } else {
205
- delete value[symToStringTag$1];
206
- }
207
- }
208
- return result;
209
- }/** Used for built-in method references. */
210
- var objectProto = Object.prototype;
211
-
212
- /**
213
- * Used to resolve the
214
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
215
- * of values.
216
- */
217
- var nativeObjectToString = objectProto.toString;
218
-
219
- /**
220
- * Converts `value` to a string using `Object.prototype.toString`.
221
- *
222
- * @private
223
- * @param {*} value The value to convert.
224
- * @returns {string} Returns the converted string.
225
- */
226
- function objectToString(value) {
227
- return nativeObjectToString.call(value);
228
- }/** `Object#toString` result references. */
229
- var nullTag = '[object Null]',
230
- undefinedTag = '[object Undefined]';
231
-
232
- /** Built-in value references. */
233
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
234
-
235
- /**
236
- * The base implementation of `getTag` without fallbacks for buggy environments.
237
- *
238
- * @private
239
- * @param {*} value The value to query.
240
- * @returns {string} Returns the `toStringTag`.
241
- */
242
- function baseGetTag(value) {
243
- if (value == null) {
244
- return value === undefined ? undefinedTag : nullTag;
245
- }
246
- return (symToStringTag && symToStringTag in Object(value))
247
- ? getRawTag(value)
248
- : objectToString(value);
249
- }/**
250
- * Checks if `value` is object-like. A value is object-like if it's not `null`
251
- * and has a `typeof` result of "object".
252
- *
253
- * @static
254
- * @memberOf _
255
- * @since 4.0.0
256
- * @category Lang
257
- * @param {*} value The value to check.
258
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
259
- * @example
260
- *
261
- * _.isObjectLike({});
262
- * // => true
263
- *
264
- * _.isObjectLike([1, 2, 3]);
265
- * // => true
266
- *
267
- * _.isObjectLike(_.noop);
268
- * // => false
269
- *
270
- * _.isObjectLike(null);
271
- * // => false
272
- */
273
- function isObjectLike(value) {
274
- return value != null && typeof value == 'object';
275
- }/** `Object#toString` result references. */
276
- var symbolTag = '[object Symbol]';
277
-
278
- /**
279
- * Checks if `value` is classified as a `Symbol` primitive or object.
280
- *
281
- * @static
282
- * @memberOf _
283
- * @since 4.0.0
284
- * @category Lang
285
- * @param {*} value The value to check.
286
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
287
- * @example
288
- *
289
- * _.isSymbol(Symbol.iterator);
290
- * // => true
291
- *
292
- * _.isSymbol('abc');
293
- * // => false
294
- */
295
- function isSymbol(value) {
296
- return typeof value == 'symbol' ||
297
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
298
- }/** Used to match a single whitespace character. */
299
- var reWhitespace = /\s/;
300
-
301
- /**
302
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
303
- * character of `string`.
304
- *
305
- * @private
306
- * @param {string} string The string to inspect.
307
- * @returns {number} Returns the index of the last non-whitespace character.
308
- */
309
- function trimmedEndIndex(string) {
310
- var index = string.length;
311
-
312
- while (index-- && reWhitespace.test(string.charAt(index))) {}
313
- return index;
314
- }/** Used to match leading whitespace. */
315
- var reTrimStart = /^\s+/;
316
-
317
- /**
318
- * The base implementation of `_.trim`.
319
- *
320
- * @private
321
- * @param {string} string The string to trim.
322
- * @returns {string} Returns the trimmed string.
323
- */
324
- function baseTrim(string) {
325
- return string
326
- ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
327
- : string;
328
- }/**
329
- * Checks if `value` is the
330
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
331
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
332
- *
333
- * @static
334
- * @memberOf _
335
- * @since 0.1.0
336
- * @category Lang
337
- * @param {*} value The value to check.
338
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
339
- * @example
340
- *
341
- * _.isObject({});
342
- * // => true
343
- *
344
- * _.isObject([1, 2, 3]);
345
- * // => true
346
- *
347
- * _.isObject(_.noop);
348
- * // => true
349
- *
350
- * _.isObject(null);
351
- * // => false
352
- */
353
- function isObject(value) {
354
- var type = typeof value;
355
- return value != null && (type == 'object' || type == 'function');
356
- }/** Used as references for various `Number` constants. */
357
- var NAN = 0 / 0;
358
-
359
- /** Used to detect bad signed hexadecimal string values. */
360
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
361
-
362
- /** Used to detect binary string values. */
363
- var reIsBinary = /^0b[01]+$/i;
364
-
365
- /** Used to detect octal string values. */
366
- var reIsOctal = /^0o[0-7]+$/i;
367
-
368
- /** Built-in method references without a dependency on `root`. */
369
- var freeParseInt = parseInt;
370
-
371
- /**
372
- * Converts `value` to a number.
373
- *
374
- * @static
375
- * @memberOf _
376
- * @since 4.0.0
377
- * @category Lang
378
- * @param {*} value The value to process.
379
- * @returns {number} Returns the number.
380
- * @example
381
- *
382
- * _.toNumber(3.2);
383
- * // => 3.2
384
- *
385
- * _.toNumber(Number.MIN_VALUE);
386
- * // => 5e-324
387
- *
388
- * _.toNumber(Infinity);
389
- * // => Infinity
390
- *
391
- * _.toNumber('3.2');
392
- * // => 3.2
393
- */
394
- function toNumber(value) {
395
- if (typeof value == 'number') {
396
- return value;
397
- }
398
- if (isSymbol(value)) {
399
- return NAN;
400
- }
401
- if (isObject(value)) {
402
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
403
- value = isObject(other) ? (other + '') : other;
404
- }
405
- if (typeof value != 'string') {
406
- return value === 0 ? value : +value;
407
- }
408
- value = baseTrim(value);
409
- var isBinary = reIsBinary.test(value);
410
- return (isBinary || reIsOctal.test(value))
411
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
412
- : (reIsBadHex.test(value) ? NAN : +value);
413
- }/**
414
- * Gets the timestamp of the number of milliseconds that have elapsed since
415
- * the Unix epoch (1 January 1970 00:00:00 UTC).
416
- *
417
- * @static
418
- * @memberOf _
419
- * @since 2.4.0
420
- * @category Date
421
- * @returns {number} Returns the timestamp.
422
- * @example
423
- *
424
- * _.defer(function(stamp) {
425
- * console.log(_.now() - stamp);
426
- * }, _.now());
427
- * // => Logs the number of milliseconds it took for the deferred invocation.
428
- */
429
- var now = function() {
430
- return root$1.Date.now();
431
- };
432
-
433
- var now$1 = now;/** Error message constants. */
434
- var FUNC_ERROR_TEXT$1 = 'Expected a function';
435
-
436
- /* Built-in method references for those with the same name as other `lodash` methods. */
437
- var nativeMax = Math.max,
438
- nativeMin = Math.min;
439
-
440
- /**
441
- * Creates a debounced function that delays invoking `func` until after `wait`
442
- * milliseconds have elapsed since the last time the debounced function was
443
- * invoked. The debounced function comes with a `cancel` method to cancel
444
- * delayed `func` invocations and a `flush` method to immediately invoke them.
445
- * Provide `options` to indicate whether `func` should be invoked on the
446
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
447
- * with the last arguments provided to the debounced function. Subsequent
448
- * calls to the debounced function return the result of the last `func`
449
- * invocation.
450
- *
451
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
452
- * invoked on the trailing edge of the timeout only if the debounced function
453
- * is invoked more than once during the `wait` timeout.
454
- *
455
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
456
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
457
- *
458
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
459
- * for details over the differences between `_.debounce` and `_.throttle`.
460
- *
461
- * @static
462
- * @memberOf _
463
- * @since 0.1.0
464
- * @category Function
465
- * @param {Function} func The function to debounce.
466
- * @param {number} [wait=0] The number of milliseconds to delay.
467
- * @param {Object} [options={}] The options object.
468
- * @param {boolean} [options.leading=false]
469
- * Specify invoking on the leading edge of the timeout.
470
- * @param {number} [options.maxWait]
471
- * The maximum time `func` is allowed to be delayed before it's invoked.
472
- * @param {boolean} [options.trailing=true]
473
- * Specify invoking on the trailing edge of the timeout.
474
- * @returns {Function} Returns the new debounced function.
475
- * @example
476
- *
477
- * // Avoid costly calculations while the window size is in flux.
478
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
479
- *
480
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
481
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
482
- * 'leading': true,
483
- * 'trailing': false
484
- * }));
485
- *
486
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
487
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
488
- * var source = new EventSource('/stream');
489
- * jQuery(source).on('message', debounced);
490
- *
491
- * // Cancel the trailing debounced invocation.
492
- * jQuery(window).on('popstate', debounced.cancel);
493
- */
494
- function debounce(func, wait, options) {
495
- var lastArgs,
496
- lastThis,
497
- maxWait,
498
- result,
499
- timerId,
500
- lastCallTime,
501
- lastInvokeTime = 0,
502
- leading = false,
503
- maxing = false,
504
- trailing = true;
505
-
506
- if (typeof func != 'function') {
507
- throw new TypeError(FUNC_ERROR_TEXT$1);
508
- }
509
- wait = toNumber(wait) || 0;
510
- if (isObject(options)) {
511
- leading = !!options.leading;
512
- maxing = 'maxWait' in options;
513
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
514
- trailing = 'trailing' in options ? !!options.trailing : trailing;
515
- }
516
-
517
- function invokeFunc(time) {
518
- var args = lastArgs,
519
- thisArg = lastThis;
520
-
521
- lastArgs = lastThis = undefined;
522
- lastInvokeTime = time;
523
- result = func.apply(thisArg, args);
524
- return result;
525
- }
526
-
527
- function leadingEdge(time) {
528
- // Reset any `maxWait` timer.
529
- lastInvokeTime = time;
530
- // Start the timer for the trailing edge.
531
- timerId = setTimeout(timerExpired, wait);
532
- // Invoke the leading edge.
533
- return leading ? invokeFunc(time) : result;
534
- }
535
-
536
- function remainingWait(time) {
537
- var timeSinceLastCall = time - lastCallTime,
538
- timeSinceLastInvoke = time - lastInvokeTime,
539
- timeWaiting = wait - timeSinceLastCall;
540
-
541
- return maxing
542
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
543
- : timeWaiting;
544
- }
545
-
546
- function shouldInvoke(time) {
547
- var timeSinceLastCall = time - lastCallTime,
548
- timeSinceLastInvoke = time - lastInvokeTime;
549
-
550
- // Either this is the first call, activity has stopped and we're at the
551
- // trailing edge, the system time has gone backwards and we're treating
552
- // it as the trailing edge, or we've hit the `maxWait` limit.
553
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
554
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
555
- }
556
-
557
- function timerExpired() {
558
- var time = now$1();
559
- if (shouldInvoke(time)) {
560
- return trailingEdge(time);
561
- }
562
- // Restart the timer.
563
- timerId = setTimeout(timerExpired, remainingWait(time));
564
- }
565
-
566
- function trailingEdge(time) {
567
- timerId = undefined;
568
-
569
- // Only invoke if we have `lastArgs` which means `func` has been
570
- // debounced at least once.
571
- if (trailing && lastArgs) {
572
- return invokeFunc(time);
573
- }
574
- lastArgs = lastThis = undefined;
575
- return result;
576
- }
577
-
578
- function cancel() {
579
- if (timerId !== undefined) {
580
- clearTimeout(timerId);
581
- }
582
- lastInvokeTime = 0;
583
- lastArgs = lastCallTime = lastThis = timerId = undefined;
584
- }
585
-
586
- function flush() {
587
- return timerId === undefined ? result : trailingEdge(now$1());
588
- }
589
-
590
- function debounced() {
591
- var time = now$1(),
592
- isInvoking = shouldInvoke(time);
593
-
594
- lastArgs = arguments;
595
- lastThis = this;
596
- lastCallTime = time;
597
-
598
- if (isInvoking) {
599
- if (timerId === undefined) {
600
- return leadingEdge(lastCallTime);
601
- }
602
- if (maxing) {
603
- // Handle invocations in a tight loop.
604
- clearTimeout(timerId);
605
- timerId = setTimeout(timerExpired, wait);
606
- return invokeFunc(lastCallTime);
607
- }
608
- }
609
- if (timerId === undefined) {
610
- timerId = setTimeout(timerExpired, wait);
611
- }
612
- return result;
613
- }
614
- debounced.cancel = cancel;
615
- debounced.flush = flush;
616
- return debounced;
617
- }/** Error message constants. */
618
- var FUNC_ERROR_TEXT = 'Expected a function';
619
-
620
- /**
621
- * Creates a throttled function that only invokes `func` at most once per
622
- * every `wait` milliseconds. The throttled function comes with a `cancel`
623
- * method to cancel delayed `func` invocations and a `flush` method to
624
- * immediately invoke them. Provide `options` to indicate whether `func`
625
- * should be invoked on the leading and/or trailing edge of the `wait`
626
- * timeout. The `func` is invoked with the last arguments provided to the
627
- * throttled function. Subsequent calls to the throttled function return the
628
- * result of the last `func` invocation.
629
- *
630
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
631
- * invoked on the trailing edge of the timeout only if the throttled function
632
- * is invoked more than once during the `wait` timeout.
633
- *
634
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
635
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
636
- *
637
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
638
- * for details over the differences between `_.throttle` and `_.debounce`.
639
- *
640
- * @static
641
- * @memberOf _
642
- * @since 0.1.0
643
- * @category Function
644
- * @param {Function} func The function to throttle.
645
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
646
- * @param {Object} [options={}] The options object.
647
- * @param {boolean} [options.leading=true]
648
- * Specify invoking on the leading edge of the timeout.
649
- * @param {boolean} [options.trailing=true]
650
- * Specify invoking on the trailing edge of the timeout.
651
- * @returns {Function} Returns the new throttled function.
652
- * @example
653
- *
654
- * // Avoid excessively updating the position while scrolling.
655
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
656
- *
657
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
658
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
659
- * jQuery(element).on('click', throttled);
660
- *
661
- * // Cancel the trailing throttled invocation.
662
- * jQuery(window).on('popstate', throttled.cancel);
663
- */
664
- function throttle(func, wait, options) {
665
- var leading = true,
666
- trailing = true;
667
-
668
- if (typeof func != 'function') {
669
- throw new TypeError(FUNC_ERROR_TEXT);
670
- }
671
- if (isObject(options)) {
672
- leading = 'leading' in options ? !!options.leading : leading;
673
- trailing = 'trailing' in options ? !!options.trailing : trailing;
674
- }
675
- return debounce(func, wait, {
676
- 'leading': leading,
677
- 'maxWait': wait,
678
- 'trailing': trailing
679
- });
680
- }function getDefaultExportFromCjs (x) {
681
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
682
- }var canUseDOM = !!(
683
- typeof window !== 'undefined' &&
684
- window.document &&
685
- window.document.createElement
686
- );
687
-
688
- var canUseDom = canUseDOM;
689
-
690
- var canUseDOM$1 = /*@__PURE__*/getDefaultExportFromCjs(canUseDom);/**
691
- * simplebar-core - v1.2.4
692
- * Scrollbars, simpler.
693
- * https://grsmto.github.io/simplebar/
694
- *
695
- * Made by Adrien Denat from a fork by Jonathan Nicol
696
- * Under MIT License
697
- */
698
-
699
-
700
- /******************************************************************************
701
- Copyright (c) Microsoft Corporation.
702
-
703
- Permission to use, copy, modify, and/or distribute this software for any
704
- purpose with or without fee is hereby granted.
705
-
706
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
707
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
708
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
709
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
710
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
711
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
712
- PERFORMANCE OF THIS SOFTWARE.
713
- ***************************************************************************** */
714
-
715
- var __assign$1 = function() {
716
- __assign$1 = Object.assign || function __assign(t) {
717
- for (var s, i = 1, n = arguments.length; i < n; i++) {
718
- s = arguments[i];
719
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
720
- }
721
- return t;
722
- };
723
- return __assign$1.apply(this, arguments);
724
- };
725
-
726
- var cachedScrollbarWidth = null;
727
- var cachedDevicePixelRatio = null;
728
- if (canUseDOM$1) {
729
- window.addEventListener('resize', function () {
730
- if (cachedDevicePixelRatio !== window.devicePixelRatio) {
731
- cachedDevicePixelRatio = window.devicePixelRatio;
732
- cachedScrollbarWidth = null;
733
- }
734
- });
735
- }
736
- function scrollbarWidth() {
737
- if (cachedScrollbarWidth === null) {
738
- if (typeof document === 'undefined') {
739
- cachedScrollbarWidth = 0;
740
- return cachedScrollbarWidth;
741
- }
742
- var body = document.body;
743
- var box = document.createElement('div');
744
- box.classList.add('simplebar-hide-scrollbar');
745
- body.appendChild(box);
746
- var width = box.getBoundingClientRect().right;
747
- body.removeChild(box);
748
- cachedScrollbarWidth = width;
749
- }
750
- return cachedScrollbarWidth;
751
- }
752
-
753
- function getElementWindow$1(element) {
754
- if (!element ||
755
- !element.ownerDocument ||
756
- !element.ownerDocument.defaultView) {
757
- return window;
758
- }
759
- return element.ownerDocument.defaultView;
760
- }
761
- function getElementDocument$1(element) {
762
- if (!element || !element.ownerDocument) {
763
- return document;
764
- }
765
- return element.ownerDocument;
766
- }
767
- // Helper function to retrieve options from element attributes
768
- var getOptions$1 = function (obj) {
769
- var initialObj = {};
770
- var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
771
- var option = attribute.name.match(/data-simplebar-(.+)/);
772
- if (option) {
773
- var key = option[1].replace(/\W+(.)/g, function (_, chr) { return chr.toUpperCase(); });
774
- switch (attribute.value) {
775
- case 'true':
776
- acc[key] = true;
777
- break;
778
- case 'false':
779
- acc[key] = false;
780
- break;
781
- case undefined:
782
- acc[key] = true;
783
- break;
784
- default:
785
- acc[key] = attribute.value;
786
- }
787
- }
788
- return acc;
789
- }, initialObj);
790
- return options;
791
- };
792
- function addClasses$1(el, classes) {
793
- var _a;
794
- if (!el)
795
- return;
796
- (_a = el.classList).add.apply(_a, classes.split(' '));
797
- }
798
- function removeClasses$1(el, classes) {
799
- if (!el)
800
- return;
801
- classes.split(' ').forEach(function (className) {
802
- el.classList.remove(className);
803
- });
804
- }
805
- function classNamesToQuery$1(classNames) {
806
- return ".".concat(classNames.split(' ').join('.'));
807
- }
808
-
809
- var helpers = /*#__PURE__*/Object.freeze({
810
- __proto__: null,
811
- getElementWindow: getElementWindow$1,
812
- getElementDocument: getElementDocument$1,
813
- getOptions: getOptions$1,
814
- addClasses: addClasses$1,
815
- removeClasses: removeClasses$1,
816
- classNamesToQuery: classNamesToQuery$1
817
- });
818
-
819
- var getElementWindow = getElementWindow$1, getElementDocument = getElementDocument$1, getOptions = getOptions$1, addClasses = addClasses$1, removeClasses = removeClasses$1, classNamesToQuery = classNamesToQuery$1;
820
- var SimpleBarCore = /** @class */ (function () {
821
- function SimpleBarCore(element, options) {
822
- if (options === void 0) { options = {}; }
823
- var _this = this;
824
- this.removePreventClickId = null;
825
- this.minScrollbarWidth = 20;
826
- this.stopScrollDelay = 175;
827
- this.isScrolling = false;
828
- this.isMouseEntering = false;
829
- this.scrollXTicking = false;
830
- this.scrollYTicking = false;
831
- this.wrapperEl = null;
832
- this.contentWrapperEl = null;
833
- this.contentEl = null;
834
- this.offsetEl = null;
835
- this.maskEl = null;
836
- this.placeholderEl = null;
837
- this.heightAutoObserverWrapperEl = null;
838
- this.heightAutoObserverEl = null;
839
- this.rtlHelpers = null;
840
- this.scrollbarWidth = 0;
841
- this.resizeObserver = null;
842
- this.mutationObserver = null;
843
- this.elStyles = null;
844
- this.isRtl = null;
845
- this.mouseX = 0;
846
- this.mouseY = 0;
847
- this.onMouseMove = function () { };
848
- this.onWindowResize = function () { };
849
- this.onStopScrolling = function () { };
850
- this.onMouseEntered = function () { };
851
- /**
852
- * On scroll event handling
853
- */
854
- this.onScroll = function () {
855
- var elWindow = getElementWindow(_this.el);
856
- if (!_this.scrollXTicking) {
857
- elWindow.requestAnimationFrame(_this.scrollX);
858
- _this.scrollXTicking = true;
859
- }
860
- if (!_this.scrollYTicking) {
861
- elWindow.requestAnimationFrame(_this.scrollY);
862
- _this.scrollYTicking = true;
863
- }
864
- if (!_this.isScrolling) {
865
- _this.isScrolling = true;
866
- addClasses(_this.el, _this.classNames.scrolling);
867
- }
868
- _this.showScrollbar('x');
869
- _this.showScrollbar('y');
870
- _this.onStopScrolling();
871
- };
872
- this.scrollX = function () {
873
- if (_this.axis.x.isOverflowing) {
874
- _this.positionScrollbar('x');
875
- }
876
- _this.scrollXTicking = false;
877
- };
878
- this.scrollY = function () {
879
- if (_this.axis.y.isOverflowing) {
880
- _this.positionScrollbar('y');
881
- }
882
- _this.scrollYTicking = false;
883
- };
884
- this._onStopScrolling = function () {
885
- removeClasses(_this.el, _this.classNames.scrolling);
886
- if (_this.options.autoHide) {
887
- _this.hideScrollbar('x');
888
- _this.hideScrollbar('y');
889
- }
890
- _this.isScrolling = false;
891
- };
892
- this.onMouseEnter = function () {
893
- if (!_this.isMouseEntering) {
894
- addClasses(_this.el, _this.classNames.mouseEntered);
895
- _this.showScrollbar('x');
896
- _this.showScrollbar('y');
897
- _this.isMouseEntering = true;
898
- }
899
- _this.onMouseEntered();
900
- };
901
- this._onMouseEntered = function () {
902
- removeClasses(_this.el, _this.classNames.mouseEntered);
903
- if (_this.options.autoHide) {
904
- _this.hideScrollbar('x');
905
- _this.hideScrollbar('y');
906
- }
907
- _this.isMouseEntering = false;
908
- };
909
- this._onMouseMove = function (e) {
910
- _this.mouseX = e.clientX;
911
- _this.mouseY = e.clientY;
912
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
913
- _this.onMouseMoveForAxis('x');
914
- }
915
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
916
- _this.onMouseMoveForAxis('y');
917
- }
918
- };
919
- this.onMouseLeave = function () {
920
- _this.onMouseMove.cancel();
921
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
922
- _this.onMouseLeaveForAxis('x');
923
- }
924
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
925
- _this.onMouseLeaveForAxis('y');
926
- }
927
- _this.mouseX = -1;
928
- _this.mouseY = -1;
929
- };
930
- this._onWindowResize = function () {
931
- // Recalculate scrollbarWidth in case it's a zoom
932
- _this.scrollbarWidth = _this.getScrollbarWidth();
933
- _this.hideNativeScrollbar();
934
- };
935
- this.onPointerEvent = function (e) {
936
- if (!_this.axis.x.track.el ||
937
- !_this.axis.y.track.el ||
938
- !_this.axis.x.scrollbar.el ||
939
- !_this.axis.y.scrollbar.el)
940
- return;
941
- var isWithinTrackXBounds, isWithinTrackYBounds;
942
- _this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
943
- _this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
944
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
945
- isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
946
- }
947
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
948
- isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
949
- }
950
- // If any pointer event is called on the scrollbar
951
- if (isWithinTrackXBounds || isWithinTrackYBounds) {
952
- // Prevent event leaking
953
- e.stopPropagation();
954
- if (e.type === 'pointerdown' && e.pointerType !== 'touch') {
955
- if (isWithinTrackXBounds) {
956
- _this.axis.x.scrollbar.rect =
957
- _this.axis.x.scrollbar.el.getBoundingClientRect();
958
- if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
959
- _this.onDragStart(e, 'x');
960
- }
961
- else {
962
- _this.onTrackClick(e, 'x');
963
- }
964
- }
965
- if (isWithinTrackYBounds) {
966
- _this.axis.y.scrollbar.rect =
967
- _this.axis.y.scrollbar.el.getBoundingClientRect();
968
- if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
969
- _this.onDragStart(e, 'y');
970
- }
971
- else {
972
- _this.onTrackClick(e, 'y');
973
- }
974
- }
975
- }
976
- }
977
- };
978
- /**
979
- * Drag scrollbar handle
980
- */
981
- this.drag = function (e) {
982
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
983
- if (!_this.draggedAxis || !_this.contentWrapperEl)
984
- return;
985
- var eventOffset;
986
- var track = _this.axis[_this.draggedAxis].track;
987
- var trackSize = (_b = (_a = track.rect) === null || _a === void 0 ? void 0 : _a[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _b !== void 0 ? _b : 0;
988
- var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
989
- var contentSize = (_d = (_c = _this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c[_this.axis[_this.draggedAxis].scrollSizeAttr]) !== null && _d !== void 0 ? _d : 0;
990
- var hostSize = parseInt((_f = (_e = _this.elStyles) === null || _e === void 0 ? void 0 : _e[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _f !== void 0 ? _f : '0px', 10);
991
- e.preventDefault();
992
- e.stopPropagation();
993
- if (_this.draggedAxis === 'y') {
994
- eventOffset = e.pageY;
995
- }
996
- else {
997
- eventOffset = e.pageX;
998
- }
999
- // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
1000
- var dragPos = eventOffset -
1001
- ((_h = (_g = track.rect) === null || _g === void 0 ? void 0 : _g[_this.axis[_this.draggedAxis].offsetAttr]) !== null && _h !== void 0 ? _h : 0) -
1002
- _this.axis[_this.draggedAxis].dragOffset;
1003
- dragPos = _this.draggedAxis === 'x' && _this.isRtl
1004
- ? ((_k = (_j = track.rect) === null || _j === void 0 ? void 0 : _j[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _k !== void 0 ? _k : 0) -
1005
- scrollbar.size -
1006
- dragPos
1007
- : dragPos;
1008
- // Convert the mouse position into a percentage of the scrollbar height/width.
1009
- var dragPerc = dragPos / (trackSize - scrollbar.size);
1010
- // Scroll the content by the same percentage.
1011
- var scrollPos = dragPerc * (contentSize - hostSize);
1012
- // Fix browsers inconsistency on RTL
1013
- if (_this.draggedAxis === 'x' && _this.isRtl) {
1014
- scrollPos = ((_l = SimpleBarCore.getRtlHelpers()) === null || _l === void 0 ? void 0 : _l.isScrollingToNegative)
1015
- ? -scrollPos
1016
- : scrollPos;
1017
- }
1018
- _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] =
1019
- scrollPos;
1020
- };
1021
- /**
1022
- * End scroll handle drag
1023
- */
1024
- this.onEndDrag = function (e) {
1025
- var elDocument = getElementDocument(_this.el);
1026
- var elWindow = getElementWindow(_this.el);
1027
- e.preventDefault();
1028
- e.stopPropagation();
1029
- removeClasses(_this.el, _this.classNames.dragging);
1030
- elDocument.removeEventListener('mousemove', _this.drag, true);
1031
- elDocument.removeEventListener('mouseup', _this.onEndDrag, true);
1032
- _this.removePreventClickId = elWindow.setTimeout(function () {
1033
- // Remove these asynchronously so we still suppress click events
1034
- // generated simultaneously with mouseup.
1035
- elDocument.removeEventListener('click', _this.preventClick, true);
1036
- elDocument.removeEventListener('dblclick', _this.preventClick, true);
1037
- _this.removePreventClickId = null;
1038
- });
1039
- };
1040
- /**
1041
- * Handler to ignore click events during drag
1042
- */
1043
- this.preventClick = function (e) {
1044
- e.preventDefault();
1045
- e.stopPropagation();
1046
- };
1047
- this.el = element;
1048
- this.options = __assign$1(__assign$1({}, SimpleBarCore.defaultOptions), options);
1049
- this.classNames = __assign$1(__assign$1({}, SimpleBarCore.defaultOptions.classNames), options.classNames);
1050
- this.axis = {
1051
- x: {
1052
- scrollOffsetAttr: 'scrollLeft',
1053
- sizeAttr: 'width',
1054
- scrollSizeAttr: 'scrollWidth',
1055
- offsetSizeAttr: 'offsetWidth',
1056
- offsetAttr: 'left',
1057
- overflowAttr: 'overflowX',
1058
- dragOffset: 0,
1059
- isOverflowing: true,
1060
- forceVisible: false,
1061
- track: { size: null, el: null, rect: null, isVisible: false },
1062
- scrollbar: { size: null, el: null, rect: null, isVisible: false }
1063
- },
1064
- y: {
1065
- scrollOffsetAttr: 'scrollTop',
1066
- sizeAttr: 'height',
1067
- scrollSizeAttr: 'scrollHeight',
1068
- offsetSizeAttr: 'offsetHeight',
1069
- offsetAttr: 'top',
1070
- overflowAttr: 'overflowY',
1071
- dragOffset: 0,
1072
- isOverflowing: true,
1073
- forceVisible: false,
1074
- track: { size: null, el: null, rect: null, isVisible: false },
1075
- scrollbar: { size: null, el: null, rect: null, isVisible: false }
1076
- }
1077
- };
1078
- if (typeof this.el !== 'object' || !this.el.nodeName) {
1079
- throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
1080
- }
1081
- this.onMouseMove = throttle(this._onMouseMove, 64);
1082
- this.onWindowResize = debounce(this._onWindowResize, 64, { leading: true });
1083
- this.onStopScrolling = debounce(this._onStopScrolling, this.stopScrollDelay);
1084
- this.onMouseEntered = debounce(this._onMouseEntered, this.stopScrollDelay);
1085
- this.init();
1086
- }
1087
- /**
1088
- * Helper to fix browsers inconsistency on RTL:
1089
- * - Firefox inverts the scrollbar initial position
1090
- * - IE11 inverts both scrollbar position and scrolling offset
1091
- * Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
1092
- */
1093
- SimpleBarCore.getRtlHelpers = function () {
1094
- if (SimpleBarCore.rtlHelpers) {
1095
- return SimpleBarCore.rtlHelpers;
1096
- }
1097
- var dummyDiv = document.createElement('div');
1098
- dummyDiv.innerHTML =
1099
- '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
1100
- var scrollbarDummyEl = dummyDiv.firstElementChild;
1101
- var dummyChild = scrollbarDummyEl === null || scrollbarDummyEl === void 0 ? void 0 : scrollbarDummyEl.firstElementChild;
1102
- if (!dummyChild)
1103
- return null;
1104
- document.body.appendChild(scrollbarDummyEl);
1105
- scrollbarDummyEl.scrollLeft = 0;
1106
- var dummyContainerOffset = SimpleBarCore.getOffset(scrollbarDummyEl);
1107
- var dummyChildOffset = SimpleBarCore.getOffset(dummyChild);
1108
- scrollbarDummyEl.scrollLeft = -999;
1109
- var dummyChildOffsetAfterScroll = SimpleBarCore.getOffset(dummyChild);
1110
- document.body.removeChild(scrollbarDummyEl);
1111
- SimpleBarCore.rtlHelpers = {
1112
- // determines if the scrolling is responding with negative values
1113
- isScrollOriginAtZero: dummyContainerOffset.left !== dummyChildOffset.left,
1114
- // determines if the origin scrollbar position is inverted or not (positioned on left or right)
1115
- isScrollingToNegative: dummyChildOffset.left !== dummyChildOffsetAfterScroll.left
1116
- };
1117
- return SimpleBarCore.rtlHelpers;
1118
- };
1119
- SimpleBarCore.prototype.getScrollbarWidth = function () {
1120
- // Try/catch for FF 56 throwing on undefined computedStyles
1121
- try {
1122
- // Detect browsers supporting CSS scrollbar styling and do not calculate
1123
- if ((this.contentWrapperEl &&
1124
- getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar')
1125
- .display === 'none') ||
1126
- 'scrollbarWidth' in document.documentElement.style ||
1127
- '-ms-overflow-style' in document.documentElement.style) {
1128
- return 0;
1129
- }
1130
- else {
1131
- return scrollbarWidth();
1132
- }
1133
- }
1134
- catch (e) {
1135
- return scrollbarWidth();
1136
- }
1137
- };
1138
- SimpleBarCore.getOffset = function (el) {
1139
- var rect = el.getBoundingClientRect();
1140
- var elDocument = getElementDocument(el);
1141
- var elWindow = getElementWindow(el);
1142
- return {
1143
- top: rect.top +
1144
- (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
1145
- left: rect.left +
1146
- (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
1147
- };
1148
- };
1149
- SimpleBarCore.prototype.init = function () {
1150
- // We stop here on server-side
1151
- if (canUseDOM$1) {
1152
- this.initDOM();
1153
- this.rtlHelpers = SimpleBarCore.getRtlHelpers();
1154
- this.scrollbarWidth = this.getScrollbarWidth();
1155
- this.recalculate();
1156
- this.initListeners();
1157
- }
1158
- };
1159
- SimpleBarCore.prototype.initDOM = function () {
1160
- var _a, _b;
1161
- // assume that element has his DOM already initiated
1162
- this.wrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.wrapper));
1163
- this.contentWrapperEl =
1164
- this.options.scrollableNode ||
1165
- this.el.querySelector(classNamesToQuery(this.classNames.contentWrapper));
1166
- this.contentEl =
1167
- this.options.contentNode ||
1168
- this.el.querySelector(classNamesToQuery(this.classNames.contentEl));
1169
- this.offsetEl = this.el.querySelector(classNamesToQuery(this.classNames.offset));
1170
- this.maskEl = this.el.querySelector(classNamesToQuery(this.classNames.mask));
1171
- this.placeholderEl = this.findChild(this.wrapperEl, classNamesToQuery(this.classNames.placeholder));
1172
- this.heightAutoObserverWrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverWrapperEl));
1173
- this.heightAutoObserverEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverEl));
1174
- this.axis.x.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.horizontal)));
1175
- this.axis.y.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.vertical)));
1176
- this.axis.x.scrollbar.el =
1177
- ((_a = this.axis.x.track.el) === null || _a === void 0 ? void 0 : _a.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
1178
- this.axis.y.scrollbar.el =
1179
- ((_b = this.axis.y.track.el) === null || _b === void 0 ? void 0 : _b.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
1180
- if (!this.options.autoHide) {
1181
- addClasses(this.axis.x.scrollbar.el, this.classNames.visible);
1182
- addClasses(this.axis.y.scrollbar.el, this.classNames.visible);
1183
- }
1184
- };
1185
- SimpleBarCore.prototype.initListeners = function () {
1186
- var _this = this;
1187
- var _a;
1188
- var elWindow = getElementWindow(this.el);
1189
- // Event listeners
1190
- this.el.addEventListener('mouseenter', this.onMouseEnter);
1191
- this.el.addEventListener('pointerdown', this.onPointerEvent, true);
1192
- this.el.addEventListener('mousemove', this.onMouseMove);
1193
- this.el.addEventListener('mouseleave', this.onMouseLeave);
1194
- (_a = this.contentWrapperEl) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', this.onScroll);
1195
- // Browser zoom triggers a window resize
1196
- elWindow.addEventListener('resize', this.onWindowResize);
1197
- if (!this.contentEl)
1198
- return;
1199
- if (window.ResizeObserver) {
1200
- // Hack for https://github.com/WICG/ResizeObserver/issues/38
1201
- var resizeObserverStarted_1 = false;
1202
- var resizeObserver = elWindow.ResizeObserver || ResizeObserver;
1203
- this.resizeObserver = new resizeObserver(function () {
1204
- if (!resizeObserverStarted_1)
1205
- return;
1206
- elWindow.requestAnimationFrame(function () {
1207
- _this.recalculate();
1208
- });
1209
- });
1210
- this.resizeObserver.observe(this.el);
1211
- this.resizeObserver.observe(this.contentEl);
1212
- elWindow.requestAnimationFrame(function () {
1213
- resizeObserverStarted_1 = true;
1214
- });
1215
- }
1216
- // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
1217
- this.mutationObserver = new elWindow.MutationObserver(function () {
1218
- elWindow.requestAnimationFrame(function () {
1219
- _this.recalculate();
1220
- });
1221
- });
1222
- this.mutationObserver.observe(this.contentEl, {
1223
- childList: true,
1224
- subtree: true,
1225
- characterData: true
1226
- });
1227
- };
1228
- SimpleBarCore.prototype.recalculate = function () {
1229
- if (!this.heightAutoObserverEl ||
1230
- !this.contentEl ||
1231
- !this.contentWrapperEl ||
1232
- !this.wrapperEl ||
1233
- !this.placeholderEl)
1234
- return;
1235
- var elWindow = getElementWindow(this.el);
1236
- this.elStyles = elWindow.getComputedStyle(this.el);
1237
- this.isRtl = this.elStyles.direction === 'rtl';
1238
- var contentElOffsetWidth = this.contentEl.offsetWidth;
1239
- var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
1240
- var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1 || contentElOffsetWidth > 0;
1241
- var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
1242
- var elOverflowX = this.elStyles.overflowX;
1243
- var elOverflowY = this.elStyles.overflowY;
1244
- this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft);
1245
- this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
1246
- var contentElScrollHeight = this.contentEl.scrollHeight;
1247
- var contentElScrollWidth = this.contentEl.scrollWidth;
1248
- this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%';
1249
- // Determine placeholder size
1250
- this.placeholderEl.style.width = isWidthAuto
1251
- ? "".concat(contentElOffsetWidth || contentElScrollWidth, "px")
1252
- : 'auto';
1253
- this.placeholderEl.style.height = "".concat(contentElScrollHeight, "px");
1254
- var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
1255
- this.axis.x.isOverflowing =
1256
- contentElOffsetWidth !== 0 && contentElScrollWidth > contentElOffsetWidth;
1257
- this.axis.y.isOverflowing =
1258
- contentElScrollHeight > contentWrapperElOffsetHeight;
1259
- // Set isOverflowing to false if user explicitely set hidden overflow
1260
- this.axis.x.isOverflowing =
1261
- elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
1262
- this.axis.y.isOverflowing =
1263
- elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
1264
- this.axis.x.forceVisible =
1265
- this.options.forceVisible === 'x' || this.options.forceVisible === true;
1266
- this.axis.y.forceVisible =
1267
- this.options.forceVisible === 'y' || this.options.forceVisible === true;
1268
- this.hideNativeScrollbar();
1269
- // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
1270
- var offsetForXScrollbar = this.axis.x.isOverflowing
1271
- ? this.scrollbarWidth
1272
- : 0;
1273
- var offsetForYScrollbar = this.axis.y.isOverflowing
1274
- ? this.scrollbarWidth
1275
- : 0;
1276
- this.axis.x.isOverflowing =
1277
- this.axis.x.isOverflowing &&
1278
- contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
1279
- this.axis.y.isOverflowing =
1280
- this.axis.y.isOverflowing &&
1281
- contentElScrollHeight >
1282
- contentWrapperElOffsetHeight - offsetForXScrollbar;
1283
- this.axis.x.scrollbar.size = this.getScrollbarSize('x');
1284
- this.axis.y.scrollbar.size = this.getScrollbarSize('y');
1285
- if (this.axis.x.scrollbar.el)
1286
- this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px");
1287
- if (this.axis.y.scrollbar.el)
1288
- this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px");
1289
- this.positionScrollbar('x');
1290
- this.positionScrollbar('y');
1291
- this.toggleTrackVisibility('x');
1292
- this.toggleTrackVisibility('y');
1293
- };
1294
- /**
1295
- * Calculate scrollbar size
1296
- */
1297
- SimpleBarCore.prototype.getScrollbarSize = function (axis) {
1298
- var _a, _b;
1299
- if (axis === void 0) { axis = 'y'; }
1300
- if (!this.axis[axis].isOverflowing || !this.contentEl) {
1301
- return 0;
1302
- }
1303
- var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
1304
- var trackSize = (_b = (_a = this.axis[axis].track.el) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetSizeAttr]) !== null && _b !== void 0 ? _b : 0;
1305
- var scrollbarRatio = trackSize / contentSize;
1306
- var scrollbarSize;
1307
- // Calculate new height/position of drag handle.
1308
- scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
1309
- if (this.options.scrollbarMaxSize) {
1310
- scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
1311
- }
1312
- return scrollbarSize;
1313
- };
1314
- SimpleBarCore.prototype.positionScrollbar = function (axis) {
1315
- var _a, _b, _c;
1316
- if (axis === void 0) { axis = 'y'; }
1317
- var scrollbar = this.axis[axis].scrollbar;
1318
- if (!this.axis[axis].isOverflowing ||
1319
- !this.contentWrapperEl ||
1320
- !scrollbar.el ||
1321
- !this.elStyles) {
1322
- return;
1323
- }
1324
- var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
1325
- var trackSize = ((_a = this.axis[axis].track.el) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetSizeAttr]) || 0;
1326
- var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
1327
- var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
1328
- scrollOffset =
1329
- axis === 'x' &&
1330
- this.isRtl &&
1331
- ((_b = SimpleBarCore.getRtlHelpers()) === null || _b === void 0 ? void 0 : _b.isScrollOriginAtZero)
1332
- ? -scrollOffset
1333
- : scrollOffset;
1334
- if (axis === 'x' && this.isRtl) {
1335
- scrollOffset = ((_c = SimpleBarCore.getRtlHelpers()) === null || _c === void 0 ? void 0 : _c.isScrollingToNegative)
1336
- ? scrollOffset
1337
- : -scrollOffset;
1338
- }
1339
- var scrollPourcent = scrollOffset / (contentSize - hostSize);
1340
- var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
1341
- handleOffset =
1342
- axis === 'x' && this.isRtl
1343
- ? -handleOffset + (trackSize - scrollbar.size)
1344
- : handleOffset;
1345
- scrollbar.el.style.transform =
1346
- axis === 'x'
1347
- ? "translate3d(".concat(handleOffset, "px, 0, 0)")
1348
- : "translate3d(0, ".concat(handleOffset, "px, 0)");
1349
- };
1350
- SimpleBarCore.prototype.toggleTrackVisibility = function (axis) {
1351
- if (axis === void 0) { axis = 'y'; }
1352
- var track = this.axis[axis].track.el;
1353
- var scrollbar = this.axis[axis].scrollbar.el;
1354
- if (!track || !scrollbar || !this.contentWrapperEl)
1355
- return;
1356
- if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
1357
- track.style.visibility = 'visible';
1358
- this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
1359
- this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(axis));
1360
- }
1361
- else {
1362
- track.style.visibility = 'hidden';
1363
- this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
1364
- this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(axis));
1365
- }
1366
- // Even if forceVisible is enabled, scrollbar itself should be hidden
1367
- if (this.axis[axis].isOverflowing) {
1368
- scrollbar.style.display = 'block';
1369
- }
1370
- else {
1371
- scrollbar.style.display = 'none';
1372
- }
1373
- };
1374
- SimpleBarCore.prototype.showScrollbar = function (axis) {
1375
- if (axis === void 0) { axis = 'y'; }
1376
- if (this.axis[axis].isOverflowing && !this.axis[axis].scrollbar.isVisible) {
1377
- addClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
1378
- this.axis[axis].scrollbar.isVisible = true;
1379
- }
1380
- };
1381
- SimpleBarCore.prototype.hideScrollbar = function (axis) {
1382
- if (axis === void 0) { axis = 'y'; }
1383
- if (this.axis[axis].isOverflowing && this.axis[axis].scrollbar.isVisible) {
1384
- removeClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
1385
- this.axis[axis].scrollbar.isVisible = false;
1386
- }
1387
- };
1388
- SimpleBarCore.prototype.hideNativeScrollbar = function () {
1389
- if (!this.offsetEl)
1390
- return;
1391
- this.offsetEl.style[this.isRtl ? 'left' : 'right'] =
1392
- this.axis.y.isOverflowing || this.axis.y.forceVisible
1393
- ? "-".concat(this.scrollbarWidth, "px")
1394
- : '0px';
1395
- this.offsetEl.style.bottom =
1396
- this.axis.x.isOverflowing || this.axis.x.forceVisible
1397
- ? "-".concat(this.scrollbarWidth, "px")
1398
- : '0px';
1399
- };
1400
- SimpleBarCore.prototype.onMouseMoveForAxis = function (axis) {
1401
- if (axis === void 0) { axis = 'y'; }
1402
- var currentAxis = this.axis[axis];
1403
- if (!currentAxis.track.el || !currentAxis.scrollbar.el)
1404
- return;
1405
- currentAxis.track.rect = currentAxis.track.el.getBoundingClientRect();
1406
- currentAxis.scrollbar.rect =
1407
- currentAxis.scrollbar.el.getBoundingClientRect();
1408
- if (this.isWithinBounds(currentAxis.track.rect)) {
1409
- this.showScrollbar(axis);
1410
- addClasses(currentAxis.track.el, this.classNames.hover);
1411
- if (this.isWithinBounds(currentAxis.scrollbar.rect)) {
1412
- addClasses(currentAxis.scrollbar.el, this.classNames.hover);
1413
- }
1414
- else {
1415
- removeClasses(currentAxis.scrollbar.el, this.classNames.hover);
1416
- }
1417
- }
1418
- else {
1419
- removeClasses(currentAxis.track.el, this.classNames.hover);
1420
- if (this.options.autoHide) {
1421
- this.hideScrollbar(axis);
1422
- }
1423
- }
1424
- };
1425
- SimpleBarCore.prototype.onMouseLeaveForAxis = function (axis) {
1426
- if (axis === void 0) { axis = 'y'; }
1427
- removeClasses(this.axis[axis].track.el, this.classNames.hover);
1428
- removeClasses(this.axis[axis].scrollbar.el, this.classNames.hover);
1429
- if (this.options.autoHide) {
1430
- this.hideScrollbar(axis);
1431
- }
1432
- };
1433
- /**
1434
- * on scrollbar handle drag movement starts
1435
- */
1436
- SimpleBarCore.prototype.onDragStart = function (e, axis) {
1437
- var _a;
1438
- if (axis === void 0) { axis = 'y'; }
1439
- var elDocument = getElementDocument(this.el);
1440
- var elWindow = getElementWindow(this.el);
1441
- var scrollbar = this.axis[axis].scrollbar;
1442
- // Measure how far the user's mouse is from the top of the scrollbar drag handle.
1443
- var eventOffset = axis === 'y' ? e.pageY : e.pageX;
1444
- this.axis[axis].dragOffset =
1445
- eventOffset - (((_a = scrollbar.rect) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetAttr]) || 0);
1446
- this.draggedAxis = axis;
1447
- addClasses(this.el, this.classNames.dragging);
1448
- elDocument.addEventListener('mousemove', this.drag, true);
1449
- elDocument.addEventListener('mouseup', this.onEndDrag, true);
1450
- if (this.removePreventClickId === null) {
1451
- elDocument.addEventListener('click', this.preventClick, true);
1452
- elDocument.addEventListener('dblclick', this.preventClick, true);
1453
- }
1454
- else {
1455
- elWindow.clearTimeout(this.removePreventClickId);
1456
- this.removePreventClickId = null;
1457
- }
1458
- };
1459
- SimpleBarCore.prototype.onTrackClick = function (e, axis) {
1460
- var _this = this;
1461
- var _a, _b, _c, _d;
1462
- if (axis === void 0) { axis = 'y'; }
1463
- var currentAxis = this.axis[axis];
1464
- if (!this.options.clickOnTrack ||
1465
- !currentAxis.scrollbar.el ||
1466
- !this.contentWrapperEl)
1467
- return;
1468
- // Preventing the event's default to trigger click underneath
1469
- e.preventDefault();
1470
- var elWindow = getElementWindow(this.el);
1471
- this.axis[axis].scrollbar.rect =
1472
- currentAxis.scrollbar.el.getBoundingClientRect();
1473
- var scrollbar = this.axis[axis].scrollbar;
1474
- var scrollbarOffset = (_b = (_a = scrollbar.rect) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetAttr]) !== null && _b !== void 0 ? _b : 0;
1475
- var hostSize = parseInt((_d = (_c = this.elStyles) === null || _c === void 0 ? void 0 : _c[this.axis[axis].sizeAttr]) !== null && _d !== void 0 ? _d : '0px', 10);
1476
- var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
1477
- var t = axis === 'y'
1478
- ? this.mouseY - scrollbarOffset
1479
- : this.mouseX - scrollbarOffset;
1480
- var dir = t < 0 ? -1 : 1;
1481
- var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
1482
- var speed = 40;
1483
- var scrollTo = function () {
1484
- if (!_this.contentWrapperEl)
1485
- return;
1486
- if (dir === -1) {
1487
- if (scrolled > scrollSize) {
1488
- scrolled -= speed;
1489
- _this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
1490
- elWindow.requestAnimationFrame(scrollTo);
1491
- }
1492
- }
1493
- else {
1494
- if (scrolled < scrollSize) {
1495
- scrolled += speed;
1496
- _this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
1497
- elWindow.requestAnimationFrame(scrollTo);
1498
- }
1499
- }
1500
- };
1501
- scrollTo();
1502
- };
1503
- /**
1504
- * Getter for content element
1505
- */
1506
- SimpleBarCore.prototype.getContentElement = function () {
1507
- return this.contentEl;
1508
- };
1509
- /**
1510
- * Getter for original scrolling element
1511
- */
1512
- SimpleBarCore.prototype.getScrollElement = function () {
1513
- return this.contentWrapperEl;
1514
- };
1515
- SimpleBarCore.prototype.removeListeners = function () {
1516
- var elWindow = getElementWindow(this.el);
1517
- // Event listeners
1518
- this.el.removeEventListener('mouseenter', this.onMouseEnter);
1519
- this.el.removeEventListener('pointerdown', this.onPointerEvent, true);
1520
- this.el.removeEventListener('mousemove', this.onMouseMove);
1521
- this.el.removeEventListener('mouseleave', this.onMouseLeave);
1522
- if (this.contentWrapperEl) {
1523
- this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
1524
- }
1525
- elWindow.removeEventListener('resize', this.onWindowResize);
1526
- if (this.mutationObserver) {
1527
- this.mutationObserver.disconnect();
1528
- }
1529
- if (this.resizeObserver) {
1530
- this.resizeObserver.disconnect();
1531
- }
1532
- // Cancel all debounced functions
1533
- this.onMouseMove.cancel();
1534
- this.onWindowResize.cancel();
1535
- this.onStopScrolling.cancel();
1536
- this.onMouseEntered.cancel();
1537
- };
1538
- /**
1539
- * Remove all listeners from DOM nodes
1540
- */
1541
- SimpleBarCore.prototype.unMount = function () {
1542
- this.removeListeners();
1543
- };
1544
- /**
1545
- * Check if mouse is within bounds
1546
- */
1547
- SimpleBarCore.prototype.isWithinBounds = function (bbox) {
1548
- return (this.mouseX >= bbox.left &&
1549
- this.mouseX <= bbox.left + bbox.width &&
1550
- this.mouseY >= bbox.top &&
1551
- this.mouseY <= bbox.top + bbox.height);
1552
- };
1553
- /**
1554
- * Find element children matches query
1555
- */
1556
- SimpleBarCore.prototype.findChild = function (el, query) {
1557
- var matches = el.matches ||
1558
- el.webkitMatchesSelector ||
1559
- el.mozMatchesSelector ||
1560
- el.msMatchesSelector;
1561
- return Array.prototype.filter.call(el.children, function (child) {
1562
- return matches.call(child, query);
1563
- })[0];
1564
- };
1565
- SimpleBarCore.rtlHelpers = null;
1566
- SimpleBarCore.defaultOptions = {
1567
- forceVisible: false,
1568
- clickOnTrack: true,
1569
- scrollbarMinSize: 25,
1570
- scrollbarMaxSize: 0,
1571
- ariaLabel: 'scrollable content',
1572
- classNames: {
1573
- contentEl: 'simplebar-content',
1574
- contentWrapper: 'simplebar-content-wrapper',
1575
- offset: 'simplebar-offset',
1576
- mask: 'simplebar-mask',
1577
- wrapper: 'simplebar-wrapper',
1578
- placeholder: 'simplebar-placeholder',
1579
- scrollbar: 'simplebar-scrollbar',
1580
- track: 'simplebar-track',
1581
- heightAutoObserverWrapperEl: 'simplebar-height-auto-observer-wrapper',
1582
- heightAutoObserverEl: 'simplebar-height-auto-observer',
1583
- visible: 'simplebar-visible',
1584
- horizontal: 'simplebar-horizontal',
1585
- vertical: 'simplebar-vertical',
1586
- hover: 'simplebar-hover',
1587
- dragging: 'simplebar-dragging',
1588
- scrolling: 'simplebar-scrolling',
1589
- scrollable: 'simplebar-scrollable',
1590
- mouseEntered: 'simplebar-mouse-entered'
1591
- },
1592
- scrollableNode: null,
1593
- contentNode: null,
1594
- autoHide: true
1595
- };
1596
- /**
1597
- * Static functions
1598
- */
1599
- SimpleBarCore.getOptions = getOptions;
1600
- SimpleBarCore.helpers = helpers;
1601
- return SimpleBarCore;
1602
- }());/**
1603
- * simplebar-react - v3.2.4
1604
- * React component for SimpleBar
1605
- * https://grsmto.github.io/simplebar/
1606
- *
1607
- * Made by Adrien Denat
1608
- * Under MIT License
1609
- */
1610
-
1611
-
1612
- /******************************************************************************
1613
- Copyright (c) Microsoft Corporation.
1614
-
1615
- Permission to use, copy, modify, and/or distribute this software for any
1616
- purpose with or without fee is hereby granted.
1617
-
1618
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1619
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1620
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1621
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1622
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1623
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1624
- PERFORMANCE OF THIS SOFTWARE.
1625
- ***************************************************************************** */
1626
-
1627
- var __assign = function() {
1628
- __assign = Object.assign || function __assign(t) {
1629
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1630
- s = arguments[i];
1631
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1632
- }
1633
- return t;
1634
- };
1635
- return __assign.apply(this, arguments);
1636
- };
1637
-
1638
- function __rest(s, e) {
1639
- var t = {};
1640
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1641
- t[p] = s[p];
1642
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1643
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1644
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1645
- t[p[i]] = s[p[i]];
1646
- }
1647
- return t;
1648
- }
1649
-
1650
- var SimpleBar = React__namespace.forwardRef(function (_a, ref) {
1651
- var children = _a.children, _b = _a.scrollableNodeProps, scrollableNodeProps = _b === void 0 ? {} : _b, otherProps = __rest(_a, ["children", "scrollableNodeProps"]);
1652
- var elRef = React__namespace.useRef();
1653
- var scrollableNodeRef = React__namespace.useRef();
1654
- var contentNodeRef = React__namespace.useRef();
1655
- var options = {};
1656
- var rest = {};
1657
- Object.keys(otherProps).forEach(function (key) {
1658
- if (Object.prototype.hasOwnProperty.call(SimpleBarCore.defaultOptions, key)) {
1659
- options[key] = otherProps[key];
1660
- }
1661
- else {
1662
- rest[key] = otherProps[key];
1663
- }
1664
- });
1665
- var classNames = __assign(__assign({}, SimpleBarCore.defaultOptions.classNames), options.classNames);
1666
- var scrollableNodeFullProps = __assign(__assign({}, scrollableNodeProps), { className: "".concat(classNames.contentWrapper).concat(scrollableNodeProps.className ? " ".concat(scrollableNodeProps.className) : ''), tabIndex: 0, role: 'region', 'aria-label': options.ariaLabel || SimpleBarCore.defaultOptions.ariaLabel });
1667
- React__namespace.useEffect(function () {
1668
- var instance;
1669
- scrollableNodeRef.current = scrollableNodeFullProps.ref
1670
- ? scrollableNodeFullProps.ref.current
1671
- : scrollableNodeRef.current;
1672
- if (elRef.current) {
1673
- instance = new SimpleBarCore(elRef.current, __assign(__assign(__assign({}, options), (scrollableNodeRef.current && {
1674
- scrollableNode: scrollableNodeRef.current
1675
- })), (contentNodeRef.current && {
1676
- contentNode: contentNodeRef.current
1677
- })));
1678
- if (typeof ref === 'function') {
1679
- ref(instance);
1680
- }
1681
- else if (ref) {
1682
- ref.current = instance;
1683
- }
1684
- }
1685
- return function () {
1686
- instance === null || instance === void 0 ? void 0 : instance.unMount();
1687
- instance = null;
1688
- if (typeof ref === 'function') {
1689
- ref(null);
1690
- }
1691
- };
1692
- }, []);
1693
- return (React__namespace.createElement("div", __assign({ "data-simplebar": "init", ref: elRef }, rest),
1694
- React__namespace.createElement("div", { className: classNames.wrapper },
1695
- React__namespace.createElement("div", { className: classNames.heightAutoObserverWrapperEl },
1696
- React__namespace.createElement("div", { className: classNames.heightAutoObserverEl })),
1697
- React__namespace.createElement("div", { className: classNames.mask },
1698
- React__namespace.createElement("div", { className: classNames.offset }, typeof children === 'function' ? (children({
1699
- scrollableNodeRef: scrollableNodeRef,
1700
- scrollableNodeProps: __assign(__assign({}, scrollableNodeFullProps), { ref: scrollableNodeRef }),
1701
- contentNodeRef: contentNodeRef,
1702
- contentNodeProps: {
1703
- className: classNames.contentEl,
1704
- ref: contentNodeRef
1705
- }
1706
- })) : (React__namespace.createElement("div", __assign({}, scrollableNodeFullProps),
1707
- React__namespace.createElement("div", { className: classNames.contentEl }, children))))),
1708
- React__namespace.createElement("div", { className: classNames.placeholder })),
1709
- React__namespace.createElement("div", { className: "".concat(classNames.track, " simplebar-horizontal") },
1710
- React__namespace.createElement("div", { className: classNames.scrollbar })),
1711
- React__namespace.createElement("div", { className: "".concat(classNames.track, " simplebar-vertical") },
1712
- React__namespace.createElement("div", { className: classNames.scrollbar }))));
1713
- });
1714
- SimpleBar.displayName = 'SimpleBar';var StyledSimpleBar = material.styled(SimpleBar)(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n max-height: 100%;\n"], ["\n max-height: 100%;\n"])));
156
+ };var StyledSimpleBar = material.styled(SimpleBar)(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n max-height: 100%;\n"], ["\n max-height: 100%;\n"])));
1715
157
  var StyledLogoContainerBox = material.styled(material.Box)(function (_a) {
1716
158
  var theme = _a.theme;
1717
159
  return theme.unstable_sx({
@@ -1719,33 +161,7 @@ var StyledLogoContainerBox = material.styled(material.Box)(function (_a) {
1719
161
  color: 'text.primary',
1720
162
  });
1721
163
  });
1722
- var templateObject_1$2;function styleInject(css, ref) {
1723
- if ( ref === void 0 ) ref = {};
1724
- var insertAt = ref.insertAt;
1725
-
1726
- if (!css || typeof document === 'undefined') { return; }
1727
-
1728
- var head = document.head || document.getElementsByTagName('head')[0];
1729
- var style = document.createElement('style');
1730
- style.type = 'text/css';
1731
-
1732
- if (insertAt === 'top') {
1733
- if (head.firstChild) {
1734
- head.insertBefore(style, head.firstChild);
1735
- } else {
1736
- head.appendChild(style);
1737
- }
1738
- } else {
1739
- head.appendChild(style);
1740
- }
1741
-
1742
- if (style.styleSheet) {
1743
- style.styleSheet.cssText = css;
1744
- } else {
1745
- style.appendChild(document.createTextNode(css));
1746
- }
1747
- }var css_248z = "[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:' ';display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:'';background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}\n";
1748
- styleInject(css_248z);var SideMenu = function (_a) {
164
+ var templateObject_1$2;var SideMenu = function (_a) {
1749
165
  var logo = _a.logo, badgeVariant = _a.badgeVariant, list = _a.list, onClick = _a.onClick;
1750
166
  return (React.createElement(StyledSimpleBar, null,
1751
167
  React.createElement(StyledLogoContainerBox, null,