@sunggang/ui-lib 0.1.46 → 0.1.48

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/index.esm.js CHANGED
@@ -1,7 +1,6 @@
1
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import React__default, { useMemo, useRef, useReducer, useEffect, useCallback, forwardRef, useImperativeHandle, Fragment, useState } from 'react';
4
- import { Icon } from '@iconify/react';
3
+ import React__default, { useState, useEffect, useMemo, useRef, useReducer, useCallback, forwardRef, useImperativeHandle, Fragment as Fragment$1 } from 'react';
5
4
  import * as SwitchPrimitives from '@radix-ui/react-switch';
6
5
  import { clsx } from 'clsx';
7
6
  import { twMerge } from 'tailwind-merge';
@@ -15,9 +14,6 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
15
14
  import { Calendar as Calendar$2, DateRange } from 'react-date-range';
16
15
  import * as locales from 'react-date-range/dist/locale';
17
16
  import format$1 from 'date-fns/format';
18
- import '@tanstack/react-table';
19
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
20
- import { ChevronRightIcon, CheckIcon, DotFilledIcon } from '@radix-ui/react-icons';
21
17
 
22
18
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
23
19
  function getDefaultExportFromCjs(x) {
@@ -64150,15 +64146,67 @@ function _ts_values(o) {
64150
64146
 
64151
64147
  var Editor = /*@__PURE__*/getDefaultExportFromCjs(ckeditor.exports);
64152
64148
 
64149
+ function _array_like_to_array$4(arr, len) {
64150
+ if (len == null || len > arr.length) len = arr.length;
64151
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
64152
+ return arr2;
64153
+ }
64154
+ function _array_with_holes$4(arr) {
64155
+ if (Array.isArray(arr)) return arr;
64156
+ }
64157
+ function _iterable_to_array_limit$4(arr, i) {
64158
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
64159
+ if (_i == null) return;
64160
+ var _arr = [];
64161
+ var _n = true;
64162
+ var _d = false;
64163
+ var _s, _e;
64164
+ try {
64165
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
64166
+ _arr.push(_s.value);
64167
+ if (i && _arr.length === i) break;
64168
+ }
64169
+ } catch (err) {
64170
+ _d = true;
64171
+ _e = err;
64172
+ } finally{
64173
+ try {
64174
+ if (!_n && _i["return"] != null) _i["return"]();
64175
+ } finally{
64176
+ if (_d) throw _e;
64177
+ }
64178
+ }
64179
+ return _arr;
64180
+ }
64181
+ function _non_iterable_rest$4() {
64182
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
64183
+ }
64184
+ function _sliced_to_array$4(arr, i) {
64185
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
64186
+ }
64187
+ function _unsupported_iterable_to_array$4(o, minLen) {
64188
+ if (!o) return;
64189
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
64190
+ var n = Object.prototype.toString.call(o).slice(8, -1);
64191
+ if (n === "Object" && o.constructor) n = o.constructor.name;
64192
+ if (n === "Map" || n === "Set") return Array.from(n);
64193
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
64194
+ }
64153
64195
  var CkEditor = function(param) {
64154
64196
  var content = param.content, setContent = param.setContent;
64155
- return /*#__PURE__*/ jsx(dist.exports.CKEditor, {
64156
- editor: Editor,
64157
- data: content,
64158
- onChange: function(_, editor) {
64159
- var data = editor.getData();
64160
- setContent(data);
64161
- }
64197
+ var _useState = _sliced_to_array$4(useState(false), 2), isClient = _useState[0], setClient = _useState[1];
64198
+ useEffect(function() {
64199
+ setClient(true);
64200
+ }, []);
64201
+ return /*#__PURE__*/ jsx(Fragment, {
64202
+ children: isClient ? /*#__PURE__*/ jsx(dist.exports.CKEditor, {
64203
+ editor: Editor,
64204
+ data: content,
64205
+ onChange: function(_, editor) {
64206
+ var data = editor.getData();
64207
+ setContent(data);
64208
+ }
64209
+ }) : null
64162
64210
  });
64163
64211
  };
64164
64212
 
@@ -64554,14 +64602,14 @@ var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
64554
64602
  * This source code is licensed under the MIT license found in the
64555
64603
  * LICENSE file in the root directory of this source tree.
64556
64604
  */
64557
- function _instanceof$3(left, right) {
64605
+ function _instanceof$4(left, right) {
64558
64606
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
64559
64607
  return !!right[Symbol.hasInstance](left);
64560
64608
  } else {
64561
64609
  return left instanceof right;
64562
64610
  }
64563
64611
  }
64564
- function _type_of$1(obj) {
64612
+ function _type_of$2(obj) {
64565
64613
  "@swc/helpers - typeof";
64566
64614
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
64567
64615
  }
@@ -64605,7 +64653,7 @@ if (process.env.NODE_ENV !== "production") {
64605
64653
  // This is intentionally an invariant that gets caught. It's the same
64606
64654
  // behavior as without this statement except with a better message.
64607
64655
  if (typeof typeSpecs[typeSpecName] !== "function") {
64608
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; " + "it must be a function, usually from the `prop-types` package, but received `" + _type_of$1(typeSpecs[typeSpecName]) + "`." + "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
64656
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; " + "it must be a function, usually from the `prop-types` package, but received `" + _type_of$2(typeSpecs[typeSpecName]) + "`." + "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
64609
64657
  err.name = "Invariant Violation";
64610
64658
  throw err;
64611
64659
  }
@@ -64613,10 +64661,10 @@ if (process.env.NODE_ENV !== "production") {
64613
64661
  } catch (ex) {
64614
64662
  error = ex;
64615
64663
  }
64616
- if (error && !_instanceof$3(error, Error)) {
64617
- printWarning$1((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker " + "function must return `null` or an `Error` but returned a " + (typeof error === "undefined" ? "undefined" : _type_of$1(error)) + ". " + "You may have forgotten to pass an argument to the type checker " + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + "shape all require an argument).");
64664
+ if (error && !_instanceof$4(error, Error)) {
64665
+ printWarning$1((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker " + "function must return `null` or an `Error` but returned a " + (typeof error === "undefined" ? "undefined" : _type_of$2(error)) + ". " + "You may have forgotten to pass an argument to the type checker " + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + "shape all require an argument).");
64618
64666
  }
64619
- if (_instanceof$3(error, Error) && !(error.message in loggedTypeFailures)) {
64667
+ if (_instanceof$4(error, Error) && !(error.message in loggedTypeFailures)) {
64620
64668
  // Only monitor this failure once because there tends to be a lot of the
64621
64669
  // same error.
64622
64670
  loggedTypeFailures[error.message] = true;
@@ -64644,14 +64692,14 @@ var checkPropTypes_1 = checkPropTypes$1;
64644
64692
  * This source code is licensed under the MIT license found in the
64645
64693
  * LICENSE file in the root directory of this source tree.
64646
64694
  */
64647
- function _instanceof$2(left, right) {
64695
+ function _instanceof$3(left, right) {
64648
64696
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
64649
64697
  return !!right[Symbol.hasInstance](left);
64650
64698
  } else {
64651
64699
  return left instanceof right;
64652
64700
  }
64653
64701
  }
64654
- function _type_of(obj) {
64702
+ function _type_of$1(obj) {
64655
64703
  "@swc/helpers - typeof";
64656
64704
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
64657
64705
  }
@@ -64869,7 +64917,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
64869
64917
  }
64870
64918
  for(var i = 0; i < propValue.length; i++){
64871
64919
  var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret$1);
64872
- if (_instanceof$2(error, Error)) {
64920
+ if (_instanceof$3(error, Error)) {
64873
64921
  return error;
64874
64922
  }
64875
64923
  }
@@ -64901,7 +64949,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
64901
64949
  }
64902
64950
  function createInstanceTypeChecker(expectedClass) {
64903
64951
  function validate(props, propName, componentName, location, propFullName) {
64904
- if (!_instanceof$2(props[propName], expectedClass)) {
64952
+ if (!_instanceof$3(props[propName], expectedClass)) {
64905
64953
  var expectedClassName = expectedClass.name || ANONYMOUS;
64906
64954
  var actualClassName = getClassName(props[propName]);
64907
64955
  return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
@@ -64952,7 +65000,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
64952
65000
  for(var key in propValue){
64953
65001
  if (has(propValue, key)) {
64954
65002
  var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret$1);
64955
- if (_instanceof$2(error, Error)) {
65003
+ if (_instanceof$3(error, Error)) {
64956
65004
  return error;
64957
65005
  }
64958
65006
  }
@@ -65050,7 +65098,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
65050
65098
  return createChainableTypeChecker(validate);
65051
65099
  }
65052
65100
  function isNode(propValue) {
65053
- switch(typeof propValue === "undefined" ? "undefined" : _type_of(propValue)){
65101
+ switch(typeof propValue === "undefined" ? "undefined" : _type_of$1(propValue)){
65054
65102
  case "number":
65055
65103
  case "string":
65056
65104
  case "undefined":
@@ -65107,18 +65155,18 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
65107
65155
  return true;
65108
65156
  }
65109
65157
  // Fallback for non-spec compliant Symbols which are polyfilled.
65110
- if (typeof Symbol === "function" && _instanceof$2(propValue, Symbol)) {
65158
+ if (typeof Symbol === "function" && _instanceof$3(propValue, Symbol)) {
65111
65159
  return true;
65112
65160
  }
65113
65161
  return false;
65114
65162
  }
65115
65163
  // Equivalent of `typeof` but with special handling for array and regexp.
65116
65164
  function getPropType(propValue) {
65117
- var propType = typeof propValue === "undefined" ? "undefined" : _type_of(propValue);
65165
+ var propType = typeof propValue === "undefined" ? "undefined" : _type_of$1(propValue);
65118
65166
  if (Array.isArray(propValue)) {
65119
65167
  return "array";
65120
65168
  }
65121
- if (_instanceof$2(propValue, RegExp)) {
65169
+ if (_instanceof$3(propValue, RegExp)) {
65122
65170
  // Old webkits (at least until Android 4.0) return 'function' rather than
65123
65171
  // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
65124
65172
  // passes PropTypes.object.
@@ -65137,9 +65185,9 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
65137
65185
  }
65138
65186
  var propType = getPropType(propValue);
65139
65187
  if (propType === "object") {
65140
- if (_instanceof$2(propValue, Date)) {
65188
+ if (_instanceof$3(propValue, Date)) {
65141
65189
  return "date";
65142
- } else if (_instanceof$2(propValue, RegExp)) {
65190
+ } else if (_instanceof$3(propValue, RegExp)) {
65143
65191
  return "regexp";
65144
65192
  }
65145
65193
  }
@@ -65261,7 +65309,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
65261
65309
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
65262
65310
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65263
65311
  PERFORMANCE OF THIS SOFTWARE.
65264
- ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol */ function _instanceof$1(left, right) {
65312
+ ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol */ function _instanceof$2(left, right) {
65265
65313
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
65266
65314
  return !!right[Symbol.hasInstance](left);
65267
65315
  } else {
@@ -65270,7 +65318,7 @@ PERFORMANCE OF THIS SOFTWARE.
65270
65318
  }
65271
65319
  function __awaiter(thisArg, _arguments, P, generator) {
65272
65320
  function adopt(value) {
65273
- return _instanceof$1(value, P) ? value : new P(function(resolve) {
65321
+ return _instanceof$2(value, P) ? value : new P(function(resolve) {
65274
65322
  resolve(value);
65275
65323
  });
65276
65324
  }
@@ -66071,7 +66119,7 @@ var _default = function(file, acceptedFiles) {
66071
66119
  return true;
66072
66120
  };
66073
66121
 
66074
- function _instanceof(left, right) {
66122
+ function _instanceof$1(left, right) {
66075
66123
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
66076
66124
  return !!right[Symbol.hasInstance](left);
66077
66125
  } else {
@@ -66384,7 +66432,7 @@ function isIeOrEdge() {
66384
66432
  * @param {any} v
66385
66433
  * @returns {boolean} True if v is an abort exception.
66386
66434
  */ function isAbort(v) {
66387
- return _instanceof(v, DOMException) && (v.name === "AbortError" || v.code === v.ABORT_ERR);
66435
+ return _instanceof$1(v, DOMException) && (v.name === "AbortError" || v.code === v.ABORT_ERR);
66388
66436
  }
66389
66437
  /**
66390
66438
  * Check if v is a security error.
@@ -66393,7 +66441,7 @@ function isIeOrEdge() {
66393
66441
  * @param {any} v
66394
66442
  * @returns {boolean} True if v is a security error.
66395
66443
  */ function isSecurityError(v) {
66396
- return _instanceof(v, DOMException) && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
66444
+ return _instanceof$1(v, DOMException) && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
66397
66445
  }
66398
66446
  /**
66399
66447
  * Check if v is a MIME type string.
@@ -66583,7 +66631,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
66583
66631
  }, [
66584
66632
  open
66585
66633
  ]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
66586
- return /*#__PURE__*/ React__default.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {
66634
+ return /*#__PURE__*/ React__default.createElement(Fragment$1, null, children(_objectSpread(_objectSpread({}, props), {}, {
66587
66635
  open: open
66588
66636
  })));
66589
66637
  });
@@ -67451,6 +67499,1960 @@ function v4(options, buf, offset) {
67451
67499
  return stringify(rnds);
67452
67500
  }
67453
67501
 
67502
+ function _assert_this_initialized(self) {
67503
+ if (self === void 0) {
67504
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
67505
+ }
67506
+ return self;
67507
+ }
67508
+ function _class_call_check(instance, Constructor) {
67509
+ if (!(instance instanceof Constructor)) {
67510
+ throw new TypeError("Cannot call a class as a function");
67511
+ }
67512
+ }
67513
+ function _defineProperties(target, props) {
67514
+ for(var i = 0; i < props.length; i++){
67515
+ var descriptor = props[i];
67516
+ descriptor.enumerable = descriptor.enumerable || false;
67517
+ descriptor.configurable = true;
67518
+ if ("value" in descriptor) descriptor.writable = true;
67519
+ Object.defineProperty(target, descriptor.key, descriptor);
67520
+ }
67521
+ }
67522
+ function _create_class(Constructor, protoProps, staticProps) {
67523
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
67524
+ if (staticProps) _defineProperties(Constructor, staticProps);
67525
+ return Constructor;
67526
+ }
67527
+ function _define_property$5(obj, key, value) {
67528
+ if (key in obj) {
67529
+ Object.defineProperty(obj, key, {
67530
+ value: value,
67531
+ enumerable: true,
67532
+ configurable: true,
67533
+ writable: true
67534
+ });
67535
+ } else {
67536
+ obj[key] = value;
67537
+ }
67538
+ return obj;
67539
+ }
67540
+ function _get_prototype_of(o) {
67541
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
67542
+ return o.__proto__ || Object.getPrototypeOf(o);
67543
+ };
67544
+ return _get_prototype_of(o);
67545
+ }
67546
+ function _inherits(subClass, superClass) {
67547
+ if (typeof superClass !== "function" && superClass !== null) {
67548
+ throw new TypeError("Super expression must either be null or a function");
67549
+ }
67550
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
67551
+ constructor: {
67552
+ value: subClass,
67553
+ writable: true,
67554
+ configurable: true
67555
+ }
67556
+ });
67557
+ if (superClass) _set_prototype_of(subClass, superClass);
67558
+ }
67559
+ function _instanceof(left, right) {
67560
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
67561
+ return !!right[Symbol.hasInstance](left);
67562
+ } else {
67563
+ return left instanceof right;
67564
+ }
67565
+ }
67566
+ function _object_spread$5(target) {
67567
+ for(var i = 1; i < arguments.length; i++){
67568
+ var source = arguments[i] != null ? arguments[i] : {};
67569
+ var ownKeys = Object.keys(source);
67570
+ if (typeof Object.getOwnPropertySymbols === "function") {
67571
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
67572
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
67573
+ }));
67574
+ }
67575
+ ownKeys.forEach(function(key) {
67576
+ _define_property$5(target, key, source[key]);
67577
+ });
67578
+ }
67579
+ return target;
67580
+ }
67581
+ function ownKeys$3(object, enumerableOnly) {
67582
+ var keys = Object.keys(object);
67583
+ if (Object.getOwnPropertySymbols) {
67584
+ var symbols = Object.getOwnPropertySymbols(object);
67585
+ if (enumerableOnly) {
67586
+ symbols = symbols.filter(function(sym) {
67587
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
67588
+ });
67589
+ }
67590
+ keys.push.apply(keys, symbols);
67591
+ }
67592
+ return keys;
67593
+ }
67594
+ function _object_spread_props$3(target, source) {
67595
+ source = source != null ? source : {};
67596
+ if (Object.getOwnPropertyDescriptors) {
67597
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
67598
+ } else {
67599
+ ownKeys$3(Object(source)).forEach(function(key) {
67600
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
67601
+ });
67602
+ }
67603
+ return target;
67604
+ }
67605
+ function _possible_constructor_return(self, call) {
67606
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
67607
+ return call;
67608
+ }
67609
+ return _assert_this_initialized(self);
67610
+ }
67611
+ function _set_prototype_of(o, p) {
67612
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
67613
+ o.__proto__ = p;
67614
+ return o;
67615
+ };
67616
+ return _set_prototype_of(o, p);
67617
+ }
67618
+ function _type_of(obj) {
67619
+ "@swc/helpers - typeof";
67620
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
67621
+ }
67622
+ function _is_native_reflect_construct() {
67623
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
67624
+ if (Reflect.construct.sham) return false;
67625
+ if (typeof Proxy === "function") return true;
67626
+ try {
67627
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67628
+ return true;
67629
+ } catch (e) {
67630
+ return false;
67631
+ }
67632
+ }
67633
+ function _create_super(Derived) {
67634
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
67635
+ return function _createSuperInternal() {
67636
+ var Super = _get_prototype_of(Derived), result;
67637
+ if (hasNativeReflectConstruct) {
67638
+ var NewTarget = _get_prototype_of(this).constructor;
67639
+ result = Reflect.construct(Super, arguments, NewTarget);
67640
+ } else {
67641
+ result = Super.apply(this, arguments);
67642
+ }
67643
+ return _possible_constructor_return(this, result);
67644
+ };
67645
+ }
67646
+ var matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
67647
+ var stringToIcon = function(value, validate, allowSimpleName) {
67648
+ var provider = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
67649
+ var colonSeparated = value.split(":");
67650
+ if (value.slice(0, 1) === "@") {
67651
+ if (colonSeparated.length < 2 || colonSeparated.length > 3) {
67652
+ return null;
67653
+ }
67654
+ provider = colonSeparated.shift().slice(1);
67655
+ }
67656
+ if (colonSeparated.length > 3 || !colonSeparated.length) {
67657
+ return null;
67658
+ }
67659
+ if (colonSeparated.length > 1) {
67660
+ var name2 = colonSeparated.pop();
67661
+ var prefix = colonSeparated.pop();
67662
+ var result = {
67663
+ // Allow provider without '@': "provider:prefix:name"
67664
+ provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
67665
+ prefix: prefix,
67666
+ name: name2
67667
+ };
67668
+ return validate && !validateIconName(result) ? null : result;
67669
+ }
67670
+ var name = colonSeparated[0];
67671
+ var dashSeparated = name.split("-");
67672
+ if (dashSeparated.length > 1) {
67673
+ var result1 = {
67674
+ provider: provider,
67675
+ prefix: dashSeparated.shift(),
67676
+ name: dashSeparated.join("-")
67677
+ };
67678
+ return validate && !validateIconName(result1) ? null : result1;
67679
+ }
67680
+ if (allowSimpleName && provider === "") {
67681
+ var result2 = {
67682
+ provider: provider,
67683
+ prefix: "",
67684
+ name: name
67685
+ };
67686
+ return validate && !validateIconName(result2, allowSimpleName) ? null : result2;
67687
+ }
67688
+ return null;
67689
+ };
67690
+ var validateIconName = function(icon, allowSimpleName) {
67691
+ if (!icon) {
67692
+ return false;
67693
+ }
67694
+ return !!((icon.provider === "" || icon.provider.match(matchIconName)) && (allowSimpleName && icon.prefix === "" || icon.prefix.match(matchIconName)) && icon.name.match(matchIconName));
67695
+ };
67696
+ var defaultIconDimensions = Object.freeze({
67697
+ left: 0,
67698
+ top: 0,
67699
+ width: 16,
67700
+ height: 16
67701
+ });
67702
+ var defaultIconTransformations = Object.freeze({
67703
+ rotate: 0,
67704
+ vFlip: false,
67705
+ hFlip: false
67706
+ });
67707
+ var defaultIconProps = Object.freeze(_object_spread$5({}, defaultIconDimensions, defaultIconTransformations));
67708
+ var defaultExtendedIconProps = Object.freeze(_object_spread_props$3(_object_spread$5({}, defaultIconProps), {
67709
+ body: "",
67710
+ hidden: false
67711
+ }));
67712
+ function mergeIconTransformations(obj1, obj2) {
67713
+ var result = {};
67714
+ if (!obj1.hFlip !== !obj2.hFlip) {
67715
+ result.hFlip = true;
67716
+ }
67717
+ if (!obj1.vFlip !== !obj2.vFlip) {
67718
+ result.vFlip = true;
67719
+ }
67720
+ var rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
67721
+ if (rotate) {
67722
+ result.rotate = rotate;
67723
+ }
67724
+ return result;
67725
+ }
67726
+ function mergeIconData(parent, child) {
67727
+ var result = mergeIconTransformations(parent, child);
67728
+ for(var key in defaultExtendedIconProps){
67729
+ if (key in defaultIconTransformations) {
67730
+ if (key in parent && !(key in result)) {
67731
+ result[key] = defaultIconTransformations[key];
67732
+ }
67733
+ } else if (key in child) {
67734
+ result[key] = child[key];
67735
+ } else if (key in parent) {
67736
+ result[key] = parent[key];
67737
+ }
67738
+ }
67739
+ return result;
67740
+ }
67741
+ function getIconsTree(data, names) {
67742
+ var icons = data.icons;
67743
+ var aliases = data.aliases || /* @__PURE__ */ Object.create(null);
67744
+ var resolved = /* @__PURE__ */ Object.create(null);
67745
+ function resolve(name) {
67746
+ if (icons[name]) {
67747
+ return resolved[name] = [];
67748
+ }
67749
+ if (!(name in resolved)) {
67750
+ resolved[name] = null;
67751
+ var parent = aliases[name] && aliases[name].parent;
67752
+ var value = parent && resolve(parent);
67753
+ if (value) {
67754
+ resolved[name] = [
67755
+ parent
67756
+ ].concat(value);
67757
+ }
67758
+ }
67759
+ return resolved[name];
67760
+ }
67761
+ (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
67762
+ return resolved;
67763
+ }
67764
+ function internalGetIconData(data, name, tree) {
67765
+ var icons = data.icons;
67766
+ var aliases = data.aliases || /* @__PURE__ */ Object.create(null);
67767
+ var currentProps = {};
67768
+ function parse(name2) {
67769
+ currentProps = mergeIconData(icons[name2] || aliases[name2], currentProps);
67770
+ }
67771
+ parse(name);
67772
+ tree.forEach(parse);
67773
+ return mergeIconData(data, currentProps);
67774
+ }
67775
+ function parseIconSet(data, callback) {
67776
+ var names = [];
67777
+ if (typeof data !== "object" || typeof data.icons !== "object") {
67778
+ return names;
67779
+ }
67780
+ if (_instanceof(data.not_found, Array)) {
67781
+ data.not_found.forEach(function(name) {
67782
+ callback(name, null);
67783
+ names.push(name);
67784
+ });
67785
+ }
67786
+ var tree = getIconsTree(data);
67787
+ for(var name in tree){
67788
+ var item = tree[name];
67789
+ if (item) {
67790
+ callback(name, internalGetIconData(data, name, item));
67791
+ names.push(name);
67792
+ }
67793
+ }
67794
+ return names;
67795
+ }
67796
+ var optionalPropertyDefaults = _object_spread$5({
67797
+ provider: "",
67798
+ aliases: {},
67799
+ not_found: {}
67800
+ }, defaultIconDimensions);
67801
+ function checkOptionalProps(item, defaults) {
67802
+ for(var prop in defaults){
67803
+ if (prop in item && _type_of(item[prop]) !== _type_of(defaults[prop])) {
67804
+ return false;
67805
+ }
67806
+ }
67807
+ return true;
67808
+ }
67809
+ function quicklyValidateIconSet(obj) {
67810
+ if (typeof obj !== "object" || obj === null) {
67811
+ return null;
67812
+ }
67813
+ var data = obj;
67814
+ if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
67815
+ return null;
67816
+ }
67817
+ if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
67818
+ return null;
67819
+ }
67820
+ var icons = data.icons;
67821
+ for(var name in icons){
67822
+ var icon = icons[name];
67823
+ if (!name.match(matchIconName) || typeof icon.body !== "string" || !checkOptionalProps(icon, defaultExtendedIconProps)) {
67824
+ return null;
67825
+ }
67826
+ }
67827
+ var aliases = data.aliases || /* @__PURE__ */ Object.create(null);
67828
+ for(var name1 in aliases){
67829
+ var icon1 = aliases[name1];
67830
+ var parent = icon1.parent;
67831
+ if (!name1.match(matchIconName) || typeof parent !== "string" || !icons[parent] && !aliases[parent] || !checkOptionalProps(icon1, defaultExtendedIconProps)) {
67832
+ return null;
67833
+ }
67834
+ }
67835
+ return data;
67836
+ }
67837
+ var dataStorage = /* @__PURE__ */ Object.create(null);
67838
+ function newStorage(provider, prefix) {
67839
+ return {
67840
+ provider: provider,
67841
+ prefix: prefix,
67842
+ icons: /* @__PURE__ */ Object.create(null),
67843
+ missing: /* @__PURE__ */ new Set()
67844
+ };
67845
+ }
67846
+ function getStorage(provider, prefix) {
67847
+ var providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
67848
+ return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
67849
+ }
67850
+ function addIconSet(storage, data) {
67851
+ if (!quicklyValidateIconSet(data)) {
67852
+ return [];
67853
+ }
67854
+ return parseIconSet(data, function(name, icon) {
67855
+ if (icon) {
67856
+ storage.icons[name] = icon;
67857
+ } else {
67858
+ storage.missing.add(name);
67859
+ }
67860
+ });
67861
+ }
67862
+ function addIconToStorage(storage, name, icon) {
67863
+ try {
67864
+ if (typeof icon.body === "string") {
67865
+ storage.icons[name] = _object_spread$5({}, icon);
67866
+ return true;
67867
+ }
67868
+ } catch (err) {}
67869
+ return false;
67870
+ }
67871
+ var simpleNames = false;
67872
+ function allowSimpleNames(allow) {
67873
+ if (typeof allow === "boolean") {
67874
+ simpleNames = allow;
67875
+ }
67876
+ return simpleNames;
67877
+ }
67878
+ function getIconData(name) {
67879
+ var icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
67880
+ if (icon) {
67881
+ var storage = getStorage(icon.provider, icon.prefix);
67882
+ var iconName = icon.name;
67883
+ return storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);
67884
+ }
67885
+ }
67886
+ function addIcon(name, data) {
67887
+ var icon = stringToIcon(name, true, simpleNames);
67888
+ if (!icon) {
67889
+ return false;
67890
+ }
67891
+ var storage = getStorage(icon.provider, icon.prefix);
67892
+ return addIconToStorage(storage, icon.name, data);
67893
+ }
67894
+ function addCollection(data, provider) {
67895
+ if (typeof data !== "object") {
67896
+ return false;
67897
+ }
67898
+ if (typeof provider !== "string") {
67899
+ provider = data.provider || "";
67900
+ }
67901
+ if (simpleNames && !provider && !data.prefix) {
67902
+ var added = false;
67903
+ if (quicklyValidateIconSet(data)) {
67904
+ data.prefix = "";
67905
+ parseIconSet(data, function(name, icon) {
67906
+ if (icon && addIcon(name, icon)) {
67907
+ added = true;
67908
+ }
67909
+ });
67910
+ }
67911
+ return added;
67912
+ }
67913
+ var prefix = data.prefix;
67914
+ if (!validateIconName({
67915
+ provider: provider,
67916
+ prefix: prefix,
67917
+ name: "a"
67918
+ })) {
67919
+ return false;
67920
+ }
67921
+ var storage = getStorage(provider, prefix);
67922
+ return !!addIconSet(storage, data);
67923
+ }
67924
+ var defaultIconSizeCustomisations = Object.freeze({
67925
+ width: null,
67926
+ height: null
67927
+ });
67928
+ var defaultIconCustomisations = Object.freeze(_object_spread$5({}, defaultIconSizeCustomisations, defaultIconTransformations));
67929
+ var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
67930
+ var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
67931
+ function calculateSize(size, ratio, precision) {
67932
+ if (ratio === 1) {
67933
+ return size;
67934
+ }
67935
+ precision = precision || 100;
67936
+ if (typeof size === "number") {
67937
+ return Math.ceil(size * ratio * precision) / precision;
67938
+ }
67939
+ if (typeof size !== "string") {
67940
+ return size;
67941
+ }
67942
+ var oldParts = size.split(unitsSplit);
67943
+ if (oldParts === null || !oldParts.length) {
67944
+ return size;
67945
+ }
67946
+ var newParts = [];
67947
+ var code = oldParts.shift();
67948
+ var isNumber = unitsTest.test(code);
67949
+ while(true){
67950
+ if (isNumber) {
67951
+ var num = parseFloat(code);
67952
+ if (isNaN(num)) {
67953
+ newParts.push(code);
67954
+ } else {
67955
+ newParts.push(Math.ceil(num * ratio * precision) / precision);
67956
+ }
67957
+ } else {
67958
+ newParts.push(code);
67959
+ }
67960
+ code = oldParts.shift();
67961
+ if (code === void 0) {
67962
+ return newParts.join("");
67963
+ }
67964
+ isNumber = !isNumber;
67965
+ }
67966
+ }
67967
+ var isUnsetKeyword = function(value) {
67968
+ return value === "unset" || value === "undefined" || value === "none";
67969
+ };
67970
+ function iconToSVG(icon, customisations) {
67971
+ var fullIcon = _object_spread$5({}, defaultIconProps, icon);
67972
+ var fullCustomisations = _object_spread$5({}, defaultIconCustomisations, customisations);
67973
+ var box = {
67974
+ left: fullIcon.left,
67975
+ top: fullIcon.top,
67976
+ width: fullIcon.width,
67977
+ height: fullIcon.height
67978
+ };
67979
+ var body = fullIcon.body;
67980
+ [
67981
+ fullIcon,
67982
+ fullCustomisations
67983
+ ].forEach(function(props) {
67984
+ var transformations = [];
67985
+ var hFlip = props.hFlip;
67986
+ var vFlip = props.vFlip;
67987
+ var rotation = props.rotate;
67988
+ if (hFlip) {
67989
+ if (vFlip) {
67990
+ rotation += 2;
67991
+ } else {
67992
+ transformations.push("translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")");
67993
+ transformations.push("scale(-1 1)");
67994
+ box.top = box.left = 0;
67995
+ }
67996
+ } else if (vFlip) {
67997
+ transformations.push("translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")");
67998
+ transformations.push("scale(1 -1)");
67999
+ box.top = box.left = 0;
68000
+ }
68001
+ var tempValue;
68002
+ if (rotation < 0) {
68003
+ rotation -= Math.floor(rotation / 4) * 4;
68004
+ }
68005
+ rotation = rotation % 4;
68006
+ switch(rotation){
68007
+ case 1:
68008
+ tempValue = box.height / 2 + box.top;
68009
+ transformations.unshift("rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")");
68010
+ break;
68011
+ case 2:
68012
+ transformations.unshift("rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")");
68013
+ break;
68014
+ case 3:
68015
+ tempValue = box.width / 2 + box.left;
68016
+ transformations.unshift("rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")");
68017
+ break;
68018
+ }
68019
+ if (rotation % 2 === 1) {
68020
+ if (box.left !== box.top) {
68021
+ tempValue = box.left;
68022
+ box.left = box.top;
68023
+ box.top = tempValue;
68024
+ }
68025
+ if (box.width !== box.height) {
68026
+ tempValue = box.width;
68027
+ box.width = box.height;
68028
+ box.height = tempValue;
68029
+ }
68030
+ }
68031
+ if (transformations.length) {
68032
+ body = '<g transform="' + transformations.join(" ") + '">' + body + "</g>";
68033
+ }
68034
+ });
68035
+ var customisationsWidth = fullCustomisations.width;
68036
+ var customisationsHeight = fullCustomisations.height;
68037
+ var boxWidth = box.width;
68038
+ var boxHeight = box.height;
68039
+ var width;
68040
+ var height;
68041
+ if (customisationsWidth === null) {
68042
+ height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
68043
+ width = calculateSize(height, boxWidth / boxHeight);
68044
+ } else {
68045
+ width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
68046
+ height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
68047
+ }
68048
+ var attributes = {};
68049
+ var setAttr = function(prop, value) {
68050
+ if (!isUnsetKeyword(value)) {
68051
+ attributes[prop] = value.toString();
68052
+ }
68053
+ };
68054
+ setAttr("width", width);
68055
+ setAttr("height", height);
68056
+ attributes.viewBox = box.left.toString() + " " + box.top.toString() + " " + boxWidth.toString() + " " + boxHeight.toString();
68057
+ return {
68058
+ attributes: attributes,
68059
+ body: body
68060
+ };
68061
+ }
68062
+ var regex = /\sid="(\S+)"/g;
68063
+ var randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
68064
+ var counter = 0;
68065
+ function replaceIDs(body) {
68066
+ var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : randomPrefix;
68067
+ var ids = [];
68068
+ var match;
68069
+ while(match = regex.exec(body)){
68070
+ ids.push(match[1]);
68071
+ }
68072
+ if (!ids.length) {
68073
+ return body;
68074
+ }
68075
+ var suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
68076
+ ids.forEach(function(id) {
68077
+ var newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
68078
+ var escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
68079
+ body = body.replace(// Allowed characters before id: [#;"]
68080
+ // Allowed characters after id: [)"], .[a-z]
68081
+ new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"), "$1" + newID + suffix + "$3");
68082
+ });
68083
+ body = body.replace(new RegExp(suffix, "g"), "");
68084
+ return body;
68085
+ }
68086
+ var storage = /* @__PURE__ */ Object.create(null);
68087
+ function setAPIModule(provider, item) {
68088
+ storage[provider] = item;
68089
+ }
68090
+ function getAPIModule(provider) {
68091
+ return storage[provider] || storage[""];
68092
+ }
68093
+ function createAPIConfig(source) {
68094
+ var resources;
68095
+ if (typeof source.resources === "string") {
68096
+ resources = [
68097
+ source.resources
68098
+ ];
68099
+ } else {
68100
+ resources = source.resources;
68101
+ if (!_instanceof(resources, Array) || !resources.length) {
68102
+ return null;
68103
+ }
68104
+ }
68105
+ var result = {
68106
+ // API hosts
68107
+ resources: resources,
68108
+ // Root path
68109
+ path: source.path || "/",
68110
+ // URL length limit
68111
+ maxURL: source.maxURL || 500,
68112
+ // Timeout before next host is used.
68113
+ rotate: source.rotate || 750,
68114
+ // Timeout before failing query.
68115
+ timeout: source.timeout || 5e3,
68116
+ // Randomise default API end point.
68117
+ random: source.random === true,
68118
+ // Start index
68119
+ index: source.index || 0,
68120
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
68121
+ dataAfterTimeout: source.dataAfterTimeout !== false
68122
+ };
68123
+ return result;
68124
+ }
68125
+ var configStorage = /* @__PURE__ */ Object.create(null);
68126
+ var fallBackAPISources = [
68127
+ "https://api.simplesvg.com",
68128
+ "https://api.unisvg.com"
68129
+ ];
68130
+ var fallBackAPI = [];
68131
+ while(fallBackAPISources.length > 0){
68132
+ if (fallBackAPISources.length === 1) {
68133
+ fallBackAPI.push(fallBackAPISources.shift());
68134
+ } else {
68135
+ if (Math.random() > 0.5) {
68136
+ fallBackAPI.push(fallBackAPISources.shift());
68137
+ } else {
68138
+ fallBackAPI.push(fallBackAPISources.pop());
68139
+ }
68140
+ }
68141
+ }
68142
+ configStorage[""] = createAPIConfig({
68143
+ resources: [
68144
+ "https://api.iconify.design"
68145
+ ].concat(fallBackAPI)
68146
+ });
68147
+ function addAPIProvider(provider, customConfig) {
68148
+ var config = createAPIConfig(customConfig);
68149
+ if (config === null) {
68150
+ return false;
68151
+ }
68152
+ configStorage[provider] = config;
68153
+ return true;
68154
+ }
68155
+ function getAPIConfig(provider) {
68156
+ return configStorage[provider];
68157
+ }
68158
+ var detectFetch = function() {
68159
+ var callback;
68160
+ try {
68161
+ callback = fetch;
68162
+ if (typeof callback === "function") {
68163
+ return callback;
68164
+ }
68165
+ } catch (err) {}
68166
+ };
68167
+ var fetchModule = detectFetch();
68168
+ function calculateMaxLength(provider, prefix) {
68169
+ var config = getAPIConfig(provider);
68170
+ if (!config) {
68171
+ return 0;
68172
+ }
68173
+ var result;
68174
+ if (!config.maxURL) {
68175
+ result = 0;
68176
+ } else {
68177
+ var maxHostLength = 0;
68178
+ config.resources.forEach(function(item) {
68179
+ var host = item;
68180
+ maxHostLength = Math.max(maxHostLength, host.length);
68181
+ });
68182
+ var url = prefix + ".json?icons=";
68183
+ result = config.maxURL - maxHostLength - config.path.length - url.length;
68184
+ }
68185
+ return result;
68186
+ }
68187
+ function shouldAbort(status) {
68188
+ return status === 404;
68189
+ }
68190
+ var prepare = function(provider, prefix, icons) {
68191
+ var results = [];
68192
+ var maxLength = calculateMaxLength(provider, prefix);
68193
+ var type = "icons";
68194
+ var item = {
68195
+ type: type,
68196
+ provider: provider,
68197
+ prefix: prefix,
68198
+ icons: []
68199
+ };
68200
+ var length = 0;
68201
+ icons.forEach(function(name, index) {
68202
+ length += name.length + 1;
68203
+ if (length >= maxLength && index > 0) {
68204
+ results.push(item);
68205
+ item = {
68206
+ type: type,
68207
+ provider: provider,
68208
+ prefix: prefix,
68209
+ icons: []
68210
+ };
68211
+ length = name.length;
68212
+ }
68213
+ item.icons.push(name);
68214
+ });
68215
+ results.push(item);
68216
+ return results;
68217
+ };
68218
+ function getPath(provider) {
68219
+ if (typeof provider === "string") {
68220
+ var config = getAPIConfig(provider);
68221
+ if (config) {
68222
+ return config.path;
68223
+ }
68224
+ }
68225
+ return "/";
68226
+ }
68227
+ var send = function(host, params, callback) {
68228
+ if (!fetchModule) {
68229
+ callback("abort", 424);
68230
+ return;
68231
+ }
68232
+ var path = getPath(params.provider);
68233
+ switch(params.type){
68234
+ case "icons":
68235
+ {
68236
+ var prefix = params.prefix;
68237
+ var icons = params.icons;
68238
+ var iconsList = icons.join(",");
68239
+ var urlParams = new URLSearchParams({
68240
+ icons: iconsList
68241
+ });
68242
+ path += prefix + ".json?" + urlParams.toString();
68243
+ break;
68244
+ }
68245
+ case "custom":
68246
+ {
68247
+ var uri = params.uri;
68248
+ path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
68249
+ break;
68250
+ }
68251
+ default:
68252
+ callback("abort", 400);
68253
+ return;
68254
+ }
68255
+ var defaultError = 503;
68256
+ fetchModule(host + path).then(function(response) {
68257
+ var status = response.status;
68258
+ if (status !== 200) {
68259
+ setTimeout(function() {
68260
+ callback(shouldAbort(status) ? "abort" : "next", status);
68261
+ });
68262
+ return;
68263
+ }
68264
+ defaultError = 501;
68265
+ return response.json();
68266
+ }).then(function(data) {
68267
+ if (typeof data !== "object" || data === null) {
68268
+ setTimeout(function() {
68269
+ if (data === 404) {
68270
+ callback("abort", data);
68271
+ } else {
68272
+ callback("next", defaultError);
68273
+ }
68274
+ });
68275
+ return;
68276
+ }
68277
+ setTimeout(function() {
68278
+ callback("success", data);
68279
+ });
68280
+ }).catch(function() {
68281
+ callback("next", defaultError);
68282
+ });
68283
+ };
68284
+ var fetchAPIModule = {
68285
+ prepare: prepare,
68286
+ send: send
68287
+ };
68288
+ function sortIcons(icons) {
68289
+ var result = {
68290
+ loaded: [],
68291
+ missing: [],
68292
+ pending: []
68293
+ };
68294
+ var storage = /* @__PURE__ */ Object.create(null);
68295
+ icons.sort(function(a, b) {
68296
+ if (a.provider !== b.provider) {
68297
+ return a.provider.localeCompare(b.provider);
68298
+ }
68299
+ if (a.prefix !== b.prefix) {
68300
+ return a.prefix.localeCompare(b.prefix);
68301
+ }
68302
+ return a.name.localeCompare(b.name);
68303
+ });
68304
+ var lastIcon = {
68305
+ provider: "",
68306
+ prefix: "",
68307
+ name: ""
68308
+ };
68309
+ icons.forEach(function(icon) {
68310
+ if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {
68311
+ return;
68312
+ }
68313
+ lastIcon = icon;
68314
+ var provider = icon.provider;
68315
+ var prefix = icon.prefix;
68316
+ var name = icon.name;
68317
+ var providerStorage = storage[provider] || (storage[provider] = /* @__PURE__ */ Object.create(null));
68318
+ var localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));
68319
+ var list;
68320
+ if (name in localStorage.icons) {
68321
+ list = result.loaded;
68322
+ } else if (prefix === "" || localStorage.missing.has(name)) {
68323
+ list = result.missing;
68324
+ } else {
68325
+ list = result.pending;
68326
+ }
68327
+ var item = {
68328
+ provider: provider,
68329
+ prefix: prefix,
68330
+ name: name
68331
+ };
68332
+ list.push(item);
68333
+ });
68334
+ return result;
68335
+ }
68336
+ function removeCallback(storages, id) {
68337
+ storages.forEach(function(storage) {
68338
+ var items = storage.loaderCallbacks;
68339
+ if (items) {
68340
+ storage.loaderCallbacks = items.filter(function(row) {
68341
+ return row.id !== id;
68342
+ });
68343
+ }
68344
+ });
68345
+ }
68346
+ function updateCallbacks(storage) {
68347
+ if (!storage.pendingCallbacksFlag) {
68348
+ storage.pendingCallbacksFlag = true;
68349
+ setTimeout(function() {
68350
+ storage.pendingCallbacksFlag = false;
68351
+ var items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];
68352
+ if (!items.length) {
68353
+ return;
68354
+ }
68355
+ var hasPending = false;
68356
+ var provider = storage.provider;
68357
+ var prefix = storage.prefix;
68358
+ items.forEach(function(item) {
68359
+ var icons = item.icons;
68360
+ var oldLength = icons.pending.length;
68361
+ icons.pending = icons.pending.filter(function(icon) {
68362
+ if (icon.prefix !== prefix) {
68363
+ return true;
68364
+ }
68365
+ var name = icon.name;
68366
+ if (storage.icons[name]) {
68367
+ icons.loaded.push({
68368
+ provider: provider,
68369
+ prefix: prefix,
68370
+ name: name
68371
+ });
68372
+ } else if (storage.missing.has(name)) {
68373
+ icons.missing.push({
68374
+ provider: provider,
68375
+ prefix: prefix,
68376
+ name: name
68377
+ });
68378
+ } else {
68379
+ hasPending = true;
68380
+ return true;
68381
+ }
68382
+ return false;
68383
+ });
68384
+ if (icons.pending.length !== oldLength) {
68385
+ if (!hasPending) {
68386
+ removeCallback([
68387
+ storage
68388
+ ], item.id);
68389
+ }
68390
+ item.callback(icons.loaded.slice(0), icons.missing.slice(0), icons.pending.slice(0), item.abort);
68391
+ }
68392
+ });
68393
+ });
68394
+ }
68395
+ }
68396
+ var idCounter = 0;
68397
+ function storeCallback(callback, icons, pendingSources) {
68398
+ var id = idCounter++;
68399
+ var abort = removeCallback.bind(null, pendingSources, id);
68400
+ if (!icons.pending.length) {
68401
+ return abort;
68402
+ }
68403
+ var item = {
68404
+ id: id,
68405
+ icons: icons,
68406
+ callback: callback,
68407
+ abort: abort
68408
+ };
68409
+ pendingSources.forEach(function(storage) {
68410
+ (storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);
68411
+ });
68412
+ return abort;
68413
+ }
68414
+ function listToIcons(list) {
68415
+ var validate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true, simpleNames = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
68416
+ var result = [];
68417
+ list.forEach(function(item) {
68418
+ var icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames) : item;
68419
+ if (icon) {
68420
+ result.push(icon);
68421
+ }
68422
+ });
68423
+ return result;
68424
+ }
68425
+ // src/config.ts
68426
+ var defaultConfig = {
68427
+ resources: [],
68428
+ index: 0,
68429
+ timeout: 2e3,
68430
+ rotate: 750,
68431
+ random: false,
68432
+ dataAfterTimeout: false
68433
+ };
68434
+ // src/query.ts
68435
+ function sendQuery(config, payload, query, done) {
68436
+ var resourcesCount = config.resources.length;
68437
+ var startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
68438
+ var resources;
68439
+ if (config.random) {
68440
+ var list = config.resources.slice(0);
68441
+ resources = [];
68442
+ while(list.length > 1){
68443
+ var nextIndex = Math.floor(Math.random() * list.length);
68444
+ resources.push(list[nextIndex]);
68445
+ list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
68446
+ }
68447
+ resources = resources.concat(list);
68448
+ } else {
68449
+ resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
68450
+ }
68451
+ var startTime = Date.now();
68452
+ var status = "pending";
68453
+ var queriesSent = 0;
68454
+ var lastError;
68455
+ var timer = null;
68456
+ var queue = [];
68457
+ var doneCallbacks = [];
68458
+ if (typeof done === "function") {
68459
+ doneCallbacks.push(done);
68460
+ }
68461
+ function resetTimer() {
68462
+ if (timer) {
68463
+ clearTimeout(timer);
68464
+ timer = null;
68465
+ }
68466
+ }
68467
+ function abort() {
68468
+ if (status === "pending") {
68469
+ status = "aborted";
68470
+ }
68471
+ resetTimer();
68472
+ queue.forEach(function(item) {
68473
+ if (item.status === "pending") {
68474
+ item.status = "aborted";
68475
+ }
68476
+ });
68477
+ queue = [];
68478
+ }
68479
+ function subscribe(callback, overwrite) {
68480
+ if (overwrite) {
68481
+ doneCallbacks = [];
68482
+ }
68483
+ if (typeof callback === "function") {
68484
+ doneCallbacks.push(callback);
68485
+ }
68486
+ }
68487
+ function getQueryStatus() {
68488
+ return {
68489
+ startTime: startTime,
68490
+ payload: payload,
68491
+ status: status,
68492
+ queriesSent: queriesSent,
68493
+ queriesPending: queue.length,
68494
+ subscribe: subscribe,
68495
+ abort: abort
68496
+ };
68497
+ }
68498
+ function failQuery() {
68499
+ status = "failed";
68500
+ doneCallbacks.forEach(function(callback) {
68501
+ callback(void 0, lastError);
68502
+ });
68503
+ }
68504
+ function clearQueue() {
68505
+ queue.forEach(function(item) {
68506
+ if (item.status === "pending") {
68507
+ item.status = "aborted";
68508
+ }
68509
+ });
68510
+ queue = [];
68511
+ }
68512
+ function moduleResponse(item, response, data) {
68513
+ var isError = response !== "success";
68514
+ queue = queue.filter(function(queued) {
68515
+ return queued !== item;
68516
+ });
68517
+ switch(status){
68518
+ case "pending":
68519
+ break;
68520
+ case "failed":
68521
+ if (isError || !config.dataAfterTimeout) {
68522
+ return;
68523
+ }
68524
+ break;
68525
+ default:
68526
+ return;
68527
+ }
68528
+ if (response === "abort") {
68529
+ lastError = data;
68530
+ failQuery();
68531
+ return;
68532
+ }
68533
+ if (isError) {
68534
+ lastError = data;
68535
+ if (!queue.length) {
68536
+ if (!resources.length) {
68537
+ failQuery();
68538
+ } else {
68539
+ execNext();
68540
+ }
68541
+ }
68542
+ return;
68543
+ }
68544
+ resetTimer();
68545
+ clearQueue();
68546
+ if (!config.random) {
68547
+ var index = config.resources.indexOf(item.resource);
68548
+ if (index !== -1 && index !== config.index) {
68549
+ config.index = index;
68550
+ }
68551
+ }
68552
+ status = "completed";
68553
+ doneCallbacks.forEach(function(callback) {
68554
+ callback(data);
68555
+ });
68556
+ }
68557
+ function execNext() {
68558
+ if (status !== "pending") {
68559
+ return;
68560
+ }
68561
+ resetTimer();
68562
+ var resource = resources.shift();
68563
+ if (resource === void 0) {
68564
+ if (queue.length) {
68565
+ timer = setTimeout(function() {
68566
+ resetTimer();
68567
+ if (status === "pending") {
68568
+ clearQueue();
68569
+ failQuery();
68570
+ }
68571
+ }, config.timeout);
68572
+ return;
68573
+ }
68574
+ failQuery();
68575
+ return;
68576
+ }
68577
+ var item = {
68578
+ status: "pending",
68579
+ resource: resource,
68580
+ callback: function(status2, data) {
68581
+ moduleResponse(item, status2, data);
68582
+ }
68583
+ };
68584
+ queue.push(item);
68585
+ queriesSent++;
68586
+ timer = setTimeout(execNext, config.rotate);
68587
+ query(resource, payload, item.callback);
68588
+ }
68589
+ setTimeout(execNext);
68590
+ return getQueryStatus;
68591
+ }
68592
+ // src/index.ts
68593
+ function initRedundancy(cfg) {
68594
+ var config = _object_spread$5({}, defaultConfig, cfg);
68595
+ var queries = [];
68596
+ function cleanup() {
68597
+ queries = queries.filter(function(item) {
68598
+ return item().status === "pending";
68599
+ });
68600
+ }
68601
+ function query(payload, queryCallback, doneCallback) {
68602
+ var query2 = sendQuery(config, payload, queryCallback, function(data, error) {
68603
+ cleanup();
68604
+ if (doneCallback) {
68605
+ doneCallback(data, error);
68606
+ }
68607
+ });
68608
+ queries.push(query2);
68609
+ return query2;
68610
+ }
68611
+ function find(callback) {
68612
+ return queries.find(function(value) {
68613
+ return callback(value);
68614
+ }) || null;
68615
+ }
68616
+ var instance = {
68617
+ query: query,
68618
+ find: find,
68619
+ setIndex: function(index) {
68620
+ config.index = index;
68621
+ },
68622
+ getIndex: function() {
68623
+ return config.index;
68624
+ },
68625
+ cleanup: cleanup
68626
+ };
68627
+ return instance;
68628
+ }
68629
+ function emptyCallback$1() {}
68630
+ var redundancyCache = /* @__PURE__ */ Object.create(null);
68631
+ function getRedundancyCache(provider) {
68632
+ if (!redundancyCache[provider]) {
68633
+ var config = getAPIConfig(provider);
68634
+ if (!config) {
68635
+ return;
68636
+ }
68637
+ var redundancy = initRedundancy(config);
68638
+ var cachedReundancy = {
68639
+ config: config,
68640
+ redundancy: redundancy
68641
+ };
68642
+ redundancyCache[provider] = cachedReundancy;
68643
+ }
68644
+ return redundancyCache[provider];
68645
+ }
68646
+ function sendAPIQuery(target, query, callback) {
68647
+ var redundancy;
68648
+ var send;
68649
+ if (typeof target === "string") {
68650
+ var api = getAPIModule(target);
68651
+ if (!api) {
68652
+ callback(void 0, 424);
68653
+ return emptyCallback$1;
68654
+ }
68655
+ send = api.send;
68656
+ var cached = getRedundancyCache(target);
68657
+ if (cached) {
68658
+ redundancy = cached.redundancy;
68659
+ }
68660
+ } else {
68661
+ var config = createAPIConfig(target);
68662
+ if (config) {
68663
+ redundancy = initRedundancy(config);
68664
+ var moduleKey = target.resources ? target.resources[0] : "";
68665
+ var api1 = getAPIModule(moduleKey);
68666
+ if (api1) {
68667
+ send = api1.send;
68668
+ }
68669
+ }
68670
+ }
68671
+ if (!redundancy || !send) {
68672
+ callback(void 0, 424);
68673
+ return emptyCallback$1;
68674
+ }
68675
+ return redundancy.query(query, send, callback)().abort;
68676
+ }
68677
+ var browserCacheVersion = "iconify2";
68678
+ var browserCachePrefix = "iconify";
68679
+ var browserCacheCountKey = browserCachePrefix + "-count";
68680
+ var browserCacheVersionKey = browserCachePrefix + "-version";
68681
+ var browserStorageHour = 36e5;
68682
+ var browserStorageCacheExpiration = 168;
68683
+ function getStoredItem(func, key) {
68684
+ try {
68685
+ return func.getItem(key);
68686
+ } catch (err) {}
68687
+ }
68688
+ function setStoredItem(func, key, value) {
68689
+ try {
68690
+ func.setItem(key, value);
68691
+ return true;
68692
+ } catch (err) {}
68693
+ }
68694
+ function removeStoredItem(func, key) {
68695
+ try {
68696
+ func.removeItem(key);
68697
+ } catch (err) {}
68698
+ }
68699
+ function setBrowserStorageItemsCount(storage, value) {
68700
+ return setStoredItem(storage, browserCacheCountKey, value.toString());
68701
+ }
68702
+ function getBrowserStorageItemsCount(storage) {
68703
+ return parseInt(getStoredItem(storage, browserCacheCountKey)) || 0;
68704
+ }
68705
+ var browserStorageConfig = {
68706
+ local: true,
68707
+ session: true
68708
+ };
68709
+ var browserStorageEmptyItems = {
68710
+ local: /* @__PURE__ */ new Set(),
68711
+ session: /* @__PURE__ */ new Set()
68712
+ };
68713
+ var browserStorageStatus = false;
68714
+ function setBrowserStorageStatus(status) {
68715
+ browserStorageStatus = status;
68716
+ }
68717
+ var _window = typeof window === "undefined" ? {} : window;
68718
+ function getBrowserStorage(key) {
68719
+ var attr = key + "Storage";
68720
+ try {
68721
+ if (_window && _window[attr] && typeof _window[attr].length === "number") {
68722
+ return _window[attr];
68723
+ }
68724
+ } catch (err) {}
68725
+ browserStorageConfig[key] = false;
68726
+ }
68727
+ function iterateBrowserStorage(key, callback) {
68728
+ var func = getBrowserStorage(key);
68729
+ if (!func) {
68730
+ return;
68731
+ }
68732
+ var version = getStoredItem(func, browserCacheVersionKey);
68733
+ if (version !== browserCacheVersion) {
68734
+ if (version) {
68735
+ var total2 = getBrowserStorageItemsCount(func);
68736
+ for(var i = 0; i < total2; i++){
68737
+ removeStoredItem(func, browserCachePrefix + i.toString());
68738
+ }
68739
+ }
68740
+ setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
68741
+ setBrowserStorageItemsCount(func, 0);
68742
+ return;
68743
+ }
68744
+ var minTime = Math.floor(Date.now() / browserStorageHour) - browserStorageCacheExpiration;
68745
+ var parseItem = function(index) {
68746
+ var name = browserCachePrefix + index.toString();
68747
+ var item = getStoredItem(func, name);
68748
+ if (typeof item !== "string") {
68749
+ return;
68750
+ }
68751
+ try {
68752
+ var data = JSON.parse(item);
68753
+ if (typeof data === "object" && typeof data.cached === "number" && data.cached > minTime && typeof data.provider === "string" && typeof data.data === "object" && typeof data.data.prefix === "string" && // Valid item: run callback
68754
+ callback(data, index)) {
68755
+ return true;
68756
+ }
68757
+ } catch (err) {}
68758
+ removeStoredItem(func, name);
68759
+ };
68760
+ var total = getBrowserStorageItemsCount(func);
68761
+ for(var i1 = total - 1; i1 >= 0; i1--){
68762
+ if (!parseItem(i1)) {
68763
+ if (i1 === total - 1) {
68764
+ total--;
68765
+ setBrowserStorageItemsCount(func, total);
68766
+ } else {
68767
+ browserStorageEmptyItems[key].add(i1);
68768
+ }
68769
+ }
68770
+ }
68771
+ }
68772
+ function initBrowserStorage() {
68773
+ if (browserStorageStatus) {
68774
+ return;
68775
+ }
68776
+ setBrowserStorageStatus(true);
68777
+ for(var key in browserStorageConfig){
68778
+ iterateBrowserStorage(key, function(item) {
68779
+ var iconSet = item.data;
68780
+ var provider = item.provider;
68781
+ var prefix = iconSet.prefix;
68782
+ var storage = getStorage(provider, prefix);
68783
+ if (!addIconSet(storage, iconSet).length) {
68784
+ return false;
68785
+ }
68786
+ var lastModified = iconSet.lastModified || -1;
68787
+ storage.lastModifiedCached = storage.lastModifiedCached ? Math.min(storage.lastModifiedCached, lastModified) : lastModified;
68788
+ return true;
68789
+ });
68790
+ }
68791
+ }
68792
+ function updateLastModified(storage, lastModified) {
68793
+ var lastValue = storage.lastModifiedCached;
68794
+ if (// Matches or newer
68795
+ lastValue && lastValue >= lastModified) {
68796
+ return lastValue === lastModified;
68797
+ }
68798
+ storage.lastModifiedCached = lastModified;
68799
+ if (lastValue) {
68800
+ for(var key in browserStorageConfig){
68801
+ iterateBrowserStorage(key, function(item) {
68802
+ var iconSet = item.data;
68803
+ return item.provider !== storage.provider || iconSet.prefix !== storage.prefix || iconSet.lastModified === lastModified;
68804
+ });
68805
+ }
68806
+ }
68807
+ return true;
68808
+ }
68809
+ function storeInBrowserStorage(storage, data) {
68810
+ if (!browserStorageStatus) {
68811
+ initBrowserStorage();
68812
+ }
68813
+ function store(key) {
68814
+ var func;
68815
+ if (!browserStorageConfig[key] || !(func = getBrowserStorage(key))) {
68816
+ return;
68817
+ }
68818
+ var set = browserStorageEmptyItems[key];
68819
+ var index;
68820
+ if (set.size) {
68821
+ set.delete(index = Array.from(set).shift());
68822
+ } else {
68823
+ index = getBrowserStorageItemsCount(func);
68824
+ if (!setBrowserStorageItemsCount(func, index + 1)) {
68825
+ return;
68826
+ }
68827
+ }
68828
+ var item = {
68829
+ cached: Math.floor(Date.now() / browserStorageHour),
68830
+ provider: storage.provider,
68831
+ data: data
68832
+ };
68833
+ return setStoredItem(func, browserCachePrefix + index.toString(), JSON.stringify(item));
68834
+ }
68835
+ if (data.lastModified && !updateLastModified(storage, data.lastModified)) {
68836
+ return;
68837
+ }
68838
+ if (!Object.keys(data.icons).length) {
68839
+ return;
68840
+ }
68841
+ if (data.not_found) {
68842
+ data = Object.assign({}, data);
68843
+ delete data.not_found;
68844
+ }
68845
+ if (!store("local")) {
68846
+ store("session");
68847
+ }
68848
+ }
68849
+ function emptyCallback() {}
68850
+ function loadedNewIcons(storage) {
68851
+ if (!storage.iconsLoaderFlag) {
68852
+ storage.iconsLoaderFlag = true;
68853
+ setTimeout(function() {
68854
+ storage.iconsLoaderFlag = false;
68855
+ updateCallbacks(storage);
68856
+ });
68857
+ }
68858
+ }
68859
+ function loadNewIcons(storage, icons) {
68860
+ if (!storage.iconsToLoad) {
68861
+ storage.iconsToLoad = icons;
68862
+ } else {
68863
+ storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();
68864
+ }
68865
+ if (!storage.iconsQueueFlag) {
68866
+ storage.iconsQueueFlag = true;
68867
+ setTimeout(function() {
68868
+ storage.iconsQueueFlag = false;
68869
+ var provider = storage.provider, prefix = storage.prefix;
68870
+ var icons2 = storage.iconsToLoad;
68871
+ delete storage.iconsToLoad;
68872
+ var api;
68873
+ if (!icons2 || !(api = getAPIModule(provider))) {
68874
+ return;
68875
+ }
68876
+ var params = api.prepare(provider, prefix, icons2);
68877
+ params.forEach(function(item) {
68878
+ sendAPIQuery(provider, item, function(data) {
68879
+ if (typeof data !== "object") {
68880
+ item.icons.forEach(function(name) {
68881
+ storage.missing.add(name);
68882
+ });
68883
+ } else {
68884
+ try {
68885
+ var parsed = addIconSet(storage, data);
68886
+ if (!parsed.length) {
68887
+ return;
68888
+ }
68889
+ var pending = storage.pendingIcons;
68890
+ if (pending) {
68891
+ parsed.forEach(function(name) {
68892
+ pending.delete(name);
68893
+ });
68894
+ }
68895
+ storeInBrowserStorage(storage, data);
68896
+ } catch (err) {
68897
+ console.error(err);
68898
+ }
68899
+ }
68900
+ loadedNewIcons(storage);
68901
+ });
68902
+ });
68903
+ });
68904
+ }
68905
+ }
68906
+ var loadIcons = function(icons, callback) {
68907
+ var cleanedIcons = listToIcons(icons, true, allowSimpleNames());
68908
+ var sortedIcons = sortIcons(cleanedIcons);
68909
+ if (!sortedIcons.pending.length) {
68910
+ var callCallback = true;
68911
+ if (callback) {
68912
+ setTimeout(function() {
68913
+ if (callCallback) {
68914
+ callback(sortedIcons.loaded, sortedIcons.missing, sortedIcons.pending, emptyCallback);
68915
+ }
68916
+ });
68917
+ }
68918
+ return function() {
68919
+ callCallback = false;
68920
+ };
68921
+ }
68922
+ var newIcons = /* @__PURE__ */ Object.create(null);
68923
+ var sources = [];
68924
+ var lastProvider, lastPrefix;
68925
+ sortedIcons.pending.forEach(function(icon) {
68926
+ var provider = icon.provider, prefix = icon.prefix;
68927
+ if (prefix === lastPrefix && provider === lastProvider) {
68928
+ return;
68929
+ }
68930
+ lastProvider = provider;
68931
+ lastPrefix = prefix;
68932
+ sources.push(getStorage(provider, prefix));
68933
+ var providerNewIcons = newIcons[provider] || (newIcons[provider] = /* @__PURE__ */ Object.create(null));
68934
+ if (!providerNewIcons[prefix]) {
68935
+ providerNewIcons[prefix] = [];
68936
+ }
68937
+ });
68938
+ sortedIcons.pending.forEach(function(icon) {
68939
+ var provider = icon.provider, prefix = icon.prefix, name = icon.name;
68940
+ var storage = getStorage(provider, prefix);
68941
+ var pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());
68942
+ if (!pendingQueue.has(name)) {
68943
+ pendingQueue.add(name);
68944
+ newIcons[provider][prefix].push(name);
68945
+ }
68946
+ });
68947
+ sources.forEach(function(storage) {
68948
+ var provider = storage.provider, prefix = storage.prefix;
68949
+ if (newIcons[provider][prefix].length) {
68950
+ loadNewIcons(storage, newIcons[provider][prefix]);
68951
+ }
68952
+ });
68953
+ return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
68954
+ };
68955
+ function mergeCustomisations(defaults, item) {
68956
+ var result = _object_spread$5({}, defaults);
68957
+ for(var key in item){
68958
+ var value = item[key];
68959
+ var valueType = typeof value === "undefined" ? "undefined" : _type_of(value);
68960
+ if (key in defaultIconSizeCustomisations) {
68961
+ if (value === null || value && (valueType === "string" || valueType === "number")) {
68962
+ result[key] = value;
68963
+ }
68964
+ } else if (valueType === _type_of(result[key])) {
68965
+ result[key] = key === "rotate" ? value % 4 : value;
68966
+ }
68967
+ }
68968
+ return result;
68969
+ }
68970
+ var separator = /[\s,]+/;
68971
+ function flipFromString(custom, flip) {
68972
+ flip.split(separator).forEach(function(str) {
68973
+ var value = str.trim();
68974
+ switch(value){
68975
+ case "horizontal":
68976
+ custom.hFlip = true;
68977
+ break;
68978
+ case "vertical":
68979
+ custom.vFlip = true;
68980
+ break;
68981
+ }
68982
+ });
68983
+ }
68984
+ function rotateFromString(value) {
68985
+ var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
68986
+ var units = value.replace(/^-?[0-9.]*/, "");
68987
+ function cleanup(value2) {
68988
+ while(value2 < 0){
68989
+ value2 += 4;
68990
+ }
68991
+ return value2 % 4;
68992
+ }
68993
+ if (units === "") {
68994
+ var num = parseInt(value);
68995
+ return isNaN(num) ? 0 : cleanup(num);
68996
+ } else if (units !== value) {
68997
+ var split = 0;
68998
+ switch(units){
68999
+ case "%":
69000
+ split = 25;
69001
+ break;
69002
+ case "deg":
69003
+ split = 90;
69004
+ }
69005
+ if (split) {
69006
+ var num1 = parseFloat(value.slice(0, value.length - units.length));
69007
+ if (isNaN(num1)) {
69008
+ return 0;
69009
+ }
69010
+ num1 = num1 / split;
69011
+ return num1 % 1 === 0 ? cleanup(num1) : 0;
69012
+ }
69013
+ }
69014
+ return defaultValue;
69015
+ }
69016
+ function iconToHTML(body, attributes) {
69017
+ var renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
69018
+ for(var attr in attributes){
69019
+ renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
69020
+ }
69021
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
69022
+ }
69023
+ function encodeSVGforURL(svg) {
69024
+ return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
69025
+ }
69026
+ function svgToData(svg) {
69027
+ return "data:image/svg+xml," + encodeSVGforURL(svg);
69028
+ }
69029
+ function svgToURL(svg) {
69030
+ return 'url("' + svgToData(svg) + '")';
69031
+ }
69032
+ var policy;
69033
+ function createPolicy() {
69034
+ try {
69035
+ policy = window.trustedTypes.createPolicy("iconify", {
69036
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
69037
+ createHTML: function(s) {
69038
+ return s;
69039
+ }
69040
+ });
69041
+ } catch (err) {
69042
+ policy = null;
69043
+ }
69044
+ }
69045
+ function cleanUpInnerHTML(html) {
69046
+ if (policy === void 0) {
69047
+ createPolicy();
69048
+ }
69049
+ return policy ? policy.createHTML(html) : html;
69050
+ }
69051
+ var defaultExtendedIconCustomisations = _object_spread_props$3(_object_spread$5({}, defaultIconCustomisations), {
69052
+ inline: false
69053
+ });
69054
+ /**
69055
+ * Default SVG attributes
69056
+ */ var svgDefaults = {
69057
+ "xmlns": "http://www.w3.org/2000/svg",
69058
+ "xmlnsXlink": "http://www.w3.org/1999/xlink",
69059
+ "aria-hidden": true,
69060
+ "role": "img"
69061
+ };
69062
+ /**
69063
+ * Style modes
69064
+ */ var commonProps = {
69065
+ display: "inline-block"
69066
+ };
69067
+ var monotoneProps = {
69068
+ backgroundColor: "currentColor"
69069
+ };
69070
+ var coloredProps = {
69071
+ backgroundColor: "transparent"
69072
+ };
69073
+ // Dynamically add common props to variables above
69074
+ var propsToAdd = {
69075
+ Image: "var(--svg)",
69076
+ Repeat: "no-repeat",
69077
+ Size: "100% 100%"
69078
+ };
69079
+ var propsToAddTo = {
69080
+ WebkitMask: monotoneProps,
69081
+ mask: monotoneProps,
69082
+ background: coloredProps
69083
+ };
69084
+ for(var prefix in propsToAddTo){
69085
+ var list = propsToAddTo[prefix];
69086
+ for(var prop in propsToAdd){
69087
+ list[prefix + prop] = propsToAdd[prop];
69088
+ }
69089
+ }
69090
+ /**
69091
+ * Default values for customisations for inline icon
69092
+ */ var inlineDefaults = _object_spread_props$3(_object_spread$5({}, defaultExtendedIconCustomisations), {
69093
+ inline: true
69094
+ });
69095
+ /**
69096
+ * Fix size: add 'px' to numbers
69097
+ */ function fixSize(value) {
69098
+ return value + (value.match(/^[-0-9.]+$/) ? "px" : "");
69099
+ }
69100
+ /**
69101
+ * Render icon
69102
+ */ var render = function(// Icon must be validated before calling this function
69103
+ icon, // Partial properties
69104
+ props, // True if icon should have vertical-align added
69105
+ inline, // Optional reference for SVG/SPAN, extracted by React.forwardRef()
69106
+ ref) {
69107
+ // Get default properties
69108
+ var defaultProps = inline ? inlineDefaults : defaultExtendedIconCustomisations;
69109
+ // Get all customisations
69110
+ var customisations = mergeCustomisations(defaultProps, props);
69111
+ // Check mode
69112
+ var mode = props.mode || "svg";
69113
+ // Create style
69114
+ var style = {};
69115
+ var customStyle = props.style || {};
69116
+ // Create SVG component properties
69117
+ var componentProps = _object_spread_props$3(_object_spread$5({}, mode === "svg" ? svgDefaults : {}), {
69118
+ ref: ref
69119
+ });
69120
+ // Get element properties
69121
+ for(var key in props){
69122
+ var value = props[key];
69123
+ if (value === void 0) {
69124
+ continue;
69125
+ }
69126
+ switch(key){
69127
+ // Properties to ignore
69128
+ case "icon":
69129
+ case "style":
69130
+ case "children":
69131
+ case "onLoad":
69132
+ case "mode":
69133
+ case "_ref":
69134
+ case "_inline":
69135
+ break;
69136
+ // Boolean attributes
69137
+ case "inline":
69138
+ case "hFlip":
69139
+ case "vFlip":
69140
+ customisations[key] = value === true || value === "true" || value === 1;
69141
+ break;
69142
+ // Flip as string: 'horizontal,vertical'
69143
+ case "flip":
69144
+ if (typeof value === "string") {
69145
+ flipFromString(customisations, value);
69146
+ }
69147
+ break;
69148
+ // Color: copy to style
69149
+ case "color":
69150
+ style.color = value;
69151
+ break;
69152
+ // Rotation as string
69153
+ case "rotate":
69154
+ if (typeof value === "string") {
69155
+ customisations[key] = rotateFromString(value);
69156
+ } else if (typeof value === "number") {
69157
+ customisations[key] = value;
69158
+ }
69159
+ break;
69160
+ // Remove aria-hidden
69161
+ case "ariaHidden":
69162
+ case "aria-hidden":
69163
+ if (value !== true && value !== "true") {
69164
+ delete componentProps["aria-hidden"];
69165
+ }
69166
+ break;
69167
+ // Copy missing property if it does not exist in customisations
69168
+ default:
69169
+ if (defaultProps[key] === void 0) {
69170
+ componentProps[key] = value;
69171
+ }
69172
+ }
69173
+ }
69174
+ // Generate icon
69175
+ var item = iconToSVG(icon, customisations);
69176
+ var renderAttribs = item.attributes;
69177
+ // Inline display
69178
+ if (customisations.inline) {
69179
+ style.verticalAlign = "-0.125em";
69180
+ }
69181
+ if (mode === "svg") {
69182
+ // Add style
69183
+ componentProps.style = _object_spread$5({}, style, customStyle);
69184
+ // Add icon stuff
69185
+ Object.assign(componentProps, renderAttribs);
69186
+ // Counter for ids based on "id" property to render icons consistently on server and client
69187
+ var localCounter = 0;
69188
+ var id = props.id;
69189
+ if (typeof id === "string") {
69190
+ // Convert '-' to '_' to avoid errors in animations
69191
+ id = id.replace(/-/g, "_");
69192
+ }
69193
+ // Add icon stuff
69194
+ componentProps.dangerouslySetInnerHTML = {
69195
+ __html: cleanUpInnerHTML(replaceIDs(item.body, id ? function() {
69196
+ return id + "ID" + localCounter++;
69197
+ } : "iconifyReact"))
69198
+ };
69199
+ return React__default.createElement("svg", componentProps);
69200
+ }
69201
+ // Render <span> with style
69202
+ var body = icon.body, width = icon.width, height = icon.height;
69203
+ var useMask = mode === "mask" || (mode === "bg" ? false : body.indexOf("currentColor") !== -1);
69204
+ // Generate SVG
69205
+ var html = iconToHTML(body, _object_spread_props$3(_object_spread$5({}, renderAttribs), {
69206
+ width: width + "",
69207
+ height: height + ""
69208
+ }));
69209
+ // Generate style
69210
+ componentProps.style = _object_spread$5(_object_spread_props$3(_object_spread$5({}, style), {
69211
+ "--svg": svgToURL(html),
69212
+ "width": fixSize(renderAttribs.width),
69213
+ "height": fixSize(renderAttribs.height)
69214
+ }), commonProps, useMask ? monotoneProps : coloredProps, customStyle);
69215
+ return React__default.createElement("span", componentProps);
69216
+ };
69217
+ /**
69218
+ * Initialise stuff
69219
+ */ // Enable short names
69220
+ allowSimpleNames(true);
69221
+ // Set API module
69222
+ setAPIModule("", fetchAPIModule);
69223
+ /**
69224
+ * Browser stuff
69225
+ */ if (typeof document !== "undefined" && typeof window !== "undefined") {
69226
+ // Set cache and load existing cache
69227
+ initBrowserStorage();
69228
+ var _window1 = window;
69229
+ // Load icons from global "IconifyPreload"
69230
+ if (_window1.IconifyPreload !== void 0) {
69231
+ var preload = _window1.IconifyPreload;
69232
+ var err = "Invalid IconifyPreload syntax.";
69233
+ if (typeof preload === "object" && preload !== null) {
69234
+ (_instanceof(preload, Array) ? preload : [
69235
+ preload
69236
+ ]).forEach(function(item) {
69237
+ try {
69238
+ if (// Check if item is an object and not null/array
69239
+ typeof item !== "object" || item === null || _instanceof(item, Array) || // Check for 'icons' and 'prefix'
69240
+ typeof item.icons !== "object" || typeof item.prefix !== "string" || // Add icon set
69241
+ !addCollection(item)) {
69242
+ console.error(err);
69243
+ }
69244
+ } catch (e) {
69245
+ console.error(err);
69246
+ }
69247
+ });
69248
+ }
69249
+ }
69250
+ // Set API from global "IconifyProviders"
69251
+ if (_window1.IconifyProviders !== void 0) {
69252
+ var providers = _window1.IconifyProviders;
69253
+ if (typeof providers === "object" && providers !== null) {
69254
+ for(var key in providers){
69255
+ var err1 = "IconifyProviders[" + key + "] is invalid.";
69256
+ try {
69257
+ var value = providers[key];
69258
+ if (typeof value !== "object" || !value || value.resources === void 0) {
69259
+ continue;
69260
+ }
69261
+ if (!addAPIProvider(key, value)) {
69262
+ console.error(err1);
69263
+ }
69264
+ } catch (e) {
69265
+ console.error(err1);
69266
+ }
69267
+ }
69268
+ }
69269
+ }
69270
+ }
69271
+ var IconComponent = /*#__PURE__*/ function(_React_Component) {
69272
+ _inherits(IconComponent, _React_Component);
69273
+ var _super = _create_super(IconComponent);
69274
+ function IconComponent(props) {
69275
+ _class_call_check(this, IconComponent);
69276
+ var _this;
69277
+ _this = _super.call(this, props);
69278
+ _this.state = {
69279
+ // Render placeholder before component is mounted
69280
+ icon: null
69281
+ };
69282
+ return _this;
69283
+ }
69284
+ _create_class(IconComponent, [
69285
+ {
69286
+ /**
69287
+ * Abort loading icon
69288
+ */ key: "_abortLoading",
69289
+ value: function _abortLoading() {
69290
+ if (this._loading) {
69291
+ this._loading.abort();
69292
+ this._loading = null;
69293
+ }
69294
+ }
69295
+ },
69296
+ {
69297
+ /**
69298
+ * Update state
69299
+ */ key: "_setData",
69300
+ value: function _setData(icon) {
69301
+ if (this.state.icon !== icon) {
69302
+ this.setState({
69303
+ icon: icon
69304
+ });
69305
+ }
69306
+ }
69307
+ },
69308
+ {
69309
+ /**
69310
+ * Check if icon should be loaded
69311
+ */ key: "_checkIcon",
69312
+ value: function _checkIcon(changed) {
69313
+ var state = this.state;
69314
+ var icon = this.props.icon;
69315
+ // Icon is an object
69316
+ if (typeof icon === "object" && icon !== null && typeof icon.body === "string") {
69317
+ // Stop loading
69318
+ this._icon = "";
69319
+ this._abortLoading();
69320
+ if (changed || state.icon === null) {
69321
+ // Set data if it was changed
69322
+ this._setData({
69323
+ data: icon
69324
+ });
69325
+ }
69326
+ return;
69327
+ }
69328
+ // Invalid icon?
69329
+ var iconName;
69330
+ if (typeof icon !== "string" || (iconName = stringToIcon(icon, false, true)) === null) {
69331
+ this._abortLoading();
69332
+ this._setData(null);
69333
+ return;
69334
+ }
69335
+ // Load icon
69336
+ var data = getIconData(iconName);
69337
+ if (!data) {
69338
+ // Icon data is not available
69339
+ if (!this._loading || this._loading.name !== icon) {
69340
+ // New icon to load
69341
+ this._abortLoading();
69342
+ this._icon = "";
69343
+ this._setData(null);
69344
+ if (data !== null) {
69345
+ // Icon was not loaded
69346
+ this._loading = {
69347
+ name: icon,
69348
+ abort: loadIcons([
69349
+ iconName
69350
+ ], this._checkIcon.bind(this, false))
69351
+ };
69352
+ }
69353
+ }
69354
+ return;
69355
+ }
69356
+ // Icon data is available
69357
+ if (this._icon !== icon || state.icon === null) {
69358
+ // New icon or icon has been loaded
69359
+ this._abortLoading();
69360
+ this._icon = icon;
69361
+ // Add classes
69362
+ var classes = [
69363
+ "iconify"
69364
+ ];
69365
+ if (iconName.prefix !== "") {
69366
+ classes.push("iconify--" + iconName.prefix);
69367
+ }
69368
+ if (iconName.provider !== "") {
69369
+ classes.push("iconify--" + iconName.provider);
69370
+ }
69371
+ // Set data
69372
+ this._setData({
69373
+ data: data,
69374
+ classes: classes
69375
+ });
69376
+ if (this.props.onLoad) {
69377
+ this.props.onLoad(icon);
69378
+ }
69379
+ }
69380
+ }
69381
+ },
69382
+ {
69383
+ /**
69384
+ * Component mounted
69385
+ */ key: "componentDidMount",
69386
+ value: function componentDidMount() {
69387
+ this._checkIcon(false);
69388
+ }
69389
+ },
69390
+ {
69391
+ /**
69392
+ * Component updated
69393
+ */ key: "componentDidUpdate",
69394
+ value: function componentDidUpdate(oldProps) {
69395
+ if (oldProps.icon !== this.props.icon) {
69396
+ this._checkIcon(true);
69397
+ }
69398
+ }
69399
+ },
69400
+ {
69401
+ /**
69402
+ * Abort loading
69403
+ */ key: "componentWillUnmount",
69404
+ value: function componentWillUnmount() {
69405
+ this._abortLoading();
69406
+ }
69407
+ },
69408
+ {
69409
+ /**
69410
+ * Render
69411
+ */ key: "render",
69412
+ value: function render1() {
69413
+ var props = this.props;
69414
+ var icon = this.state.icon;
69415
+ if (icon === null) {
69416
+ // Render placeholder
69417
+ return props.children ? props.children : React__default.createElement("span", {});
69418
+ }
69419
+ // Add classes
69420
+ var newProps = props;
69421
+ if (icon.classes) {
69422
+ newProps = _object_spread_props$3(_object_spread$5({}, props), {
69423
+ className: (typeof props.className === "string" ? props.className + " " : "") + icon.classes.join(" ")
69424
+ });
69425
+ }
69426
+ // Render icon
69427
+ return render(_object_spread$5({}, defaultIconProps, icon.data), newProps, props._inline, props._ref);
69428
+ }
69429
+ }
69430
+ ]);
69431
+ return IconComponent;
69432
+ }(React__default.Component);
69433
+ /**
69434
+ * Block icon
69435
+ *
69436
+ * @param props - Component properties
69437
+ */ var Icon = React__default.forwardRef(function Icon(props, ref) {
69438
+ var newProps = _object_spread_props$3(_object_spread$5({}, props), {
69439
+ _ref: ref,
69440
+ _inline: false
69441
+ });
69442
+ return React__default.createElement(IconComponent, newProps);
69443
+ });
69444
+ /**
69445
+ * Inline icon (has negative verticalAlign that makes it behave like icon font)
69446
+ *
69447
+ * @param props - Component properties
69448
+ */ React__default.forwardRef(function InlineIcon(props, ref) {
69449
+ var newProps = _object_spread_props$3(_object_spread$5({}, props), {
69450
+ _ref: ref,
69451
+ _inline: true
69452
+ });
69453
+ return React__default.createElement(IconComponent, newProps);
69454
+ });
69455
+
67454
69456
  function _array_like_to_array$3(arr, len) {
67455
69457
  if (len == null || len > arr.length) len = arr.length;
67456
69458
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -67462,7 +69464,7 @@ function _array_with_holes$3(arr) {
67462
69464
  function _array_without_holes(arr) {
67463
69465
  if (Array.isArray(arr)) return _array_like_to_array$3(arr);
67464
69466
  }
67465
- function _define_property$7(obj, key, value) {
69467
+ function _define_property$4(obj, key, value) {
67466
69468
  if (key in obj) {
67467
69469
  Object.defineProperty(obj, key, {
67468
69470
  value: value,
@@ -67508,7 +69510,7 @@ function _non_iterable_rest$3() {
67508
69510
  function _non_iterable_spread() {
67509
69511
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67510
69512
  }
67511
- function _object_spread$7(target) {
69513
+ function _object_spread$4(target) {
67512
69514
  for(var i = 1; i < arguments.length; i++){
67513
69515
  var source = arguments[i] != null ? arguments[i] : {};
67514
69516
  var ownKeys = Object.keys(source);
@@ -67518,12 +69520,12 @@ function _object_spread$7(target) {
67518
69520
  }));
67519
69521
  }
67520
69522
  ownKeys.forEach(function(key) {
67521
- _define_property$7(target, key, source[key]);
69523
+ _define_property$4(target, key, source[key]);
67522
69524
  });
67523
69525
  }
67524
69526
  return target;
67525
69527
  }
67526
- function ownKeys$3(object, enumerableOnly) {
69528
+ function ownKeys$2(object, enumerableOnly) {
67527
69529
  var keys = Object.keys(object);
67528
69530
  if (Object.getOwnPropertySymbols) {
67529
69531
  var symbols = Object.getOwnPropertySymbols(object);
@@ -67536,12 +69538,12 @@ function ownKeys$3(object, enumerableOnly) {
67536
69538
  }
67537
69539
  return keys;
67538
69540
  }
67539
- function _object_spread_props$3(target, source) {
69541
+ function _object_spread_props$2(target, source) {
67540
69542
  source = source != null ? source : {};
67541
69543
  if (Object.getOwnPropertyDescriptors) {
67542
69544
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
67543
69545
  } else {
67544
- ownKeys$3(Object(source)).forEach(function(key) {
69546
+ ownKeys$2(Object(source)).forEach(function(key) {
67545
69547
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
67546
69548
  });
67547
69549
  }
@@ -67602,11 +69604,11 @@ var DropImage = function(param) {
67602
69604
  return /*#__PURE__*/ jsxs("section", {
67603
69605
  className: "w-full",
67604
69606
  children: [
67605
- /*#__PURE__*/ jsxs("div", _object_spread_props$3(_object_spread$7({}, getRootProps({
69607
+ /*#__PURE__*/ jsxs("div", _object_spread_props$2(_object_spread$4({}, getRootProps({
67606
69608
  className: "dropzone"
67607
69609
  })), {
67608
69610
  children: [
67609
- /*#__PURE__*/ jsx("input", _object_spread$7({}, getInputProps())),
69611
+ /*#__PURE__*/ jsx("input", _object_spread$4({}, getInputProps())),
67610
69612
  /*#__PURE__*/ jsx("div", {
67611
69613
  className: "flex justify-between",
67612
69614
  children: /*#__PURE__*/ jsx("div", {
@@ -67712,7 +69714,7 @@ var ModalContent = function(param) {
67712
69714
  className: "w-24 h-10 px-2 text-white bg-gray-600 rounded",
67713
69715
  onClick: setModal,
67714
69716
  children: "確定"
67715
- }) : /*#__PURE__*/ jsxs(Fragment$1, {
69717
+ }) : /*#__PURE__*/ jsxs(Fragment, {
67716
69718
  children: [
67717
69719
  /*#__PURE__*/ jsx("button", {
67718
69720
  type: "button",
@@ -68047,7 +70049,7 @@ function cn() {
68047
70049
  return twMerge(clsx(inputs));
68048
70050
  }
68049
70051
 
68050
- function _define_property$6(obj, key, value) {
70052
+ function _define_property$3(obj, key, value) {
68051
70053
  if (key in obj) {
68052
70054
  Object.defineProperty(obj, key, {
68053
70055
  value: value,
@@ -68060,7 +70062,7 @@ function _define_property$6(obj, key, value) {
68060
70062
  }
68061
70063
  return obj;
68062
70064
  }
68063
- function _object_spread$6(target) {
70065
+ function _object_spread$3(target) {
68064
70066
  for(var i = 1; i < arguments.length; i++){
68065
70067
  var source = arguments[i] != null ? arguments[i] : {};
68066
70068
  var ownKeys = Object.keys(source);
@@ -68070,12 +70072,12 @@ function _object_spread$6(target) {
68070
70072
  }));
68071
70073
  }
68072
70074
  ownKeys.forEach(function(key) {
68073
- _define_property$6(target, key, source[key]);
70075
+ _define_property$3(target, key, source[key]);
68074
70076
  });
68075
70077
  }
68076
70078
  return target;
68077
70079
  }
68078
- function ownKeys$2(object, enumerableOnly) {
70080
+ function ownKeys$1(object, enumerableOnly) {
68079
70081
  var keys = Object.keys(object);
68080
70082
  if (Object.getOwnPropertySymbols) {
68081
70083
  var symbols = Object.getOwnPropertySymbols(object);
@@ -68088,20 +70090,20 @@ function ownKeys$2(object, enumerableOnly) {
68088
70090
  }
68089
70091
  return keys;
68090
70092
  }
68091
- function _object_spread_props$2(target, source) {
70093
+ function _object_spread_props$1(target, source) {
68092
70094
  source = source != null ? source : {};
68093
70095
  if (Object.getOwnPropertyDescriptors) {
68094
70096
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
68095
70097
  } else {
68096
- ownKeys$2(Object(source)).forEach(function(key) {
70098
+ ownKeys$1(Object(source)).forEach(function(key) {
68097
70099
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68098
70100
  });
68099
70101
  }
68100
70102
  return target;
68101
70103
  }
68102
- function _object_without_properties$6(source, excluded) {
70104
+ function _object_without_properties$3(source, excluded) {
68103
70105
  if (source == null) return {};
68104
- var target = _object_without_properties_loose$6(source, excluded);
70106
+ var target = _object_without_properties_loose$3(source, excluded);
68105
70107
  var key, i;
68106
70108
  if (Object.getOwnPropertySymbols) {
68107
70109
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -68114,7 +70116,7 @@ function _object_without_properties$6(source, excluded) {
68114
70116
  }
68115
70117
  return target;
68116
70118
  }
68117
- function _object_without_properties_loose$6(source, excluded) {
70119
+ function _object_without_properties_loose$3(source, excluded) {
68118
70120
  if (source == null) return {};
68119
70121
  var target = {};
68120
70122
  var sourceKeys = Object.keys(source);
@@ -68127,10 +70129,10 @@ function _object_without_properties_loose$6(source, excluded) {
68127
70129
  return target;
68128
70130
  }
68129
70131
  var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68130
- var className = _param.className, props = _object_without_properties$6(_param, [
70132
+ var className = _param.className, props = _object_without_properties$3(_param, [
68131
70133
  "className"
68132
70134
  ]);
68133
- return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$2(_object_spread$6({
70135
+ return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$1(_object_spread$3({
68134
70136
  className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className)
68135
70137
  }, props), {
68136
70138
  ref: ref,
@@ -68141,7 +70143,7 @@ var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68141
70143
  });
68142
70144
  Switch.displayName = SwitchPrimitives.Root.displayName;
68143
70145
 
68144
- function _define_property$5(obj, key, value) {
70146
+ function _define_property$2(obj, key, value) {
68145
70147
  if (key in obj) {
68146
70148
  Object.defineProperty(obj, key, {
68147
70149
  value: value,
@@ -68154,7 +70156,7 @@ function _define_property$5(obj, key, value) {
68154
70156
  }
68155
70157
  return obj;
68156
70158
  }
68157
- function _object_spread$5(target) {
70159
+ function _object_spread$2(target) {
68158
70160
  for(var i = 1; i < arguments.length; i++){
68159
70161
  var source = arguments[i] != null ? arguments[i] : {};
68160
70162
  var ownKeys = Object.keys(source);
@@ -68164,14 +70166,14 @@ function _object_spread$5(target) {
68164
70166
  }));
68165
70167
  }
68166
70168
  ownKeys.forEach(function(key) {
68167
- _define_property$5(target, key, source[key]);
70169
+ _define_property$2(target, key, source[key]);
68168
70170
  });
68169
70171
  }
68170
70172
  return target;
68171
70173
  }
68172
- function _object_without_properties$5(source, excluded) {
70174
+ function _object_without_properties$2(source, excluded) {
68173
70175
  if (source == null) return {};
68174
- var target = _object_without_properties_loose$5(source, excluded);
70176
+ var target = _object_without_properties_loose$2(source, excluded);
68175
70177
  var key, i;
68176
70178
  if (Object.getOwnPropertySymbols) {
68177
70179
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -68184,7 +70186,7 @@ function _object_without_properties$5(source, excluded) {
68184
70186
  }
68185
70187
  return target;
68186
70188
  }
68187
- function _object_without_properties_loose$5(source, excluded) {
70189
+ function _object_without_properties_loose$2(source, excluded) {
68188
70190
  if (source == null) return {};
68189
70191
  var target = {};
68190
70192
  var sourceKeys = Object.keys(source);
@@ -68219,14 +70221,14 @@ var buttonVariants = cva("inline-flex items-center justify-center whitespace-now
68219
70221
  }
68220
70222
  });
68221
70223
  var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68222
- var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties$5(_param, [
70224
+ var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties$2(_param, [
68223
70225
  "className",
68224
70226
  "variant",
68225
70227
  "size",
68226
70228
  "asChild"
68227
70229
  ]);
68228
70230
  var Comp = asChild ? Slot : "button";
68229
- return /*#__PURE__*/ jsx(Comp, _object_spread$5({
70231
+ return /*#__PURE__*/ jsx(Comp, _object_spread$2({
68230
70232
  className: cn(buttonVariants({
68231
70233
  variant: variant,
68232
70234
  size: size,
@@ -68236,7 +70238,7 @@ var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68236
70238
  }, props));
68237
70239
  });
68238
70240
 
68239
- function _define_property$4(obj, key, value) {
70241
+ function _define_property$1(obj, key, value) {
68240
70242
  if (key in obj) {
68241
70243
  Object.defineProperty(obj, key, {
68242
70244
  value: value,
@@ -68267,7 +70269,7 @@ function _object_destructuring_empty(o) {
68267
70269
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
68268
70270
  return o;
68269
70271
  }
68270
- function _object_spread$4(target) {
70272
+ function _object_spread$1(target) {
68271
70273
  for(var i = 1; i < arguments.length; i++){
68272
70274
  var source = arguments[i] != null ? arguments[i] : {};
68273
70275
  var ownKeys = Object.keys(source);
@@ -68277,12 +70279,12 @@ function _object_spread$4(target) {
68277
70279
  }));
68278
70280
  }
68279
70281
  ownKeys.forEach(function(key) {
68280
- _define_property$4(target, key, source[key]);
70282
+ _define_property$1(target, key, source[key]);
68281
70283
  });
68282
70284
  }
68283
70285
  return target;
68284
70286
  }
68285
- function ownKeys$1(object, enumerableOnly) {
70287
+ function ownKeys(object, enumerableOnly) {
68286
70288
  var keys = Object.keys(object);
68287
70289
  if (Object.getOwnPropertySymbols) {
68288
70290
  var symbols = Object.getOwnPropertySymbols(object);
@@ -68295,20 +70297,20 @@ function ownKeys$1(object, enumerableOnly) {
68295
70297
  }
68296
70298
  return keys;
68297
70299
  }
68298
- function _object_spread_props$1(target, source) {
70300
+ function _object_spread_props(target, source) {
68299
70301
  source = source != null ? source : {};
68300
70302
  if (Object.getOwnPropertyDescriptors) {
68301
70303
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
68302
70304
  } else {
68303
- ownKeys$1(Object(source)).forEach(function(key) {
70305
+ ownKeys(Object(source)).forEach(function(key) {
68304
70306
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68305
70307
  });
68306
70308
  }
68307
70309
  return target;
68308
70310
  }
68309
- function _object_without_properties$4(source, excluded) {
70311
+ function _object_without_properties$1(source, excluded) {
68310
70312
  if (source == null) return {};
68311
- var target = _object_without_properties_loose$4(source, excluded);
70313
+ var target = _object_without_properties_loose$1(source, excluded);
68312
70314
  var key, i;
68313
70315
  if (Object.getOwnPropertySymbols) {
68314
70316
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -68321,7 +70323,7 @@ function _object_without_properties$4(source, excluded) {
68321
70323
  }
68322
70324
  return target;
68323
70325
  }
68324
- function _object_without_properties_loose$4(source, excluded) {
70326
+ function _object_without_properties_loose$1(source, excluded) {
68325
70327
  if (source == null) return {};
68326
70328
  var target = {};
68327
70329
  var sourceKeys = Object.keys(source);
@@ -68334,15 +70336,15 @@ function _object_without_properties_loose$4(source, excluded) {
68334
70336
  return target;
68335
70337
  }
68336
70338
  function Calendar(_param) {
68337
- var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties$4(_param, [
70339
+ var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties$1(_param, [
68338
70340
  "className",
68339
70341
  "classNames",
68340
70342
  "showOutsideDays"
68341
70343
  ]);
68342
- return /*#__PURE__*/ jsx(DayPicker, _object_spread_props$1(_object_spread$4({
70344
+ return /*#__PURE__*/ jsx(DayPicker, _object_spread_props(_object_spread$1({
68343
70345
  showOutsideDays: showOutsideDays,
68344
70346
  className: cn("p-3", className),
68345
- classNames: _object_spread$4({
70347
+ classNames: _object_spread$1({
68346
70348
  months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
68347
70349
  month: "space-y-4",
68348
70350
  caption: "flex justify-center pt-1 relative items-center",
@@ -68394,7 +70396,7 @@ function Calendar(_param) {
68394
70396
  }
68395
70397
  Calendar.displayName = "Calendar";
68396
70398
 
68397
- function _define_property$3(obj, key, value) {
70399
+ function _define_property(obj, key, value) {
68398
70400
  if (key in obj) {
68399
70401
  Object.defineProperty(obj, key, {
68400
70402
  value: value,
@@ -68407,7 +70409,7 @@ function _define_property$3(obj, key, value) {
68407
70409
  }
68408
70410
  return obj;
68409
70411
  }
68410
- function _object_spread$3(target) {
70412
+ function _object_spread(target) {
68411
70413
  for(var i = 1; i < arguments.length; i++){
68412
70414
  var source = arguments[i] != null ? arguments[i] : {};
68413
70415
  var ownKeys = Object.keys(source);
@@ -68417,14 +70419,14 @@ function _object_spread$3(target) {
68417
70419
  }));
68418
70420
  }
68419
70421
  ownKeys.forEach(function(key) {
68420
- _define_property$3(target, key, source[key]);
70422
+ _define_property(target, key, source[key]);
68421
70423
  });
68422
70424
  }
68423
70425
  return target;
68424
70426
  }
68425
- function _object_without_properties$3(source, excluded) {
70427
+ function _object_without_properties(source, excluded) {
68426
70428
  if (source == null) return {};
68427
- var target = _object_without_properties_loose$3(source, excluded);
70429
+ var target = _object_without_properties_loose(source, excluded);
68428
70430
  var key, i;
68429
70431
  if (Object.getOwnPropertySymbols) {
68430
70432
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -68437,7 +70439,7 @@ function _object_without_properties$3(source, excluded) {
68437
70439
  }
68438
70440
  return target;
68439
70441
  }
68440
- function _object_without_properties_loose$3(source, excluded) {
70442
+ function _object_without_properties_loose(source, excluded) {
68441
70443
  if (source == null) return {};
68442
70444
  var target = {};
68443
70445
  var sourceKeys = Object.keys(source);
@@ -68452,13 +70454,13 @@ function _object_without_properties_loose$3(source, excluded) {
68452
70454
  var Popover = PopoverPrimitive.Root;
68453
70455
  var PopoverTrigger = PopoverPrimitive.Trigger;
68454
70456
  var PopoverContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68455
- var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties$3(_param, [
70457
+ var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
68456
70458
  "className",
68457
70459
  "align",
68458
70460
  "sideOffset"
68459
70461
  ]);
68460
70462
  return /*#__PURE__*/ jsx(PopoverPrimitive.Portal, {
68461
- children: /*#__PURE__*/ jsx(PopoverPrimitive.Content, _object_spread$3({
70463
+ children: /*#__PURE__*/ jsx(PopoverPrimitive.Content, _object_spread({
68462
70464
  ref: ref,
68463
70465
  align: align,
68464
70466
  sideOffset: sideOffset,
@@ -68493,7 +70495,7 @@ function DateRangePicker(param) {
68493
70495
  /*#__PURE__*/ jsx(Calendar$1, {
68494
70496
  className: "mr-2 h-4 w-4"
68495
70497
  }),
68496
- (dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxs(Fragment$1, {
70498
+ (dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxs(Fragment, {
68497
70499
  children: [
68498
70500
  format(dates.from, "yyyy-MM-dd"),
68499
70501
  " -",
@@ -68679,414 +70681,4 @@ var ReactDateRange = function(param) {
68679
70681
  });
68680
70682
  };
68681
70683
 
68682
- function _define_property$2(obj, key, value) {
68683
- if (key in obj) {
68684
- Object.defineProperty(obj, key, {
68685
- value: value,
68686
- enumerable: true,
68687
- configurable: true,
68688
- writable: true
68689
- });
68690
- } else {
68691
- obj[key] = value;
68692
- }
68693
- return obj;
68694
- }
68695
- function _object_spread$2(target) {
68696
- for(var i = 1; i < arguments.length; i++){
68697
- var source = arguments[i] != null ? arguments[i] : {};
68698
- var ownKeys = Object.keys(source);
68699
- if (typeof Object.getOwnPropertySymbols === "function") {
68700
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
68701
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
68702
- }));
68703
- }
68704
- ownKeys.forEach(function(key) {
68705
- _define_property$2(target, key, source[key]);
68706
- });
68707
- }
68708
- return target;
68709
- }
68710
- function ownKeys(object, enumerableOnly) {
68711
- var keys = Object.keys(object);
68712
- if (Object.getOwnPropertySymbols) {
68713
- var symbols = Object.getOwnPropertySymbols(object);
68714
- if (enumerableOnly) {
68715
- symbols = symbols.filter(function(sym) {
68716
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
68717
- });
68718
- }
68719
- keys.push.apply(keys, symbols);
68720
- }
68721
- return keys;
68722
- }
68723
- function _object_spread_props(target, source) {
68724
- source = source != null ? source : {};
68725
- if (Object.getOwnPropertyDescriptors) {
68726
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
68727
- } else {
68728
- ownKeys(Object(source)).forEach(function(key) {
68729
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68730
- });
68731
- }
68732
- return target;
68733
- }
68734
- function _object_without_properties$2(source, excluded) {
68735
- if (source == null) return {};
68736
- var target = _object_without_properties_loose$2(source, excluded);
68737
- var key, i;
68738
- if (Object.getOwnPropertySymbols) {
68739
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
68740
- for(i = 0; i < sourceSymbolKeys.length; i++){
68741
- key = sourceSymbolKeys[i];
68742
- if (excluded.indexOf(key) >= 0) continue;
68743
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
68744
- target[key] = source[key];
68745
- }
68746
- }
68747
- return target;
68748
- }
68749
- function _object_without_properties_loose$2(source, excluded) {
68750
- if (source == null) return {};
68751
- var target = {};
68752
- var sourceKeys = Object.keys(source);
68753
- var key, i;
68754
- for(i = 0; i < sourceKeys.length; i++){
68755
- key = sourceKeys[i];
68756
- if (excluded.indexOf(key) >= 0) continue;
68757
- target[key] = source[key];
68758
- }
68759
- return target;
68760
- }
68761
- var DropdownMenuSubTrigger = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68762
- var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties$2(_param, [
68763
- "className",
68764
- "inset",
68765
- "children"
68766
- ]);
68767
- return /*#__PURE__*/ jsxs(DropdownMenuPrimitive.SubTrigger, _object_spread_props(_object_spread$2({
68768
- ref: ref,
68769
- className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className)
68770
- }, props), {
68771
- children: [
68772
- children,
68773
- /*#__PURE__*/ jsx(ChevronRightIcon, {
68774
- className: "ml-auto h-4 w-4"
68775
- })
68776
- ]
68777
- }));
68778
- });
68779
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
68780
- var DropdownMenuSubContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68781
- var className = _param.className, props = _object_without_properties$2(_param, [
68782
- "className"
68783
- ]);
68784
- return /*#__PURE__*/ jsx(DropdownMenuPrimitive.SubContent, _object_spread$2({
68785
- ref: ref,
68786
- className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
68787
- }, props));
68788
- });
68789
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
68790
- var DropdownMenuContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68791
- var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties$2(_param, [
68792
- "className",
68793
- "sideOffset"
68794
- ]);
68795
- return /*#__PURE__*/ jsx(DropdownMenuPrimitive.Portal, {
68796
- children: /*#__PURE__*/ jsx(DropdownMenuPrimitive.Content, _object_spread$2({
68797
- ref: ref,
68798
- sideOffset: sideOffset,
68799
- className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
68800
- }, props))
68801
- });
68802
- });
68803
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
68804
- var DropdownMenuItem = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68805
- var className = _param.className, inset = _param.inset, props = _object_without_properties$2(_param, [
68806
- "className",
68807
- "inset"
68808
- ]);
68809
- return /*#__PURE__*/ jsx(DropdownMenuPrimitive.Item, _object_spread$2({
68810
- ref: ref,
68811
- className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)
68812
- }, props));
68813
- });
68814
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
68815
- var DropdownMenuCheckboxItem = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68816
- var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties$2(_param, [
68817
- "className",
68818
- "children",
68819
- "checked"
68820
- ]);
68821
- return /*#__PURE__*/ jsxs(DropdownMenuPrimitive.CheckboxItem, _object_spread_props(_object_spread$2({
68822
- ref: ref,
68823
- className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
68824
- checked: checked
68825
- }, props), {
68826
- children: [
68827
- /*#__PURE__*/ jsx("span", {
68828
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
68829
- children: /*#__PURE__*/ jsx(DropdownMenuPrimitive.ItemIndicator, {
68830
- children: /*#__PURE__*/ jsx(CheckIcon, {
68831
- className: "h-4 w-4"
68832
- })
68833
- })
68834
- }),
68835
- children
68836
- ]
68837
- }));
68838
- });
68839
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
68840
- var DropdownMenuRadioItem = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68841
- var className = _param.className, children = _param.children, props = _object_without_properties$2(_param, [
68842
- "className",
68843
- "children"
68844
- ]);
68845
- return /*#__PURE__*/ jsxs(DropdownMenuPrimitive.RadioItem, _object_spread_props(_object_spread$2({
68846
- ref: ref,
68847
- className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)
68848
- }, props), {
68849
- children: [
68850
- /*#__PURE__*/ jsx("span", {
68851
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
68852
- children: /*#__PURE__*/ jsx(DropdownMenuPrimitive.ItemIndicator, {
68853
- children: /*#__PURE__*/ jsx(DotFilledIcon, {
68854
- className: "h-4 w-4 fill-current"
68855
- })
68856
- })
68857
- }),
68858
- children
68859
- ]
68860
- }));
68861
- });
68862
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
68863
- var DropdownMenuLabel = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68864
- var className = _param.className, inset = _param.inset, props = _object_without_properties$2(_param, [
68865
- "className",
68866
- "inset"
68867
- ]);
68868
- return /*#__PURE__*/ jsx(DropdownMenuPrimitive.Label, _object_spread$2({
68869
- ref: ref,
68870
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)
68871
- }, props));
68872
- });
68873
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
68874
- var DropdownMenuSeparator = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68875
- var className = _param.className, props = _object_without_properties$2(_param, [
68876
- "className"
68877
- ]);
68878
- return /*#__PURE__*/ jsx(DropdownMenuPrimitive.Separator, _object_spread$2({
68879
- ref: ref,
68880
- className: cn("-mx-1 my-1 h-px bg-muted", className)
68881
- }, props));
68882
- });
68883
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
68884
-
68885
- function _define_property$1(obj, key, value) {
68886
- if (key in obj) {
68887
- Object.defineProperty(obj, key, {
68888
- value: value,
68889
- enumerable: true,
68890
- configurable: true,
68891
- writable: true
68892
- });
68893
- } else {
68894
- obj[key] = value;
68895
- }
68896
- return obj;
68897
- }
68898
- function _object_spread$1(target) {
68899
- for(var i = 1; i < arguments.length; i++){
68900
- var source = arguments[i] != null ? arguments[i] : {};
68901
- var ownKeys = Object.keys(source);
68902
- if (typeof Object.getOwnPropertySymbols === "function") {
68903
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
68904
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
68905
- }));
68906
- }
68907
- ownKeys.forEach(function(key) {
68908
- _define_property$1(target, key, source[key]);
68909
- });
68910
- }
68911
- return target;
68912
- }
68913
- function _object_without_properties$1(source, excluded) {
68914
- if (source == null) return {};
68915
- var target = _object_without_properties_loose$1(source, excluded);
68916
- var key, i;
68917
- if (Object.getOwnPropertySymbols) {
68918
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
68919
- for(i = 0; i < sourceSymbolKeys.length; i++){
68920
- key = sourceSymbolKeys[i];
68921
- if (excluded.indexOf(key) >= 0) continue;
68922
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
68923
- target[key] = source[key];
68924
- }
68925
- }
68926
- return target;
68927
- }
68928
- function _object_without_properties_loose$1(source, excluded) {
68929
- if (source == null) return {};
68930
- var target = {};
68931
- var sourceKeys = Object.keys(source);
68932
- var key, i;
68933
- for(i = 0; i < sourceKeys.length; i++){
68934
- key = sourceKeys[i];
68935
- if (excluded.indexOf(key) >= 0) continue;
68936
- target[key] = source[key];
68937
- }
68938
- return target;
68939
- }
68940
- var Input = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
68941
- var className = _param.className, type = _param.type, props = _object_without_properties$1(_param, [
68942
- "className",
68943
- "type"
68944
- ]);
68945
- return /*#__PURE__*/ jsx("input", _object_spread$1({
68946
- type: type,
68947
- className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className),
68948
- ref: ref
68949
- }, props));
68950
- });
68951
- Input.displayName = "Input";
68952
-
68953
- function _define_property(obj, key, value) {
68954
- if (key in obj) {
68955
- Object.defineProperty(obj, key, {
68956
- value: value,
68957
- enumerable: true,
68958
- configurable: true,
68959
- writable: true
68960
- });
68961
- } else {
68962
- obj[key] = value;
68963
- }
68964
- return obj;
68965
- }
68966
- function _object_spread(target) {
68967
- for(var i = 1; i < arguments.length; i++){
68968
- var source = arguments[i] != null ? arguments[i] : {};
68969
- var ownKeys = Object.keys(source);
68970
- if (typeof Object.getOwnPropertySymbols === "function") {
68971
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
68972
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
68973
- }));
68974
- }
68975
- ownKeys.forEach(function(key) {
68976
- _define_property(target, key, source[key]);
68977
- });
68978
- }
68979
- return target;
68980
- }
68981
- function _object_without_properties(source, excluded) {
68982
- if (source == null) return {};
68983
- var target = _object_without_properties_loose(source, excluded);
68984
- var key, i;
68985
- if (Object.getOwnPropertySymbols) {
68986
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
68987
- for(i = 0; i < sourceSymbolKeys.length; i++){
68988
- key = sourceSymbolKeys[i];
68989
- if (excluded.indexOf(key) >= 0) continue;
68990
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
68991
- target[key] = source[key];
68992
- }
68993
- }
68994
- return target;
68995
- }
68996
- function _object_without_properties_loose(source, excluded) {
68997
- if (source == null) return {};
68998
- var target = {};
68999
- var sourceKeys = Object.keys(source);
69000
- var key, i;
69001
- for(i = 0; i < sourceKeys.length; i++){
69002
- key = sourceKeys[i];
69003
- if (excluded.indexOf(key) >= 0) continue;
69004
- target[key] = source[key];
69005
- }
69006
- return target;
69007
- }
69008
- var Table = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69009
- var className = _param.className, props = _object_without_properties(_param, [
69010
- "className"
69011
- ]);
69012
- return /*#__PURE__*/ jsx("div", {
69013
- className: "relative w-full overflow-auto",
69014
- children: /*#__PURE__*/ jsx("table", _object_spread({
69015
- ref: ref,
69016
- className: cn("w-full caption-bottom text-sm", className)
69017
- }, props))
69018
- });
69019
- });
69020
- Table.displayName = "Table";
69021
- var TableHeader = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69022
- var className = _param.className, props = _object_without_properties(_param, [
69023
- "className"
69024
- ]);
69025
- return /*#__PURE__*/ jsx("thead", _object_spread({
69026
- ref: ref,
69027
- className: cn("[&_tr]:border-b", className)
69028
- }, props));
69029
- });
69030
- TableHeader.displayName = "TableHeader";
69031
- var TableBody = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69032
- var className = _param.className, props = _object_without_properties(_param, [
69033
- "className"
69034
- ]);
69035
- return /*#__PURE__*/ jsx("tbody", _object_spread({
69036
- ref: ref,
69037
- className: cn("[&_tr:last-child]:border-0", className)
69038
- }, props));
69039
- });
69040
- TableBody.displayName = "TableBody";
69041
- var TableFooter = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69042
- var className = _param.className, props = _object_without_properties(_param, [
69043
- "className"
69044
- ]);
69045
- return /*#__PURE__*/ jsx("tfoot", _object_spread({
69046
- ref: ref,
69047
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
69048
- }, props));
69049
- });
69050
- TableFooter.displayName = "TableFooter";
69051
- var TableRow = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69052
- var className = _param.className, props = _object_without_properties(_param, [
69053
- "className"
69054
- ]);
69055
- return /*#__PURE__*/ jsx("tr", _object_spread({
69056
- ref: ref,
69057
- className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className)
69058
- }, props));
69059
- });
69060
- TableRow.displayName = "TableRow";
69061
- var TableHead = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69062
- var className = _param.className, props = _object_without_properties(_param, [
69063
- "className"
69064
- ]);
69065
- return /*#__PURE__*/ jsx("th", _object_spread({
69066
- ref: ref,
69067
- className: cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)
69068
- }, props));
69069
- });
69070
- TableHead.displayName = "TableHead";
69071
- var TableCell = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69072
- var className = _param.className, props = _object_without_properties(_param, [
69073
- "className"
69074
- ]);
69075
- return /*#__PURE__*/ jsx("td", _object_spread({
69076
- ref: ref,
69077
- className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)
69078
- }, props));
69079
- });
69080
- TableCell.displayName = "TableCell";
69081
- var TableCaption = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
69082
- var className = _param.className, props = _object_without_properties(_param, [
69083
- "className"
69084
- ]);
69085
- return /*#__PURE__*/ jsx("caption", _object_spread({
69086
- ref: ref,
69087
- className: cn("mt-4 text-sm text-muted-foreground", className)
69088
- }, props));
69089
- });
69090
- TableCaption.displayName = "TableCaption";
69091
-
69092
70684
  export { CkEditor, CustomUpload, DateRangePicker, DropImage, ReactDateRange, Spin, Switch, UiLibrary };