@temboplus/frontend-react-core 0.1.3-beta.9 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +80 -334
  3. package/dist/index.cjs.js +15 -1
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.esm.js +4 -1
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/timezone/index.cjs.js +16 -0
  10. package/dist/{notifications → timezone}/index.cjs.js.map +1 -1
  11. package/dist/timezone/index.d.ts +4 -0
  12. package/dist/timezone/index.d.ts.map +1 -0
  13. package/dist/timezone/index.js +5 -0
  14. package/dist/{notifications → timezone}/index.js.map +1 -1
  15. package/dist/timezone/use-format-date.d.ts +23 -0
  16. package/dist/timezone/use-format-date.d.ts.map +1 -0
  17. package/dist/timezone/use-timezone-date.d.ts +18 -0
  18. package/dist/timezone/use-timezone-date.d.ts.map +1 -0
  19. package/dist/timezone/use-timezone.d.ts +20 -0
  20. package/dist/timezone/use-timezone.d.ts.map +1 -0
  21. package/dist/use-timezone-date-B-P03WD_.js +81 -0
  22. package/dist/use-timezone-date-B-P03WD_.js.map +1 -0
  23. package/dist/use-timezone-date-s1Ru9Fw6.js +88 -0
  24. package/dist/use-timezone-date-s1Ru9Fw6.js.map +1 -0
  25. package/package.json +58 -63
  26. package/dist/InfoCircleOutlined-B7d2aRfV.js +0 -7
  27. package/dist/InfoCircleOutlined-B7d2aRfV.js.map +0 -1
  28. package/dist/InfoCircleOutlined-DYs90hdV.js +0 -7
  29. package/dist/InfoCircleOutlined-DYs90hdV.js.map +0 -1
  30. package/dist/ZoomOutOutlined-CW-jqBMI.js +0 -2
  31. package/dist/ZoomOutOutlined-CW-jqBMI.js.map +0 -1
  32. package/dist/ZoomOutOutlined-Pw8hpWWK.js +0 -2
  33. package/dist/ZoomOutOutlined-Pw8hpWWK.js.map +0 -1
  34. package/dist/alerts/index.cjs.js +0 -2
  35. package/dist/alerts/index.cjs.js.map +0 -1
  36. package/dist/alerts/index.d.ts +0 -1
  37. package/dist/alerts/index.js +0 -2
  38. package/dist/alerts/index.js.map +0 -1
  39. package/dist/dialogs/index.cjs.js +0 -2
  40. package/dist/dialogs/index.cjs.js.map +0 -1
  41. package/dist/dialogs/index.d.ts +0 -1
  42. package/dist/dialogs/index.js +0 -2
  43. package/dist/dialogs/index.js.map +0 -1
  44. package/dist/features/alerts/alert.d.ts +0 -12
  45. package/dist/features/alerts/alert.js +0 -95
  46. package/dist/features/alerts/index.d.ts +0 -1
  47. package/dist/features/alerts/index.js +0 -1
  48. package/dist/features/dialogs/index.d.ts +0 -1
  49. package/dist/features/dialogs/index.js +0 -1
  50. package/dist/features/dialogs/modal-provider.d.ts +0 -3
  51. package/dist/features/dialogs/modal-provider.js +0 -6
  52. package/dist/features/dialogs/tembo-confirm.d.ts +0 -63
  53. package/dist/features/dialogs/tembo-confirm.js +0 -111
  54. package/dist/features/input-validation/account-name-validator.d.ts +0 -13
  55. package/dist/features/input-validation/account-name-validator.js +0 -28
  56. package/dist/features/input-validation/account-number-validator.d.ts +0 -13
  57. package/dist/features/input-validation/account-number-validator.js +0 -65
  58. package/dist/features/input-validation/amount-validator.d.ts +0 -78
  59. package/dist/features/input-validation/amount-validator.js +0 -100
  60. package/dist/features/input-validation/index.d.ts +0 -5
  61. package/dist/features/input-validation/index.js +0 -5
  62. package/dist/features/input-validation/phone-number-validator.d.ts +0 -25
  63. package/dist/features/input-validation/phone-number-validator.js +0 -79
  64. package/dist/features/input-validation/swift-code-validator.d.ts +0 -13
  65. package/dist/features/input-validation/swift-code-validator.js +0 -38
  66. package/dist/features/notifications/index.d.ts +0 -3
  67. package/dist/features/notifications/index.js +0 -3
  68. package/dist/features/notifications/tembo-notify.d.ts +0 -50
  69. package/dist/features/notifications/tembo-notify.js +0 -140
  70. package/dist/features/notifications/toast-config.d.ts +0 -12
  71. package/dist/features/notifications/toast-config.js +0 -60
  72. package/dist/features/notifications/toast-container.d.ts +0 -19
  73. package/dist/features/notifications/toast-container.js +0 -89
  74. package/dist/index.js +0 -1
  75. package/dist/notifications/index.cjs.js +0 -2
  76. package/dist/notifications/index.d.ts +0 -1
  77. package/dist/notifications/index.js +0 -2
  78. package/dist/providers.d.ts +0 -37
  79. package/dist/providers.js +0 -32
  80. package/dist/tembo-notify-Bp14qngd.js +0 -2
  81. package/dist/tembo-notify-Bp14qngd.js.map +0 -1
  82. package/dist/tembo-notify-h5Xn66oA.js +0 -2
  83. package/dist/tembo-notify-h5Xn66oA.js.map +0 -1
  84. package/dist/theme/colors.d.ts +0 -278
  85. package/dist/theme/colors.js +0 -212
  86. package/dist/theme/constants.d.ts +0 -143
  87. package/dist/theme/constants.js +0 -82
  88. package/dist/theme/index.cjs.js +0 -2
  89. package/dist/theme/index.cjs.js.map +0 -1
  90. package/dist/theme/index.d.ts +0 -3
  91. package/dist/theme/index.js +0 -2
  92. package/dist/theme/index.js.map +0 -1
  93. package/dist/theme/theme-provider.d.ts +0 -99
  94. package/dist/theme/theme-provider.js +0 -404
  95. package/dist/theme-provider-Ca4P0Hcp.js +0 -11
  96. package/dist/theme-provider-Ca4P0Hcp.js.map +0 -1
  97. package/dist/theme-provider-RhAw3jw_.js +0 -11
  98. package/dist/theme-provider-RhAw3jw_.js.map +0 -1
  99. package/dist/validation/index.cjs.js +0 -2
  100. package/dist/validation/index.cjs.js.map +0 -1
  101. package/dist/validation/index.d.ts +0 -1
  102. package/dist/validation/index.js +0 -2
  103. package/dist/validation/index.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Hook over the user's timezone preference, persisted to localStorage.
