md-components-mdigial-azamat 0.0.109 → 0.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionCardList/ActionCardList.js +32 -7
- package/dist/ActionCardList/index.js +1 -1
- package/dist/ActionCardList/info.js +1 -1
- package/dist/ActionCardSecondaryList/ActionCardSecondaryList.js +32 -0
- package/dist/ActionCardSecondaryList/index.js +6 -0
- package/dist/ActionCardSecondaryList/info.js +11 -0
- package/dist/ActionCardSecondaryList/schema.js +51 -0
- package/dist/ActionCardSecondaryList/types.js +4 -0
- package/dist/ActionIconList/ActionIconList.js +29 -4
- package/dist/AllComponents.js +35 -9
- package/dist/AllComponentsInfo.js +107 -89
- package/dist/AnimatedSwiper/index.js +40 -38
- package/dist/ButtonsList/ButtonsList.js +25 -19
- package/dist/CardImageList/CardImageList.js +130 -73
- package/dist/CardImageList/info.js +1 -1
- package/dist/CardImageList/schema.js +62 -0
- package/dist/Cards/ActionSecondaryCard/ActionSecondaryCard.js +77 -0
- package/dist/Cards/ActionSecondaryCard/index.js +6 -0
- package/dist/Cards/ActionSecondaryCard/info.js +11 -0
- package/dist/Cards/ActionSecondaryCard/types.js +4 -0
- package/dist/Cards/CardImage/CardImage.js +100 -55
- package/dist/Cards/CardImage/index.js +6 -1
- package/dist/Cards/CardImage/info.js +1 -1
- package/dist/Cards/CardImage/schema.js +32 -0
- package/dist/Cards/CardImage/types.js +3 -2
- package/dist/Cards/InfoCard/InfoCard.js +114 -0
- package/dist/Cards/InfoCard/index.js +9 -0
- package/dist/Cards/InfoCard/info.js +11 -0
- package/dist/Cards/InfoCard/schema.js +60 -0
- package/dist/Cards/InfoCard/types.js +4 -0
- package/dist/Cards/PostCard/PostCard.js +60 -0
- package/dist/Cards/PostCard/index.js +6 -0
- package/dist/Cards/PostCard/info.js +11 -0
- package/dist/Cards/PostCard/types.js +4 -0
- package/dist/Cards/WarningCard/WarningCard.js +31 -6
- package/dist/Cards/WarningCard/index.js +1 -1
- package/dist/Cards/WarningCard/info.js +1 -1
- package/dist/Cards/WarningCard/model.js +1 -1
- package/dist/CurrencyRates/CurrencyRates.js +78 -0
- package/dist/CurrencyRates/components/Calculator.js +101 -0
- package/dist/CurrencyRates/components/RateCell.js +15 -0
- package/dist/CurrencyRates/components/RatesTable.js +134 -0
- package/dist/CurrencyRates/components/index.js +6 -0
- package/dist/CurrencyRates/index.js +8 -0
- package/dist/CurrencyRates/info.js +11 -0
- package/dist/CurrencyRates/schema.js +63 -0
- package/dist/CurrencyRates/types.js +4 -0
- package/dist/DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js +1 -1
- package/dist/DownloadFile/components/DownloadFileFull/DownloadFileFull.js +1 -1
- package/dist/DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js +1 -1
- package/dist/DownloadFile/components/DownloadFileMini/DownloadFileMini.js +1 -1
- package/dist/DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js +1 -1
- package/dist/Faq/Faq.js +1 -1
- package/dist/Faq/components/FeedbackForm/FeedbackForm.js +55 -6
- package/dist/Faq/components/FeedbackForm/index.js +1 -1
- package/dist/FieldInput-ef2a18d4.js +2743 -0
- package/dist/Flex-86aee720.js +78 -0
- package/dist/Footer/Footer.js +5 -5
- package/dist/Forms/FormDefault/FormDefault.js +12 -0
- package/dist/Forms/FormDefault/components/FieldCustom.js +11 -0
- package/dist/Forms/FormDefault/components/FieldInput.js +11 -0
- package/dist/Forms/FormDefault/components/FieldSection.js +10 -0
- package/dist/Forms/FormDefault/components/FormContent.js +10 -0
- package/dist/Forms/FormDefault/components/FormFields.js +7 -0
- package/dist/Forms/FormDefault/components/FormSuccessMessage.js +49 -0
- package/dist/Forms/FormDefault/components/index.js +6 -0
- package/dist/Forms/FormDefault/hooks/index.js +10 -0
- package/dist/Forms/FormDefault/hooks/useFieldOptions.js +32 -0
- package/dist/Forms/FormDefault/hooks/useFieldValidation.js +33 -0
- package/dist/Forms/FormDefault/hooks/useFieldVisibility.js +24 -0
- package/dist/Forms/FormDefault/hooks/useFormSubmission.js +64 -0
- package/dist/Forms/FormDefault/index.js +6 -12
- package/dist/Forms/FormDefault/info.js +3 -113
- package/dist/Forms/FormDefault/model/componentRegistry.js +134 -0
- package/dist/Forms/FormDefault/model/fieldTypes.js +18 -0
- package/dist/Forms/FormDefault/model/formElementTypes.js +18 -0
- package/dist/Forms/FormDefault/model/index.js +13 -0
- package/dist/Forms/FormDefault/model/requestForm.js +4 -0
- package/dist/Forms/{model/components.js → FormDefault/schema.js} +36 -7
- package/dist/Forms/FormDefault/utils.js +20 -0
- package/dist/Grid-331af266.js +80 -0
- package/dist/Header/Header.js +54 -42
- package/dist/Header/components/HeaderMainMobile/HeaderMainMobile.js +26 -24
- package/dist/Header/components/HeaderMobile/HeaderMobile.js +67 -52
- package/dist/Header/components/HeaderSearch/HeaderSearch.js +1 -1
- package/dist/Header/components/HeaderTab/HeaderTab.js +17 -15
- package/dist/Header/components/HeaderTabsMobile/HeaderTabsMobile.js +10 -9
- package/dist/Header/components/HeaderWeb/HeaderWeb.js +134 -114
- package/dist/Header/components/TabsOutlined/TabsOutlined.js +8 -7
- package/dist/HeroIconsBanner/HeroIconsBanner.js +71 -54
- package/dist/IconList/IconList.js +59 -33
- package/dist/InfoCardList/InfoCardList.js +100 -0
- package/dist/InfoCardList/index.js +6 -0
- package/dist/InfoCardList/info.js +11 -0
- package/dist/InfoCardList/schema.js +39 -0
- package/dist/InfoCardList/types.js +1 -0
- package/dist/ModalBody/index.js +1 -1
- package/dist/PageViewer/renderComponents.js +1 -1
- package/dist/PostsList/PostsList.js +78 -0
- package/dist/PostsList/index.js +4 -0
- package/dist/PostsList/info.js +11 -0
- package/dist/PostsList/schema.js +49 -0
- package/dist/PostsList/types.js +1 -0
- package/dist/PostsSlider/PostsSlider.js +78 -0
- package/dist/PostsSlider/index.js +4 -0
- package/dist/PostsSlider/info.js +11 -0
- package/dist/PostsSlider/schema.js +49 -0
- package/dist/PostsSlider/types.js +1 -0
- package/dist/PreviewList/PreviewList.js +19 -19
- package/dist/PreviewList/components/PreviewCard/PreviewCard.js +29 -29
- package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
- package/dist/RenderAllComponents/const.js +1 -1
- package/dist/SearchBlock/SearchBlock.js +101 -0
- package/dist/SearchBlock/index.js +4 -0
- package/dist/SearchBlock/info.js +11 -0
- package/dist/SearchBlock/schema.js +36 -0
- package/dist/SegmentedContent/SegmentedContent.js +160 -0
- package/dist/SegmentedContent/components/ContentCard.js +50 -0
- package/dist/SegmentedContent/components/index.js +4 -0
- package/dist/SegmentedContent/index.js +8 -0
- package/dist/SegmentedContent/info.js +12 -0
- package/dist/SegmentedContent/schema.js +108 -0
- package/dist/SegmentedContent/types.js +1 -0
- package/dist/Segments/Segments.js +36 -28
- package/dist/Segments/index.js +8 -2
- package/dist/Segments/info.js +1 -1
- package/dist/Segments/schema.js +21 -0
- package/dist/Segments/types.js +4 -1
- package/dist/SegmentsIcons/SegmentsIcons.js +92 -0
- package/dist/SegmentsIcons/index.js +8 -0
- package/dist/SegmentsIcons/info.js +11 -0
- package/dist/SegmentsIcons/schema.js +14 -0
- package/dist/SegmentsIcons/types.js +1 -0
- package/dist/SwiperList/SwiperList.js +13 -11
- package/dist/assets/index.css +1 -1
- package/dist/{clientApi-642fea4b.js → clientApi-ccb08ba6.js} +7 -7
- package/dist/{componentsMap-855b1df7.js → componentsMap-29ccdfcc.js} +6 -3
- package/dist/{data.mock-182979d1.js → data.mock-bb32e8ee.js} +485 -133
- package/dist/index-0791c17f.js +56 -0
- package/dist/index-2ec92a04.js +32 -0
- package/dist/{index-497f59a8.js → index-b795390d.js} +23 -20
- package/dist/index.esm-0558519f.js +1171 -0
- package/dist/{index.module-c8833286.js → index.module-8835bf96.js} +1 -1
- package/dist/info-72904479.js +791 -0
- package/dist/main.js +151 -116
- package/dist/{mousewheel-865ae601.js → mousewheel-afbc6d42.js} +1 -1
- package/dist/navigation-266856e7.js +136 -0
- package/dist/navigation-cd786a0d.js +133 -0
- package/dist/{palette-c2fe86ec.js → palette-256cf77a.js} +3 -1
- package/dist/{swiper-react-90953710.js → swiper-react-3c2710e8.js} +695 -825
- package/dist/trash/HeroLargeCards/index.js +7 -6
- package/dist/types-c3843cc0.js +4 -0
- package/dist/useDraggableScroll-440da9b7.js +29 -0
- package/dist/useTranslation-d7a3ca6f.js +298 -0
- package/package.json +1 -1
- package/dist/FileLoader/fileLoader.js +0 -22
- package/dist/FileLoader/index.js +0 -8
- package/dist/Forms/FormDefault/componentTypes.js +0 -31
- package/dist/Forms/FormDefault/fieldTypesList.js +0 -45
- package/dist/Forms/helpers/renderFormFields.js +0 -7
- package/dist/Forms/model/requestForm.js +0 -4
- package/dist/index-6686852d.js +0 -1794
- package/dist/index-a0ed2e4a.js +0 -1221
- package/dist/info-34fbb2a8.js +0 -1534
- package/dist/navigation-b894d0cd.js +0 -183
- /package/dist/Forms/{types/formItems.js → FormDefault/model/types.js} +0 -0
|
@@ -0,0 +1,2743 @@
|
|
|
1
|
+
import { jsxs as C, jsx as i, Fragment as Le } from "react/jsx-runtime";
|
|
2
|
+
import { b as Hn, C as _n } from "./index.esm-0558519f.js";
|
|
3
|
+
import Me, { forwardRef as W, useRef as Ue, useDebugValue as Lt, createElement as $n, useContext as jn, useState as U, useCallback as fe, useEffect as ze, useImperativeHandle as Jt, useMemo as Qt } from "react";
|
|
4
|
+
import { F } from "./Flex-86aee720.js";
|
|
5
|
+
import { C as zn } from "./index-2ec92a04.js";
|
|
6
|
+
import { c as P } from "./cn-6a4bf187.js";
|
|
7
|
+
import { u as Ve } from "./useTranslation-d7a3ca6f.js";
|
|
8
|
+
import { C as Bn, a as Gn } from "./index-0791c17f.js";
|
|
9
|
+
import { u as en } from "./useClickOutside-197b0df2.js";
|
|
10
|
+
import { useFieldVisibility as Zn } from "./Forms/FormDefault/hooks/useFieldVisibility.js";
|
|
11
|
+
import { useFieldOptions as Wn } from "./Forms/FormDefault/hooks/useFieldOptions.js";
|
|
12
|
+
import { useFieldValidation as Yn } from "./Forms/FormDefault/hooks/useFieldValidation.js";
|
|
13
|
+
const tn = W(
|
|
14
|
+
({ className: e, label: t, error: n, ...r }, o) => /* @__PURE__ */ C("div", { children: [
|
|
15
|
+
/* @__PURE__ */ C(
|
|
16
|
+
F,
|
|
17
|
+
{
|
|
18
|
+
align: "center",
|
|
19
|
+
gap: 8,
|
|
20
|
+
as: "label",
|
|
21
|
+
className: "cursor-pointer group w-fit",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ C(
|
|
24
|
+
F,
|
|
25
|
+
{
|
|
26
|
+
align: "center",
|
|
27
|
+
justify: "center",
|
|
28
|
+
className: "relative",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ i(
|
|
31
|
+
"input",
|
|
32
|
+
{
|
|
33
|
+
type: "checkbox",
|
|
34
|
+
className: "peer sr-only",
|
|
35
|
+
ref: o,
|
|
36
|
+
...r
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ i(
|
|
40
|
+
F,
|
|
41
|
+
{
|
|
42
|
+
align: "center",
|
|
43
|
+
justify: "center",
|
|
44
|
+
className: P(
|
|
45
|
+
"size-5 rounded-md border transition-all duration-200",
|
|
46
|
+
"border-grayBlue bg-white text-transparent",
|
|
47
|
+
"peer-checked:bg-greenLight peer-checked:border-greenLight peer-checked:text-white",
|
|
48
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-greenLight peer-focus-visible:ring-offset-2",
|
|
49
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
50
|
+
"group-hover:border-greenLight",
|
|
51
|
+
e
|
|
52
|
+
),
|
|
53
|
+
children: /* @__PURE__ */ i(zn, { className: "size-3 transition-opacity duration-200" })
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
t && /* @__PURE__ */ i(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
className: P(
|
|
63
|
+
"text-sm text-graySoft select-none group-hover:text-blackBG transition-colors duration-200"
|
|
64
|
+
),
|
|
65
|
+
children: t
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
n && /* @__PURE__ */ i("p", { className: "mt-1 text-sm text-red", children: n })
|
|
72
|
+
] })
|
|
73
|
+
);
|
|
74
|
+
tn.displayName = "Checkbox";
|
|
75
|
+
const nn = W(
|
|
76
|
+
({
|
|
77
|
+
label: e,
|
|
78
|
+
options: t = [],
|
|
79
|
+
value: n,
|
|
80
|
+
onChange: r,
|
|
81
|
+
error: o,
|
|
82
|
+
className: a,
|
|
83
|
+
direction: s = "column"
|
|
84
|
+
}, l) => {
|
|
85
|
+
const c = Array.isArray(n) ? n : [], p = (f) => {
|
|
86
|
+
if (!r)
|
|
87
|
+
return;
|
|
88
|
+
const h = c.includes(f) ? c.filter((u) => u !== f) : [...c, f];
|
|
89
|
+
r(h);
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ C(
|
|
92
|
+
F,
|
|
93
|
+
{
|
|
94
|
+
ref: l,
|
|
95
|
+
vertical: !0,
|
|
96
|
+
gap: 12,
|
|
97
|
+
className: P(a),
|
|
98
|
+
children: [
|
|
99
|
+
e && /* @__PURE__ */ i("label", { className: "text-sm font-medium text-blackBG py-1", children: e }),
|
|
100
|
+
/* @__PURE__ */ C("div", { children: [
|
|
101
|
+
/* @__PURE__ */ i(
|
|
102
|
+
F,
|
|
103
|
+
{
|
|
104
|
+
gap: 16,
|
|
105
|
+
className: P(
|
|
106
|
+
"w-full",
|
|
107
|
+
s === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
108
|
+
),
|
|
109
|
+
children: t == null ? void 0 : t.map((f) => /* @__PURE__ */ i(
|
|
110
|
+
tn,
|
|
111
|
+
{
|
|
112
|
+
label: f == null ? void 0 : f.label,
|
|
113
|
+
checked: c.includes(f == null ? void 0 : f.value),
|
|
114
|
+
onChange: () => p(f == null ? void 0 : f.value)
|
|
115
|
+
},
|
|
116
|
+
f == null ? void 0 : f.value
|
|
117
|
+
))
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
o && /* @__PURE__ */ i("p", { className: "mt-1 text-sm text-red", children: o })
|
|
121
|
+
] })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
nn.displayName = "CheckboxGroup";
|
|
128
|
+
var H = function() {
|
|
129
|
+
return H = Object.assign || function(t) {
|
|
130
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
131
|
+
n = arguments[r];
|
|
132
|
+
for (var a in n)
|
|
133
|
+
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
134
|
+
}
|
|
135
|
+
return t;
|
|
136
|
+
}, H.apply(this, arguments);
|
|
137
|
+
};
|
|
138
|
+
function ge(e, t, n) {
|
|
139
|
+
if (n || arguments.length === 2)
|
|
140
|
+
for (var r = 0, o = t.length, a; r < o; r++)
|
|
141
|
+
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
|
|
142
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
143
|
+
}
|
|
144
|
+
function Un(e) {
|
|
145
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
146
|
+
return function(n) {
|
|
147
|
+
return t[n] === void 0 && (t[n] = e(n)), t[n];
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
var qn = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Xn = /* @__PURE__ */ Un(
|
|
151
|
+
function(e) {
|
|
152
|
+
return qn.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
153
|
+
}
|
|
154
|
+
/* Z+1 */
|
|
155
|
+
), A = "-ms-", De = "-moz-", D = "-webkit-", rn = "comm", Je = "rule", wt = "decl", Kn = "@import", on = "@keyframes", Jn = "@layer", an = Math.abs, xt = String.fromCharCode, pt = Object.assign;
|
|
156
|
+
function Qn(e, t) {
|
|
157
|
+
return R(e, 0) ^ 45 ? (((t << 2 ^ R(e, 0)) << 2 ^ R(e, 1)) << 2 ^ R(e, 2)) << 2 ^ R(e, 3) : 0;
|
|
158
|
+
}
|
|
159
|
+
function sn(e) {
|
|
160
|
+
return e.trim();
|
|
161
|
+
}
|
|
162
|
+
function K(e, t) {
|
|
163
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
164
|
+
}
|
|
165
|
+
function v(e, t, n) {
|
|
166
|
+
return e.replace(t, n);
|
|
167
|
+
}
|
|
168
|
+
function Be(e, t, n) {
|
|
169
|
+
return e.indexOf(t, n);
|
|
170
|
+
}
|
|
171
|
+
function R(e, t) {
|
|
172
|
+
return e.charCodeAt(t) | 0;
|
|
173
|
+
}
|
|
174
|
+
function me(e, t, n) {
|
|
175
|
+
return e.slice(t, n);
|
|
176
|
+
}
|
|
177
|
+
function Y(e) {
|
|
178
|
+
return e.length;
|
|
179
|
+
}
|
|
180
|
+
function cn(e) {
|
|
181
|
+
return e.length;
|
|
182
|
+
}
|
|
183
|
+
function Ee(e, t) {
|
|
184
|
+
return t.push(e), e;
|
|
185
|
+
}
|
|
186
|
+
function er(e, t) {
|
|
187
|
+
return e.map(t).join("");
|
|
188
|
+
}
|
|
189
|
+
function Et(e, t) {
|
|
190
|
+
return e.filter(function(n) {
|
|
191
|
+
return !K(n, t);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
var Qe = 1, ye = 1, ln = 0, z = 0, I = 0, xe = "";
|
|
195
|
+
function et(e, t, n, r, o, a, s, l) {
|
|
196
|
+
return { value: e, root: t, parent: n, type: r, props: o, children: a, line: Qe, column: ye, length: s, return: "", siblings: l };
|
|
197
|
+
}
|
|
198
|
+
function ne(e, t) {
|
|
199
|
+
return pt(et("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
200
|
+
}
|
|
201
|
+
function he(e) {
|
|
202
|
+
for (; e.root; )
|
|
203
|
+
e = ne(e.root, { children: [e] });
|
|
204
|
+
Ee(e, e.siblings);
|
|
205
|
+
}
|
|
206
|
+
function tr() {
|
|
207
|
+
return I;
|
|
208
|
+
}
|
|
209
|
+
function nr() {
|
|
210
|
+
return I = z > 0 ? R(xe, --z) : 0, ye--, I === 10 && (ye = 1, Qe--), I;
|
|
211
|
+
}
|
|
212
|
+
function Z() {
|
|
213
|
+
return I = z < ln ? R(xe, z++) : 0, ye++, I === 10 && (ye = 1, Qe++), I;
|
|
214
|
+
}
|
|
215
|
+
function le() {
|
|
216
|
+
return R(xe, z);
|
|
217
|
+
}
|
|
218
|
+
function Ge() {
|
|
219
|
+
return z;
|
|
220
|
+
}
|
|
221
|
+
function tt(e, t) {
|
|
222
|
+
return me(xe, e, t);
|
|
223
|
+
}
|
|
224
|
+
function ht(e) {
|
|
225
|
+
switch (e) {
|
|
226
|
+
case 0:
|
|
227
|
+
case 9:
|
|
228
|
+
case 10:
|
|
229
|
+
case 13:
|
|
230
|
+
case 32:
|
|
231
|
+
return 5;
|
|
232
|
+
case 33:
|
|
233
|
+
case 43:
|
|
234
|
+
case 44:
|
|
235
|
+
case 47:
|
|
236
|
+
case 62:
|
|
237
|
+
case 64:
|
|
238
|
+
case 126:
|
|
239
|
+
case 59:
|
|
240
|
+
case 123:
|
|
241
|
+
case 125:
|
|
242
|
+
return 4;
|
|
243
|
+
case 58:
|
|
244
|
+
return 3;
|
|
245
|
+
case 34:
|
|
246
|
+
case 39:
|
|
247
|
+
case 40:
|
|
248
|
+
case 91:
|
|
249
|
+
return 2;
|
|
250
|
+
case 41:
|
|
251
|
+
case 93:
|
|
252
|
+
return 1;
|
|
253
|
+
}
|
|
254
|
+
return 0;
|
|
255
|
+
}
|
|
256
|
+
function rr(e) {
|
|
257
|
+
return Qe = ye = 1, ln = Y(xe = e), z = 0, [];
|
|
258
|
+
}
|
|
259
|
+
function or(e) {
|
|
260
|
+
return xe = "", e;
|
|
261
|
+
}
|
|
262
|
+
function it(e) {
|
|
263
|
+
return sn(tt(z - 1, ft(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
264
|
+
}
|
|
265
|
+
function ar(e) {
|
|
266
|
+
for (; (I = le()) && I < 33; )
|
|
267
|
+
Z();
|
|
268
|
+
return ht(e) > 2 || ht(I) > 3 ? "" : " ";
|
|
269
|
+
}
|
|
270
|
+
function sr(e, t) {
|
|
271
|
+
for (; --t && Z() && !(I < 48 || I > 102 || I > 57 && I < 65 || I > 70 && I < 97); )
|
|
272
|
+
;
|
|
273
|
+
return tt(e, Ge() + (t < 6 && le() == 32 && Z() == 32));
|
|
274
|
+
}
|
|
275
|
+
function ft(e) {
|
|
276
|
+
for (; Z(); )
|
|
277
|
+
switch (I) {
|
|
278
|
+
case e:
|
|
279
|
+
return z;
|
|
280
|
+
case 34:
|
|
281
|
+
case 39:
|
|
282
|
+
e !== 34 && e !== 39 && ft(I);
|
|
283
|
+
break;
|
|
284
|
+
case 40:
|
|
285
|
+
e === 41 && ft(e);
|
|
286
|
+
break;
|
|
287
|
+
case 92:
|
|
288
|
+
Z();
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
return z;
|
|
292
|
+
}
|
|
293
|
+
function ir(e, t) {
|
|
294
|
+
for (; Z() && e + I !== 47 + 10; )
|
|
295
|
+
if (e + I === 42 + 42 && le() === 47)
|
|
296
|
+
break;
|
|
297
|
+
return "/*" + tt(t, z - 1) + "*" + xt(e === 47 ? e : Z());
|
|
298
|
+
}
|
|
299
|
+
function cr(e) {
|
|
300
|
+
for (; !ht(le()); )
|
|
301
|
+
Z();
|
|
302
|
+
return tt(e, z);
|
|
303
|
+
}
|
|
304
|
+
function lr(e) {
|
|
305
|
+
return or(Ze("", null, null, null, [""], e = rr(e), 0, [0], e));
|
|
306
|
+
}
|
|
307
|
+
function Ze(e, t, n, r, o, a, s, l, c) {
|
|
308
|
+
for (var p = 0, f = 0, h = s, u = 0, d = 0, g = 0, m = 1, N = 1, k = 1, L = 0, S = "", w = o, x = a, b = r, y = S; N; )
|
|
309
|
+
switch (g = L, L = Z()) {
|
|
310
|
+
case 40:
|
|
311
|
+
if (g != 108 && R(y, h - 1) == 58) {
|
|
312
|
+
Be(y += v(it(L), "&", "&\f"), "&\f", an(p ? l[p - 1] : 0)) != -1 && (k = -1);
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
case 34:
|
|
316
|
+
case 39:
|
|
317
|
+
case 91:
|
|
318
|
+
y += it(L);
|
|
319
|
+
break;
|
|
320
|
+
case 9:
|
|
321
|
+
case 10:
|
|
322
|
+
case 13:
|
|
323
|
+
case 32:
|
|
324
|
+
y += ar(g);
|
|
325
|
+
break;
|
|
326
|
+
case 92:
|
|
327
|
+
y += sr(Ge() - 1, 7);
|
|
328
|
+
continue;
|
|
329
|
+
case 47:
|
|
330
|
+
switch (le()) {
|
|
331
|
+
case 42:
|
|
332
|
+
case 47:
|
|
333
|
+
Ee(dr(ir(Z(), Ge()), t, n, c), c);
|
|
334
|
+
break;
|
|
335
|
+
default:
|
|
336
|
+
y += "/";
|
|
337
|
+
}
|
|
338
|
+
break;
|
|
339
|
+
case 123 * m:
|
|
340
|
+
l[p++] = Y(y) * k;
|
|
341
|
+
case 125 * m:
|
|
342
|
+
case 59:
|
|
343
|
+
case 0:
|
|
344
|
+
switch (L) {
|
|
345
|
+
case 0:
|
|
346
|
+
case 125:
|
|
347
|
+
N = 0;
|
|
348
|
+
case 59 + f:
|
|
349
|
+
k == -1 && (y = v(y, /\f/g, "")), d > 0 && Y(y) - h && Ee(d > 32 ? Mt(y + ";", r, n, h - 1, c) : Mt(v(y, " ", "") + ";", r, n, h - 2, c), c);
|
|
350
|
+
break;
|
|
351
|
+
case 59:
|
|
352
|
+
y += ";";
|
|
353
|
+
default:
|
|
354
|
+
if (Ee(b = Dt(y, t, n, p, f, o, l, S, w = [], x = [], h, a), a), L === 123)
|
|
355
|
+
if (f === 0)
|
|
356
|
+
Ze(y, t, b, b, w, a, h, l, x);
|
|
357
|
+
else
|
|
358
|
+
switch (u === 99 && R(y, 3) === 110 ? 100 : u) {
|
|
359
|
+
case 100:
|
|
360
|
+
case 108:
|
|
361
|
+
case 109:
|
|
362
|
+
case 115:
|
|
363
|
+
Ze(e, b, b, r && Ee(Dt(e, b, b, 0, 0, o, l, S, o, w = [], h, x), x), o, x, h, l, r ? w : x);
|
|
364
|
+
break;
|
|
365
|
+
default:
|
|
366
|
+
Ze(y, b, b, b, [""], x, 0, l, x);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
p = f = d = 0, m = k = 1, S = y = "", h = s;
|
|
370
|
+
break;
|
|
371
|
+
case 58:
|
|
372
|
+
h = 1 + Y(y), d = g;
|
|
373
|
+
default:
|
|
374
|
+
if (m < 1) {
|
|
375
|
+
if (L == 123)
|
|
376
|
+
--m;
|
|
377
|
+
else if (L == 125 && m++ == 0 && nr() == 125)
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
switch (y += xt(L), L * m) {
|
|
381
|
+
case 38:
|
|
382
|
+
k = f > 0 ? 1 : (y += "\f", -1);
|
|
383
|
+
break;
|
|
384
|
+
case 44:
|
|
385
|
+
l[p++] = (Y(y) - 1) * k, k = 1;
|
|
386
|
+
break;
|
|
387
|
+
case 64:
|
|
388
|
+
le() === 45 && (y += it(Z())), u = le(), f = h = Y(S = y += cr(Ge())), L++;
|
|
389
|
+
break;
|
|
390
|
+
case 45:
|
|
391
|
+
g === 45 && Y(y) == 2 && (m = 0);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return a;
|
|
395
|
+
}
|
|
396
|
+
function Dt(e, t, n, r, o, a, s, l, c, p, f, h) {
|
|
397
|
+
for (var u = o - 1, d = o === 0 ? a : [""], g = cn(d), m = 0, N = 0, k = 0; m < r; ++m)
|
|
398
|
+
for (var L = 0, S = me(e, u + 1, u = an(N = s[m])), w = e; L < g; ++L)
|
|
399
|
+
(w = sn(N > 0 ? d[L] + " " + S : v(S, /&\f/g, d[L]))) && (c[k++] = w);
|
|
400
|
+
return et(e, t, n, o === 0 ? Je : l, c, p, f, h);
|
|
401
|
+
}
|
|
402
|
+
function dr(e, t, n, r) {
|
|
403
|
+
return et(e, t, n, rn, xt(tr()), me(e, 2, -2), 0, r);
|
|
404
|
+
}
|
|
405
|
+
function Mt(e, t, n, r, o) {
|
|
406
|
+
return et(e, t, n, wt, me(e, 0, r), me(e, r + 1, -1), r, o);
|
|
407
|
+
}
|
|
408
|
+
function dn(e, t, n) {
|
|
409
|
+
switch (Qn(e, t)) {
|
|
410
|
+
case 5103:
|
|
411
|
+
return D + "print-" + e + e;
|
|
412
|
+
case 5737:
|
|
413
|
+
case 4201:
|
|
414
|
+
case 3177:
|
|
415
|
+
case 3433:
|
|
416
|
+
case 1641:
|
|
417
|
+
case 4457:
|
|
418
|
+
case 2921:
|
|
419
|
+
case 5572:
|
|
420
|
+
case 6356:
|
|
421
|
+
case 5844:
|
|
422
|
+
case 3191:
|
|
423
|
+
case 6645:
|
|
424
|
+
case 3005:
|
|
425
|
+
case 6391:
|
|
426
|
+
case 5879:
|
|
427
|
+
case 5623:
|
|
428
|
+
case 6135:
|
|
429
|
+
case 4599:
|
|
430
|
+
case 4855:
|
|
431
|
+
case 4215:
|
|
432
|
+
case 6389:
|
|
433
|
+
case 5109:
|
|
434
|
+
case 5365:
|
|
435
|
+
case 5621:
|
|
436
|
+
case 3829:
|
|
437
|
+
return D + e + e;
|
|
438
|
+
case 4789:
|
|
439
|
+
return De + e + e;
|
|
440
|
+
case 5349:
|
|
441
|
+
case 4246:
|
|
442
|
+
case 4810:
|
|
443
|
+
case 6968:
|
|
444
|
+
case 2756:
|
|
445
|
+
return D + e + De + e + A + e + e;
|
|
446
|
+
case 5936:
|
|
447
|
+
switch (R(e, t + 11)) {
|
|
448
|
+
case 114:
|
|
449
|
+
return D + e + A + v(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
450
|
+
case 108:
|
|
451
|
+
return D + e + A + v(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
452
|
+
case 45:
|
|
453
|
+
return D + e + A + v(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
454
|
+
}
|
|
455
|
+
case 6828:
|
|
456
|
+
case 4268:
|
|
457
|
+
case 2903:
|
|
458
|
+
return D + e + A + e + e;
|
|
459
|
+
case 6165:
|
|
460
|
+
return D + e + A + "flex-" + e + e;
|
|
461
|
+
case 5187:
|
|
462
|
+
return D + e + v(e, /(\w+).+(:[^]+)/, D + "box-$1$2" + A + "flex-$1$2") + e;
|
|
463
|
+
case 5443:
|
|
464
|
+
return D + e + A + "flex-item-" + v(e, /flex-|-self/g, "") + (K(e, /flex-|baseline/) ? "" : A + "grid-row-" + v(e, /flex-|-self/g, "")) + e;
|
|
465
|
+
case 4675:
|
|
466
|
+
return D + e + A + "flex-line-pack" + v(e, /align-content|flex-|-self/g, "") + e;
|
|
467
|
+
case 5548:
|
|
468
|
+
return D + e + A + v(e, "shrink", "negative") + e;
|
|
469
|
+
case 5292:
|
|
470
|
+
return D + e + A + v(e, "basis", "preferred-size") + e;
|
|
471
|
+
case 6060:
|
|
472
|
+
return D + "box-" + v(e, "-grow", "") + D + e + A + v(e, "grow", "positive") + e;
|
|
473
|
+
case 4554:
|
|
474
|
+
return D + v(e, /([^-])(transform)/g, "$1" + D + "$2") + e;
|
|
475
|
+
case 6187:
|
|
476
|
+
return v(v(v(e, /(zoom-|grab)/, D + "$1"), /(image-set)/, D + "$1"), e, "") + e;
|
|
477
|
+
case 5495:
|
|
478
|
+
case 3959:
|
|
479
|
+
return v(e, /(image-set\([^]*)/, D + "$1$`$1");
|
|
480
|
+
case 4968:
|
|
481
|
+
return v(v(e, /(.+:)(flex-)?(.*)/, D + "box-pack:$3" + A + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + D + e + e;
|
|
482
|
+
case 4200:
|
|
483
|
+
if (!K(e, /flex-|baseline/))
|
|
484
|
+
return A + "grid-column-align" + me(e, t) + e;
|
|
485
|
+
break;
|
|
486
|
+
case 2592:
|
|
487
|
+
case 3360:
|
|
488
|
+
return A + v(e, "template-", "") + e;
|
|
489
|
+
case 4384:
|
|
490
|
+
case 3616:
|
|
491
|
+
return n && n.some(function(r, o) {
|
|
492
|
+
return t = o, K(r.props, /grid-\w+-end/);
|
|
493
|
+
}) ? ~Be(e + (n = n[t].value), "span", 0) ? e : A + v(e, "-start", "") + e + A + "grid-row-span:" + (~Be(n, "span", 0) ? K(n, /\d+/) : +K(n, /\d+/) - +K(e, /\d+/)) + ";" : A + v(e, "-start", "") + e;
|
|
494
|
+
case 4896:
|
|
495
|
+
case 4128:
|
|
496
|
+
return n && n.some(function(r) {
|
|
497
|
+
return K(r.props, /grid-\w+-start/);
|
|
498
|
+
}) ? e : A + v(v(e, "-end", "-span"), "span ", "") + e;
|
|
499
|
+
case 4095:
|
|
500
|
+
case 3583:
|
|
501
|
+
case 4068:
|
|
502
|
+
case 2532:
|
|
503
|
+
return v(e, /(.+)-inline(.+)/, D + "$1$2") + e;
|
|
504
|
+
case 8116:
|
|
505
|
+
case 7059:
|
|
506
|
+
case 5753:
|
|
507
|
+
case 5535:
|
|
508
|
+
case 5445:
|
|
509
|
+
case 5701:
|
|
510
|
+
case 4933:
|
|
511
|
+
case 4677:
|
|
512
|
+
case 5533:
|
|
513
|
+
case 5789:
|
|
514
|
+
case 5021:
|
|
515
|
+
case 4765:
|
|
516
|
+
if (Y(e) - 1 - t > 6)
|
|
517
|
+
switch (R(e, t + 1)) {
|
|
518
|
+
case 109:
|
|
519
|
+
if (R(e, t + 4) !== 45)
|
|
520
|
+
break;
|
|
521
|
+
case 102:
|
|
522
|
+
return v(e, /(.+:)(.+)-([^]+)/, "$1" + D + "$2-$3$1" + De + (R(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
523
|
+
case 115:
|
|
524
|
+
return ~Be(e, "stretch", 0) ? dn(v(e, "stretch", "fill-available"), t, n) + e : e;
|
|
525
|
+
}
|
|
526
|
+
break;
|
|
527
|
+
case 5152:
|
|
528
|
+
case 5920:
|
|
529
|
+
return v(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, a, s, l, c, p) {
|
|
530
|
+
return A + o + ":" + a + p + (s ? A + o + "-span:" + (l ? c : +c - +a) + p : "") + e;
|
|
531
|
+
});
|
|
532
|
+
case 4949:
|
|
533
|
+
if (R(e, t + 6) === 121)
|
|
534
|
+
return v(e, ":", ":" + D) + e;
|
|
535
|
+
break;
|
|
536
|
+
case 6444:
|
|
537
|
+
switch (R(e, R(e, 14) === 45 ? 18 : 11)) {
|
|
538
|
+
case 120:
|
|
539
|
+
return v(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + D + (R(e, 14) === 45 ? "inline-" : "") + "box$3$1" + D + "$2$3$1" + A + "$2box$3") + e;
|
|
540
|
+
case 100:
|
|
541
|
+
return v(e, ":", ":" + A) + e;
|
|
542
|
+
}
|
|
543
|
+
break;
|
|
544
|
+
case 5719:
|
|
545
|
+
case 2647:
|
|
546
|
+
case 2135:
|
|
547
|
+
case 3927:
|
|
548
|
+
case 2391:
|
|
549
|
+
return v(e, "scroll-", "scroll-snap-") + e;
|
|
550
|
+
}
|
|
551
|
+
return e;
|
|
552
|
+
}
|
|
553
|
+
function qe(e, t) {
|
|
554
|
+
for (var n = "", r = 0; r < e.length; r++)
|
|
555
|
+
n += t(e[r], r, e, t) || "";
|
|
556
|
+
return n;
|
|
557
|
+
}
|
|
558
|
+
function ur(e, t, n, r) {
|
|
559
|
+
switch (e.type) {
|
|
560
|
+
case Jn:
|
|
561
|
+
if (e.children.length)
|
|
562
|
+
break;
|
|
563
|
+
case Kn:
|
|
564
|
+
case wt:
|
|
565
|
+
return e.return = e.return || e.value;
|
|
566
|
+
case rn:
|
|
567
|
+
return "";
|
|
568
|
+
case on:
|
|
569
|
+
return e.return = e.value + "{" + qe(e.children, r) + "}";
|
|
570
|
+
case Je:
|
|
571
|
+
if (!Y(e.value = e.props.join(",")))
|
|
572
|
+
return "";
|
|
573
|
+
}
|
|
574
|
+
return Y(n = qe(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
575
|
+
}
|
|
576
|
+
function pr(e) {
|
|
577
|
+
var t = cn(e);
|
|
578
|
+
return function(n, r, o, a) {
|
|
579
|
+
for (var s = "", l = 0; l < t; l++)
|
|
580
|
+
s += e[l](n, r, o, a) || "";
|
|
581
|
+
return s;
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function hr(e) {
|
|
585
|
+
return function(t) {
|
|
586
|
+
t.root || (t = t.return) && e(t);
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function fr(e, t, n, r) {
|
|
590
|
+
if (e.length > -1 && !e.return)
|
|
591
|
+
switch (e.type) {
|
|
592
|
+
case wt:
|
|
593
|
+
e.return = dn(e.value, e.length, n);
|
|
594
|
+
return;
|
|
595
|
+
case on:
|
|
596
|
+
return qe([ne(e, { value: v(e.value, "@", "@" + D) })], r);
|
|
597
|
+
case Je:
|
|
598
|
+
if (e.length)
|
|
599
|
+
return er(n = e.props, function(o) {
|
|
600
|
+
switch (K(o, r = /(::plac\w+|:read-\w+)/)) {
|
|
601
|
+
case ":read-only":
|
|
602
|
+
case ":read-write":
|
|
603
|
+
he(ne(e, { props: [v(o, /:(read-\w+)/, ":" + De + "$1")] })), he(ne(e, { props: [o] })), pt(e, { props: Et(n, r) });
|
|
604
|
+
break;
|
|
605
|
+
case "::placeholder":
|
|
606
|
+
he(ne(e, { props: [v(o, /:(plac\w+)/, ":" + D + "input-$1")] })), he(ne(e, { props: [v(o, /:(plac\w+)/, ":" + De + "$1")] })), he(ne(e, { props: [v(o, /:(plac\w+)/, A + "input-$1")] })), he(ne(e, { props: [o] })), pt(e, { props: Et(n, r) });
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
return "";
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
var gr = {
|
|
614
|
+
animationIterationCount: 1,
|
|
615
|
+
aspectRatio: 1,
|
|
616
|
+
borderImageOutset: 1,
|
|
617
|
+
borderImageSlice: 1,
|
|
618
|
+
borderImageWidth: 1,
|
|
619
|
+
boxFlex: 1,
|
|
620
|
+
boxFlexGroup: 1,
|
|
621
|
+
boxOrdinalGroup: 1,
|
|
622
|
+
columnCount: 1,
|
|
623
|
+
columns: 1,
|
|
624
|
+
flex: 1,
|
|
625
|
+
flexGrow: 1,
|
|
626
|
+
flexPositive: 1,
|
|
627
|
+
flexShrink: 1,
|
|
628
|
+
flexNegative: 1,
|
|
629
|
+
flexOrder: 1,
|
|
630
|
+
gridRow: 1,
|
|
631
|
+
gridRowEnd: 1,
|
|
632
|
+
gridRowSpan: 1,
|
|
633
|
+
gridRowStart: 1,
|
|
634
|
+
gridColumn: 1,
|
|
635
|
+
gridColumnEnd: 1,
|
|
636
|
+
gridColumnSpan: 1,
|
|
637
|
+
gridColumnStart: 1,
|
|
638
|
+
msGridRow: 1,
|
|
639
|
+
msGridRowSpan: 1,
|
|
640
|
+
msGridColumn: 1,
|
|
641
|
+
msGridColumnSpan: 1,
|
|
642
|
+
fontWeight: 1,
|
|
643
|
+
lineHeight: 1,
|
|
644
|
+
opacity: 1,
|
|
645
|
+
order: 1,
|
|
646
|
+
orphans: 1,
|
|
647
|
+
tabSize: 1,
|
|
648
|
+
widows: 1,
|
|
649
|
+
zIndex: 1,
|
|
650
|
+
zoom: 1,
|
|
651
|
+
WebkitLineClamp: 1,
|
|
652
|
+
// SVG-related properties
|
|
653
|
+
fillOpacity: 1,
|
|
654
|
+
floodOpacity: 1,
|
|
655
|
+
stopOpacity: 1,
|
|
656
|
+
strokeDasharray: 1,
|
|
657
|
+
strokeDashoffset: 1,
|
|
658
|
+
strokeMiterlimit: 1,
|
|
659
|
+
strokeOpacity: 1,
|
|
660
|
+
strokeWidth: 1
|
|
661
|
+
}, pe = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", un = "active", pn = "data-styled-version", nt = "6.1.19", Ct = `/*!sc*/
|
|
662
|
+
`, Xe = typeof window < "u" && typeof document < "u", mr = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), Vt = /invalid hook call/i, He = /* @__PURE__ */ new Set(), yr = function(e, t) {
|
|
663
|
+
if (process.env.NODE_ENV !== "production") {
|
|
664
|
+
var n = t ? ' with the id of "'.concat(t, '"') : "", r = "The component ".concat(e).concat(n, ` has been created dynamically.
|
|
665
|
+
`) + `You may see this warning because you've called styled inside another component.
|
|
666
|
+
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
667
|
+
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
|
|
668
|
+
`, o = console.error;
|
|
669
|
+
try {
|
|
670
|
+
var a = !0;
|
|
671
|
+
console.error = function(s) {
|
|
672
|
+
for (var l = [], c = 1; c < arguments.length; c++)
|
|
673
|
+
l[c - 1] = arguments[c];
|
|
674
|
+
Vt.test(s) ? (a = !1, He.delete(r)) : o.apply(void 0, ge([s], l, !1));
|
|
675
|
+
}, Ue(), a && !He.has(r) && (console.warn(r), He.add(r));
|
|
676
|
+
} catch (s) {
|
|
677
|
+
Vt.test(s.message) && He.delete(r);
|
|
678
|
+
} finally {
|
|
679
|
+
console.error = o;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}, rt = Object.freeze([]), ve = Object.freeze({});
|
|
683
|
+
function vr(e, t, n) {
|
|
684
|
+
return n === void 0 && (n = ve), e.theme !== n.theme && e.theme || t || n.theme;
|
|
685
|
+
}
|
|
686
|
+
var gt = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), br = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, wr = /(^-|-$)/g;
|
|
687
|
+
function At(e) {
|
|
688
|
+
return e.replace(br, "-").replace(wr, "");
|
|
689
|
+
}
|
|
690
|
+
var xr = /(a)(d)/gi, _e = 52, Ot = function(e) {
|
|
691
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
692
|
+
};
|
|
693
|
+
function mt(e) {
|
|
694
|
+
var t, n = "";
|
|
695
|
+
for (t = Math.abs(e); t > _e; t = t / _e | 0)
|
|
696
|
+
n = Ot(t % _e) + n;
|
|
697
|
+
return (Ot(t % _e) + n).replace(xr, "$1-$2");
|
|
698
|
+
}
|
|
699
|
+
var ct, hn = 5381, ie = function(e, t) {
|
|
700
|
+
for (var n = t.length; n; )
|
|
701
|
+
e = 33 * e ^ t.charCodeAt(--n);
|
|
702
|
+
return e;
|
|
703
|
+
}, fn = function(e) {
|
|
704
|
+
return ie(hn, e);
|
|
705
|
+
};
|
|
706
|
+
function Cr(e) {
|
|
707
|
+
return mt(fn(e) >>> 0);
|
|
708
|
+
}
|
|
709
|
+
function gn(e) {
|
|
710
|
+
return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
|
|
711
|
+
}
|
|
712
|
+
function lt(e) {
|
|
713
|
+
return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
714
|
+
}
|
|
715
|
+
var mn = typeof Symbol == "function" && Symbol.for, yn = mn ? Symbol.for("react.memo") : 60115, Sr = mn ? Symbol.for("react.forward_ref") : 60112, kr = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Nr = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, vn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Lr = ((ct = {})[Sr] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, ct[yn] = vn, ct);
|
|
716
|
+
function Pt(e) {
|
|
717
|
+
return ("type" in (t = e) && t.type.$$typeof) === yn ? vn : "$$typeof" in e ? Lr[e.$$typeof] : kr;
|
|
718
|
+
var t;
|
|
719
|
+
}
|
|
720
|
+
var Er = Object.defineProperty, Dr = Object.getOwnPropertyNames, It = Object.getOwnPropertySymbols, Mr = Object.getOwnPropertyDescriptor, Vr = Object.getPrototypeOf, Rt = Object.prototype;
|
|
721
|
+
function bn(e, t, n) {
|
|
722
|
+
if (typeof t != "string") {
|
|
723
|
+
if (Rt) {
|
|
724
|
+
var r = Vr(t);
|
|
725
|
+
r && r !== Rt && bn(e, r, n);
|
|
726
|
+
}
|
|
727
|
+
var o = Dr(t);
|
|
728
|
+
It && (o = o.concat(It(t)));
|
|
729
|
+
for (var a = Pt(e), s = Pt(t), l = 0; l < o.length; ++l) {
|
|
730
|
+
var c = o[l];
|
|
731
|
+
if (!(c in Nr || n && n[c] || s && c in s || a && c in a)) {
|
|
732
|
+
var p = Mr(t, c);
|
|
733
|
+
try {
|
|
734
|
+
Er(e, c, p);
|
|
735
|
+
} catch {
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
return e;
|
|
741
|
+
}
|
|
742
|
+
function be(e) {
|
|
743
|
+
return typeof e == "function";
|
|
744
|
+
}
|
|
745
|
+
function St(e) {
|
|
746
|
+
return typeof e == "object" && "styledComponentId" in e;
|
|
747
|
+
}
|
|
748
|
+
function ce(e, t) {
|
|
749
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
750
|
+
}
|
|
751
|
+
function Ft(e, t) {
|
|
752
|
+
if (e.length === 0)
|
|
753
|
+
return "";
|
|
754
|
+
for (var n = e[0], r = 1; r < e.length; r++)
|
|
755
|
+
n += t ? t + e[r] : e[r];
|
|
756
|
+
return n;
|
|
757
|
+
}
|
|
758
|
+
function we(e) {
|
|
759
|
+
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
760
|
+
}
|
|
761
|
+
function yt(e, t, n) {
|
|
762
|
+
if (n === void 0 && (n = !1), !n && !we(e) && !Array.isArray(e))
|
|
763
|
+
return t;
|
|
764
|
+
if (Array.isArray(t))
|
|
765
|
+
for (var r = 0; r < t.length; r++)
|
|
766
|
+
e[r] = yt(e[r], t[r]);
|
|
767
|
+
else if (we(t))
|
|
768
|
+
for (var r in t)
|
|
769
|
+
e[r] = yt(e[r], t[r]);
|
|
770
|
+
return e;
|
|
771
|
+
}
|
|
772
|
+
function kt(e, t) {
|
|
773
|
+
Object.defineProperty(e, "toString", { value: t });
|
|
774
|
+
}
|
|
775
|
+
var Ar = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
|
|
776
|
+
|
|
777
|
+
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
778
|
+
|
|
779
|
+
- Are you trying to reuse it across renders?
|
|
780
|
+
- Are you accidentally calling collectStyles twice?
|
|
781
|
+
|
|
782
|
+
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
783
|
+
|
|
784
|
+
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
785
|
+
|
|
786
|
+
- Does this error occur on the client and is your target falsy?
|
|
787
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
788
|
+
|
|
789
|
+
`, 5: `The clone method cannot be used on the client!
|
|
790
|
+
|
|
791
|
+
- Are you running in a client-like environment on the server?
|
|
792
|
+
- Are you trying to run SSR on the client?
|
|
793
|
+
|
|
794
|
+
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
|
|
795
|
+
|
|
796
|
+
- Are you using a custom target that isn't mounted?
|
|
797
|
+
- Does your document not have a valid head element?
|
|
798
|
+
- Have you accidentally removed a style tag manually?
|
|
799
|
+
|
|
800
|
+
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
|
|
801
|
+
|
|
802
|
+
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
803
|
+
|
|
804
|
+
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
805
|
+
|
|
806
|
+
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
807
|
+
|
|
808
|
+
`, 14: `ThemeProvider: "theme" prop is required.
|
|
809
|
+
|
|
810
|
+
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
|
|
811
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
812
|
+
as for instance in your render method then you may be running into this limitation.
|
|
813
|
+
|
|
814
|
+
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
|
|
815
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
816
|
+
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
817
|
+
function Or() {
|
|
818
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
819
|
+
e[t] = arguments[t];
|
|
820
|
+
for (var n = e[0], r = [], o = 1, a = e.length; o < a; o += 1)
|
|
821
|
+
r.push(e[o]);
|
|
822
|
+
return r.forEach(function(s) {
|
|
823
|
+
n = n.replace(/%[a-z]/, s);
|
|
824
|
+
}), n;
|
|
825
|
+
}
|
|
826
|
+
function Ce(e) {
|
|
827
|
+
for (var t = [], n = 1; n < arguments.length; n++)
|
|
828
|
+
t[n - 1] = arguments[n];
|
|
829
|
+
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : "")) : new Error(Or.apply(void 0, ge([Ar[e]], t, !1)).trim());
|
|
830
|
+
}
|
|
831
|
+
var Pr = function() {
|
|
832
|
+
function e(t) {
|
|
833
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
834
|
+
}
|
|
835
|
+
return e.prototype.indexOfGroup = function(t) {
|
|
836
|
+
for (var n = 0, r = 0; r < t; r++)
|
|
837
|
+
n += this.groupSizes[r];
|
|
838
|
+
return n;
|
|
839
|
+
}, e.prototype.insertRules = function(t, n) {
|
|
840
|
+
if (t >= this.groupSizes.length) {
|
|
841
|
+
for (var r = this.groupSizes, o = r.length, a = o; t >= a; )
|
|
842
|
+
if ((a <<= 1) < 0)
|
|
843
|
+
throw Ce(16, "".concat(t));
|
|
844
|
+
this.groupSizes = new Uint32Array(a), this.groupSizes.set(r), this.length = a;
|
|
845
|
+
for (var s = o; s < a; s++)
|
|
846
|
+
this.groupSizes[s] = 0;
|
|
847
|
+
}
|
|
848
|
+
for (var l = this.indexOfGroup(t + 1), c = (s = 0, n.length); s < c; s++)
|
|
849
|
+
this.tag.insertRule(l, n[s]) && (this.groupSizes[t]++, l++);
|
|
850
|
+
}, e.prototype.clearGroup = function(t) {
|
|
851
|
+
if (t < this.length) {
|
|
852
|
+
var n = this.groupSizes[t], r = this.indexOfGroup(t), o = r + n;
|
|
853
|
+
this.groupSizes[t] = 0;
|
|
854
|
+
for (var a = r; a < o; a++)
|
|
855
|
+
this.tag.deleteRule(r);
|
|
856
|
+
}
|
|
857
|
+
}, e.prototype.getGroup = function(t) {
|
|
858
|
+
var n = "";
|
|
859
|
+
if (t >= this.length || this.groupSizes[t] === 0)
|
|
860
|
+
return n;
|
|
861
|
+
for (var r = this.groupSizes[t], o = this.indexOfGroup(t), a = o + r, s = o; s < a; s++)
|
|
862
|
+
n += "".concat(this.tag.getRule(s)).concat(Ct);
|
|
863
|
+
return n;
|
|
864
|
+
}, e;
|
|
865
|
+
}(), Ir = 1 << 30, We = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map(), Ye = 1, $e = function(e) {
|
|
866
|
+
if (We.has(e))
|
|
867
|
+
return We.get(e);
|
|
868
|
+
for (; Ke.has(Ye); )
|
|
869
|
+
Ye++;
|
|
870
|
+
var t = Ye++;
|
|
871
|
+
if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > Ir))
|
|
872
|
+
throw Ce(16, "".concat(t));
|
|
873
|
+
return We.set(e, t), Ke.set(t, e), t;
|
|
874
|
+
}, Rr = function(e, t) {
|
|
875
|
+
Ye = t + 1, We.set(e, t), Ke.set(t, e);
|
|
876
|
+
}, Fr = "style[".concat(pe, "][").concat(pn, '="').concat(nt, '"]'), Tr = new RegExp("^".concat(pe, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Hr = function(e, t, n) {
|
|
877
|
+
for (var r, o = n.split(","), a = 0, s = o.length; a < s; a++)
|
|
878
|
+
(r = o[a]) && e.registerName(t, r);
|
|
879
|
+
}, _r = function(e, t) {
|
|
880
|
+
for (var n, r = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(Ct), o = [], a = 0, s = r.length; a < s; a++) {
|
|
881
|
+
var l = r[a].trim();
|
|
882
|
+
if (l) {
|
|
883
|
+
var c = l.match(Tr);
|
|
884
|
+
if (c) {
|
|
885
|
+
var p = 0 | parseInt(c[1], 10), f = c[2];
|
|
886
|
+
p !== 0 && (Rr(f, p), Hr(e, f, c[3]), e.getTag().insertRules(p, o)), o.length = 0;
|
|
887
|
+
} else
|
|
888
|
+
o.push(l);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}, Tt = function(e) {
|
|
892
|
+
for (var t = document.querySelectorAll(Fr), n = 0, r = t.length; n < r; n++) {
|
|
893
|
+
var o = t[n];
|
|
894
|
+
o && o.getAttribute(pe) !== un && (_r(e, o), o.parentNode && o.parentNode.removeChild(o));
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
function $r() {
|
|
898
|
+
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
899
|
+
}
|
|
900
|
+
var wn = function(e) {
|
|
901
|
+
var t = document.head, n = e || t, r = document.createElement("style"), o = function(l) {
|
|
902
|
+
var c = Array.from(l.querySelectorAll("style[".concat(pe, "]")));
|
|
903
|
+
return c[c.length - 1];
|
|
904
|
+
}(n), a = o !== void 0 ? o.nextSibling : null;
|
|
905
|
+
r.setAttribute(pe, un), r.setAttribute(pn, nt);
|
|
906
|
+
var s = $r();
|
|
907
|
+
return s && r.setAttribute("nonce", s), n.insertBefore(r, a), r;
|
|
908
|
+
}, jr = function() {
|
|
909
|
+
function e(t) {
|
|
910
|
+
this.element = wn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(n) {
|
|
911
|
+
if (n.sheet)
|
|
912
|
+
return n.sheet;
|
|
913
|
+
for (var r = document.styleSheets, o = 0, a = r.length; o < a; o++) {
|
|
914
|
+
var s = r[o];
|
|
915
|
+
if (s.ownerNode === n)
|
|
916
|
+
return s;
|
|
917
|
+
}
|
|
918
|
+
throw Ce(17);
|
|
919
|
+
}(this.element), this.length = 0;
|
|
920
|
+
}
|
|
921
|
+
return e.prototype.insertRule = function(t, n) {
|
|
922
|
+
try {
|
|
923
|
+
return this.sheet.insertRule(n, t), this.length++, !0;
|
|
924
|
+
} catch {
|
|
925
|
+
return !1;
|
|
926
|
+
}
|
|
927
|
+
}, e.prototype.deleteRule = function(t) {
|
|
928
|
+
this.sheet.deleteRule(t), this.length--;
|
|
929
|
+
}, e.prototype.getRule = function(t) {
|
|
930
|
+
var n = this.sheet.cssRules[t];
|
|
931
|
+
return n && n.cssText ? n.cssText : "";
|
|
932
|
+
}, e;
|
|
933
|
+
}(), zr = function() {
|
|
934
|
+
function e(t) {
|
|
935
|
+
this.element = wn(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
936
|
+
}
|
|
937
|
+
return e.prototype.insertRule = function(t, n) {
|
|
938
|
+
if (t <= this.length && t >= 0) {
|
|
939
|
+
var r = document.createTextNode(n);
|
|
940
|
+
return this.element.insertBefore(r, this.nodes[t] || null), this.length++, !0;
|
|
941
|
+
}
|
|
942
|
+
return !1;
|
|
943
|
+
}, e.prototype.deleteRule = function(t) {
|
|
944
|
+
this.element.removeChild(this.nodes[t]), this.length--;
|
|
945
|
+
}, e.prototype.getRule = function(t) {
|
|
946
|
+
return t < this.length ? this.nodes[t].textContent : "";
|
|
947
|
+
}, e;
|
|
948
|
+
}(), Br = function() {
|
|
949
|
+
function e(t) {
|
|
950
|
+
this.rules = [], this.length = 0;
|
|
951
|
+
}
|
|
952
|
+
return e.prototype.insertRule = function(t, n) {
|
|
953
|
+
return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0);
|
|
954
|
+
}, e.prototype.deleteRule = function(t) {
|
|
955
|
+
this.rules.splice(t, 1), this.length--;
|
|
956
|
+
}, e.prototype.getRule = function(t) {
|
|
957
|
+
return t < this.length ? this.rules[t] : "";
|
|
958
|
+
}, e;
|
|
959
|
+
}(), Ht = Xe, Gr = { isServer: !Xe, useCSSOMInjection: !mr }, xn = function() {
|
|
960
|
+
function e(t, n, r) {
|
|
961
|
+
t === void 0 && (t = ve), n === void 0 && (n = {});
|
|
962
|
+
var o = this;
|
|
963
|
+
this.options = H(H({}, Gr), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && Xe && Ht && (Ht = !1, Tt(this)), kt(this, function() {
|
|
964
|
+
return function(a) {
|
|
965
|
+
for (var s = a.getTag(), l = s.length, c = "", p = function(h) {
|
|
966
|
+
var u = function(k) {
|
|
967
|
+
return Ke.get(k);
|
|
968
|
+
}(h);
|
|
969
|
+
if (u === void 0)
|
|
970
|
+
return "continue";
|
|
971
|
+
var d = a.names.get(u), g = s.getGroup(h);
|
|
972
|
+
if (d === void 0 || !d.size || g.length === 0)
|
|
973
|
+
return "continue";
|
|
974
|
+
var m = "".concat(pe, ".g").concat(h, '[id="').concat(u, '"]'), N = "";
|
|
975
|
+
d !== void 0 && d.forEach(function(k) {
|
|
976
|
+
k.length > 0 && (N += "".concat(k, ","));
|
|
977
|
+
}), c += "".concat(g).concat(m, '{content:"').concat(N, '"}').concat(Ct);
|
|
978
|
+
}, f = 0; f < l; f++)
|
|
979
|
+
p(f);
|
|
980
|
+
return c;
|
|
981
|
+
}(o);
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
return e.registerId = function(t) {
|
|
985
|
+
return $e(t);
|
|
986
|
+
}, e.prototype.rehydrate = function() {
|
|
987
|
+
!this.server && Xe && Tt(this);
|
|
988
|
+
}, e.prototype.reconstructWithOptions = function(t, n) {
|
|
989
|
+
return n === void 0 && (n = !0), new e(H(H({}, this.options), t), this.gs, n && this.names || void 0);
|
|
990
|
+
}, e.prototype.allocateGSInstance = function(t) {
|
|
991
|
+
return this.gs[t] = (this.gs[t] || 0) + 1;
|
|
992
|
+
}, e.prototype.getTag = function() {
|
|
993
|
+
return this.tag || (this.tag = (t = function(n) {
|
|
994
|
+
var r = n.useCSSOMInjection, o = n.target;
|
|
995
|
+
return n.isServer ? new Br(o) : r ? new jr(o) : new zr(o);
|
|
996
|
+
}(this.options), new Pr(t)));
|
|
997
|
+
var t;
|
|
998
|
+
}, e.prototype.hasNameForId = function(t, n) {
|
|
999
|
+
return this.names.has(t) && this.names.get(t).has(n);
|
|
1000
|
+
}, e.prototype.registerName = function(t, n) {
|
|
1001
|
+
if ($e(t), this.names.has(t))
|
|
1002
|
+
this.names.get(t).add(n);
|
|
1003
|
+
else {
|
|
1004
|
+
var r = /* @__PURE__ */ new Set();
|
|
1005
|
+
r.add(n), this.names.set(t, r);
|
|
1006
|
+
}
|
|
1007
|
+
}, e.prototype.insertRules = function(t, n, r) {
|
|
1008
|
+
this.registerName(t, n), this.getTag().insertRules($e(t), r);
|
|
1009
|
+
}, e.prototype.clearNames = function(t) {
|
|
1010
|
+
this.names.has(t) && this.names.get(t).clear();
|
|
1011
|
+
}, e.prototype.clearRules = function(t) {
|
|
1012
|
+
this.getTag().clearGroup($e(t)), this.clearNames(t);
|
|
1013
|
+
}, e.prototype.clearTag = function() {
|
|
1014
|
+
this.tag = void 0;
|
|
1015
|
+
}, e;
|
|
1016
|
+
}(), Zr = /&/g, Wr = /^\s*\/\/.*$/gm;
|
|
1017
|
+
function Cn(e, t) {
|
|
1018
|
+
return e.map(function(n) {
|
|
1019
|
+
return n.type === "rule" && (n.value = "".concat(t, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(t, " ")), n.props = n.props.map(function(r) {
|
|
1020
|
+
return "".concat(t, " ").concat(r);
|
|
1021
|
+
})), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = Cn(n.children, t)), n;
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
function Yr(e) {
|
|
1025
|
+
var t, n, r, o = e === void 0 ? ve : e, a = o.options, s = a === void 0 ? ve : a, l = o.plugins, c = l === void 0 ? rt : l, p = function(u, d, g) {
|
|
1026
|
+
return g.startsWith(n) && g.endsWith(n) && g.replaceAll(n, "").length > 0 ? ".".concat(t) : u;
|
|
1027
|
+
}, f = c.slice();
|
|
1028
|
+
f.push(function(u) {
|
|
1029
|
+
u.type === Je && u.value.includes("&") && (u.props[0] = u.props[0].replace(Zr, n).replace(r, p));
|
|
1030
|
+
}), s.prefix && f.push(fr), f.push(ur);
|
|
1031
|
+
var h = function(u, d, g, m) {
|
|
1032
|
+
d === void 0 && (d = ""), g === void 0 && (g = ""), m === void 0 && (m = "&"), t = m, n = d, r = new RegExp("\\".concat(n, "\\b"), "g");
|
|
1033
|
+
var N = u.replace(Wr, ""), k = lr(g || d ? "".concat(g, " ").concat(d, " { ").concat(N, " }") : N);
|
|
1034
|
+
s.namespace && (k = Cn(k, s.namespace));
|
|
1035
|
+
var L = [];
|
|
1036
|
+
return qe(k, pr(f.concat(hr(function(S) {
|
|
1037
|
+
return L.push(S);
|
|
1038
|
+
})))), L;
|
|
1039
|
+
};
|
|
1040
|
+
return h.hash = c.length ? c.reduce(function(u, d) {
|
|
1041
|
+
return d.name || Ce(15), ie(u, d.name);
|
|
1042
|
+
}, hn).toString() : "", h;
|
|
1043
|
+
}
|
|
1044
|
+
var Ur = new xn(), vt = Yr(), Sn = Me.createContext({ shouldForwardProp: void 0, styleSheet: Ur, stylis: vt });
|
|
1045
|
+
Sn.Consumer;
|
|
1046
|
+
Me.createContext(void 0);
|
|
1047
|
+
function _t() {
|
|
1048
|
+
return jn(Sn);
|
|
1049
|
+
}
|
|
1050
|
+
var $t = function() {
|
|
1051
|
+
function e(t, n) {
|
|
1052
|
+
var r = this;
|
|
1053
|
+
this.inject = function(o, a) {
|
|
1054
|
+
a === void 0 && (a = vt);
|
|
1055
|
+
var s = r.name + a.hash;
|
|
1056
|
+
o.hasNameForId(r.id, s) || o.insertRules(r.id, s, a(r.rules, s, "@keyframes"));
|
|
1057
|
+
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = n, kt(this, function() {
|
|
1058
|
+
throw Ce(12, String(r.name));
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
return e.prototype.getName = function(t) {
|
|
1062
|
+
return t === void 0 && (t = vt), this.name + t.hash;
|
|
1063
|
+
}, e;
|
|
1064
|
+
}(), qr = function(e) {
|
|
1065
|
+
return e >= "A" && e <= "Z";
|
|
1066
|
+
};
|
|
1067
|
+
function jt(e) {
|
|
1068
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
1069
|
+
var r = e[n];
|
|
1070
|
+
if (n === 1 && r === "-" && e[0] === "-")
|
|
1071
|
+
return e;
|
|
1072
|
+
qr(r) ? t += "-" + r.toLowerCase() : t += r;
|
|
1073
|
+
}
|
|
1074
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
1075
|
+
}
|
|
1076
|
+
var kn = function(e) {
|
|
1077
|
+
return e == null || e === !1 || e === "";
|
|
1078
|
+
}, Nn = function(e) {
|
|
1079
|
+
var t, n, r = [];
|
|
1080
|
+
for (var o in e) {
|
|
1081
|
+
var a = e[o];
|
|
1082
|
+
e.hasOwnProperty(o) && !kn(a) && (Array.isArray(a) && a.isCss || be(a) ? r.push("".concat(jt(o), ":"), a, ";") : we(a) ? r.push.apply(r, ge(ge(["".concat(o, " {")], Nn(a), !1), ["}"], !1)) : r.push("".concat(jt(o), ": ").concat((t = o, (n = a) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in gr || t.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";")));
|
|
1083
|
+
}
|
|
1084
|
+
return r;
|
|
1085
|
+
};
|
|
1086
|
+
function de(e, t, n, r) {
|
|
1087
|
+
if (kn(e))
|
|
1088
|
+
return [];
|
|
1089
|
+
if (St(e))
|
|
1090
|
+
return [".".concat(e.styledComponentId)];
|
|
1091
|
+
if (be(e)) {
|
|
1092
|
+
if (!be(a = e) || a.prototype && a.prototype.isReactComponent || !t)
|
|
1093
|
+
return [e];
|
|
1094
|
+
var o = e(t);
|
|
1095
|
+
return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof $t || we(o) || o === null || console.error("".concat(gn(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), de(o, t, n, r);
|
|
1096
|
+
}
|
|
1097
|
+
var a;
|
|
1098
|
+
return e instanceof $t ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : we(e) ? Nn(e) : Array.isArray(e) ? Array.prototype.concat.apply(rt, e.map(function(s) {
|
|
1099
|
+
return de(s, t, n, r);
|
|
1100
|
+
})) : [e.toString()];
|
|
1101
|
+
}
|
|
1102
|
+
function Xr(e) {
|
|
1103
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
1104
|
+
var n = e[t];
|
|
1105
|
+
if (be(n) && !St(n))
|
|
1106
|
+
return !1;
|
|
1107
|
+
}
|
|
1108
|
+
return !0;
|
|
1109
|
+
}
|
|
1110
|
+
var Kr = fn(nt), Jr = function() {
|
|
1111
|
+
function e(t, n, r) {
|
|
1112
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (r === void 0 || r.isStatic) && Xr(t), this.componentId = n, this.baseHash = ie(Kr, n), this.baseStyle = r, xn.registerId(n);
|
|
1113
|
+
}
|
|
1114
|
+
return e.prototype.generateAndInjectStyles = function(t, n, r) {
|
|
1115
|
+
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, n, r) : "";
|
|
1116
|
+
if (this.isStatic && !r.hash)
|
|
1117
|
+
if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId))
|
|
1118
|
+
o = ce(o, this.staticRulesId);
|
|
1119
|
+
else {
|
|
1120
|
+
var a = Ft(de(this.rules, t, n, r)), s = mt(ie(this.baseHash, a) >>> 0);
|
|
1121
|
+
if (!n.hasNameForId(this.componentId, s)) {
|
|
1122
|
+
var l = r(a, ".".concat(s), void 0, this.componentId);
|
|
1123
|
+
n.insertRules(this.componentId, s, l);
|
|
1124
|
+
}
|
|
1125
|
+
o = ce(o, s), this.staticRulesId = s;
|
|
1126
|
+
}
|
|
1127
|
+
else {
|
|
1128
|
+
for (var c = ie(this.baseHash, r.hash), p = "", f = 0; f < this.rules.length; f++) {
|
|
1129
|
+
var h = this.rules[f];
|
|
1130
|
+
if (typeof h == "string")
|
|
1131
|
+
p += h, process.env.NODE_ENV !== "production" && (c = ie(c, h));
|
|
1132
|
+
else if (h) {
|
|
1133
|
+
var u = Ft(de(h, t, n, r));
|
|
1134
|
+
c = ie(c, u + f), p += u;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
if (p) {
|
|
1138
|
+
var d = mt(c >>> 0);
|
|
1139
|
+
n.hasNameForId(this.componentId, d) || n.insertRules(this.componentId, d, r(p, ".".concat(d), void 0, this.componentId)), o = ce(o, d);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
return o;
|
|
1143
|
+
}, e;
|
|
1144
|
+
}(), Ln = Me.createContext(void 0);
|
|
1145
|
+
Ln.Consumer;
|
|
1146
|
+
var dt = {}, zt = /* @__PURE__ */ new Set();
|
|
1147
|
+
function Qr(e, t, n) {
|
|
1148
|
+
var r = St(e), o = e, a = !lt(e), s = t.attrs, l = s === void 0 ? rt : s, c = t.componentId, p = c === void 0 ? function(w, x) {
|
|
1149
|
+
var b = typeof w != "string" ? "sc" : At(w);
|
|
1150
|
+
dt[b] = (dt[b] || 0) + 1;
|
|
1151
|
+
var y = "".concat(b, "-").concat(Cr(nt + b + dt[b]));
|
|
1152
|
+
return x ? "".concat(x, "-").concat(y) : y;
|
|
1153
|
+
}(t.displayName, t.parentComponentId) : c, f = t.displayName, h = f === void 0 ? function(w) {
|
|
1154
|
+
return lt(w) ? "styled.".concat(w) : "Styled(".concat(gn(w), ")");
|
|
1155
|
+
}(e) : f, u = t.displayName && t.componentId ? "".concat(At(t.displayName), "-").concat(t.componentId) : t.componentId || p, d = r && o.attrs ? o.attrs.concat(l).filter(Boolean) : l, g = t.shouldForwardProp;
|
|
1156
|
+
if (r && o.shouldForwardProp) {
|
|
1157
|
+
var m = o.shouldForwardProp;
|
|
1158
|
+
if (t.shouldForwardProp) {
|
|
1159
|
+
var N = t.shouldForwardProp;
|
|
1160
|
+
g = function(w, x) {
|
|
1161
|
+
return m(w, x) && N(w, x);
|
|
1162
|
+
};
|
|
1163
|
+
} else
|
|
1164
|
+
g = m;
|
|
1165
|
+
}
|
|
1166
|
+
var k = new Jr(n, u, r ? o.componentStyle : void 0);
|
|
1167
|
+
function L(w, x) {
|
|
1168
|
+
return function(b, y, O) {
|
|
1169
|
+
var _ = b.attrs, oe = b.componentStyle, Se = b.defaultProps, Pe = b.foldedComponentIds, Ie = b.styledComponentId, ke = b.target, Re = Me.useContext(Ln), Fe = _t(), J = b.shouldForwardProp || Fe.shouldForwardProp;
|
|
1170
|
+
process.env.NODE_ENV !== "production" && Lt(Ie);
|
|
1171
|
+
var Ne = vr(y, Re, Se) || ve, $ = function(X, Q, ae) {
|
|
1172
|
+
for (var ee, G = H(H({}, Q), { className: void 0, theme: ae }), se = 0; se < X.length; se += 1) {
|
|
1173
|
+
var te = be(ee = X[se]) ? ee(G) : ee;
|
|
1174
|
+
for (var j in te)
|
|
1175
|
+
G[j] = j === "className" ? ce(G[j], te[j]) : j === "style" ? H(H({}, G[j]), te[j]) : te[j];
|
|
1176
|
+
}
|
|
1177
|
+
return Q.className && (G.className = ce(G.className, Q.className)), G;
|
|
1178
|
+
}(_, y, Ne), q = $.as || ke, E = {};
|
|
1179
|
+
for (var M in $)
|
|
1180
|
+
$[M] === void 0 || M[0] === "$" || M === "as" || M === "theme" && $.theme === Ne || (M === "forwardedAs" ? E.as = $.forwardedAs : J && !J(M, q) || (E[M] = $[M], J || process.env.NODE_ENV !== "development" || Xn(M) || zt.has(M) || !gt.has(q) || (zt.add(M), console.warn('styled-components: it looks like an unknown prop "'.concat(M, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1181
|
+
var T = function(X, Q) {
|
|
1182
|
+
var ae = _t(), ee = X.generateAndInjectStyles(Q, ae.styleSheet, ae.stylis);
|
|
1183
|
+
return process.env.NODE_ENV !== "production" && Lt(ee), ee;
|
|
1184
|
+
}(oe, $);
|
|
1185
|
+
process.env.NODE_ENV !== "production" && b.warnTooManyClasses && b.warnTooManyClasses(T);
|
|
1186
|
+
var B = ce(Pe, Ie);
|
|
1187
|
+
return T && (B += " " + T), $.className && (B += " " + $.className), E[lt(q) && !gt.has(q) ? "class" : "className"] = B, O && (E.ref = O), $n(q, E);
|
|
1188
|
+
}(S, w, x);
|
|
1189
|
+
}
|
|
1190
|
+
L.displayName = h;
|
|
1191
|
+
var S = Me.forwardRef(L);
|
|
1192
|
+
return S.attrs = d, S.componentStyle = k, S.displayName = h, S.shouldForwardProp = g, S.foldedComponentIds = r ? ce(o.foldedComponentIds, o.styledComponentId) : "", S.styledComponentId = u, S.target = r ? o.target : e, Object.defineProperty(S, "defaultProps", { get: function() {
|
|
1193
|
+
return this._foldedDefaultProps;
|
|
1194
|
+
}, set: function(w) {
|
|
1195
|
+
this._foldedDefaultProps = r ? function(x) {
|
|
1196
|
+
for (var b = [], y = 1; y < arguments.length; y++)
|
|
1197
|
+
b[y - 1] = arguments[y];
|
|
1198
|
+
for (var O = 0, _ = b; O < _.length; O++)
|
|
1199
|
+
yt(x, _[O], !0);
|
|
1200
|
+
return x;
|
|
1201
|
+
}({}, o.defaultProps, w) : w;
|
|
1202
|
+
} }), process.env.NODE_ENV !== "production" && (yr(h, u), S.warnTooManyClasses = function(w, x) {
|
|
1203
|
+
var b = {}, y = !1;
|
|
1204
|
+
return function(O) {
|
|
1205
|
+
if (!y && (b[O] = !0, Object.keys(b).length >= 200)) {
|
|
1206
|
+
var _ = x ? ' with the id of "'.concat(x, '"') : "";
|
|
1207
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(w).concat(_, `.
|
|
1208
|
+
`) + `Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1209
|
+
Example:
|
|
1210
|
+
const Component = styled.div.attrs(props => ({
|
|
1211
|
+
style: {
|
|
1212
|
+
background: props.background,
|
|
1213
|
+
},
|
|
1214
|
+
}))\`width: 100%;\`
|
|
1215
|
+
|
|
1216
|
+
<Component />`), y = !0, b = {};
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
}(h, u)), kt(S, function() {
|
|
1220
|
+
return ".".concat(S.styledComponentId);
|
|
1221
|
+
}), a && bn(S, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), S;
|
|
1222
|
+
}
|
|
1223
|
+
function Bt(e, t) {
|
|
1224
|
+
for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1)
|
|
1225
|
+
n.push(t[r], e[r + 1]);
|
|
1226
|
+
return n;
|
|
1227
|
+
}
|
|
1228
|
+
var Gt = function(e) {
|
|
1229
|
+
return Object.assign(e, { isCss: !0 });
|
|
1230
|
+
};
|
|
1231
|
+
function En(e) {
|
|
1232
|
+
for (var t = [], n = 1; n < arguments.length; n++)
|
|
1233
|
+
t[n - 1] = arguments[n];
|
|
1234
|
+
if (be(e) || we(e))
|
|
1235
|
+
return Gt(de(Bt(rt, ge([e], t, !0))));
|
|
1236
|
+
var r = e;
|
|
1237
|
+
return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? de(r) : Gt(de(Bt(r, t)));
|
|
1238
|
+
}
|
|
1239
|
+
function bt(e, t, n) {
|
|
1240
|
+
if (n === void 0 && (n = ve), !t)
|
|
1241
|
+
throw Ce(1, t);
|
|
1242
|
+
var r = function(o) {
|
|
1243
|
+
for (var a = [], s = 1; s < arguments.length; s++)
|
|
1244
|
+
a[s - 1] = arguments[s];
|
|
1245
|
+
return e(t, n, En.apply(void 0, ge([o], a, !1)));
|
|
1246
|
+
};
|
|
1247
|
+
return r.attrs = function(o) {
|
|
1248
|
+
return bt(e, t, H(H({}, n), { attrs: Array.prototype.concat(n.attrs, o).filter(Boolean) }));
|
|
1249
|
+
}, r.withConfig = function(o) {
|
|
1250
|
+
return bt(e, t, H(H({}, n), o));
|
|
1251
|
+
}, r;
|
|
1252
|
+
}
|
|
1253
|
+
var Dn = function(e) {
|
|
1254
|
+
return bt(Qr, e);
|
|
1255
|
+
}, Ae = Dn;
|
|
1256
|
+
gt.forEach(function(e) {
|
|
1257
|
+
Ae[e] = Dn(e);
|
|
1258
|
+
});
|
|
1259
|
+
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1260
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
1261
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);
|
|
1262
|
+
var je = "__sc-".concat(pe, "__");
|
|
1263
|
+
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[je] || (window[je] = 0), window[je] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1264
|
+
|
|
1265
|
+
See https://s-c.sh/2BAXzed for more info.`), window[je] += 1);
|
|
1266
|
+
var ue = function() {
|
|
1267
|
+
return ue = Object.assign || function(e) {
|
|
1268
|
+
for (var t, n = 1, r = arguments.length; n < r; n++)
|
|
1269
|
+
for (var o in t = arguments[n])
|
|
1270
|
+
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
1271
|
+
return e;
|
|
1272
|
+
}, ue.apply(this, arguments);
|
|
1273
|
+
};
|
|
1274
|
+
function Oe(e, t) {
|
|
1275
|
+
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
|
|
1276
|
+
}
|
|
1277
|
+
var Zt, Wt, Yt, Ut, qt, re = "#666", eo = En(Zt || (Zt = Oe([`
|
|
1278
|
+
display: flex;
|
|
1279
|
+
align-items: center;
|
|
1280
|
+
min-width: 322px;
|
|
1281
|
+
max-width: 508px;
|
|
1282
|
+
height: 48px;
|
|
1283
|
+
border: dashed 2px `, `;
|
|
1284
|
+
padding: 8px 16px 8px 8px;
|
|
1285
|
+
border-radius: 5px;
|
|
1286
|
+
cursor: pointer;
|
|
1287
|
+
flex-grow: 0;
|
|
1288
|
+
|
|
1289
|
+
&.is-disabled {
|
|
1290
|
+
border: dashed 2px `, `;
|
|
1291
|
+
cursor: no-drop;
|
|
1292
|
+
svg {
|
|
1293
|
+
fill: `, `;
|
|
1294
|
+
color: `, `;
|
|
1295
|
+
path {
|
|
1296
|
+
fill: `, `;
|
|
1297
|
+
color: `, `;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
`], [`
|
|
1302
|
+
display: flex;
|
|
1303
|
+
align-items: center;
|
|
1304
|
+
min-width: 322px;
|
|
1305
|
+
max-width: 508px;
|
|
1306
|
+
height: 48px;
|
|
1307
|
+
border: dashed 2px `, `;
|
|
1308
|
+
padding: 8px 16px 8px 8px;
|
|
1309
|
+
border-radius: 5px;
|
|
1310
|
+
cursor: pointer;
|
|
1311
|
+
flex-grow: 0;
|
|
1312
|
+
|
|
1313
|
+
&.is-disabled {
|
|
1314
|
+
border: dashed 2px `, `;
|
|
1315
|
+
cursor: no-drop;
|
|
1316
|
+
svg {
|
|
1317
|
+
fill: `, `;
|
|
1318
|
+
color: `, `;
|
|
1319
|
+
path {
|
|
1320
|
+
fill: `, `;
|
|
1321
|
+
color: `, `;
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
`])), "#0658c2", re, re, re, re, re), to = Ae.label(Wt || (Wt = Oe([`
|
|
1326
|
+
position: relative;
|
|
1327
|
+
`, `;
|
|
1328
|
+
&:focus-within {
|
|
1329
|
+
outline: 2px solid black;
|
|
1330
|
+
}
|
|
1331
|
+
& > input {
|
|
1332
|
+
display: block;
|
|
1333
|
+
opacity: 0;
|
|
1334
|
+
position: absolute;
|
|
1335
|
+
pointer-events: none;
|
|
1336
|
+
}
|
|
1337
|
+
`], [`
|
|
1338
|
+
position: relative;
|
|
1339
|
+
`, `;
|
|
1340
|
+
&:focus-within {
|
|
1341
|
+
outline: 2px solid black;
|
|
1342
|
+
}
|
|
1343
|
+
& > input {
|
|
1344
|
+
display: block;
|
|
1345
|
+
opacity: 0;
|
|
1346
|
+
position: absolute;
|
|
1347
|
+
pointer-events: none;
|
|
1348
|
+
}
|
|
1349
|
+
`])), function(e) {
|
|
1350
|
+
return e.override ? "" : eo;
|
|
1351
|
+
}), no = Ae.div(Yt || (Yt = Oe([`
|
|
1352
|
+
border: dashed 2px `, `;
|
|
1353
|
+
border-radius: 5px;
|
|
1354
|
+
background-color: `, `;
|
|
1355
|
+
opacity: 0.9;
|
|
1356
|
+
position: absolute;
|
|
1357
|
+
top: 0;
|
|
1358
|
+
right: 0;
|
|
1359
|
+
left: 0;
|
|
1360
|
+
bottom: 0;
|
|
1361
|
+
z-index: 999;
|
|
1362
|
+
& > span {
|
|
1363
|
+
position: absolute;
|
|
1364
|
+
top: 50%;
|
|
1365
|
+
left: 50%;
|
|
1366
|
+
transform: translateX(-50%) translateY(-50%);
|
|
1367
|
+
}
|
|
1368
|
+
`], [`
|
|
1369
|
+
border: dashed 2px `, `;
|
|
1370
|
+
border-radius: 5px;
|
|
1371
|
+
background-color: `, `;
|
|
1372
|
+
opacity: 0.9;
|
|
1373
|
+
position: absolute;
|
|
1374
|
+
top: 0;
|
|
1375
|
+
right: 0;
|
|
1376
|
+
left: 0;
|
|
1377
|
+
bottom: 0;
|
|
1378
|
+
z-index: 999;
|
|
1379
|
+
& > span {
|
|
1380
|
+
position: absolute;
|
|
1381
|
+
top: 50%;
|
|
1382
|
+
left: 50%;
|
|
1383
|
+
transform: translateX(-50%) translateY(-50%);
|
|
1384
|
+
}
|
|
1385
|
+
`])), re, "#999"), ro = Ae.div(Ut || (Ut = Oe([`
|
|
1386
|
+
display: flex;
|
|
1387
|
+
justify-content: space-between;
|
|
1388
|
+
flex-grow: 1;
|
|
1389
|
+
& > span {
|
|
1390
|
+
font-size: 12px;
|
|
1391
|
+
color: `, `;
|
|
1392
|
+
}
|
|
1393
|
+
.file-types {
|
|
1394
|
+
overflow: hidden;
|
|
1395
|
+
white-space: nowrap;
|
|
1396
|
+
text-overflow: ellipsis;
|
|
1397
|
+
max-width: 100px;
|
|
1398
|
+
}
|
|
1399
|
+
`], [`
|
|
1400
|
+
display: flex;
|
|
1401
|
+
justify-content: space-between;
|
|
1402
|
+
flex-grow: 1;
|
|
1403
|
+
& > span {
|
|
1404
|
+
font-size: 12px;
|
|
1405
|
+
color: `, `;
|
|
1406
|
+
}
|
|
1407
|
+
.file-types {
|
|
1408
|
+
overflow: hidden;
|
|
1409
|
+
white-space: nowrap;
|
|
1410
|
+
text-overflow: ellipsis;
|
|
1411
|
+
max-width: 100px;
|
|
1412
|
+
}
|
|
1413
|
+
`])), function(e) {
|
|
1414
|
+
return e.$error ? "red" : re;
|
|
1415
|
+
}), oo = Ae.span(qt || (qt = Oe([`
|
|
1416
|
+
font-size: 14px;
|
|
1417
|
+
color: `, `;
|
|
1418
|
+
span {
|
|
1419
|
+
text-decoration: underline;
|
|
1420
|
+
}
|
|
1421
|
+
`], [`
|
|
1422
|
+
font-size: 14px;
|
|
1423
|
+
color: `, `;
|
|
1424
|
+
span {
|
|
1425
|
+
text-decoration: underline;
|
|
1426
|
+
}
|
|
1427
|
+
`])), re), Xt = function(e) {
|
|
1428
|
+
return e / 1024 / 1024;
|
|
1429
|
+
}, ao = function(e) {
|
|
1430
|
+
return e === void 0 ? "" : e.map(function(t) {
|
|
1431
|
+
return ".".concat(t.toLowerCase());
|
|
1432
|
+
}).join(",");
|
|
1433
|
+
};
|
|
1434
|
+
function so(e) {
|
|
1435
|
+
var t = e.types, n = e.minSize, r = e.maxSize;
|
|
1436
|
+
if (t) {
|
|
1437
|
+
var o = t.toString(), a = "";
|
|
1438
|
+
return r && (a += "size >= ".concat(r, ", ")), n && (a += "size <= ".concat(n, ", ")), i("span", ue({ title: "".concat(a, "types: ").concat(o), className: "file-types" }, { children: o }));
|
|
1439
|
+
}
|
|
1440
|
+
return null;
|
|
1441
|
+
}
|
|
1442
|
+
function io() {
|
|
1443
|
+
return C("svg", ue({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [i("path", { d: "M5.33317 6.66667H22.6665V16H25.3332V6.66667C25.3332 5.196 24.1372 4 22.6665 4H5.33317C3.8625 4 2.6665 5.196 2.6665 6.66667V22.6667C2.6665 24.1373 3.8625 25.3333 5.33317 25.3333H15.9998V22.6667H5.33317V6.66667Z", fill: "#0658C2" }), i("path", { d: "M10.6665 14.6667L6.6665 20H21.3332L15.9998 12L11.9998 17.3333L10.6665 14.6667Z", fill: "#0658C2" }), i("path", { d: "M25.3332 18.6667H22.6665V22.6667H18.6665V25.3333H22.6665V29.3333H25.3332V25.3333H29.3332V22.6667H25.3332V18.6667Z", fill: "#0658C2" })] }));
|
|
1444
|
+
}
|
|
1445
|
+
var ut = 0, co = function(e, t, n, r, o, a) {
|
|
1446
|
+
return n ? i("span", { children: "File type/size error, Hovered on types!" }) : i(oo, { children: r ? i("span", { children: "Upload disabled" }) : i(Le, e || t ? { children: a ? i(Le, { children: i("span", { children: a }) }) : C(Le, { children: [i("span", { children: "Uploaded Successfully!" }), " Upload another?"] }) } : { children: C(Le, o ? { children: [i("span", { children: o.split(" ")[0] }), " ", o.substr(o.indexOf(" ") + 1)] } : { children: [i("span", { children: "Upload" }), " or drop a file right here"] }) }) });
|
|
1447
|
+
}, lo = function(e) {
|
|
1448
|
+
var t = e.name, n = e.hoverTitle, r = e.types, o = e.handleChange, a = e.classes, s = e.children, l = e.maxSize, c = e.minSize, p = e.fileOrFiles, f = e.onSizeError, h = e.onTypeError, u = e.onSelect, d = e.onDrop, g = e.disabled, m = e.label, N = e.uploadedLabel, k = e.multiple, L = e.required, S = e.onDraggingStateChange, w = e.dropMessageStyle, x = e.ariaLabel, b = e.ariaDescribedby, y = Ue(null), O = Ue(null), _ = U(!1), oe = _[0], Se = _[1], Pe = U(null), Ie = Pe[0], ke = Pe[1], Re = U(!1), Fe = Re[0], J = Re[1], Ne = function(E) {
|
|
1449
|
+
return r && !function(M, T) {
|
|
1450
|
+
var B = M.name.split(".").pop();
|
|
1451
|
+
return T.map(function(X) {
|
|
1452
|
+
return X.toLowerCase();
|
|
1453
|
+
}).includes(B.toLowerCase());
|
|
1454
|
+
}(E, r) ? (J(!0), h && h("File type is not supported"), !1) : l && Xt(E.size) > l ? (J(!0), f && f("File size is too big"), !1) : !(c && Xt(E.size) < c) || (J(!0), f && f("File size is too small"), !1);
|
|
1455
|
+
}, $ = function(E) {
|
|
1456
|
+
var M = !1;
|
|
1457
|
+
if (E) {
|
|
1458
|
+
if (E instanceof File)
|
|
1459
|
+
M = !Ne(E);
|
|
1460
|
+
else
|
|
1461
|
+
for (var T = 0; T < E.length; T++) {
|
|
1462
|
+
var B = E[T];
|
|
1463
|
+
M = !Ne(B) || M;
|
|
1464
|
+
}
|
|
1465
|
+
return !M && (o && o(E), ke(E), Se(!0), J(!1), !0);
|
|
1466
|
+
}
|
|
1467
|
+
return !1;
|
|
1468
|
+
}, q = function(E) {
|
|
1469
|
+
var M = E.labelRef, T = E.inputRef, B = E.multiple, X = E.handleChanges, Q = E.onDrop, ae = U(!1), ee = ae[0], G = ae[1], se = fe(function() {
|
|
1470
|
+
T.current.click();
|
|
1471
|
+
}, [T]), te = fe(function(V) {
|
|
1472
|
+
V.preventDefault(), V.stopPropagation(), ut++, V.dataTransfer.items && V.dataTransfer.items.length !== 0 && G(!0);
|
|
1473
|
+
}, []), j = fe(function(V) {
|
|
1474
|
+
V.preventDefault(), V.stopPropagation(), --ut > 0 || G(!1);
|
|
1475
|
+
}, []), at = fe(function(V) {
|
|
1476
|
+
V.preventDefault(), V.stopPropagation();
|
|
1477
|
+
}, []), st = fe(function(V) {
|
|
1478
|
+
V.preventDefault(), V.stopPropagation(), G(!1), ut = 0;
|
|
1479
|
+
var Te = V.dataTransfer.files;
|
|
1480
|
+
if (Te && Te.length > 0) {
|
|
1481
|
+
var Nt = B ? Te : Te[0], Tn = X(Nt);
|
|
1482
|
+
Q && Tn && Q(Nt);
|
|
1483
|
+
}
|
|
1484
|
+
}, [X]);
|
|
1485
|
+
return ze(function() {
|
|
1486
|
+
var V = M.current;
|
|
1487
|
+
return V.addEventListener("click", se), V.addEventListener("dragenter", te), V.addEventListener("dragleave", j), V.addEventListener("dragover", at), V.addEventListener("drop", st), function() {
|
|
1488
|
+
V.removeEventListener("click", se), V.removeEventListener("dragenter", te), V.removeEventListener("dragleave", j), V.removeEventListener("dragover", at), V.removeEventListener("drop", st);
|
|
1489
|
+
};
|
|
1490
|
+
}, [se, te, j, at, st, M]), ee;
|
|
1491
|
+
}({ labelRef: y, inputRef: O, multiple: k, handleChanges: $, onDrop: d });
|
|
1492
|
+
return ze(function() {
|
|
1493
|
+
S == null || S(q);
|
|
1494
|
+
}, [q]), ze(function() {
|
|
1495
|
+
p ? (Se(!0), ke(p)) : (O.current && (O.current.value = ""), Se(!1), ke(null));
|
|
1496
|
+
}, [p]), C(to, ue({ override: s, className: "".concat(a || "", " ").concat(g ? "is-disabled" : ""), ref: y, htmlFor: t, onClick: function(E) {
|
|
1497
|
+
E.preventDefault(), E.stopPropagation();
|
|
1498
|
+
}, "aria-describedby": b, role: "button", "aria-label": x }, { children: [i("input", { onClick: function(E) {
|
|
1499
|
+
E.stopPropagation(), O && O.current && (O.current.value = "", O.current.click());
|
|
1500
|
+
}, onChange: function(E) {
|
|
1501
|
+
var M = E.target.files, T = k ? M : M[0], B = $(T);
|
|
1502
|
+
u && B && u(T);
|
|
1503
|
+
}, accept: ao(r), ref: O, type: "file", id: t, name: t, disabled: g, multiple: k, required: L }), q && i(no, ue({ style: w }, { children: i("span", { children: n || "Drop Here" }) })), !s && C(Le, { children: [i(io, {}), C(ro, ue({ $error: Fe }, { children: [co(Ie, oe, Fe, g, m, N), i(so, { types: r, minSize: c, maxSize: l })] }))] }), s] }));
|
|
1504
|
+
};
|
|
1505
|
+
const uo = ({
|
|
1506
|
+
width: e = 40,
|
|
1507
|
+
height: t = 40,
|
|
1508
|
+
...n
|
|
1509
|
+
}) => /* @__PURE__ */ C(
|
|
1510
|
+
"svg",
|
|
1511
|
+
{
|
|
1512
|
+
width: e,
|
|
1513
|
+
height: t,
|
|
1514
|
+
viewBox: "0 0 40 40",
|
|
1515
|
+
fill: "none",
|
|
1516
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1517
|
+
...n,
|
|
1518
|
+
children: [
|
|
1519
|
+
/* @__PURE__ */ i(
|
|
1520
|
+
"path",
|
|
1521
|
+
{
|
|
1522
|
+
d: "M0 20C0 8.95431 8.95431 0 20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20Z",
|
|
1523
|
+
fill: "#EAEEF0"
|
|
1524
|
+
}
|
|
1525
|
+
),
|
|
1526
|
+
/* @__PURE__ */ i(
|
|
1527
|
+
"path",
|
|
1528
|
+
{
|
|
1529
|
+
d: "M11.2425 26.9701L12.2127 26.7275L11.2425 26.9701ZM28.7575 26.9701L27.7873 26.7275V26.7276L28.7575 26.9701ZM27.6693 29.5764L27.0539 28.7881V28.7881L27.6693 29.5764ZM12.3307 29.5764L12.9461 28.7881H12.9461L12.3307 29.5764ZM22.8284 12.3284L22.1213 13.0355V13.0355L22.8284 12.3284ZM10.0299 26.2425L10.2724 27.2126L12.2127 26.7275L11.9701 25.7574L10.0299 26.2425ZM15.1231 30.9999H24.8769V28.9999H15.1231V30.9999ZM29.7276 27.2126L29.9701 26.2425L28.0299 25.7574L27.7873 26.7275L29.7276 27.2126ZM24.8769 30.9999C25.6025 30.9999 26.235 31.0016 26.7508 30.9399C27.2934 30.875 27.8165 30.7301 28.2847 30.3646L27.0539 28.7881C26.9796 28.8462 26.8564 28.913 26.5134 28.9541C26.1436 28.9983 25.6512 28.9999 24.8769 28.9999V30.9999ZM27.7873 26.7276C27.5995 27.4787 27.4785 27.9561 27.3459 28.304C27.2229 28.6269 27.1281 28.7301 27.0539 28.7881L28.2847 30.3646C28.7529 29.999 29.0203 29.5267 29.2149 29.0161C29.3998 28.5306 29.5516 27.9166 29.7276 27.2126L27.7873 26.7276ZM10.2724 27.2126C10.4484 27.9166 10.6002 28.5306 10.7851 29.0161C10.9797 29.5267 11.2471 29.999 11.7153 30.3646L12.9461 28.7881C12.8719 28.7301 12.7771 28.6269 12.6541 28.304C12.5215 27.9561 12.4005 27.4787 12.2127 26.7275L10.2724 27.2126ZM15.1231 28.9999C14.3488 28.9999 13.8564 28.9983 13.4866 28.9541C13.1436 28.913 13.0204 28.8462 12.9461 28.7881L11.7153 30.3646C12.1835 30.7301 12.7066 30.875 13.2492 30.9399C13.765 31.0016 14.3975 30.9999 15.1231 30.9999V28.9999ZM16.4645 11.6213L13.2929 14.7928L14.7071 16.207L17.8787 13.0355L16.4645 11.6213ZM22.1213 13.0355L25.2929 16.207L26.7071 14.7928L23.5355 11.6213L22.1213 13.0355ZM17.8787 13.0355C18.5653 12.3488 19.0107 11.9065 19.3817 11.6234C19.7296 11.3579 19.8923 11.3284 20 11.3284V9.32837C19.2792 9.32837 18.6944 9.63215 18.1685 10.0333C17.6658 10.4169 17.1111 10.9746 16.4645 11.6213L17.8787 13.0355ZM23.5355 11.6213C22.8889 10.9746 22.3342 10.4169 21.8315 10.0333C21.3056 9.63215 20.7208 9.32837 20 9.32837V11.3284C20.1077 11.3284 20.2704 11.3579 20.6183 11.6234C20.9893 11.9065 21.4347 12.3488 22.1213 13.0355L23.5355 11.6213ZM21 24.4999V10.4999H19V24.4999H21Z",
|
|
1530
|
+
fill: "#16A34A"
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1533
|
+
]
|
|
1534
|
+
}
|
|
1535
|
+
), po = ({
|
|
1536
|
+
hoverTitle: e,
|
|
1537
|
+
fileTypes: t,
|
|
1538
|
+
maxSize: n,
|
|
1539
|
+
multiple: r,
|
|
1540
|
+
onFileChange: o,
|
|
1541
|
+
onSizeError: a,
|
|
1542
|
+
onTypeError: s,
|
|
1543
|
+
name: l = "file",
|
|
1544
|
+
disabled: c
|
|
1545
|
+
}) => {
|
|
1546
|
+
const { t: p } = Ve();
|
|
1547
|
+
return /* @__PURE__ */ i("div", { className: "w-full", children: /* @__PURE__ */ i(
|
|
1548
|
+
lo,
|
|
1549
|
+
{
|
|
1550
|
+
hoverTitle: p(e, "Загрузить файл"),
|
|
1551
|
+
handleChange: o,
|
|
1552
|
+
types: t,
|
|
1553
|
+
maxSize: n,
|
|
1554
|
+
onSizeError: a,
|
|
1555
|
+
onTypeError: s,
|
|
1556
|
+
multiple: r,
|
|
1557
|
+
name: l,
|
|
1558
|
+
disabled: c,
|
|
1559
|
+
children: /* @__PURE__ */ C(
|
|
1560
|
+
F,
|
|
1561
|
+
{
|
|
1562
|
+
vertical: !0,
|
|
1563
|
+
gap: 20,
|
|
1564
|
+
align: "center",
|
|
1565
|
+
className: P(
|
|
1566
|
+
"p-5 rounded-xl border border-dashed border-lightGray5 cursor-pointer transition-colors duration-200",
|
|
1567
|
+
"hover:bg-gray-50 hover:border-grayBlue6",
|
|
1568
|
+
"active:bg-gray-100",
|
|
1569
|
+
c && "opacity-50 cursor-not-allowed hover:bg-transparent"
|
|
1570
|
+
),
|
|
1571
|
+
children: [
|
|
1572
|
+
/* @__PURE__ */ i(
|
|
1573
|
+
uo,
|
|
1574
|
+
{
|
|
1575
|
+
width: 40,
|
|
1576
|
+
height: 40
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
/* @__PURE__ */ C(
|
|
1580
|
+
F,
|
|
1581
|
+
{
|
|
1582
|
+
vertical: !0,
|
|
1583
|
+
gap: 1,
|
|
1584
|
+
align: "center",
|
|
1585
|
+
children: [
|
|
1586
|
+
/* @__PURE__ */ C("p", { className: "text-blackBG text-center text-base", children: [
|
|
1587
|
+
p("academy.drop_file", "Перетащите файл"),
|
|
1588
|
+
" ",
|
|
1589
|
+
/* @__PURE__ */ i("span", { className: "text-greenLight", children: p("academy.or_load", "или загрузите") })
|
|
1590
|
+
] }),
|
|
1591
|
+
/* @__PURE__ */ i("p", { className: "text-[13px] leading-4 text-center text-gray2", children: p("academy.max_size", {
|
|
1592
|
+
size: n,
|
|
1593
|
+
defaultValue: `Максимальный размер: ${n}MB`
|
|
1594
|
+
}) })
|
|
1595
|
+
]
|
|
1596
|
+
}
|
|
1597
|
+
)
|
|
1598
|
+
]
|
|
1599
|
+
}
|
|
1600
|
+
)
|
|
1601
|
+
}
|
|
1602
|
+
) });
|
|
1603
|
+
}, ho = ({
|
|
1604
|
+
width: e = 24,
|
|
1605
|
+
height: t = 24,
|
|
1606
|
+
color: n = "#768793",
|
|
1607
|
+
...r
|
|
1608
|
+
}) => /* @__PURE__ */ i(
|
|
1609
|
+
"svg",
|
|
1610
|
+
{
|
|
1611
|
+
width: e,
|
|
1612
|
+
height: t,
|
|
1613
|
+
viewBox: "0 0 24 24",
|
|
1614
|
+
fill: "none",
|
|
1615
|
+
xmlSpace: "preserve",
|
|
1616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1617
|
+
...r,
|
|
1618
|
+
children: /* @__PURE__ */ i(
|
|
1619
|
+
"path",
|
|
1620
|
+
{
|
|
1621
|
+
d: "M7 7L17 17M7 17L17 7",
|
|
1622
|
+
stroke: n,
|
|
1623
|
+
strokeWidth: "2",
|
|
1624
|
+
strokeLinecap: "round",
|
|
1625
|
+
strokeLinejoin: "bevel"
|
|
1626
|
+
}
|
|
1627
|
+
)
|
|
1628
|
+
}
|
|
1629
|
+
), fo = ({
|
|
1630
|
+
width: e = 24,
|
|
1631
|
+
height: t = 24,
|
|
1632
|
+
color: n = "#3E454C",
|
|
1633
|
+
...r
|
|
1634
|
+
}) => /* @__PURE__ */ i(
|
|
1635
|
+
"svg",
|
|
1636
|
+
{
|
|
1637
|
+
width: e,
|
|
1638
|
+
height: t,
|
|
1639
|
+
viewBox: "0 0 21 22",
|
|
1640
|
+
fill: "none",
|
|
1641
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1642
|
+
...r,
|
|
1643
|
+
children: /* @__PURE__ */ C("g", { id: "file-image-01", children: [
|
|
1644
|
+
/* @__PURE__ */ i(
|
|
1645
|
+
"path",
|
|
1646
|
+
{
|
|
1647
|
+
id: "Vector",
|
|
1648
|
+
d: "M16.4123 20.4135C15.8265 20.9993 14.8837 20.9993 12.9981 20.9993H4.99805C3.11243 20.9993 2.16962 20.9993 1.58383 20.4135C0.998047 19.8277 0.998047 18.8849 0.998047 16.9993V4.99927C0.998047 3.11365 0.998047 2.17084 1.58383 1.58505C2.16962 0.999268 3.11243 0.999268 4.99805 0.999268H9.15831C10.0635 0.999268 10.5161 0.999268 10.9139 1.18224C11.3117 1.36522 11.6063 1.70884 12.1953 2.3961L16.0351 6.8758C16.5114 7.43153 16.7496 7.7094 16.8738 8.04522C16.9981 8.38105 16.9981 8.74702 16.9981 9.47896V10.9993",
|
|
1649
|
+
stroke: n,
|
|
1650
|
+
strokeWidth: "2"
|
|
1651
|
+
}
|
|
1652
|
+
),
|
|
1653
|
+
/* @__PURE__ */ i(
|
|
1654
|
+
"path",
|
|
1655
|
+
{
|
|
1656
|
+
id: "Vector_2",
|
|
1657
|
+
d: "M9.99805 0.999268V6.49927C9.99805 7.44208 9.99805 7.91348 10.2909 8.20637C10.5838 8.49927 11.0552 8.49927 11.998 8.49927H16.498",
|
|
1658
|
+
stroke: n,
|
|
1659
|
+
strokeWidth: "2"
|
|
1660
|
+
}
|
|
1661
|
+
),
|
|
1662
|
+
/* @__PURE__ */ i(
|
|
1663
|
+
"path",
|
|
1664
|
+
{
|
|
1665
|
+
id: "Vector_3",
|
|
1666
|
+
d: "M19.8383 13.4993C19.4371 13.1853 18.9384 12.9993 18.398 12.9993C17.0726 12.9993 15.998 14.1186 15.998 15.4993C15.998 16.88 16.6726 17.9993 17.998 17.9993C19.1026 17.9993 19.998 16.88 19.998 15.4993",
|
|
1667
|
+
stroke: n,
|
|
1668
|
+
strokeWidth: "2",
|
|
1669
|
+
strokeLinejoin: "round"
|
|
1670
|
+
}
|
|
1671
|
+
),
|
|
1672
|
+
/* @__PURE__ */ i(
|
|
1673
|
+
"path",
|
|
1674
|
+
{
|
|
1675
|
+
id: "Vector 8117",
|
|
1676
|
+
d: "M17.998 15.4995H19.998V18.9995",
|
|
1677
|
+
stroke: n,
|
|
1678
|
+
strokeWidth: "2",
|
|
1679
|
+
strokeLinejoin: "round"
|
|
1680
|
+
}
|
|
1681
|
+
),
|
|
1682
|
+
/* @__PURE__ */ i(
|
|
1683
|
+
"path",
|
|
1684
|
+
{
|
|
1685
|
+
id: "Vector 8104",
|
|
1686
|
+
d: "M3.99805 12.4995V18.9995",
|
|
1687
|
+
stroke: n,
|
|
1688
|
+
strokeWidth: "2",
|
|
1689
|
+
strokeLinejoin: "round"
|
|
1690
|
+
}
|
|
1691
|
+
),
|
|
1692
|
+
/* @__PURE__ */ i(
|
|
1693
|
+
"path",
|
|
1694
|
+
{
|
|
1695
|
+
id: "Vector 8099",
|
|
1696
|
+
d: "M7 18.9993V14.4434C7 13.8606 7 13.5692 7.14661 13.5286C7.29323 13.488 7.44315 13.7379 7.743 14.2376L10 17.9993L12.257 14.2376C12.5569 13.7379 12.7068 13.488 12.8534 13.5286C13 13.5692 13 13.8606 13 14.4434V18.9993",
|
|
1697
|
+
stroke: n,
|
|
1698
|
+
strokeWidth: "2",
|
|
1699
|
+
strokeLinejoin: "round"
|
|
1700
|
+
}
|
|
1701
|
+
)
|
|
1702
|
+
] })
|
|
1703
|
+
}
|
|
1704
|
+
), Kt = (e, t) => Number.isNaN(e) || e === void 0 || e === null ? "" : e < 1024 ? `${e} ${t("file.b", "B")}` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} ${t("file.kb", "KB")}` : `${(e / (1024 * 1024)).toFixed(2)} ${t("file.mb", "MB")}`, go = (e, t) => {
|
|
1705
|
+
if (!e)
|
|
1706
|
+
return null;
|
|
1707
|
+
if (e instanceof File)
|
|
1708
|
+
return {
|
|
1709
|
+
name: e.name,
|
|
1710
|
+
size: Kt(e.size, t)
|
|
1711
|
+
};
|
|
1712
|
+
if (typeof e == "string") {
|
|
1713
|
+
const n = e.trim();
|
|
1714
|
+
let r = 0;
|
|
1715
|
+
if (n.startsWith("data:")) {
|
|
1716
|
+
const o = n.split(",")[1] || "";
|
|
1717
|
+
r = o.length * 3 / 4 - (o.endsWith("==") ? 2 : o.endsWith("=") ? 1 : 0);
|
|
1718
|
+
} else
|
|
1719
|
+
r = n.length * 3 / 4;
|
|
1720
|
+
return {
|
|
1721
|
+
name: t("file.base64", "Base64 File"),
|
|
1722
|
+
// Simplified name logic
|
|
1723
|
+
size: Kt(r, t)
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
return null;
|
|
1727
|
+
}, mo = ({
|
|
1728
|
+
file: e,
|
|
1729
|
+
index: t,
|
|
1730
|
+
onRemove: n,
|
|
1731
|
+
isDeleteBtn: r = !0
|
|
1732
|
+
}) => {
|
|
1733
|
+
const { t: o } = Ve(), a = go(e, o);
|
|
1734
|
+
return /* @__PURE__ */ C(
|
|
1735
|
+
F,
|
|
1736
|
+
{
|
|
1737
|
+
align: "start",
|
|
1738
|
+
justify: "between",
|
|
1739
|
+
className: "w-full p-3 border-b border-lightGray5 bg-white last:border-0",
|
|
1740
|
+
children: [
|
|
1741
|
+
/* @__PURE__ */ C(
|
|
1742
|
+
F,
|
|
1743
|
+
{
|
|
1744
|
+
align: "start",
|
|
1745
|
+
gap: 16,
|
|
1746
|
+
children: [
|
|
1747
|
+
/* @__PURE__ */ i(
|
|
1748
|
+
fo,
|
|
1749
|
+
{
|
|
1750
|
+
width: 21,
|
|
1751
|
+
height: 22,
|
|
1752
|
+
className: "text-blackBG mt-1"
|
|
1753
|
+
}
|
|
1754
|
+
),
|
|
1755
|
+
/* @__PURE__ */ C(F, { vertical: !0, children: [
|
|
1756
|
+
/* @__PURE__ */ i("p", { className: "text-base font-medium text-blackBG", children: (a == null ? void 0 : a.name) || o("tenders.Loaded", "Загружено") }),
|
|
1757
|
+
/* @__PURE__ */ i("span", { className: "text-[13px] leading-4 text-gray2", children: a == null ? void 0 : a.size })
|
|
1758
|
+
] })
|
|
1759
|
+
]
|
|
1760
|
+
}
|
|
1761
|
+
),
|
|
1762
|
+
r && /* @__PURE__ */ i(
|
|
1763
|
+
"button",
|
|
1764
|
+
{
|
|
1765
|
+
type: "button",
|
|
1766
|
+
className: "p-1 rounded-full text-lightGray bg-lightGray5 hover:bg-gray-200 hover:text-gray2 transition-all duration-200",
|
|
1767
|
+
onClick: () => n(t),
|
|
1768
|
+
children: /* @__PURE__ */ i(
|
|
1769
|
+
ho,
|
|
1770
|
+
{
|
|
1771
|
+
width: 16,
|
|
1772
|
+
height: 16,
|
|
1773
|
+
color: "currentColor"
|
|
1774
|
+
}
|
|
1775
|
+
)
|
|
1776
|
+
}
|
|
1777
|
+
)
|
|
1778
|
+
]
|
|
1779
|
+
}
|
|
1780
|
+
);
|
|
1781
|
+
}, yo = ({
|
|
1782
|
+
files: e,
|
|
1783
|
+
onRemove: t,
|
|
1784
|
+
isDeleteBtn: n
|
|
1785
|
+
}) => e.length === 0 ? null : /* @__PURE__ */ i(
|
|
1786
|
+
F,
|
|
1787
|
+
{
|
|
1788
|
+
vertical: !0,
|
|
1789
|
+
gap: 8,
|
|
1790
|
+
className: "w-full",
|
|
1791
|
+
children: e.map((r, o) => /* @__PURE__ */ i(
|
|
1792
|
+
mo,
|
|
1793
|
+
{
|
|
1794
|
+
file: r,
|
|
1795
|
+
index: o,
|
|
1796
|
+
onRemove: t,
|
|
1797
|
+
isDeleteBtn: n
|
|
1798
|
+
},
|
|
1799
|
+
o
|
|
1800
|
+
))
|
|
1801
|
+
}
|
|
1802
|
+
), vo = ({
|
|
1803
|
+
onChange: e,
|
|
1804
|
+
value: t,
|
|
1805
|
+
maxSize: n = 10,
|
|
1806
|
+
multiple: r = !0,
|
|
1807
|
+
onRemove: o
|
|
1808
|
+
}) => {
|
|
1809
|
+
const [a, s] = U(""), { t: l } = Ve();
|
|
1810
|
+
return {
|
|
1811
|
+
files: Array.isArray(t) ? t : [],
|
|
1812
|
+
uploadError: a,
|
|
1813
|
+
handleFileChange: (d) => {
|
|
1814
|
+
s("");
|
|
1815
|
+
let g = [];
|
|
1816
|
+
if (d && (d instanceof FileList || Array.isArray(d) ? g = Array.from(d) : d instanceof File || typeof d == "string" ? g = [d] : typeof d == "object" && (g = Object.values(d).filter(
|
|
1817
|
+
(m) => m instanceof File || typeof m == "string"
|
|
1818
|
+
))), r) {
|
|
1819
|
+
const m = Array.isArray(t) ? t : [];
|
|
1820
|
+
e([...m, ...g]);
|
|
1821
|
+
} else
|
|
1822
|
+
e(g);
|
|
1823
|
+
},
|
|
1824
|
+
handleRemoveFile: (d) => {
|
|
1825
|
+
if (o)
|
|
1826
|
+
o(d);
|
|
1827
|
+
else {
|
|
1828
|
+
const m = [...Array.isArray(t) ? t : []];
|
|
1829
|
+
m.splice(d, 1), e(m);
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
handleSizeError: () => {
|
|
1833
|
+
s(
|
|
1834
|
+
`${l("academy.max_size", { size: n, defaultValue: `Максимальный размер: ${n}MB` })}`
|
|
1835
|
+
);
|
|
1836
|
+
},
|
|
1837
|
+
handleTypeError: () => {
|
|
1838
|
+
s(`${l("academy.type_error", "Неверный тип файла")}`);
|
|
1839
|
+
}
|
|
1840
|
+
};
|
|
1841
|
+
}, Mn = W(
|
|
1842
|
+
({
|
|
1843
|
+
onChange: e,
|
|
1844
|
+
error: t,
|
|
1845
|
+
hoverTitle: n = "tenders.drag_file",
|
|
1846
|
+
maxSize: r = 10,
|
|
1847
|
+
fileTypes: o,
|
|
1848
|
+
value: a,
|
|
1849
|
+
isDeleteBtn: s = !0,
|
|
1850
|
+
label: l,
|
|
1851
|
+
onRemove: c,
|
|
1852
|
+
multiple: p = !0,
|
|
1853
|
+
name: f,
|
|
1854
|
+
disabled: h,
|
|
1855
|
+
...u
|
|
1856
|
+
}, d) => {
|
|
1857
|
+
const { t: g } = Ve(), {
|
|
1858
|
+
files: m,
|
|
1859
|
+
uploadError: N,
|
|
1860
|
+
handleFileChange: k,
|
|
1861
|
+
handleRemoveFile: L,
|
|
1862
|
+
handleSizeError: S,
|
|
1863
|
+
handleTypeError: w
|
|
1864
|
+
} = vo({
|
|
1865
|
+
onChange: e,
|
|
1866
|
+
value: a,
|
|
1867
|
+
maxSize: r,
|
|
1868
|
+
multiple: p,
|
|
1869
|
+
onRemove: c
|
|
1870
|
+
}), x = typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
1871
|
+
return /* @__PURE__ */ C(
|
|
1872
|
+
F,
|
|
1873
|
+
{
|
|
1874
|
+
ref: d,
|
|
1875
|
+
vertical: !0,
|
|
1876
|
+
gap: 12,
|
|
1877
|
+
className: "w-full",
|
|
1878
|
+
...u,
|
|
1879
|
+
children: [
|
|
1880
|
+
l && /* @__PURE__ */ i("p", { className: "text-base font-medium text-blackBG", children: g(l, l) }),
|
|
1881
|
+
(m.length === 0 || p) && /* @__PURE__ */ i(
|
|
1882
|
+
po,
|
|
1883
|
+
{
|
|
1884
|
+
hoverTitle: n,
|
|
1885
|
+
fileTypes: o,
|
|
1886
|
+
maxSize: r,
|
|
1887
|
+
multiple: p,
|
|
1888
|
+
onFileChange: k,
|
|
1889
|
+
onSizeError: S,
|
|
1890
|
+
onTypeError: w,
|
|
1891
|
+
name: f,
|
|
1892
|
+
disabled: h
|
|
1893
|
+
}
|
|
1894
|
+
),
|
|
1895
|
+
!!x && /* @__PURE__ */ i("div", { className: "text-red text-sm font-normal", children: g(x, x) }),
|
|
1896
|
+
!!N && /* @__PURE__ */ i("div", { className: "text-red text-sm font-normal", children: N }),
|
|
1897
|
+
/* @__PURE__ */ i(
|
|
1898
|
+
yo,
|
|
1899
|
+
{
|
|
1900
|
+
files: m,
|
|
1901
|
+
onRemove: L,
|
|
1902
|
+
isDeleteBtn: s
|
|
1903
|
+
}
|
|
1904
|
+
)
|
|
1905
|
+
]
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
);
|
|
1910
|
+
Mn.displayName = "FileLoader";
|
|
1911
|
+
const ot = W(
|
|
1912
|
+
({ className: e, type: t, error: n, label: r, startIcon: o, endIcon: a, ...s }, l) => /* @__PURE__ */ C("div", { className: "w-full relative", children: [
|
|
1913
|
+
/* @__PURE__ */ C("div", { className: "relative group", children: [
|
|
1914
|
+
/* @__PURE__ */ i(
|
|
1915
|
+
"input",
|
|
1916
|
+
{
|
|
1917
|
+
type: t,
|
|
1918
|
+
id: s.name,
|
|
1919
|
+
className: P(
|
|
1920
|
+
"peer flex h-14 w-full rounded-xl border border-lightGray5 outline-none bg-white px-4 pt-5 pb-2 text-base text-blackBG",
|
|
1921
|
+
"placeholder:text-transparent",
|
|
1922
|
+
"transition-all duration-300 ease-in-out",
|
|
1923
|
+
"hover:border-grayBlue6",
|
|
1924
|
+
"focus:border-greenLight",
|
|
1925
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-lightGray",
|
|
1926
|
+
o && "pl-12",
|
|
1927
|
+
a && "pr-12",
|
|
1928
|
+
n && "border-red hover:border-red focus:border-red",
|
|
1929
|
+
e
|
|
1930
|
+
),
|
|
1931
|
+
placeholder: r || "Placeholder",
|
|
1932
|
+
ref: l,
|
|
1933
|
+
...s
|
|
1934
|
+
}
|
|
1935
|
+
),
|
|
1936
|
+
o && /* @__PURE__ */ i("div", { className: "absolute left-4 top-1/2 -translate-y-1/2 flex items-center justify-center text-gray2 peer-focus:text-greenLight pointer-events-none z-10", children: o }),
|
|
1937
|
+
a && /* @__PURE__ */ i("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 flex items-center justify-center text-gray2 peer-focus:text-greenLight pointer-events-none z-10", children: a }),
|
|
1938
|
+
r && /* @__PURE__ */ i(
|
|
1939
|
+
"label",
|
|
1940
|
+
{
|
|
1941
|
+
htmlFor: s.name,
|
|
1942
|
+
className: P(
|
|
1943
|
+
"absolute left-4 top-4 text-base text-gray2 transition-all duration-300 pointer-events-none",
|
|
1944
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:text-base",
|
|
1945
|
+
"peer-focus:top-1.5 peer-focus:text-xs peer-focus:text-gray2",
|
|
1946
|
+
"peer-[:not(:placeholder-shown)]:top-1.5 peer-[:not(:placeholder-shown)]:text-xs",
|
|
1947
|
+
o && "left-12 peer-focus:left-12 peer-[:not(:placeholder-shown)]:left-12"
|
|
1948
|
+
),
|
|
1949
|
+
children: r
|
|
1950
|
+
}
|
|
1951
|
+
)
|
|
1952
|
+
] }),
|
|
1953
|
+
n && /* @__PURE__ */ i("p", { className: "mt-1 text-sm text-red", children: n })
|
|
1954
|
+
] })
|
|
1955
|
+
);
|
|
1956
|
+
ot.displayName = "Input";
|
|
1957
|
+
const bo = ({
|
|
1958
|
+
isFormatted: e,
|
|
1959
|
+
isReadable: t,
|
|
1960
|
+
onChange: n
|
|
1961
|
+
}) => {
|
|
1962
|
+
const r = !!t || !!e, o = fe(
|
|
1963
|
+
(s) => {
|
|
1964
|
+
if (s == null || s === "")
|
|
1965
|
+
return "";
|
|
1966
|
+
const l = Array.isArray(s) ? s.join("").replace(/\D/g, "") : s.toString().replace(/\D/g, "");
|
|
1967
|
+
return r ? l.replace(/\B(?=(\d{3})+(?!\d))/g, " ") : l;
|
|
1968
|
+
},
|
|
1969
|
+
[r]
|
|
1970
|
+
);
|
|
1971
|
+
return {
|
|
1972
|
+
formatValue: o,
|
|
1973
|
+
handleChange: (s) => {
|
|
1974
|
+
const l = s.target, c = l.value, p = c.replace(/\D/g, ""), f = l.selectionStart || 0, h = c.slice(0, f).replace(/\D/g, "").length, u = o(p);
|
|
1975
|
+
if (l.value = u, n) {
|
|
1976
|
+
const d = l.value;
|
|
1977
|
+
l.value = p, n(s), l.value = d;
|
|
1978
|
+
}
|
|
1979
|
+
if (r) {
|
|
1980
|
+
let d = 0, g = 0;
|
|
1981
|
+
for (; g < h && d < l.value.length; )
|
|
1982
|
+
/\d/.test(l.value[d]) && g++, d++;
|
|
1983
|
+
l.setSelectionRange(d, d);
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
}, Vn = W(
|
|
1988
|
+
({
|
|
1989
|
+
className: e,
|
|
1990
|
+
isFormatted: t,
|
|
1991
|
+
isReadable: n,
|
|
1992
|
+
error: r,
|
|
1993
|
+
label: o,
|
|
1994
|
+
onChange: a,
|
|
1995
|
+
value: s,
|
|
1996
|
+
defaultValue: l,
|
|
1997
|
+
...c
|
|
1998
|
+
}, p) => {
|
|
1999
|
+
const f = Ue(null);
|
|
2000
|
+
Jt(p, () => f.current);
|
|
2001
|
+
const { formatValue: h, handleChange: u } = bo({
|
|
2002
|
+
isFormatted: t,
|
|
2003
|
+
isReadable: n,
|
|
2004
|
+
onChange: a
|
|
2005
|
+
}), d = {
|
|
2006
|
+
...c,
|
|
2007
|
+
type: "text",
|
|
2008
|
+
inputMode: "numeric",
|
|
2009
|
+
onChange: u
|
|
2010
|
+
};
|
|
2011
|
+
return s !== void 0 ? d.value = h(s) : l !== void 0 && (d.defaultValue = h(l)), /* @__PURE__ */ C("div", { className: "w-full relative", children: [
|
|
2012
|
+
/* @__PURE__ */ C("div", { className: "group relative", children: [
|
|
2013
|
+
/* @__PURE__ */ i(
|
|
2014
|
+
"input",
|
|
2015
|
+
{
|
|
2016
|
+
...d,
|
|
2017
|
+
id: c.id || c.name,
|
|
2018
|
+
ref: f,
|
|
2019
|
+
className: P(
|
|
2020
|
+
"peer flex h-14 w-full rounded-xl border border-lightGray5 bg-white outline-none px-4 pt-5 pb-2 text-base text-blackBG",
|
|
2021
|
+
"placeholder:text-transparent",
|
|
2022
|
+
"transition-all duration-300 ease-in-out",
|
|
2023
|
+
"hover:border-grayBlue6",
|
|
2024
|
+
"focus:border-greenLight",
|
|
2025
|
+
"disabled:cursor-not-allowed disabled:bg-lightGray disabled:opacity-50",
|
|
2026
|
+
r && "border-red hover:border-red focus:border-red",
|
|
2027
|
+
e
|
|
2028
|
+
),
|
|
2029
|
+
placeholder: o || "0"
|
|
2030
|
+
}
|
|
2031
|
+
),
|
|
2032
|
+
o && /* @__PURE__ */ i(
|
|
2033
|
+
"label",
|
|
2034
|
+
{
|
|
2035
|
+
htmlFor: c.id || c.name,
|
|
2036
|
+
className: P(
|
|
2037
|
+
"absolute left-4 top-4 text-base text-gray2 transition-all duration-300 pointer-events-none",
|
|
2038
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:text-base",
|
|
2039
|
+
"peer-focus:top-1.5 peer-focus:text-xs peer-focus:text-gray2",
|
|
2040
|
+
"peer-[:not(:placeholder-shown)]:top-1.5 peer-[:not(:placeholder-shown)]:text-xs"
|
|
2041
|
+
),
|
|
2042
|
+
children: o
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2045
|
+
] }),
|
|
2046
|
+
r && /* @__PURE__ */ i("p", { className: "mt-2 text-sm text-red", children: r })
|
|
2047
|
+
] });
|
|
2048
|
+
}
|
|
2049
|
+
);
|
|
2050
|
+
Vn.displayName = "NumberField";
|
|
2051
|
+
const An = W(
|
|
2052
|
+
({ onChange: e, ...t }, n) => /* @__PURE__ */ i(
|
|
2053
|
+
ot,
|
|
2054
|
+
{
|
|
2055
|
+
ref: n,
|
|
2056
|
+
type: "tel",
|
|
2057
|
+
onChange: (o) => {
|
|
2058
|
+
let a = o.target.value.replace(/\D/g, "");
|
|
2059
|
+
a.length > 0 && (a = "+" + a);
|
|
2060
|
+
const s = t.maxLength || 16;
|
|
2061
|
+
a.length > s && (a = a.slice(0, s)), o.target.value = a, e == null || e(o);
|
|
2062
|
+
},
|
|
2063
|
+
...t
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
2066
|
+
);
|
|
2067
|
+
An.displayName = "PhoneInput";
|
|
2068
|
+
const wo = ({
|
|
2069
|
+
width: e = 20,
|
|
2070
|
+
height: t = 20,
|
|
2071
|
+
color: n = "#40474F",
|
|
2072
|
+
...r
|
|
2073
|
+
}) => /* @__PURE__ */ i(
|
|
2074
|
+
"svg",
|
|
2075
|
+
{
|
|
2076
|
+
width: e,
|
|
2077
|
+
height: t,
|
|
2078
|
+
viewBox: "0 0 20 20",
|
|
2079
|
+
fill: "none",
|
|
2080
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2081
|
+
...r,
|
|
2082
|
+
children: /* @__PURE__ */ i(
|
|
2083
|
+
"path",
|
|
2084
|
+
{
|
|
2085
|
+
d: "M18.3327 9.16669V10.1667H19.3327V9.16669H18.3327ZM1.66602 9.16669H0.666016V10.1667H1.66602V9.16669ZM4.99935 4.16669V5.16669H14.9993V4.16669V3.16669H4.99935V4.16669ZM18.3327 7.50002H17.3327V14.1667H18.3327H19.3327V7.50002H18.3327ZM14.9993 17.5V16.5H4.99935V17.5V18.5H14.9993V17.5ZM1.66602 14.1667H2.66602V7.50002H1.66602H0.666016V14.1667H1.66602ZM4.99935 17.5V16.5C4.1854 16.5 3.67555 16.4979 3.30381 16.4479C2.96084 16.4018 2.88859 16.3321 2.86128 16.3048L2.15417 17.0119L1.44706 17.719C1.90791 18.1798 2.47257 18.3542 3.03731 18.4301C3.57329 18.5021 4.24194 18.5 4.99935 18.5V17.5ZM1.66602 14.1667H0.666016C0.666016 14.9241 0.663892 15.5927 0.735952 16.1287C0.81188 16.6935 0.986218 17.2581 1.44706 17.719L2.15417 17.0119L2.86128 16.3048C2.83397 16.2774 2.76423 16.2052 2.71812 15.8622C2.66814 15.4905 2.66602 14.9806 2.66602 14.1667H1.66602ZM18.3327 14.1667H17.3327C17.3327 14.9806 17.3306 15.4905 17.2806 15.8622C17.2345 16.2052 17.1647 16.2774 17.1374 16.3048L17.8445 17.0119L18.5516 17.719C19.0125 17.2581 19.1868 16.6935 19.2627 16.1287C19.3348 15.5927 19.3327 14.9241 19.3327 14.1667H18.3327ZM14.9993 17.5V18.5C15.7568 18.5 16.4254 18.5021 16.9614 18.4301C17.5261 18.3542 18.0908 18.1798 18.5516 17.719L17.8445 17.0119L17.1374 16.3048C17.1101 16.3321 17.0379 16.4018 16.6949 16.4479C16.3232 16.4979 15.8133 16.5 14.9993 16.5V17.5ZM14.9993 4.16669V5.16669C15.8133 5.16669 16.3232 5.16881 16.6949 5.21879C17.0379 5.2649 17.1101 5.33464 17.1374 5.36195L17.8445 4.65484L18.5516 3.94774C18.0908 3.48689 17.5261 3.31255 16.9614 3.23662C16.4254 3.16456 15.7568 3.16669 14.9993 3.16669V4.16669ZM18.3327 7.50002H19.3327C19.3327 6.74262 19.3348 6.07396 19.2627 5.53799C19.1868 4.97324 19.0125 4.40858 18.5516 3.94774L17.8445 4.65484L17.1374 5.36195C17.1647 5.38926 17.2345 5.46151 17.2806 5.80448C17.3306 6.17622 17.3327 6.68608 17.3327 7.50002H18.3327ZM4.99935 4.16669V3.16669C4.24194 3.16669 3.57329 3.16456 3.03732 3.23662C2.47257 3.31255 1.90791 3.48689 1.44706 3.94774L2.15417 4.65484L2.86128 5.36195C2.88859 5.33464 2.96084 5.2649 3.30381 5.21879C3.67555 5.16881 4.1854 5.16669 4.99935 5.16669V4.16669ZM1.66602 7.50002H2.66602C2.66602 6.68608 2.66814 6.17622 2.71812 5.80448C2.76423 5.46151 2.83397 5.38926 2.86128 5.36195L2.15417 4.65484L1.44706 3.94774C0.986218 4.40858 0.81188 4.97324 0.735952 5.53799C0.663892 6.07396 0.666016 6.74262 0.666016 7.50002H1.66602ZM18.3327 7.50002H17.3327V9.16669H18.3327H19.3327V7.50002H18.3327ZM18.3327 9.16669V8.16669H1.66602V9.16669V10.1667H18.3327V9.16669ZM1.66602 9.16669H2.66602V7.50002H1.66602H0.666016V9.16669H1.66602ZM5.83268 1.66669H4.83268V4.16669H5.83268H6.83268V1.66669H5.83268ZM14.166 1.66669H13.166V4.16669H14.166H15.166V1.66669H14.166ZM14.166 14.1667V15.1667H15.8327V14.1667V13.1667H14.166V14.1667Z",
|
|
2086
|
+
fill: n
|
|
2087
|
+
}
|
|
2088
|
+
)
|
|
2089
|
+
}
|
|
2090
|
+
), xo = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], Co = (e) => {
|
|
2091
|
+
if (!e)
|
|
2092
|
+
return "";
|
|
2093
|
+
const t = String(e.getDate()).padStart(2, "0"), n = String(e.getMonth() + 1).padStart(2, "0"), r = e.getFullYear();
|
|
2094
|
+
return `${t}.${n}.${r}`;
|
|
2095
|
+
}, So = (e) => {
|
|
2096
|
+
if (!e)
|
|
2097
|
+
return null;
|
|
2098
|
+
const t = e.split(".");
|
|
2099
|
+
if (t.length === 3) {
|
|
2100
|
+
const n = parseInt(t[0], 10), r = parseInt(t[1], 10) - 1, o = parseInt(t[2], 10);
|
|
2101
|
+
if (!isNaN(n) && !isNaN(r) && !isNaN(o)) {
|
|
2102
|
+
const a = new Date(o, r, n);
|
|
2103
|
+
if (a.getDate() === n && a.getMonth() === r && a.getFullYear() === o)
|
|
2104
|
+
return a;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
return null;
|
|
2108
|
+
}, ko = (e, t) => {
|
|
2109
|
+
const r = new Date(t, e, 1).toLocaleDateString("ru-RU", {
|
|
2110
|
+
month: "long",
|
|
2111
|
+
year: "numeric"
|
|
2112
|
+
});
|
|
2113
|
+
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
2114
|
+
}, No = ({
|
|
2115
|
+
currentMonth: e,
|
|
2116
|
+
currentYear: t,
|
|
2117
|
+
calendarDays: n,
|
|
2118
|
+
onPrevMonth: r,
|
|
2119
|
+
onNextMonth: o,
|
|
2120
|
+
onSelectDate: a,
|
|
2121
|
+
selectedDate: s
|
|
2122
|
+
}) => {
|
|
2123
|
+
const l = (c, p, f) => {
|
|
2124
|
+
if (!s || c === null)
|
|
2125
|
+
return !1;
|
|
2126
|
+
let h = e, u = t;
|
|
2127
|
+
return p ? (h = h - 1, h < 0 && (h = 11, u = u - 1)) : f && (h = h + 1, h > 11 && (h = 0, u = u + 1)), s.getDate() === c && s.getMonth() === h && s.getFullYear() === u;
|
|
2128
|
+
};
|
|
2129
|
+
return /* @__PURE__ */ C("div", { className: "absolute top-[calc(100%+8px)] left-0 z-50 bg-white rounded-2xl border border-grayBlue shadow-lg p-4 min-w-[320px]", children: [
|
|
2130
|
+
/* @__PURE__ */ C(
|
|
2131
|
+
F,
|
|
2132
|
+
{
|
|
2133
|
+
align: "center",
|
|
2134
|
+
justify: "between",
|
|
2135
|
+
className: "mb-4",
|
|
2136
|
+
children: [
|
|
2137
|
+
/* @__PURE__ */ i(
|
|
2138
|
+
"button",
|
|
2139
|
+
{
|
|
2140
|
+
type: "button",
|
|
2141
|
+
onClick: r,
|
|
2142
|
+
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
2143
|
+
children: /* @__PURE__ */ i(
|
|
2144
|
+
Bn,
|
|
2145
|
+
{
|
|
2146
|
+
width: 16,
|
|
2147
|
+
height: 16
|
|
2148
|
+
}
|
|
2149
|
+
)
|
|
2150
|
+
}
|
|
2151
|
+
),
|
|
2152
|
+
/* @__PURE__ */ i("h3", { className: "text-base font-semibold text-blackBG capitalize", children: ko(e, t) }),
|
|
2153
|
+
/* @__PURE__ */ i(
|
|
2154
|
+
"button",
|
|
2155
|
+
{
|
|
2156
|
+
type: "button",
|
|
2157
|
+
onClick: o,
|
|
2158
|
+
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
2159
|
+
children: /* @__PURE__ */ i(
|
|
2160
|
+
Gn,
|
|
2161
|
+
{
|
|
2162
|
+
width: 16,
|
|
2163
|
+
height: 16
|
|
2164
|
+
}
|
|
2165
|
+
)
|
|
2166
|
+
}
|
|
2167
|
+
)
|
|
2168
|
+
]
|
|
2169
|
+
}
|
|
2170
|
+
),
|
|
2171
|
+
/* @__PURE__ */ i("div", { className: "grid grid-cols-7 gap-1 mb-2", children: xo.map((c) => /* @__PURE__ */ i(
|
|
2172
|
+
"div",
|
|
2173
|
+
{
|
|
2174
|
+
className: "text-center text-xs font-medium text-grayBlue5 py-2",
|
|
2175
|
+
children: c
|
|
2176
|
+
},
|
|
2177
|
+
c
|
|
2178
|
+
)) }),
|
|
2179
|
+
/* @__PURE__ */ i("div", { className: "grid grid-cols-7 gap-1", children: n.map((c, p) => {
|
|
2180
|
+
let h = new Date(t, e, 1).getDay() - 1;
|
|
2181
|
+
h === -1 && (h = 6);
|
|
2182
|
+
const u = new Date(
|
|
2183
|
+
t,
|
|
2184
|
+
e + 1,
|
|
2185
|
+
0
|
|
2186
|
+
).getDate(), d = p < h, g = p >= h + u, m = !d && !g, N = l(c, d, g);
|
|
2187
|
+
return /* @__PURE__ */ i(
|
|
2188
|
+
"button",
|
|
2189
|
+
{
|
|
2190
|
+
type: "button",
|
|
2191
|
+
onClick: () => a(c, d, g),
|
|
2192
|
+
disabled: c === null,
|
|
2193
|
+
className: P(
|
|
2194
|
+
"w-10 h-10 rounded-lg text-sm font-medium transition-colors",
|
|
2195
|
+
"hover:bg-[#E8F4FD] focus:outline-none focus:bg-[#E8F4FD]",
|
|
2196
|
+
m ? "text-blackBG" : "text-grayBlue5 opacity-50",
|
|
2197
|
+
N && "bg-greenLight text-white hover:bg-greenLight focus:bg-greenLight"
|
|
2198
|
+
),
|
|
2199
|
+
children: c
|
|
2200
|
+
},
|
|
2201
|
+
p
|
|
2202
|
+
);
|
|
2203
|
+
}) })
|
|
2204
|
+
] });
|
|
2205
|
+
}, Lo = (e) => {
|
|
2206
|
+
const [t, n] = U(
|
|
2207
|
+
(e || /* @__PURE__ */ new Date()).getMonth()
|
|
2208
|
+
), [r, o] = U(
|
|
2209
|
+
(e || /* @__PURE__ */ new Date()).getFullYear()
|
|
2210
|
+
), a = () => {
|
|
2211
|
+
t === 0 ? (n(11), o(r - 1)) : n(t - 1);
|
|
2212
|
+
}, s = () => {
|
|
2213
|
+
t === 11 ? (n(0), o(r + 1)) : n(t + 1);
|
|
2214
|
+
}, l = Qt(() => {
|
|
2215
|
+
const c = new Date(r, t, 1), f = new Date(r, t + 1, 0).getDate();
|
|
2216
|
+
let h = c.getDay() - 1;
|
|
2217
|
+
h === -1 && (h = 6);
|
|
2218
|
+
const u = [], d = new Date(r, t, 0).getDate();
|
|
2219
|
+
for (let m = h - 1; m >= 0; m--)
|
|
2220
|
+
u.push(d - m);
|
|
2221
|
+
for (let m = 1; m <= f; m++)
|
|
2222
|
+
u.push(m);
|
|
2223
|
+
const g = 42 - u.length;
|
|
2224
|
+
for (let m = 1; m <= g; m++)
|
|
2225
|
+
u.push(m);
|
|
2226
|
+
return u;
|
|
2227
|
+
}, [t, r]);
|
|
2228
|
+
return {
|
|
2229
|
+
currentMonth: t,
|
|
2230
|
+
currentYear: r,
|
|
2231
|
+
setCurrentMonth: n,
|
|
2232
|
+
setCurrentYear: o,
|
|
2233
|
+
handlePrevMonth: a,
|
|
2234
|
+
handleNextMonth: s,
|
|
2235
|
+
calendarDays: l
|
|
2236
|
+
};
|
|
2237
|
+
}, Eo = ({ value: e, onChange: t }) => {
|
|
2238
|
+
const [n, r] = U(""), [o, a] = U(!1), [s, l] = U(null), c = e !== void 0, p = c ? e : n, { ref: f } = en(o, () => {
|
|
2239
|
+
a(!1);
|
|
2240
|
+
}), h = Qt(() => So(p || ""), [p]), u = Lo(h || /* @__PURE__ */ new Date()), { setCurrentMonth: d, setCurrentYear: g } = u;
|
|
2241
|
+
return ze(() => {
|
|
2242
|
+
h && (l(h), d(h.getMonth()), g(h.getFullYear()));
|
|
2243
|
+
}, [h, d, g]), {
|
|
2244
|
+
displayValue: p,
|
|
2245
|
+
isCalendarOpen: o,
|
|
2246
|
+
calendarRef: f,
|
|
2247
|
+
selectedDate: s,
|
|
2248
|
+
handleInputChange: (w) => {
|
|
2249
|
+
const x = w.target.value;
|
|
2250
|
+
c || r(x), t == null || t(x);
|
|
2251
|
+
},
|
|
2252
|
+
handleDateSelect: (w, x, b) => {
|
|
2253
|
+
if (w === null)
|
|
2254
|
+
return;
|
|
2255
|
+
let y = u.currentMonth, O = u.currentYear;
|
|
2256
|
+
x ? (y = y - 1, y < 0 && (y = 11, O = O - 1)) : b && (y = y + 1, y > 11 && (y = 0, O = O + 1));
|
|
2257
|
+
const _ = new Date(O, y, w), oe = Co(_);
|
|
2258
|
+
l(_), d(y), g(O), c || r(oe), t == null || t(oe), a(!1);
|
|
2259
|
+
},
|
|
2260
|
+
toggleCalendar: () => a((w) => !w),
|
|
2261
|
+
openCalendar: () => a(!0),
|
|
2262
|
+
closeCalendar: () => a(!1),
|
|
2263
|
+
calendar: u
|
|
2264
|
+
};
|
|
2265
|
+
}, On = W(
|
|
2266
|
+
({
|
|
2267
|
+
className: e,
|
|
2268
|
+
error: t,
|
|
2269
|
+
label: n,
|
|
2270
|
+
value: r,
|
|
2271
|
+
onChange: o,
|
|
2272
|
+
placeholder: a = " ",
|
|
2273
|
+
...s
|
|
2274
|
+
}, l) => {
|
|
2275
|
+
const {
|
|
2276
|
+
displayValue: c,
|
|
2277
|
+
isCalendarOpen: p,
|
|
2278
|
+
calendarRef: f,
|
|
2279
|
+
selectedDate: h,
|
|
2280
|
+
handleInputChange: u,
|
|
2281
|
+
handleDateSelect: d,
|
|
2282
|
+
toggleCalendar: g,
|
|
2283
|
+
openCalendar: m,
|
|
2284
|
+
calendar: N
|
|
2285
|
+
} = Eo({ value: r, onChange: o });
|
|
2286
|
+
return /* @__PURE__ */ C(
|
|
2287
|
+
"div",
|
|
2288
|
+
{
|
|
2289
|
+
className: "w-full relative",
|
|
2290
|
+
ref: f,
|
|
2291
|
+
children: [
|
|
2292
|
+
/* @__PURE__ */ i(
|
|
2293
|
+
ot,
|
|
2294
|
+
{
|
|
2295
|
+
...s,
|
|
2296
|
+
ref: l,
|
|
2297
|
+
value: c,
|
|
2298
|
+
onChange: u,
|
|
2299
|
+
className: e,
|
|
2300
|
+
error: t,
|
|
2301
|
+
label: n,
|
|
2302
|
+
placeholder: a,
|
|
2303
|
+
onClick: m,
|
|
2304
|
+
startIcon: /* @__PURE__ */ i(
|
|
2305
|
+
"button",
|
|
2306
|
+
{
|
|
2307
|
+
type: "button",
|
|
2308
|
+
onClick: (k) => {
|
|
2309
|
+
k.stopPropagation(), g();
|
|
2310
|
+
},
|
|
2311
|
+
className: "flex items-center justify-center cursor-pointer pointer-events-auto hover:text-greenLight transition-colors",
|
|
2312
|
+
tabIndex: -1,
|
|
2313
|
+
children: /* @__PURE__ */ i(wo, {})
|
|
2314
|
+
}
|
|
2315
|
+
)
|
|
2316
|
+
}
|
|
2317
|
+
),
|
|
2318
|
+
p && /* @__PURE__ */ i(
|
|
2319
|
+
No,
|
|
2320
|
+
{
|
|
2321
|
+
currentMonth: N.currentMonth,
|
|
2322
|
+
currentYear: N.currentYear,
|
|
2323
|
+
calendarDays: N.calendarDays,
|
|
2324
|
+
onPrevMonth: N.handlePrevMonth,
|
|
2325
|
+
onNextMonth: N.handleNextMonth,
|
|
2326
|
+
onSelectDate: d,
|
|
2327
|
+
selectedDate: h
|
|
2328
|
+
}
|
|
2329
|
+
)
|
|
2330
|
+
]
|
|
2331
|
+
}
|
|
2332
|
+
);
|
|
2333
|
+
}
|
|
2334
|
+
);
|
|
2335
|
+
On.displayName = "DateInput";
|
|
2336
|
+
const Pn = W(
|
|
2337
|
+
({ className: e, label: t, error: n, value: r, ...o }, a) => /* @__PURE__ */ C("div", { children: [
|
|
2338
|
+
/* @__PURE__ */ C(
|
|
2339
|
+
F,
|
|
2340
|
+
{
|
|
2341
|
+
align: "center",
|
|
2342
|
+
gap: 8,
|
|
2343
|
+
as: "label",
|
|
2344
|
+
className: "cursor-pointer group w-fit",
|
|
2345
|
+
children: [
|
|
2346
|
+
/* @__PURE__ */ C(
|
|
2347
|
+
F,
|
|
2348
|
+
{
|
|
2349
|
+
align: "center",
|
|
2350
|
+
justify: "center",
|
|
2351
|
+
className: "relative",
|
|
2352
|
+
children: [
|
|
2353
|
+
/* @__PURE__ */ i(
|
|
2354
|
+
"input",
|
|
2355
|
+
{
|
|
2356
|
+
type: "radio",
|
|
2357
|
+
className: "peer sr-only",
|
|
2358
|
+
ref: a,
|
|
2359
|
+
value: String(r),
|
|
2360
|
+
...o
|
|
2361
|
+
}
|
|
2362
|
+
),
|
|
2363
|
+
/* @__PURE__ */ i(
|
|
2364
|
+
F,
|
|
2365
|
+
{
|
|
2366
|
+
align: "center",
|
|
2367
|
+
justify: "center",
|
|
2368
|
+
className: P(
|
|
2369
|
+
"size-6 rounded-full border bg-white border-grayBlue transition-all duration-200",
|
|
2370
|
+
"peer-checked:bg-greenLight peer-checked:border-greenLight",
|
|
2371
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-greenLight peer-focus-visible:ring-offset-2",
|
|
2372
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2373
|
+
"group-hover:border-greenLight",
|
|
2374
|
+
"peer-checked:[&>div]:scale-100",
|
|
2375
|
+
e
|
|
2376
|
+
),
|
|
2377
|
+
children: /* @__PURE__ */ i("div", { className: "size-3 rounded-full bg-white scale-0 transition-transform duration-200" })
|
|
2378
|
+
}
|
|
2379
|
+
)
|
|
2380
|
+
]
|
|
2381
|
+
}
|
|
2382
|
+
),
|
|
2383
|
+
t && /* @__PURE__ */ i(
|
|
2384
|
+
"span",
|
|
2385
|
+
{
|
|
2386
|
+
className: P(
|
|
2387
|
+
"text-sm text-graySoft select-none group-hover:text-blackBG transition-colors duration-200"
|
|
2388
|
+
),
|
|
2389
|
+
children: t
|
|
2390
|
+
}
|
|
2391
|
+
)
|
|
2392
|
+
]
|
|
2393
|
+
}
|
|
2394
|
+
),
|
|
2395
|
+
n && /* @__PURE__ */ i("p", { className: "mt-1 text-sm text-red", children: n })
|
|
2396
|
+
] })
|
|
2397
|
+
);
|
|
2398
|
+
Pn.displayName = "Radio";
|
|
2399
|
+
const In = W(
|
|
2400
|
+
({
|
|
2401
|
+
label: e,
|
|
2402
|
+
options: t = [],
|
|
2403
|
+
value: n,
|
|
2404
|
+
name: r,
|
|
2405
|
+
onChange: o,
|
|
2406
|
+
error: a,
|
|
2407
|
+
className: s,
|
|
2408
|
+
direction: l = "column"
|
|
2409
|
+
}, c) => /* @__PURE__ */ C(
|
|
2410
|
+
F,
|
|
2411
|
+
{
|
|
2412
|
+
ref: c,
|
|
2413
|
+
vertical: !0,
|
|
2414
|
+
gap: 12,
|
|
2415
|
+
className: P(s),
|
|
2416
|
+
children: [
|
|
2417
|
+
e && /* @__PURE__ */ i("label", { className: "text-sm font-medium text-blackBG py-1", children: e }),
|
|
2418
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2419
|
+
/* @__PURE__ */ i(
|
|
2420
|
+
F,
|
|
2421
|
+
{
|
|
2422
|
+
gap: 16,
|
|
2423
|
+
className: P(
|
|
2424
|
+
"w-full",
|
|
2425
|
+
l === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
2426
|
+
),
|
|
2427
|
+
children: t == null ? void 0 : t.map((p) => {
|
|
2428
|
+
const f = n === p.value;
|
|
2429
|
+
return /* @__PURE__ */ i(
|
|
2430
|
+
Pn,
|
|
2431
|
+
{
|
|
2432
|
+
name: r,
|
|
2433
|
+
label: p.label,
|
|
2434
|
+
value: p.value,
|
|
2435
|
+
checked: f,
|
|
2436
|
+
onChange: () => o == null ? void 0 : o(p.value)
|
|
2437
|
+
},
|
|
2438
|
+
String(p.value)
|
|
2439
|
+
);
|
|
2440
|
+
})
|
|
2441
|
+
}
|
|
2442
|
+
),
|
|
2443
|
+
a && /* @__PURE__ */ i("p", { className: "text-sm text-red mt-1", children: a })
|
|
2444
|
+
] })
|
|
2445
|
+
]
|
|
2446
|
+
}
|
|
2447
|
+
)
|
|
2448
|
+
);
|
|
2449
|
+
In.displayName = "RadioGroup";
|
|
2450
|
+
const Do = ({
|
|
2451
|
+
className: e,
|
|
2452
|
+
size: t = 20,
|
|
2453
|
+
color: n = "currentColor",
|
|
2454
|
+
...r
|
|
2455
|
+
}) => /* @__PURE__ */ i(
|
|
2456
|
+
"svg",
|
|
2457
|
+
{
|
|
2458
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2459
|
+
width: t,
|
|
2460
|
+
height: t,
|
|
2461
|
+
viewBox: "0 0 20 20",
|
|
2462
|
+
fill: "none",
|
|
2463
|
+
...r,
|
|
2464
|
+
className: e,
|
|
2465
|
+
children: /* @__PURE__ */ i(
|
|
2466
|
+
"path",
|
|
2467
|
+
{
|
|
2468
|
+
d: "M15 7.5L10.7071 11.7929C10.3738 12.1262 10.2071 12.2929 10 12.2929C9.79289 12.2929 9.62623 12.1262 9.29289 11.7929L5 7.5",
|
|
2469
|
+
stroke: n,
|
|
2470
|
+
strokeWidth: "2",
|
|
2471
|
+
strokeLinejoin: "round"
|
|
2472
|
+
}
|
|
2473
|
+
)
|
|
2474
|
+
}
|
|
2475
|
+
), Mo = ({
|
|
2476
|
+
options: e,
|
|
2477
|
+
selectedValue: t,
|
|
2478
|
+
onSelect: n
|
|
2479
|
+
}) => /* @__PURE__ */ i(
|
|
2480
|
+
"div",
|
|
2481
|
+
{
|
|
2482
|
+
className: P(
|
|
2483
|
+
"absolute left-0 z-[100] mt-2 w-full overflow-hidden rounded-xl border border-grayBlue bg-white shadow-xl",
|
|
2484
|
+
"animate-in fade-in zoom-in-95 duration-200",
|
|
2485
|
+
"transition-all duration-200 ease-in-out"
|
|
2486
|
+
),
|
|
2487
|
+
children: /* @__PURE__ */ i("div", { className: "max-h-[280px] overflow-y-auto py-2 custom-scrollbar", children: e.length > 0 ? e.map((r) => /* @__PURE__ */ i(
|
|
2488
|
+
"button",
|
|
2489
|
+
{
|
|
2490
|
+
type: "button",
|
|
2491
|
+
onClick: () => n(r),
|
|
2492
|
+
className: P(
|
|
2493
|
+
"flex w-full items-center px-4 py-2 text-left text-base transition-colors",
|
|
2494
|
+
r.value === t ? "bg-greenLight/90 font-medium text-white" : "text-blackBG hover:bg-[#E8F4FD] active:bg-green-100"
|
|
2495
|
+
),
|
|
2496
|
+
children: r.label
|
|
2497
|
+
},
|
|
2498
|
+
r.value
|
|
2499
|
+
)) : /* @__PURE__ */ i("div", { className: "px-5 py-3 text-sm text-gray2", children: "Нет данных" }) })
|
|
2500
|
+
}
|
|
2501
|
+
), Vo = ({
|
|
2502
|
+
value: e,
|
|
2503
|
+
options: t = [],
|
|
2504
|
+
onChange: n,
|
|
2505
|
+
onBlur: r,
|
|
2506
|
+
disabled: o,
|
|
2507
|
+
name: a
|
|
2508
|
+
}) => {
|
|
2509
|
+
const {
|
|
2510
|
+
ref: s,
|
|
2511
|
+
isShow: l,
|
|
2512
|
+
setIsShow: c
|
|
2513
|
+
} = en(!1), p = t.find((d) => d.value === e);
|
|
2514
|
+
return {
|
|
2515
|
+
isOpen: l,
|
|
2516
|
+
setIsOpen: c,
|
|
2517
|
+
containerRef: s,
|
|
2518
|
+
selectedOption: p,
|
|
2519
|
+
handleToggle: () => {
|
|
2520
|
+
o || c(!l);
|
|
2521
|
+
},
|
|
2522
|
+
handleSelect: (d) => {
|
|
2523
|
+
n && n({
|
|
2524
|
+
target: {
|
|
2525
|
+
name: a,
|
|
2526
|
+
value: d.value
|
|
2527
|
+
}
|
|
2528
|
+
}), c(!1);
|
|
2529
|
+
},
|
|
2530
|
+
handleBlur: (d) => {
|
|
2531
|
+
r && r({
|
|
2532
|
+
target: {
|
|
2533
|
+
name: a,
|
|
2534
|
+
value: e
|
|
2535
|
+
}
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
};
|
|
2539
|
+
}, Rn = W(
|
|
2540
|
+
({
|
|
2541
|
+
className: e,
|
|
2542
|
+
error: t,
|
|
2543
|
+
label: n,
|
|
2544
|
+
options: r = [],
|
|
2545
|
+
placeholder: o = " ",
|
|
2546
|
+
value: a,
|
|
2547
|
+
onChange: s,
|
|
2548
|
+
onBlur: l,
|
|
2549
|
+
name: c,
|
|
2550
|
+
disabled: p,
|
|
2551
|
+
...f
|
|
2552
|
+
}, h) => {
|
|
2553
|
+
const {
|
|
2554
|
+
isOpen: u,
|
|
2555
|
+
containerRef: d,
|
|
2556
|
+
selectedOption: g,
|
|
2557
|
+
handleToggle: m,
|
|
2558
|
+
handleSelect: N,
|
|
2559
|
+
handleBlur: k
|
|
2560
|
+
} = Vo({ value: a, options: r, onChange: s, onBlur: l, disabled: p, name: c });
|
|
2561
|
+
return Jt(h, () => d.current), /* @__PURE__ */ C(
|
|
2562
|
+
"div",
|
|
2563
|
+
{
|
|
2564
|
+
className: P("w-full relative", e),
|
|
2565
|
+
ref: d,
|
|
2566
|
+
onBlur: k,
|
|
2567
|
+
...f,
|
|
2568
|
+
children: [
|
|
2569
|
+
/* @__PURE__ */ C("div", { className: "relative w-full group", children: [
|
|
2570
|
+
/* @__PURE__ */ C(
|
|
2571
|
+
"button",
|
|
2572
|
+
{
|
|
2573
|
+
type: "button",
|
|
2574
|
+
onClick: m,
|
|
2575
|
+
disabled: p,
|
|
2576
|
+
className: P(
|
|
2577
|
+
"peer flex h-14 w-full items-center justify-between rounded-xl border border-lightGray5 bg-white px-4 text-base text-blackBG",
|
|
2578
|
+
"pt-5 pb-2 outline-none",
|
|
2579
|
+
"transition-all duration-300 ease-in-out",
|
|
2580
|
+
u && "border-greenLight",
|
|
2581
|
+
p && "cursor-not-allowed bg-lightGray opacity-50",
|
|
2582
|
+
t && "border-red hover:border-red"
|
|
2583
|
+
),
|
|
2584
|
+
children: [
|
|
2585
|
+
/* @__PURE__ */ i(
|
|
2586
|
+
"span",
|
|
2587
|
+
{
|
|
2588
|
+
className: P(
|
|
2589
|
+
"truncate text-left text-base text-blackBG",
|
|
2590
|
+
!g && "text-transparent"
|
|
2591
|
+
),
|
|
2592
|
+
children: g ? g.label : " "
|
|
2593
|
+
}
|
|
2594
|
+
),
|
|
2595
|
+
/* @__PURE__ */ i(
|
|
2596
|
+
Do,
|
|
2597
|
+
{
|
|
2598
|
+
size: 24,
|
|
2599
|
+
className: P(
|
|
2600
|
+
"absolute right-4 top-1/2 -translate-y-1/2 text-gray2 transition-transform duration-300",
|
|
2601
|
+
u && "rotate-180 text-green"
|
|
2602
|
+
)
|
|
2603
|
+
}
|
|
2604
|
+
)
|
|
2605
|
+
]
|
|
2606
|
+
}
|
|
2607
|
+
),
|
|
2608
|
+
(n || o) && /* @__PURE__ */ i(
|
|
2609
|
+
"label",
|
|
2610
|
+
{
|
|
2611
|
+
onClick: m,
|
|
2612
|
+
className: P(
|
|
2613
|
+
"absolute left-4 top-4 text-base text-gray2 transition-all duration-300 pointer-events-none",
|
|
2614
|
+
g || u ? "top-1.5 text-xs" : "top-4 text-base"
|
|
2615
|
+
),
|
|
2616
|
+
children: n || o
|
|
2617
|
+
}
|
|
2618
|
+
),
|
|
2619
|
+
u && /* @__PURE__ */ i(
|
|
2620
|
+
Mo,
|
|
2621
|
+
{
|
|
2622
|
+
options: r,
|
|
2623
|
+
selectedValue: a,
|
|
2624
|
+
onSelect: N
|
|
2625
|
+
}
|
|
2626
|
+
)
|
|
2627
|
+
] }),
|
|
2628
|
+
t && /* @__PURE__ */ i("p", { className: "mt-2 text-sm text-red", children: t })
|
|
2629
|
+
]
|
|
2630
|
+
}
|
|
2631
|
+
);
|
|
2632
|
+
}
|
|
2633
|
+
);
|
|
2634
|
+
Rn.displayName = "Select";
|
|
2635
|
+
const Fn = W(
|
|
2636
|
+
({ className: e, error: t, label: n, ...r }, o) => /* @__PURE__ */ C("div", { className: "w-full relative", children: [
|
|
2637
|
+
/* @__PURE__ */ i(
|
|
2638
|
+
"textarea",
|
|
2639
|
+
{
|
|
2640
|
+
className: P(
|
|
2641
|
+
"peer flex w-full min-h-[120px] rounded-xl border border-lightGray5 bg-white px-4 pt-5 pb-2 text-base text-blackBG outline-none",
|
|
2642
|
+
"placeholder:text-transparent",
|
|
2643
|
+
"transition-all duration-300 ease-in-out",
|
|
2644
|
+
"hover:border-grayBlue6",
|
|
2645
|
+
"focus:border-greenLight",
|
|
2646
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-lightGray",
|
|
2647
|
+
"resize-y",
|
|
2648
|
+
t && "border-red hover:border-red focus:border-red",
|
|
2649
|
+
e
|
|
2650
|
+
),
|
|
2651
|
+
placeholder: n || "Placeholder",
|
|
2652
|
+
ref: o,
|
|
2653
|
+
...r
|
|
2654
|
+
}
|
|
2655
|
+
),
|
|
2656
|
+
n && /* @__PURE__ */ i(
|
|
2657
|
+
"label",
|
|
2658
|
+
{
|
|
2659
|
+
htmlFor: r.name,
|
|
2660
|
+
className: P(
|
|
2661
|
+
"absolute left-4 top-4 text-base text-gray2 transition-all duration-300 pointer-events-none",
|
|
2662
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:text-base",
|
|
2663
|
+
"peer-focus:top-1.5 peer-focus:text-xs peer-focus:text-gray2",
|
|
2664
|
+
"peer-[:not(:placeholder-shown)]:top-1.5 peer-[:not(:placeholder-shown)]:text-xs"
|
|
2665
|
+
),
|
|
2666
|
+
children: n
|
|
2667
|
+
}
|
|
2668
|
+
),
|
|
2669
|
+
t && /* @__PURE__ */ i("p", { className: "mt-1 text-sm text-red", children: t })
|
|
2670
|
+
] })
|
|
2671
|
+
);
|
|
2672
|
+
Fn.displayName = "TextArea";
|
|
2673
|
+
const Ao = {
|
|
2674
|
+
text: ot,
|
|
2675
|
+
number: Vn,
|
|
2676
|
+
phone: An,
|
|
2677
|
+
select: Rn,
|
|
2678
|
+
date: On,
|
|
2679
|
+
radio: In,
|
|
2680
|
+
checkbox: nn,
|
|
2681
|
+
file: Mn,
|
|
2682
|
+
textarea: Fn
|
|
2683
|
+
}, Go = ({ field: e }) => {
|
|
2684
|
+
var S;
|
|
2685
|
+
const { t } = Ve(), {
|
|
2686
|
+
control: n,
|
|
2687
|
+
register: r,
|
|
2688
|
+
formState: { errors: o }
|
|
2689
|
+
} = Hn(), a = Zn(e.visibility, n), s = Wn(e), l = Yn(e, t), c = Ao[e.type];
|
|
2690
|
+
if (!c || !a)
|
|
2691
|
+
return null;
|
|
2692
|
+
const { optionsUrl: p, labelKey: f, valueKey: h, ...u } = e.field_props || {}, d = {
|
|
2693
|
+
...u,
|
|
2694
|
+
label: u != null && u.label ? t(u.label, u.label) : void 0,
|
|
2695
|
+
placeholder: u != null && u.placeholder ? t(u.placeholder, u.placeholder) : void 0
|
|
2696
|
+
}, g = e.type === "select" && p ? s : d.options || [], m = e.name ? (S = o[e.name]) == null ? void 0 : S.message : void 0, N = m ? t(m, m) : void 0, k = [
|
|
2697
|
+
"select",
|
|
2698
|
+
"radio",
|
|
2699
|
+
"checkbox",
|
|
2700
|
+
"file",
|
|
2701
|
+
"phone",
|
|
2702
|
+
"date"
|
|
2703
|
+
].includes(e.type), L = {
|
|
2704
|
+
...d,
|
|
2705
|
+
options: g,
|
|
2706
|
+
error: N
|
|
2707
|
+
};
|
|
2708
|
+
return k && e.name ? /* @__PURE__ */ i(
|
|
2709
|
+
_n,
|
|
2710
|
+
{
|
|
2711
|
+
name: e.name,
|
|
2712
|
+
control: n,
|
|
2713
|
+
rules: l,
|
|
2714
|
+
render: ({ field: { onChange: w, value: x, name: b, ref: y } }) => /* @__PURE__ */ i(
|
|
2715
|
+
c,
|
|
2716
|
+
{
|
|
2717
|
+
...L,
|
|
2718
|
+
onChange: w,
|
|
2719
|
+
value: x,
|
|
2720
|
+
name: b,
|
|
2721
|
+
ref: y
|
|
2722
|
+
}
|
|
2723
|
+
)
|
|
2724
|
+
}
|
|
2725
|
+
) : e.name ? /* @__PURE__ */ i(
|
|
2726
|
+
c,
|
|
2727
|
+
{
|
|
2728
|
+
...L,
|
|
2729
|
+
...r(e.name, l)
|
|
2730
|
+
}
|
|
2731
|
+
) : /* @__PURE__ */ i(
|
|
2732
|
+
c,
|
|
2733
|
+
{
|
|
2734
|
+
...L,
|
|
2735
|
+
onChange: () => {
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
);
|
|
2739
|
+
};
|
|
2740
|
+
export {
|
|
2741
|
+
tn as C,
|
|
2742
|
+
Go as F
|
|
2743
|
+
};
|