3
+ *
4
+ * Each app supplies its own `storageKey` (e.g. `"afloat.timezone"`,
5
+ * `"dashboard.timezone"`) so preferences don't collide across products
6
+ * sharing the same browser origin.
7
+ *
8
+ * Initial render returns `defaultTimezone` (or {@link DEFAULT_TIMEZONE});
9
+ * the persisted value is rehydrated on mount to avoid SSR mismatch.
10
+ *
11
+ * When backend-stored user preferences arrive later, the source of truth
12
+ * inside this hook can swap to a hybrid local+remote scheme without
13
+ * consumers having to touch their call sites — the `[tz, setTz]` shape
14
+ * stays stable.
15
+ */
16
+ export declare function useTimezone(options: {
17
+ storageKey: string;
18
+ defaultTimezone?: string;
19
+ }): readonly [string, (next: string) => void];
20
+ //# sourceMappingURL=use-timezone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-timezone.d.ts","sourceRoot":"","sources":["../../src/timezone/use-timezone.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,CAwB5C"}
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import { DEFAULT_TIMEZONE, isValidTimezone, formatDate, formatDateTime, formatDateTimeWithSeconds, formatTime, toUtcInstant, sameDayInTimezone, parseInTimezone, endOfDayInTimezone, startOfDayInTimezone } from '@temboplus/frontend-core';
3
+ import { useState, useEffect, useCallback, useMemo } from 'react';
4
+
5
+ /**
6
+ * Hook over the user's timezone preference, persisted to localStorage.
7
+ *
8
+ * Each app supplies its own `storageKey` (e.g. `"afloat.timezone"`,
9
+ * `"dashboard.timezone"`) so preferences don't collide across products
10
+ * sharing the same browser origin.
11
+ *
12
+ * Initial render returns `defaultTimezone` (or {@link DEFAULT_TIMEZONE});
13
+ * the persisted value is rehydrated on mount to avoid SSR mismatch.
14
+ *
15
+ * When backend-stored user preferences arrive later, the source of truth
16
+ * inside this hook can swap to a hybrid local+remote scheme without
17
+ * consumers having to touch their call sites — the `[tz, setTz]` shape
18
+ * stays stable.
19
+ */
20
+ function useTimezone(options) {
21
+ const fallback = options.defaultTimezone ?? DEFAULT_TIMEZONE;
22
+ const [timezone, setTimezone] = useState(fallback);
23
+ useEffect(() => {
24
+ if (typeof window === "undefined")
25
+ return;
26
+ const stored = window.localStorage.getItem(options.storageKey);
27
+ if (isValidTimezone(stored)) {
28
+ setTimezone(stored);
29
+ }
30
+ }, [options.storageKey]);
31
+ const update = useCallback((next) => {
32
+ if (!isValidTimezone(next))
33
+ return;
34
+ setTimezone(next);
35
+ if (typeof window !== "undefined") {
36
+ window.localStorage.setItem(options.storageKey, next);
37
+ }
38
+ }, [options.storageKey]);
39
+ return [timezone, update];
40
+ }
41
+
42
+ /** `25 MAY 2026` */
43
+ function useFormatDate(options) {
44
+ const [tz] = useTimezone(options);
45
+ return useMemo(() => (date) => formatDate(date, tz), [tz]);
46
+ }
47
+ /** `25 MAY 2026, 02:30 PM` */
48
+ function useFormatDateTime(options) {
49
+ const [tz] = useTimezone(options);
50
+ return useMemo(() => (date) => formatDateTime(date, tz), [tz]);
51
+ }
52
+ /** `25 MAY 2026, 02:30:45 PM` — audit rows where seconds matter. */
53
+ function useFormatDateTimeWithSeconds(options) {
54
+ const [tz] = useTimezone(options);
55
+ return useMemo(() => (date) => formatDateTimeWithSeconds(date, tz), [tz]);
56
+ }
57
+ /** `02:30 PM` */
58
+ function useFormatTime(options) {
59
+ const [tz] = useTimezone(options);
60
+ return useMemo(() => (date) => formatTime(date, tz), [tz]);
61
+ }
62
+
63
+ /**
64
+ * Boundary helpers bound to the user's current timezone preference.
65
+ * Re-memoises when the preference changes so date pickers / range
66
+ * builders pick up the new offset automatically.
67
+ */
68
+ function useTimezoneDate(options) {
69
+ const [tz] = useTimezone(options);
70
+ return useMemo(() => ({
71
+ tz,
72
+ startOfDay: (date) => startOfDayInTimezone(date, tz),
73
+ endOfDay: (date) => endOfDayInTimezone(date, tz),
74
+ parse: (iso) => parseInTimezone(iso, tz),
75
+ sameDay: (a, b) => sameDayInTimezone(a, b, tz),
76
+ toUtc: toUtcInstant,
77
+ }), [tz]);
78
+ }
79
+
80
+ export { useFormatDateTime as a, useFormatDateTimeWithSeconds as b, useFormatTime as c, useTimezone as d, useTimezoneDate as e, useFormatDate as u };
81
+ //# sourceMappingURL=use-timezone-date-B-P03WD_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-timezone-date-B-P03WD_.js","sources":["../src/timezone/use-timezone.ts","../src/timezone/use-format-date.ts","../src/timezone/use-timezone-date.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":"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"}
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var frontendCore = require('@temboplus/frontend-core');
5
+ var react = require('react');
6
+
7
+ /**
8
+ * Hook over the user's timezone preference, persisted to localStorage.
9
+ *
10
+ * Each app supplies its own `storageKey` (e.g. `"afloat.timezone"`,
11
+ * `"dashboard.timezone"`) so preferences don't collide across products
12
+ * sharing the same browser origin.
13
+ *
14
+ * Initial render returns `defaultTimezone` (or {@link DEFAULT_TIMEZONE});
15
+ * the persisted value is rehydrated on mount to avoid SSR mismatch.
16
+ *
17
+ * When backend-stored user preferences arrive later, the source of truth
18
+ * inside this hook can swap to a hybrid local+remote scheme without
19
+ * consumers having to touch their call sites — the `[tz, setTz]` shape
20
+ * stays stable.
21
+ */
22
+ function useTimezone(options) {
23
+ const fallback = options.defaultTimezone ?? frontendCore.DEFAULT_TIMEZONE;
24
+ const [timezone, setTimezone] = react.useState(fallback);
25
+ react.useEffect(() => {
26
+ if (typeof window === "undefined")
27
+ return;
28
+ const stored = window.localStorage.getItem(options.storageKey);
29
+ if (frontendCore.isValidTimezone(stored)) {
30
+ setTimezone(stored);
31
+ }
32
+ }, [options.storageKey]);
33
+ const update = react.useCallback((next) => {
34
+ if (!frontendCore.isValidTimezone(next))
35
+ return;
36
+ setTimezone(next);
37
+ if (typeof window !== "undefined") {
38
+ window.localStorage.setItem(options.storageKey, next);
39
+ }
40
+ }, [options.storageKey]);
41
+ return [timezone, update];
42
+ }
43
+
44
+ /** `25 MAY 2026` */
45
+ function useFormatDate(options) {
46
+ const [tz] = useTimezone(options);
47
+ return react.useMemo(() => (date) => frontendCore.formatDate(date, tz), [tz]);
48
+ }
49
+ /** `25 MAY 2026, 02:30 PM` */
50
+ function useFormatDateTime(options) {
51
+ const [tz] = useTimezone(options);
52
+ return react.useMemo(() => (date) => frontendCore.formatDateTime(date, tz), [tz]);
53
+ }
54
+ /** `25 MAY 2026, 02:30:45 PM` — audit rows where seconds matter. */
55
+ function useFormatDateTimeWithSeconds(options) {
56
+ const [tz] = useTimezone(options);
57
+ return react.useMemo(() => (date) => frontendCore.formatDateTimeWithSeconds(date, tz), [tz]);
58
+ }
59
+ /** `02:30 PM` */
60
+ function useFormatTime(options) {
61
+ const [tz] = useTimezone(options);
62
+ return react.useMemo(() => (date) => frontendCore.formatTime(date, tz), [tz]);
63
+ }
64
+
65
+ /**
66
+ * Boundary helpers bound to the user's current timezone preference.
67
+ * Re-memoises when the preference changes so date pickers / range
68
+ * builders pick up the new offset automatically.
69
+ */
70
+ function useTimezoneDate(options) {
71
+ const [tz] = useTimezone(options);
72
+ return react.useMemo(() => ({
73
+ tz,
74
+ startOfDay: (date) => frontendCore.startOfDayInTimezone(date, tz),
75
+ endOfDay: (date) => frontendCore.endOfDayInTimezone(date, tz),
76
+ parse: (iso) => frontendCore.parseInTimezone(iso, tz),
77
+ sameDay: (a, b) => frontendCore.sameDayInTimezone(a, b, tz),
78
+ toUtc: frontendCore.toUtcInstant,
79
+ }), [tz]);
80
+ }
81
+
82
+ exports.useFormatDate = useFormatDate;
83
+ exports.useFormatDateTime = useFormatDateTime;
84
+ exports.useFormatDateTimeWithSeconds = useFormatDateTimeWithSeconds;
85
+ exports.useFormatTime = useFormatTime;
86
+ exports.useTimezone = useTimezone;
87
+ exports.useTimezoneDate = useTimezoneDate;
88
+ //# sourceMappingURL=use-timezone-date-s1Ru9Fw6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-timezone-date-s1Ru9Fw6.js","sources":["../src/timezone/use-timezone.ts","../src/timezone/use-format-date.ts","../src/timezone/use-timezone-date.ts"],"sourcesContent":[null,null,null],"names":["DEFAULT_TIMEZONE","useState","useEffect","isValidTimezone","useCallback","useMemo","formatDate","formatDateTime","formatDateTimeWithSeconds","formatTime","startOfDayInTimezone","endOfDayInTimezone","parseInTimezone","sameDayInTimezone","toUtcInstant"],"mappings":"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"}
package/package.json CHANGED
@@ -1,83 +1,78 @@
1
1
  {
2
2
  "name": "@temboplus/frontend-react-core",
3
- "version": "0.1.3-beta.9",
4
- "repository": "https://github.com/TemboPlus-Frontend/temboplus-frontend-react-core",
3
+ "version": "0.1.4",
4
+ "description": "React hooks that wrap @temboplus/frontend-core primitives for use in React applications across the TemboPlus platform.",
5
5
  "author": "Okello Gerald",
6
6
  "license": "ISC",
7
- "description": "A React UI library for TemboPlus applications, providing reusable components, validators, and utilities for building consistent react applications across the platform.",
8
- "scripts": {
9
- "build:types": "tsc --project tsconfig.json",
10
- "build:js": "rollup -c rollup.config.js --configTsconfig tsconfig.json",
11
- "build:fix-dts": "node ./scripts/fix-dts.js",
12
- "build": "npm run build:types && npm run build:js && npm run build:fix-dts",
13
- "prepare": "npm run build",
14
- "dev": "npm run build -- --watch",
15
- "test": "vitest",
16
- "coverage": "vitest run --coverage"
17
- },
7
+ "keywords": [
8
+ "temboplus",
9
+ "frontend",
10
+ "react",
11
+ "hooks"
12
+ ],
18
13
  "type": "module",
14
+ "sideEffects": false,
19
15
  "main": "./dist/index.cjs.js",
20
16
  "module": "./dist/index.esm.js",
17
+ "types": "./dist/index.d.ts",
21
18
  "exports": {
22
19
  ".": {
20
+ "types": "./dist/index.d.ts",
23
21
  "import": "./dist/index.esm.js",
24
- "require": "./dist/index.cjs.js",
25
- "types": "./dist/index.d.ts"
26
- },
27
- "./theme": {
28
- "types": "./dist/theme/index.d.ts",
29
- "default": "./dist/theme/index.js"
22
+ "require": "./dist/index.cjs.js"
30
23
  },
31
- "./dialogs": {
32
- "types": "./dist/dialogs/index.d.ts",
33
- "default": "./dist/dialogs/index.js"
34
- },
35
- "./notifications": {
36
- "types": "./dist/notifications/index.d.ts",
37
- "default": "./dist/notifications/index.js"
38
- },
39
- "./alerts": {
40
- "types": "./dist/alerts/index.d.ts",
41
- "default": "./dist/alerts/index.js"
42
- },
43
- "./validation": {
44
- "types": "./dist/validation/index.d.ts",
45
- "default": "./dist/validation/index.js"
24
+ "./timezone": {
25
+ "types": "./dist/timezone/index.d.ts",
26
+ "default": "./dist/timezone/index.js"
46
27
  }
47
28
  },
48
29
  "files": [
49
30
  "dist"
50
31
  ],
51
- "keywords": [],
52
- "devDependencies": {
53
- "@rollup/plugin-alias": "^5.1.1",
54
- "@rollup/plugin-commonjs": "^28.0.6",
55
- "@rollup/plugin-json": "^6.1.0",
56
- "@rollup/plugin-node-resolve": "^16.0.1",
57
- "@rollup/plugin-terser": "^0.4.4",
58
- "@rollup/plugin-typescript": "^12.1.3",
59
- "@types/lodash": "^4.17.20",
60
- "@types/react": "^19.1.8",
61
- "@types/react-dom": "^19.1.6",
62
- "@vitest/coverage-v8": "^3.2.4",
63
- "antd": "5.26.2",
64
- "autoprefixer": "^10.4.21",
65
- "less": "^4.3.0",
66
- "postcss": "^8.5.6",
67
- "rollup": "^4.44.1",
68
- "rollup-plugin-peer-deps-external": "^2.2.4",
69
- "rollup-plugin-postcss": "^4.0.2",
70
- "rollup-plugin-typescript2": "^0.36.0",
71
- "typescript": "^5.8.3",
72
- "vitest": "^3.2.4"
32
+ "engines": {
33
+ "node": ">=20",
34
+ "bun": ">=1.1"
35
+ },
36
+ "scripts": {
37
+ "dev": "bun x rollup -c rollup.config.js --watch",
38
+ "build": "bun run build:types && bun run build:js",
39
+ "build:js": "bun x rollup -c rollup.config.js",
40
+ "build:types": "bun x tsc --project tsconfig.json --emitDeclarationOnly",
41
+ "test": "bun test --pass-with-no-tests",
42
+ "coverage": "bun test --coverage --pass-with-no-tests",
43
+ "lint": "bun x @biomejs/biome check src",
44
+ "format": "bun x @biomejs/biome check --write src",
45
+ "typecheck": "bun x tsc --noEmit",
46
+ "release": "echo 'Releases are tag-driven. Update CHANGELOG.md, bump version in package.json, then: git tag vX.Y.Z && git push origin main --tags'",
47
+ "prepublishOnly": "bun run typecheck && bun run test && bun run build"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/TemboPlus-Frontend/temboplus-frontend-react-core.git"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/TemboPlus-Frontend/temboplus-frontend-react-core/issues"
55
+ },
56
+ "homepage": "https://github.com/TemboPlus-Frontend/temboplus-frontend-react-core#readme",
57
+ "publishConfig": {
58
+ "access": "public",
59
+ "registry": "https://registry.npmjs.org"
60
+ },
61
+ "dependencies": {
62
+ "@temboplus/frontend-core": "^1.0.4",
63
+ "tslib": "^2.8.1"
73
64
  },
74
65
  "peerDependencies": {
75
- "@ebay/nice-modal-react": "^1.2.13",
76
- "@temboplus/frontend-core": "^0.2.20-beta.2",
77
- "antd": "^5.26.2",
78
- "react": "^19.1.0",
79
- "react-dom": "^19.1.0",
80
- "react-toastify": "^11.0.5",
81
- "lodash": "^4.17.21"
66
+ "react": "^19.2.3"
67
+ },
68
+ "devDependencies": {
69
+ "@biomejs/biome": "^2.4.16",
70
+ "@rollup/plugin-commonjs": "^29.0.0",
71
+ "@rollup/plugin-node-resolve": "^16.0.3",
72
+ "@rollup/plugin-typescript": "^12.3.0",
73
+ "@types/bun": "^1.3.14",
74
+ "@types/react": "^19.2.7",
75
+ "rollup": "^4.53.3",
76
+ "typescript": "^6.0.3"
82
77
  }
83
78
  }
@@ -1,7 +0,0 @@
1
- "use strict";var t=require("react");function n(t){if(t&&t.__esModule)return t;var n=Object.create(null);return t&&Object.keys(t).forEach(function(e){if("default"!==e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}}),n.default=t,Object.freeze(n)}var e=n(t);function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i=t.createContext({});function o(){return o=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},o.apply(null,arguments)}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function a(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(e=e.call(t)).next,0===n);else for(;!(c=(r=o.call(e)).done)&&(a.push(r.value),a.length!==n);c=!0);}catch(t){u=!0,i=t}finally{try{if(!c&&null!=e.return&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return s(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t){var n=function(t,n){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n);if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==c(n)?n:n+""}function l(t,n,e){return(n=u(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function h(t,n){if(null==t)return{};var e,r,i=function(t,n){if(null==t)return{};var e={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==n.indexOf(r))continue;e[r]=t[r]}return e}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)e=o[r],-1===n.indexOf(e)&&{}.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}var f,g={exports:{}};
2
- /*!
3
- Copyright (c) 2018 Jed Watson.
4
- Licensed under the MIT License (MIT), see
5
- http://jedwatson.github.io/classnames
6
- */var d,m=(f||(f=1,d=g,function(){var t={}.hasOwnProperty;function n(){for(var t="",n=0;n<arguments.length;n++){var i=arguments[n];i&&(t=r(t,e(i)))}return t}function e(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var i="";for(var o in e)t.call(e,o)&&e[o]&&(i=r(i,o));return i}function r(t,n){return n?t?t+" "+n:t+n:t}d.exports?(n.default=n,d.exports=n):window.classNames=n}()),g.exports),p=r(m);const v=Math.round;function b(t,n){const e=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=e.map(t=>parseFloat(t));for(let t=0;t<3;t+=1)r[t]=n(r[t]||0,e[t]||"",t);return e[3]?r[3]=e[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const y=(t,n,e)=>0===e?t:t/100;function x(t,n){const e=n||255;return t>e?e:t<0?0:t}class _{constructor(t){function n(n){return n[0]in t&&n[1]in t&&n[2]in t}if(l(this,"isValid",!0),l(this,"r",0),l(this,"g",0),l(this,"b",0),l(this,"a",1),l(this,"_h",void 0),l(this,"_s",void 0),l(this,"_l",void 0),l(this,"_v",void 0),l(this,"_max",void 0),l(this,"_min",void 0),l(this,"_brightness",void 0),t)if("string"==typeof t){const e=t.trim();function r(t){return e.startsWith(t)}/^#?[A-F\d]{3,8}$/i.test(e)?this.fromHexString(e):r("rgb")?this.fromRgbString(e):r("hsl")?this.fromHslString(e):(r("hsv")||r("hsb"))&&this.fromHsvString(e)}else if(t instanceof _)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=x(t.r),this.g=x(t.g),this.b=x(t.b),this.a="number"==typeof t.a?x(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else{if(!n("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t));this.fromHsv(t)}else;}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*t(this.r)+.7152*t(this.g)+.0722*t(this.b)}getHue(){if(void 0===this._h){const t=this.getMax()-this.getMin();this._h=0===t?0:v(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(void 0===this._s){const t=this.getMax()-this.getMin();this._s=0===t?0:t/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(t=10){const n=this.getHue(),e=this.getSaturation();let r=this.getLightness()-t/100;return r<0&&(r=0),this._c({h:n,s:e,l:r,a:this.a})}lighten(t=10){const n=this.getHue(),e=this.getSaturation();let r=this.getLightness()+t/100;return r>1&&(r=1),this._c({h:n,s:e,l:r,a:this.a})}mix(t,n=50){const e=this._c(t),r=n/100,i=t=>(e[t]-this[t])*r+this[t],o={r:v(i("r")),g:v(i("g")),b:v(i("b")),a:v(100*i("a"))/100};return this._c(o)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),e=this.a+n.a*(1-this.a),r=t=>v((this[t]*this.a+n[t]*n.a*(1-this.a))/e);return this._c({r:r("r"),g:r("g"),b:r("b"),a:e})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=2===n.length?n:"0"+n;const e=(this.g||0).toString(16);t+=2===e.length?e:"0"+e;const r=(this.b||0).toString(16);if(t+=2===r.length?r:"0"+r,"number"==typeof this.a&&this.a>=0&&this.a<1){const n=v(255*this.a).toString(16);t+=2===n.length?n:"0"+n}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=v(100*this.getSaturation()),e=v(100*this.getLightness());return 1!==this.a?`hsla(${t},${n}%,${e}%,${this.a})`:`hsl(${t},${n}%,${e}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,e){const r=this.clone();return r[t]=x(n,e),r}_c(t){return new this.constructor(t)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function e(t,e){return parseInt(n[t]+n[e||t],16)}n.length<6?(this.r=e(0),this.g=e(1),this.b=e(2),this.a=n[3]?e(3)/255:1):(this.r=e(0,1),this.g=e(2,3),this.b=e(4,5),this.a=n[6]?e(6,7)/255:1)}fromHsl({h:t,s:n,l:e,a:r}){if(this._h=t%360,this._s=n,this._l=e,this.a="number"==typeof r?r:1,n<=0){const t=v(255*e);this.r=t,this.g=t,this.b=t}let i=0,o=0,s=0;const a=t/60,c=(1-Math.abs(2*e-1))*n,u=c*(1-Math.abs(a%2-1));a>=0&&a<1?(i=c,o=u):a>=1&&a<2?(i=u,o=c):a>=2&&a<3?(o=c,s=u):a>=3&&a<4?(o=u,s=c):a>=4&&a<5?(i=u,s=c):a>=5&&a<6&&(i=c,s=u);const l=e-c/2;this.r=v(255*(i+l)),this.g=v(255*(o+l)),this.b=v(255*(s+l))}fromHsv({h:t,s:n,v:e,a:r}){this._h=t%360,this._s=n,this._v=e,this.a="number"==typeof r?r:1;const i=v(255*e);if(this.r=i,this.g=i,this.b=i,n<=0)return;const o=t/60,s=Math.floor(o),a=o-s,c=v(e*(1-n)*255),u=v(e*(1-n*a)*255),l=v(e*(1-n*(1-a))*255);switch(s){case 0:this.g=l,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=l;break;case 3:this.r=c,this.g=u;break;case 4:this.r=l,this.g=c;break;default:this.g=c,this.b=u}}fromHsvString(t){const n=b(t,y);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=b(t,y);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=b(t,(t,n)=>n.includes("%")?v(t/100*255):t);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var w=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function C(t,n,e){var r;return(r=Math.round(t.h)>=60&&Math.round(t.h)<=240?e?Math.round(t.h)-2*n:Math.round(t.h)+2*n:e?Math.round(t.h)+2*n:Math.round(t.h)-2*n)<0?r+=360:r>=360&&(r-=360),r}function S(t,n,e){return 0===t.h&&0===t.s?t.s:((r=e?t.s-.16*n:4===n?t.s+.16:t.s+.05*n)>1&&(r=1),e&&5===n&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function O(t,n,e){var r;return r=e?t.v+.05*n:t.v-.15*n,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}var M=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];function k(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,r)}return e}function E(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?k(Object(e),!0).forEach(function(n){l(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):k(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}M.primary=M[5];var N="data-rc-order",j="data-rc-priority",H=new Map;function T(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return t?t.startsWith("data-")?t:"data-".concat(t):"rc-util-key"}function A(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function $(t){return Array.from((H.get(t)||t).children).filter(function(t){return"STYLE"===t.tagName})}function P(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var e=n.csp,r=n.prepend,i=n.priority,o=void 0===i?0:i,s=function(t){return"queue"===t?"prependQueue":t?"prepend":"append"}(r),a="prependQueue"===s,c=document.createElement("style");c.setAttribute(N,s),a&&o&&c.setAttribute(j,"".concat(o)),null!=e&&e.nonce&&(c.nonce=null==e?void 0:e.nonce),c.innerHTML=t;var u=A(n),l=u.firstChild;if(r){if(a){var h=(n.styles||$(u)).filter(function(t){if(!["prepend","prependQueue"].includes(t.getAttribute(N)))return!1;var n=Number(t.getAttribute(j)||0);return o>=n});if(h.length)return u.insertBefore(c,h[h.length-1].nextSibling),c}u.insertBefore(c,l)}else u.appendChild(c);return c}function R(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=A(e),i=$(r),o=E(E({},e),{},{styles:i});!function(t,n){var e=H.get(t);if(!e||!function(t,n){if(!t)return!1;if(t.contains)return t.contains(n);for(var e=n;e;){if(e===t)return!0;e=e.parentNode}return!1}(document,e)){var r=P("",n),i=r.parentNode;H.set(t,i),t.removeChild(r)}}(r,o);var s=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=A(n);return(n.styles||$(e)).find(function(e){return e.getAttribute(T(n))===t})}(n,o);if(s){var a,c,u;if(null!==(a=o.csp)&&void 0!==a&&a.nonce&&s.nonce!==(null===(c=o.csp)||void 0===c?void 0:c.nonce))s.nonce=null===(u=o.csp)||void 0===u?void 0:u.nonce;return s.innerHTML!==t&&(s.innerHTML=t),s}var l=P(t,o);return l.setAttribute(T(o),n),l}function z(t){var n;return null==t||null===(n=t.getRootNode)||void 0===n?void 0:n.call(t)}function L(t){return function(t){return z(t)instanceof ShadowRoot}(t)?z(t):null}var I={},D=[];function B(t,n){if("production"!==process.env.NODE_ENV&&!t&&void 0!==console){var e=D.reduce(function(t,n){return n(null!=t?t:"","warning")},n);e&&console.error("Warning: ".concat(e))}}function V(t,n){if("production"!==process.env.NODE_ENV&&!t&&void 0!==console){var e=D.reduce(function(t,n){return n(null!=t?t:"","note")},n);e&&console.warn("Note: ".concat(e))}}function q(t,n,e){n||I[e]||(t(!1,e),I[e]=!0)}function W(t,n){q(B,t,n)}function Q(t){return"object"===c(t)&&"string"==typeof t.name&&"string"==typeof t.theme&&("object"===c(t.icon)||"function"==typeof t.icon)}function F(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).reduce(function(n,e){var r,i=t[e];if("class"===e)n.className=i,delete n.class;else delete n[e],n[(r=e,r.replace(/-(.)/g,function(t,n){return n.toUpperCase()}))]=i;return n},{})}function U(t,n,r){return r?e.default.createElement(t.tag,E(E({key:n},F(t.attrs)),r),(t.children||[]).map(function(e,r){return U(e,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.default.createElement(t.tag,E({key:n},F(t.attrs)),(t.children||[]).map(function(e,r){return U(e,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function G(t){return function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=[],r=new _(t),i=r.toHsv(),o=5;o>0;o-=1){var s=new _({h:C(i,o,!0),s:S(i,o,!0),v:O(i,o,!0)});e.push(s)}e.push(r);for(var a=1;a<=4;a+=1){var c=new _({h:C(i,a),s:S(i,a),v:O(i,a)});e.push(c)}return"dark"===n.theme?w.map(function(t){var r=t.index,i=t.amount;return new _(n.backgroundColor||"#141414").mix(e[r],i).toHexString()}):e.map(function(t){return t.toHexString()})}(t)[0]}function J(t){return t?Array.isArray(t)?t:[t]:[]}W.preMessage=function(t){D.push(t)},W.resetWarned=function(){I={}},W.noteOnce=function(t,n){q(V,t,n)};var Y=["icon","className","onClick","style","primaryColor","secondaryColor"],K={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var X=function(n){var r,o,s,a,c,u,l,f,g=n.icon,d=n.className,m=n.onClick,p=n.style,v=n.primaryColor,b=n.secondaryColor,y=h(n,Y),x=e.useRef(),_=K;if(v&&(_={primaryColor:v,secondaryColor:b||G(v)}),r=x,o=t.useContext(i),s=o.csp,a=o.prefixCls,c=o.layer,u="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",a&&(u=u.replace(/anticon/g,a)),c&&(u="@layer ".concat(c," {\n").concat(u,"\n}")),t.useEffect(function(){var t=L(r.current);R(u,"@ant-design-icons",{prepend:!c,csp:s,attachTo:t})},[]),l=Q(g),f="icon should be icon definiton, but got ".concat(g),W(l,"[@ant-design/icons] ".concat(f)),!Q(g))return null;var w=g;return w&&"function"==typeof w.icon&&(w=E(E({},w),{},{icon:w.icon(_.primaryColor,_.secondaryColor)})),U(w.icon,"svg-".concat(w.name),E(E({className:d,onClick:m,style:p,"data-icon":w.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},y),{},{ref:x}))};function Z(t){var n=a(J(t),2),e=n[0],r=n[1];return X.setTwoToneColors({primaryColor:e,secondaryColor:r})}X.displayName="IconReact",X.getTwoToneColors=function(){return E({},K)},X.setTwoToneColors=function(t){var n=t.primaryColor,e=t.secondaryColor;K.primaryColor=n,K.secondaryColor=e||G(n),K.calculated=!!e};var tt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Z(M.primary);var nt=e.forwardRef(function(t,n){var r=t.className,s=t.icon,c=t.spin,u=t.rotate,f=t.tabIndex,g=t.onClick,d=t.twoToneColor,m=h(t,tt),v=e.useContext(i),b=v.prefixCls,y=void 0===b?"anticon":b,x=v.rootClassName,_=p(x,y,l(l({},"".concat(y,"-").concat(s.name),!!s.name),"".concat(y,"-spin"),!!c||"loading"===s.name),r),w=f;void 0===w&&g&&(w=-1);var C=u?{msTransform:"rotate(".concat(u,"deg)"),transform:"rotate(".concat(u,"deg)")}:void 0,S=a(J(d),2),O=S[0],M=S[1];return e.createElement("span",o({role:"img","aria-label":s.name},m,{ref:n,tabIndex:w,onClick:g,className:_}),e.createElement(X,{icon:s,primaryColor:O,secondaryColor:M,style:C}))});nt.displayName="AntdIcon",nt.getTwoToneColor=function(){var t=X.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor},nt.setTwoToneColor=Z;var et={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},rt=function(t,n){return e.createElement(nt,o({},t,{ref:n,icon:et}))},it=e.forwardRef(rt);"production"!==process.env.NODE_ENV&&(it.displayName="CheckCircleOutlined");var ot={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},st=function(t,n){return e.createElement(nt,o({},t,{ref:n,icon:ot}))},at=e.forwardRef(st);"production"!==process.env.NODE_ENV&&(at.displayName="CloseCircleOutlined");var ct={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ut=function(t,n){return e.createElement(nt,o({},t,{ref:n,icon:ct}))},lt=e.forwardRef(ut);"production"!==process.env.NODE_ENV&&(lt.displayName="ExclamationCircleOutlined");var ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},ft=function(t,n){return e.createElement(nt,o({},t,{ref:n,icon:ht}))},gt=e.forwardRef(ft);"production"!==process.env.NODE_ENV&&(gt.displayName="InfoCircleOutlined"),exports.Icon=nt,exports.RefIcon=lt,exports.RefIcon$1=gt,exports.RefIcon$2=it,exports.RefIcon$3=at,exports._extends=o;
7
- //# sourceMappingURL=InfoCircleOutlined-B7d2aRfV.js.map