@efficiency-point/design-system 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -114,6 +114,20 @@ export function Example() {
114
114
  />
115
115
  ```
116
116
 
117
+ ### DSSearchDropDown
118
+
119
+ Контролируемый одиночный выбор с live-поиском по `label` и `value`. Меню показывает не более пяти строк одновременно и прокручивает остальные варианты.
120
+
121
+ ```tsx
122
+ <DSSearchDropDown
123
+ label="Отдел"
124
+ options={options}
125
+ value={departmentId}
126
+ onChange={setDepartmentId}
127
+ placeholder="Найдите отдел"
128
+ />
129
+ ```
130
+
117
131
  ### DSDateTimePicker
118
132
 
119
133
  Контролируемое поле для `date`, `time` или `datetime`. Использует нативные browser controls и принимает `Date | null`, `min` и `max`.
@@ -190,6 +204,10 @@ export function Example() {
190
204
  <DSBadge variant="success" dot>Готово</DSBadge>
191
205
  ```
192
206
 
207
+ ### DSAccordion
208
+
209
+ При раскрытии Accordion автоматически прокручивает страницу после завершения анимации: короткий контент показывается целиком у нижней границы viewport, а высокий фиксируется заголовком у верхней границы. Поведение можно отключить через `autoScrollOnOpen={false}`; отступ настраивается `scrollOffset`.
210
+
193
211
  ### DSSkeleton
194
212
 
195
213
  Декоративный placeholder с вариантами `text`, `rectangular`, `circular`, несколькими строками и отключаемой анимацией. Skeleton скрыт от accessibility tree; `aria-busy` должен задавать родитель.
@@ -1,13 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
- type DSAccordionProps = {
2
+ export type DSAccordionProps = {
3
3
  title: ReactNode;
4
4
  subtitle?: ReactNode;
5
5
  children: ReactNode;
6
6
  defaultOpen?: boolean;
7
7
  open?: boolean;
8
8
  onOpenChange?: (open: boolean) => void;
9
+ autoScrollOnOpen?: boolean;
10
+ scrollOffset?: number;
9
11
  className?: string;
10
12
  };
11
- export declare const DSAccordion: ({ title, subtitle, children, defaultOpen, open: controlledOpen, onOpenChange, className, }: DSAccordionProps) => import("react").JSX.Element;
12
- export {};
13
+ export type DSAccordionScrollTarget = {
14
+ alignment: 'start' | 'end' | 'none';
15
+ delta: number;
16
+ };
17
+ export declare const getDSAccordionScrollTarget: (top: number, height: number, viewportHeight: number, offset?: number) => DSAccordionScrollTarget;
18
+ export declare const DSAccordion: ({ title, subtitle, children, defaultOpen, open: controlledOpen, onOpenChange, autoScrollOnOpen, scrollOffset, className, }: DSAccordionProps) => import("react").JSX.Element;
13
19
  //# sourceMappingURL=DSAccordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSAccordion.d.ts","sourceRoot":"","sources":["../../../src/components/DSAccordion/DSAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,KAAK,gBAAgB,GAAG;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,4FAQzB,gBAAgB,gCAqDlB,CAAC"}
1
+ {"version":3,"file":"DSAccordion.d.ts","sourceRoot":"","sources":["../../../src/components/DSAccordion/DSAccordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,SAAS,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACnC,KAAK,MAAM,EACX,QAAQ,MAAM,EACd,gBAAgB,MAAM,EACtB,eAAW,KACZ,uBAsBF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,4HAUzB,gBAAgB,gCA4GlB,CAAC"}
@@ -6,7 +6,6 @@ export interface DSButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
6
6
  variant?: DSButtonVariant;
7
7
  size?: DSButtonSize;
8
8
  isLoading?: boolean;
9
- loadingLabel?: string;
10
9
  }
11
10
  export declare const DSButton: import('react').ForwardRefExoticComponent<DSButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
12
11
  //# sourceMappingURL=DSButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSButton.d.ts","sourceRoot":"","sources":["../../../src/components/DSButton/DSButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAC7H,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC5F,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ,6GA0BnB,CAAC"}
1
+ {"version":3,"file":"DSButton.d.ts","sourceRoot":"","sources":["../../../src/components/DSButton/DSButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAC7H,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC5F,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,6GAsBnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DSDateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DSDateTimePicker/DSDateTimePicker.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAaF,eAAO,MAAM,wBAAwB,GACjC,OAAO,IAAI,GAAG,IAAI,EAClB,MAAM,oBAAoB,WAW7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAChC,OAAO,MAAM,EACb,MAAM,oBAAoB,gBAoB7B,CAAC;AAuDF,eAAO,MAAM,gBAAgB,GAAI,gIAiB9B,qBAAqB,gCA6VvB,CAAC"}
1
+ {"version":3,"file":"DSDateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DSDateTimePicker/DSDateTimePicker.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAaF,eAAO,MAAM,wBAAwB,GACjC,OAAO,IAAI,GAAG,IAAI,EAClB,MAAM,oBAAoB,WAW7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAChC,OAAO,MAAM,EACb,MAAM,oBAAoB,gBAsC7B,CAAC;AAuDF,eAAO,MAAM,gBAAgB,GAAI,gIAiB9B,qBAAqB,gCAmWvB,CAAC"}
@@ -1,19 +1,23 @@
1
1
  import { CSSProperties } from 'react';
2
- import { DropDownOption } from '../DSDropDown/DSDropDown';
2
+ import { DropDownOption, DSDropDownSize } from '../DSDropDown/DSDropDown';
3
3
  export type DSDropDownMultipleProps = {
4
4
  options: DropDownOption[];
5
5
  value: string[];
6
6
  onChange?: (value: string[], selectedOptions: DropDownOption[]) => void;
7
7
  placeholder?: string;
8
8
  disabled?: boolean;
9
+ stringWhileDisabled?: boolean;
9
10
  label?: string;
10
11
  error?: string;
12
+ size?: DSDropDownSize;
13
+ required?: boolean;
11
14
  hint?: string;
12
15
  className?: string;
13
16
  name?: string;
14
17
  id?: string;
15
18
  closeOnSelect?: boolean;
19
+ needMark?: boolean;
16
20
  maxMenuHeight?: CSSProperties['maxHeight'];
17
21
  };
18
- export declare const DSDropDownMultiple: ({ options, value, onChange, placeholder, disabled, label, error, hint, className, name, id, closeOnSelect, maxMenuHeight, }: DSDropDownMultipleProps) => import("react").JSX.Element;
22
+ export declare const DSDropDownMultiple: ({ options, value, onChange, placeholder, disabled, stringWhileDisabled, label, error, size, required, hint, className, name, id, closeOnSelect, needMark, maxMenuHeight, }: DSDropDownMultipleProps) => import("react").JSX.Element;
19
23
  //# sourceMappingURL=DSDropDownMultiple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSDropDownMultiple.d.ts","sourceRoot":"","sources":["../../../src/components/DSDropDownMultiple/DSDropDownMultiple.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1F,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,6HAchC,uBAAuB,gCAoKzB,CAAC"}
1
+ {"version":3,"file":"DSDropDownMultiple.d.ts","sourceRoot":"","sources":["../../../src/components/DSDropDownMultiple/DSDropDownMultiple.tsx"],"names":[],"mappings":"AACA,OAAO,EAQH,KAAK,aAAa,EACrB,MAAM,OAAO,CAAC;AACf,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,cAAc,EACtB,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CAC9C,CAAC;AAiBF,eAAO,MAAM,kBAAkB,GAAI,4KAkBhC,uBAAuB,gCAyMzB,CAAC"}
@@ -1,9 +1,5 @@
1
- export type DSLoaderVariant = 'primary' | 'secondary' | 'light' | 'danger';
2
- export type DSLoaderProps = {
1
+ export type DSLoaderVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'empty' | 'destructive' | 'destructiveOutline';
2
+ export declare const DSLoader: ({ variant }: Readonly<{
3
3
  variant?: DSLoaderVariant;
4
- label?: string;
5
- className?: string;
6
- decorative?: boolean;
7
- };
8
- export declare const DSLoader: ({ variant, label, className, decorative, }: DSLoaderProps) => import("react").JSX.Element;
4
+ }>) => import("react").JSX.Element;
9
5
  //# sourceMappingURL=DSLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLoader.d.ts","sourceRoot":"","sources":["../../../src/components/DSLoader/DSLoader.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,4CAKtB,aAAa,gCAOf,CAAC"}
1
+ {"version":3,"file":"DSLoader.d.ts","sourceRoot":"","sources":["../../../src/components/DSLoader/DSLoader.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAE7H,eAAO,MAAM,QAAQ,GAAI,aAAyB,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CAAC,CAAC,gCAWtF,CAAC"}
@@ -1,6 +1,2 @@
1
- export type DSPageLoaderProps = {
2
- label?: string;
3
- className?: string;
4
- };
5
- export declare const DSPageLoader: ({ label, className }: DSPageLoaderProps) => import("react").JSX.Element;
1
+ export declare const DSPageLoader: () => import("react").JSX.Element;
6
2
  //# sourceMappingURL=DSPageLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSPageLoader.d.ts","sourceRoot":"","sources":["../../../src/components/DSPageLoader/DSPageLoader.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,sBAAiD,iBAAiB,gCAS9F,CAAC"}
1
+ {"version":3,"file":"DSPageLoader.d.ts","sourceRoot":"","sources":["../../../src/components/DSPageLoader/DSPageLoader.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,mCAkBxB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { DSDropDownSize, DropDownOption } from '../DSDropDown/DSDropDown';
2
+ export type DSSearchDropDownProps = {
3
+ options: DropDownOption[];
4
+ value: string;
5
+ onChange?: (value: string, option: DropDownOption) => void;
6
+ placeholder?: string;
7
+ noResultsText?: string;
8
+ disabled?: boolean;
9
+ readOnly?: boolean;
10
+ stringWhileDisabled?: boolean;
11
+ label?: string;
12
+ error?: string;
13
+ hint?: string;
14
+ size?: DSDropDownSize;
15
+ required?: boolean;
16
+ className?: string;
17
+ name?: string;
18
+ id?: string;
19
+ needMark?: boolean;
20
+ };
21
+ export declare const DSSearchDropDown: ({ options, value, onChange, placeholder, noResultsText, disabled, readOnly, stringWhileDisabled, label, error, hint, size, required, className, name, id, needMark, }: DSSearchDropDownProps) => import("react").JSX.Element;
22
+ //# sourceMappingURL=DSSearchDropDown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSSearchDropDown.d.ts","sourceRoot":"","sources":["../../../src/components/DSSearchDropDown/DSSearchDropDown.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQ/E,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAcF,eAAO,MAAM,gBAAgB,GAAI,uKAkB9B,qBAAqB,gCA6QvB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { DropDownOption } from '../DSDropDown/DSDropDown';
2
+ export declare const filterSearchDropDownOptions: (options: DropDownOption[], query: string) => DropDownOption[];
3
+ export declare const getNextSearchDropDownOptionIndex: (options: DropDownOption[], startIndex: number, direction: 1 | -1) => number;
4
+ //# sourceMappingURL=DSSearchDropDown.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSSearchDropDown.utils.d.ts","sourceRoot":"","sources":["../../../src/components/DSSearchDropDown/DSSearchDropDown.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,2BAA2B,GAAI,SAAS,cAAc,EAAE,EAAE,OAAO,MAAM,qBAQnF,CAAC;AAEF,eAAO,MAAM,gCAAgC,GACzC,SAAS,cAAc,EAAE,EACzB,YAAY,MAAM,EAClB,WAAW,CAAC,GAAG,CAAC,CAAC,WAUpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DSVideoPlayerFrame.d.ts","sourceRoot":"","sources":["../../../src/components/DSVideoPlayerFrame/DSVideoPlayerFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAI/E,MAAM,MAAM,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IACpG,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,+HAahC,uBAAuB,gCAkCzB,CAAC"}
1
+ {"version":3,"file":"DSVideoPlayerFrame.d.ts","sourceRoot":"","sources":["../../../src/components/DSVideoPlayerFrame/DSVideoPlayerFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAI1F,MAAM,MAAM,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IACpG,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAkBF,eAAO,MAAM,kBAAkB,GAAI,+HAahC,uBAAuB,gCAuFzB,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("@tanstack/react-table"),i=require("zustand");var a={badge:`_badge_1pk53_1`,sm:`_sm_1pk53_3`,md:`_md_1pk53_5`,neutral:`_neutral_1pk53_7`,info:`_info_1pk53_9`,success:`_success_1pk53_11`,warning:`_warning_1pk53_13`,error:`_error_1pk53_15`,dot:`_dot_1pk53_17`,icon:`_icon_1pk53_19`,label:`_label_1pk53_21`},o=({children:t,variant:n=`neutral`,size:r=`md`,dot:i=!1,icon:o,className:s=``})=>(0,e.jsxs)(`span`,{className:`${a.badge} ${a[n]} ${a[r]} ${s}`,children:[i&&(0,e.jsx)(`span`,{className:a.dot,"aria-hidden":`true`}),o&&(0,e.jsx)(`span`,{className:a.icon,"aria-hidden":`true`,children:o}),(0,e.jsx)(`span`,{className:a.label,children:t})]}),s={loader:`_loader_1tjcf_1`,"ds-spin":`_ds-spin_1tjcf_1`,primary:`_primary_1tjcf_21`,secondary:`_secondary_1tjcf_23`,light:`_light_1tjcf_25`,danger:`_danger_1tjcf_27`},c=({variant:t=`primary`,label:n=`Загрузка`,className:r=``,decorative:i=!1})=>(0,e.jsx)(`span`,{className:`${s.loader} ${s[t]} ${r}`,role:i?void 0:`status`,"aria-label":i?void 0:n,"aria-hidden":i||void 0}),l={button:`_button_1gql6_1`,sm:`_sm_1gql6_43`,md:`_md_1gql6_55`,lg:`_lg_1gql6_67`,primary:`_primary_1gql6_79`,secondary:`_secondary_1gql6_91`,outline:`_outline_1gql6_103`,ghost:`_ghost_1gql6_115`,empty:`_empty_1gql6_127`,destructive:`_destructive_1gql6_139`,destructiveOutline:`_destructiveOutline_1gql6_147`},u=(0,t.forwardRef)(({children:t,variant:n=`primary`,size:r=`md`,isLoading:i=!1,loadingLabel:a=`Загрузка`,disabled:o,type:s=`button`,className:u=``,...d},f)=>(0,e.jsx)(`button`,{ref:f,className:`${l.button} ${l[n]} ${l[r]} ${u}`,disabled:o||i,"aria-busy":i||void 0,...d,type:s,children:i?(0,e.jsx)(c,{variant:`light`,label:a}):t}));u.displayName=`DSButton`;var d={label:`_label_fa00b_1`,required:`_required_fa00b_23`,error:`_error_fa00b_25`,optional:`_optional_fa00b_33`,hint:`_hint_fa00b_35`,disabled:`_disabled_fa00b_47`,message:`_message_fa00b_55`,success:`_success_fa00b_71`},f=({children:t,required:n=!1,optionalText:r,disabled:i=!1,className:a=``,...o})=>(0,e.jsxs)(`label`,{className:`${d.label} ${i?d.disabled:``} ${a}`,...o,children:[(0,e.jsx)(`span`,{children:t}),n&&(0,e.jsx)(`span`,{className:d.required,"aria-hidden":`true`,children:`*`}),r&&(0,e.jsx)(`span`,{className:d.optional,children:r})]}),p=({children:t,variant:n=`hint`,id:r,live:i=!1,className:a=``})=>(0,e.jsx)(`span`,{id:r,className:`${d.message} ${d[n]} ${a}`,role:i&&n===`error`?`alert`:void 0,"aria-live":i&&n!==`error`?`polite`:void 0,children:t}),m={wrapper:`_wrapper_1gq36_1`,label:`_label_1gq36_3`,input:`_input_1gq36_5`,control:`_control_1gq36_7`,disabled:`_disabled_1gq36_13`,controlError:`_controlError_1gq36_17`},h=({checked:n,onChange:r,label:i,hint:a,error:o,disabled:s=!1,readOnly:c=!1,className:l=``,name:u,id:d,indeterminate:f=!1,...h})=>{let g=(0,t.useId)(),_=d??`ds-checkbox-${u??g}`,v=(0,t.useRef)(null),y=a?`${_}-hint`:void 0,b=o?`${_}-error`:void 0;return(0,t.useEffect)(()=>{v.current&&(v.current.indeterminate=f&&!n)},[n,f]),(0,e.jsxs)(`div`,{className:`${m.wrapper} ${l}`,children:[(0,e.jsxs)(`label`,{className:`${m.label} ${s?m.disabled:``}`,htmlFor:_,children:[(0,e.jsx)(`input`,{ref:v,id:_,name:u,type:`checkbox`,checked:n,disabled:s,"aria-readonly":c||void 0,"aria-invalid":!!o,"aria-describedby":[y,b].filter(Boolean).join(` `)||void 0,className:m.input,onChange:e=>{c||r?.(e.target.checked,e)},...h}),(0,e.jsx)(`span`,{className:`${m.control} ${o?m.controlError:``}`,"aria-hidden":`true`,children:f&&!n?`−`:n?`✓`:``}),i&&(0,e.jsx)(`span`,{children:i})]}),a&&!o&&(0,e.jsx)(p,{id:y,children:a}),o&&(0,e.jsx)(p,{id:b,variant:`error`,children:o})]})},g={wrapper:`_wrapper_1or7y_1`,trigger:`_trigger_1or7y_17`,lg:`_lg_1or7y_51`,chevron:`_chevron_1or7y_63`,chevronOpen:`_chevronOpen_1or7y_89`,nav:`_nav_1or7y_99`,day:`_day_1or7y_101`,monthSelect:`_monthSelect_1or7y_103`,yearInput:`_yearInput_1or7y_105`,timeInput:`_timeInput_1or7y_107`,value:`_value_1or7y_131`,placeholder:`_placeholder_1or7y_139`,error:`_error_1or7y_147`,panel:`_panel_1or7y_155`,calendarHeader:`_calendarHeader_1or7y_181`,weekdays:`_weekdays_1or7y_271`,days:`_days_1or7y_273`,outside:`_outside_1or7y_309`,selected:`_selected_1or7y_317`,timeLabel:`_timeLabel_1or7y_337`},_=[`Пн`,`Вт`,`Ср`,`Чт`,`Пт`,`Сб`,`Вс`],v=[`Январь`,`Февраль`,`Март`,`Апрель`,`Май`,`Июнь`,`Июль`,`Август`,`Сентябрь`,`Октябрь`,`Ноябрь`,`Декабрь`],y=e=>String(e).padStart(2,`0`),b=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),x=(e,t)=>{if(!e)return``;let n=`${e.getFullYear()}-${y(e.getMonth()+1)}-${y(e.getDate())}`,r=`${y(e.getHours())}:${y(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n}T${r}`},S=(e,t)=>{if(!e)return null;if(t===`time`){let t=/^(\d{2}):(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(n>23||r>59)return null;let i=new Date;return i.setHours(n,r,0,0),i}let n=new Date(t===`date`?`${e}T00:00`:e);return Number.isNaN(n.getTime())?null:n},C=(e,t)=>{if(!e)return``;let n=`${y(e.getDate())}.${y(e.getMonth()+1)}.${e.getFullYear()}`,r=`${y(e.getHours())}:${y(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n} ${r}`},w=e=>{let t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=new Date(t);return r.setDate(t.getDate()-n),Array.from({length:42},(e,t)=>{let n=new Date(r);return n.setDate(r.getDate()+t),n})},T=(e,t)=>!!(e&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),E=(e,t,n)=>{let r=b(e).getTime();return!!(t&&r<b(t).getTime()||n&&r>b(n).getTime())},D=8,O=6,k=({value:r,onChange:i,mode:a=`date`,label:o,placeholder:s,hint:c,error:l,disabled:u=!1,readOnly:d=!1,required:m=!1,min:h,max:y,size:b=`md`,id:k,name:A,className:j=``})=>{let M=(0,t.useId)(),N=k??`ds-date-time-${A??M}`,P=c?`${N}-hint`:void 0,F=l?`${N}-error`:void 0,I=(0,t.useRef)(null),L=(0,t.useRef)(null),R=(0,t.useRef)(null),[z,B]=(0,t.useState)(!1),[V,H]=(0,t.useState)(r??new Date),[U,W]=(0,t.useState)(x(r,`time`)),[G,K]=(0,t.useState)(null),ee=(0,t.useMemo)(()=>w(V),[V]),te=a!==`time`,ne=a!==`date`;(0,t.useEffect)(()=>{r&&H(r),W(x(r,`time`))},[r]);let q=(0,t.useCallback)(()=>{let e=L.current,t=R.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-D,o=n.top-D,s=a<r.height&&o>a,c=Math.max(120,s?o:a),l=s?Math.max(D,n.top-r.height-O):n.bottom+O,u=n.left,d=i-r.width-D;K({top:l,left:Math.max(D,Math.min(u,d)),maxHeight:c})},[]);(0,t.useLayoutEffect)(()=>{if(!z){K(null);return}return q(),window.addEventListener(`resize`,q),window.addEventListener(`scroll`,q,!0),()=>{window.removeEventListener(`resize`,q),window.removeEventListener(`scroll`,q,!0)}},[z,q,V,U]),(0,t.useEffect)(()=>{if(!z)return;let e=e=>{let t=e.target,n=I.current?.contains(t),r=R.current?.contains(t);!n&&!r&&B(!1)},t=e=>{e.key===`Escape`&&(B(!1),L.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[z]);let re=e=>{if(E(e,h,y))return;let t=new Date(e);t.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(t),a===`date`&&B(!1)},ie=e=>{if(W(e),!e){i?.(null);return}let t=S(e,`time`);if(!t)return;let n=new Date(a===`datetime`?r??V:new Date);n.setHours(t.getHours(),t.getMinutes(),0,0),!(h&&n<h||y&&n>y)&&i?.(n)},ae=s??(a===`date`?`Выберите дату`:a===`time`?`Введите время`:`Выберите дату и время`),oe=[P,F].filter(Boolean).join(` `)||void 0,se=z&&!d?(0,e.jsxs)(`div`,{ref:R,className:g.panel,role:`dialog`,"aria-label":o??ae,style:G?{top:G.top,left:G.left,maxHeight:G.maxHeight}:{visibility:`hidden`,top:0,left:0},children:[te&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(`div`,{className:g.calendarHeader,children:[(0,e.jsx)(`button`,{type:`button`,className:g.nav,"aria-label":`Предыдущий месяц`,onClick:()=>H(new Date(V.getFullYear(),V.getMonth()-1,1)),children:`‹`}),(0,e.jsx)(`select`,{className:g.monthSelect,"aria-label":`Месяц`,value:V.getMonth(),onChange:e=>H(new Date(V.getFullYear(),Number(e.target.value),1)),children:v.map((t,n)=>(0,e.jsx)(`option`,{value:n,children:t},t))}),(0,e.jsx)(`input`,{className:g.yearInput,type:`number`,"aria-label":`Год`,value:V.getFullYear(),onChange:e=>H(new Date(Number(e.target.value),V.getMonth(),1))}),(0,e.jsx)(`button`,{type:`button`,className:g.nav,"aria-label":`Следующий месяц`,onClick:()=>H(new Date(V.getFullYear(),V.getMonth()+1,1)),children:`›`})]}),(0,e.jsx)(`div`,{className:g.weekdays,children:_.map(t=>(0,e.jsx)(`span`,{children:t},t))}),(0,e.jsx)(`div`,{className:g.days,children:ee.map(t=>{let n=T(r,t);return(0,e.jsx)(`button`,{type:`button`,className:`${g.day} ${t.getMonth()===V.getMonth()?``:g.outside} ${n?g.selected:``}`,disabled:E(t,h,y),"aria-pressed":n,onClick:()=>re(t),children:t.getDate()},t.toISOString())})})]}),ne&&(0,e.jsxs)(`label`,{className:g.timeLabel,children:[(0,e.jsx)(`span`,{children:`Время`}),(0,e.jsx)(`input`,{className:g.timeInput,type:`time`,value:U,onChange:e=>ie(e.target.value)})]})]}):null;return(0,e.jsxs)(`div`,{ref:I,className:`${g.wrapper} ${j}`,children:[o&&(0,e.jsx)(f,{htmlFor:N,required:m,disabled:u,children:o}),(0,e.jsxs)(`button`,{ref:L,id:N,name:A,type:`button`,className:`${g.trigger} ${g[b]} ${l?g.error:``}`,disabled:u,"aria-readonly":d||void 0,"aria-expanded":z,"aria-haspopup":`dialog`,"aria-describedby":oe,onClick:()=>{d||B(e=>!e)},children:[(0,e.jsx)(`span`,{className:r?g.value:g.placeholder,children:C(r,a)||ae}),(0,e.jsx)(`span`,{className:[g.chevron,se?g.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),se&&(0,n.createPortal)(se,document.body),c&&!l&&(0,e.jsx)(p,{id:P,children:c}),l&&(0,e.jsx)(p,{id:F,variant:`error`,children:l})]})},A={root:`_root_1q42e_1`,legend:`_legend_1q42e_3`,range:`_range_1q42e_5`},j=e=>!!(e.from&&e.to&&e.from.getTime()<=e.to.getTime()),M=({value:t,onChange:n,onDraftChange:r,mode:i=`date`,fromLabel:a=`От`,toLabel:o=`До`,hint:s,error:c,min:l,max:u,disabled:d=!1,readOnly:f=!1,required:m=!1,className:h=``})=>{let g=c??(t.from&&t.to&&t.from>t.to?`Дата «От» не может быть позже даты «До»`:void 0),_=e=>{r?.(e),j(e)&&n?.(e)};return(0,e.jsxs)(`fieldset`,{className:`${A.root} ${h}`,disabled:d,children:[(0,e.jsxs)(`div`,{className:A.range,children:[(0,e.jsx)(k,{value:t.from,mode:i===`datetime`?`datetime`:i,label:a,min:l,max:t.to??u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,from:e})}),(0,e.jsx)(k,{value:t.to,mode:i===`datetime`?`datetime`:i,label:o,min:t.from??l,max:u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,to:e})})]}),s&&!g&&(0,e.jsx)(p,{children:s})]})},N={group:`_group_1fs9e_1`,skeleton:`_skeleton_1fs9e_3`,text:`_text_1fs9e_5`,rectangular:`_rectangular_1fs9e_7`,circular:`_circular_1fs9e_9`,animated:`_animated_1fs9e_11`,"ds-skeleton":`_ds-skeleton_1fs9e_1`},P=({variant:t=`text`,width:n=`100%`,height:r,lines:i=1,animated:a=!0,className:o=``})=>(0,e.jsx)(`span`,{className:`${N.group} ${o}`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(o,s)=>(0,e.jsx)(`span`,{className:`${N.skeleton} ${N[t]} ${a?N.animated:``}`,style:{width:s===i-1&&i>1?`70%`:n,height:r}},s))}),F={wrapper:`_wrapper_1f1hc_1`,label:`_label_1f1hc_17`,container:`_container_1f1hc_29`,trigger:`_trigger_1f1hc_37`,disabledText:`_disabledText_1f1hc_39`,sm:`_sm_1f1hc_61`,md:`_md_1f1hc_71`,lg:`_lg_1f1hc_81`,value:`_value_1f1hc_141`,placeholder:`_placeholder_1f1hc_143`,chevron:`_chevron_1f1hc_195`,chevronOpen:`_chevronOpen_1f1hc_221`,menu:`_menu_1f1hc_229`,option:`_option_1f1hc_259`,selected:`_selected_1f1hc_329`,message:`_message_1f1hc_349`,error:`_error_1f1hc_351`,errorState:`_errorState_1f1hc_377`},I=8,L=6,R=120,z=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},B=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},V=({options:r,value:i,onChange:a,placeholder:o=`Выберите опцию`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,hint:p,className:m=``,required:h=!1,name:g,id:_,needMark:v=!0,maxMenuHeight:y})=>{let b=(0,t.useId)(),x=_??`ds-dropdown-${g??b}`,S=`${x}-listbox`,[C,w]=(0,t.useState)(!1),[T,E]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)([]),j=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),M=p?`${x}-hint`:void 0,N=u?`${x}-error`:void 0,P=[M,N].filter(Boolean).join(` `)||void 0,V=s&&c,H=(0,t.useCallback)(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-I,o=n.top-I,s=a<r.height&&o>a,c=Math.max(R,s?o:a),l=B(y),u=Math.min(c,l),d=n.left,f=i-n.width-I,p=Math.max(I,Math.min(d,f)),m=s?Math.max(I,n.top-r.height-L):n.bottom+L;E({top:m,left:p,width:n.width,maxHeight:u})},[y]);(0,t.useLayoutEffect)(()=>{if(!C){E(null);return}return H(),window.addEventListener(`resize`,H),window.addEventListener(`scroll`,H,!0),()=>{window.removeEventListener(`resize`,H),window.removeEventListener(`scroll`,H,!0)}},[C,H,r.length]),(0,t.useEffect)(()=>{if(!C)return;let e=e=>{let t=e.target,n=D.current?.contains(t),r=k.current?.contains(t);!n&&!r&&w(!1)},t=e=>{e.key===`Escape`&&(w(!1),O.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[C]);let U=(e,t)=>{let n=z(r,e,t);if(n===-1)return;let i=A.current[n];i?.focus(),i?.scrollIntoView({block:`nearest`})},W=e=>{e.disabled||(a?.(e.value,e),w(!1),O.current?.focus())},G=C?(0,e.jsx)(`ul`,{ref:k,id:S,className:F.menu,role:`listbox`,"aria-label":l,style:T?{position:`fixed`,top:T.top,left:T.left,width:T.width,maxHeight:T.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=t.value===i;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{A.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[F[d],F.option,a?F.selected:``].filter(Boolean).join(` `),onClick:()=>W(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;U(n+t,t)}if(e.key===`Tab`&&w(!1),e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;U(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),W(t))},children:[(0,e.jsx)(`span`,{children:t.label}),a&&v&&(0,e.jsx)(`span`,{"aria-hidden":`true`,children:`✓`})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:D,className:[F.wrapper,u?F.errorState:``,m].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{required:h,disabled:s,htmlFor:V?void 0:x,children:l}),(0,e.jsx)(`div`,{className:F.container,children:V?(0,e.jsx)(`div`,{id:x,className:F.disabledText,"aria-describedby":P,children:j?.label??o}):(0,e.jsxs)(`button`,{ref:O,id:x,type:`button`,name:g,className:`${F.trigger} ${F[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":C,"aria-controls":S,"aria-describedby":P,"aria-invalid":!!u,onClick:()=>w(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),w(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>{U(e.key===`ArrowDown`?0:r.length-1,t)})}if(e.key===`Enter`&&C){e.preventDefault();let t=r.findIndex(e=>e.value===i);U(t>=0?t:0,1)}},children:[(0,e.jsx)(`span`,{className:`${j?F.value:F.placeholder}
2
- ${F[d]}`,children:j?.label??o}),(0,e.jsx)(`span`,{className:[F.chevron,C?F.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})}),C&&(0,n.createPortal)(G,document.body),p&&!u&&(0,e.jsx)(`span`,{id:M,className:F.message,children:p}),u&&(0,e.jsx)(`span`,{id:N,className:F.error,children:u})]})},H=e=>`${e.id}:${e.direction}`,U=({options:t,value:n,onChange:r,label:i=`Сортировка`,placeholder:a=`Выберите сортировку`,disabled:o=!1,className:s})=>{let c=t.flatMap(e=>[{value:H({id:e.id,direction:`asc`}),label:e.ascLabel??`${e.label} · по возрастанию`,disabled:e.disabled},{value:H({id:e.id,direction:`desc`}),label:e.descLabel??`${e.label} · по убыванию`,disabled:e.disabled}]);return(0,e.jsx)(V,{options:c,value:n?H(n):``,label:i,placeholder:a,disabled:o,className:s,onChange:e=>{let t=e.lastIndexOf(`:`);r?.({id:e.slice(0,t),direction:e.slice(t+1)})}})},W={approve:`M4 12l5 5L20 6`,reject:`M5 5l14 14M19 5L5 19`,edit:`M4 20h4L19 9l-4-4L4 16v4z`,cross:`M5 5l14 14M19 5L5 19`,chevron:`M6 9l6 6 6-6`,basket:`M4 7h16l-1 13H5L4 7zm3 0V4h10v3`,info:`M12 10v7m0-10v.01`,warning:`M12 4L3 20h18L12 4zm0 5v5m0 3v.01`},G=({name:t,title:n,width:r=24,height:i=24,...a})=>(0,e.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:r,height:i,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,role:n?`img`:void 0,"aria-hidden":!n||void 0,focusable:`false`,...a,children:[n&&(0,e.jsx)(`title`,{children:n}),(0,e.jsx)(`path`,{d:W[t]})]}),K={root:`_root_l2civ_1`,tableWrap:`_tableWrap_l2civ_3`,table:`_table_l2civ_3`,sticky:`_sticky_l2civ_15`,sortButton:`_sortButton_l2civ_17`,state:`_state_l2civ_21`,cards:`_cards_l2civ_23`,mobileSort:`_mobileSort_l2civ_23`,card:`_card_l2civ_23`,spanTwo:`_spanTwo_l2civ_37`,clickableRow:`_clickableRow_l2civ_41`,pagination:`_pagination_l2civ_49`,paginationRange:`_paginationRange_l2civ_75`,paginationControls:`_paginationControls_l2civ_87`,pageNumbers:`_pageNumbers_l2civ_89`,pageButton:`_pageButton_l2civ_101`,ellipsis:`_ellipsis_l2civ_111`,previousIcon:`_previousIcon_l2civ_123`,nextIcon:`_nextIcon_l2civ_131`,default:`_default_l2civ_169`,tableOnMobile:`_tableOnMobile_l2civ_169`,wide:`_wide_l2civ_173`},ee=(0,r.tableFeatures)({rowSortingFeature:r.rowSortingFeature,sortedRowModel:(0,r.createSortedRowModel)()}),te=(e,t)=>t<=7?Array.from({length:t},(e,t)=>t):e<=3?[0,1,2,3,4,`ellipsis-end`,t-1]:e>=t-4?[0,`ellipsis-start`,t-5,t-4,t-3,t-2,t-1]:[0,`ellipsis-start`,e-1,e,e+1,`ellipsis-end`,t-1],ne=(e,t)=>{let n=new Set;for(let t of e){if(!t.id.trim())return`Идентификатор колонки не может быть пустым`;if(n.has(t.id))return`Идентификатор колонки «${t.id}» повторяется`;n.add(t.id)}for(let n=0;n<t.length;n+=1){let r=t[n];for(let t of e)if(typeof t.accessor==`string`&&!(t.accessor in r))return`В строке ${n+1} отсутствует колонка «${t.id}»`}return null},q=(e,t)=>typeof e==`function`?e(t):t[e],re=e=>{if(e==null||e===``)return null;let t=Date.parse(String(e));return Number.isNaN(t)?null:t},ie=(e,t,n)=>{let r=re(e.getValue(n)),i=re(t.getValue(n));return r===null&&i===null?0:r===null?-1:i===null?1:r-i},ae=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(r)-Number(i)},oe=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(!!r)-Number(!!i)},se=(e,t,n)=>{let r=String(e.getValue(n)??``),i=String(t.getValue(n)??``);return r.localeCompare(i,void 0,{numeric:!0,sensitivity:`base`})},ce=e=>{switch(e){case`date`:return ie;case`number`:return ae;case`boolean`:return oe;case`text`:case void 0:return se;case`custom`:return}},le=e=>{let t=t=>q(e.accessor,t),n=e.sortFn??ce(e.dataType),r=e.enableSorting??(e.dataType!==`custom`&&n!==void 0),i={id:e.id,accessorFn:t,header:()=>e.header,cell:t=>{let n=t.getValue();return e.cell?.(t.row.original,n)??String(n??``)},enableSorting:r,sortDescFirst:e.sortDescFirst};return n!==void 0&&(i.sortFn=n),i},ue=({columns:n,data:i,tableOnMobile:a=!1,breakpoint:o=`default`,sorting:s,onSortingChange:c,renderMobileCard:l,getRowId:d,caption:f,ariaLabel:p,loading:m=!1,error:h,emptyState:g=`Нет данных`,stickyHeader:_=!1,maxHeight:v,className:y=``,onRowClick:b,pagination:x=!1,pageSize:S=30,visibleColumnIds:C})=>{let[w,T]=(0,t.useState)([]),[E,D]=(0,t.useState)(0),O=s??w,k=O.map(e=>`${e.id}:${e.desc?`desc`:`asc`}`).join(`|`),A=Number.isFinite(S)&&S>0?Math.floor(S):30,j=(0,t.useMemo)(()=>{if(C===void 0)return n;let e=new Set(C);return n.filter(t=>e.has(t.id))},[n,C]),M=(0,t.useMemo)(()=>j.length===0?`Должна быть видима хотя бы одна колонка`:ne(j,i),[i,j]),N=(0,t.useMemo)(()=>j.map(le),[j]),F=(0,r.useTable)({features:ee,columns:N,data:i,state:{sorting:O},onSortingChange:e=>{let t=typeof e==`function`?e(O):e;s===void 0&&T(t),D(0),c?.(t)},getRowId:d}),I=F.getRowModel().rows,L=x?Math.max(1,Math.ceil(I.length/A)):1,R=Math.min(E,L-1),z=(0,t.useMemo)(()=>x?I.slice(R*A,(R+1)*A):I,[A,x,R,I]),B=(0,t.useMemo)(()=>j.filter(e=>e.enableSorting??e.dataType!==`custom`).map(e=>({id:e.id,label:typeof e.header==`string`?e.header:e.id})),[j]),V=(0,t.useMemo)(()=>te(R,L),[L,R]),H=[K.root,o===`wide`?K.wide:K.default,a?K.tableOnMobile:``,y].filter(Boolean).join(` `),W=M??h,re=x&&!m&&!W&&I.length>A,ie=R*A+1,ae=Math.min((R+1)*A,I.length);return(0,t.useEffect)(()=>{D(0)},[i,A,x,k]),(0,t.useEffect)(()=>{E>=L&&D(L-1)},[L,E]),(0,e.jsxs)(`section`,{className:H,"aria-busy":m,children:[!a&&!m&&!W&&z.length>0&&B.length>0&&(0,e.jsx)(U,{className:K.mobileSort,options:B,value:O[0]?{id:O[0].id,direction:O[0].desc?`desc`:`asc`}:null,onChange:e=>F.setSorting([{id:e.id,desc:e.direction===`desc`}])}),(0,e.jsx)(`div`,{className:K.tableWrap,style:{maxHeight:v},children:(0,e.jsxs)(`table`,{className:K.table,"aria-label":p,children:[f&&(0,e.jsx)(`caption`,{children:f}),(0,e.jsx)(`thead`,{className:_?K.sticky:``,children:F.getHeaderGroups().map(t=>(0,e.jsx)(`tr`,{children:t.headers.map(t=>{let n=t.column.getIsSorted(),r=t.column.getCanSort(),i=t.column.getToggleSortingHandler();return(0,e.jsx)(`th`,{scope:`col`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:`none`,children:(0,e.jsxs)(`button`,{type:`button`,className:K.sortButton,disabled:!r,onClick:i,children:[(0,e.jsx)(F.FlexRender,{header:t}),(0,e.jsx)(`span`,{"aria-hidden":`true`,children:n===`asc`?`↑`:n===`desc`?`↓`:`↕`})]})},t.id)})},t.id))}),(0,e.jsx)(`tbody`,{children:m?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{colSpan:j.length,children:(0,e.jsx)(P,{lines:3})})}):W?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:K.state,colSpan:j.length,children:W})}):z.length===0?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:K.state,colSpan:j.length,children:g})}):z.map(t=>(0,e.jsx)(`tr`,{className:b?K.clickableRow:void 0,onClick:()=>b?.(t.original),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b?.(t.original))},tabIndex:b?0:void 0,role:b?`button`:void 0,children:t.getAllCells().map(t=>(0,e.jsx)(`td`,{children:(0,e.jsx)(F.FlexRender,{cell:t})},t.id))},t.id))})]})}),!a&&(0,e.jsx)(`div`,{className:K.cards,role:`list`,"aria-label":p??f,children:m?(0,e.jsx)(P,{lines:4}):W?(0,e.jsx)(`div`,{className:K.state,children:W}):z.length===0?(0,e.jsx)(`div`,{className:K.state,children:g}):z.map(t=>{if(l)return(0,e.jsx)(`div`,{role:`listitem`,children:l({row:t.original,columns:j})},t.id);let n=j.filter(e=>!e.mobile?.hideOnMobile).sort((e,t)=>(e.mobile?.mobileOrder??0)-(t.mobile?.mobileOrder??0)),r=n.find(e=>e.mobile?.primary)??n.find(e=>e.mobile?.mobileVariant!==`actions`),i=e=>q(e.accessor,t.original),a=e=>e.mobile?.renderMobile?.(t.original,i(e))??e.cell?.(t.original,i(e))??String(i(e)??``);return(0,e.jsxs)(`article`,{role:`listitem`,className:K.card,children:[(0,e.jsx)(`h3`,{children:r?a(r):`Строка ${t.index+1}`}),(0,e.jsx)(`dl`,{children:n.filter(e=>e!==r&&e.mobile?.mobileVariant!==`actions`).map(t=>(0,e.jsxs)(`div`,{className:t.mobile?.mobileSpan===2?K.spanTwo:``,children:[(0,e.jsx)(`dt`,{children:t.mobile?.mobileLabel??t.header}),(0,e.jsx)(`dd`,{children:a(t)})]},t.id))}),n.filter(e=>e.mobile?.mobileVariant===`actions`).map(t=>(0,e.jsx)(`footer`,{children:a(t)},t.id))]},t.id)})}),re&&(0,e.jsxs)(`nav`,{className:K.pagination,"aria-label":`Пагинация таблицы`,children:[(0,e.jsxs)(`span`,{className:K.paginationRange,"aria-live":`polite`,children:[ie,`–`,ae,` из `,I.length]}),(0,e.jsxs)(`div`,{className:K.paginationControls,children:[(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===0,"aria-label":`Предыдущая страница`,onClick:()=>{D(e=>Math.max(0,e-1))},children:[(0,e.jsx)(G,{name:`chevron`,width:18,height:18,className:K.previousIcon}),(0,e.jsx)(`span`,{className:K.paginationButtonLabel,children:`Назад`})]}),(0,e.jsx)(`div`,{className:K.pageNumbers,children:V.map(t=>typeof t==`number`?(0,e.jsx)(u,{variant:t===R?`secondary`:`empty`,size:`md`,className:K.pageButton,"aria-label":`Перейти на страницу ${t+1}`,"aria-current":t===R?`page`:void 0,onClick:()=>{D(t)},children:t+1},t):(0,e.jsx)(`span`,{className:K.ellipsis,"aria-hidden":`true`,children:`…`},t))}),(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===L-1,"aria-label":`Следующая страница`,onClick:()=>{D(e=>Math.min(L-1,e+1))},children:[(0,e.jsx)(`span`,{className:K.paginationButtonLabel,children:`Вперёд`}),(0,e.jsx)(G,{name:`chevron`,width:18,height:18,className:K.nextIcon})]})]})]})]})},de=({options:n,value:r,onChange:i,placeholder:a=`Выберите опции`,disabled:o=!1,label:s,error:c,hint:l,className:u=``,name:d,id:f,closeOnSelect:p=!1,maxMenuHeight:m})=>{let h=(0,t.useId)(),g=f??`ds-dropdown-multiple-${d??h}`,[_,v]=(0,t.useState)(!1),y=(0,t.useRef)(null),b=(0,t.useRef)(null),x=(0,t.useRef)([]),S=(0,t.useMemo)(()=>n.filter(e=>r.includes(e.value)),[n,r]),C=S.map(e=>e.label).join(`, `),w=l?`${g}-hint`:void 0,T=c?`${g}-error`:void 0;(0,t.useEffect)(()=>{let e=e=>{y.current?.contains(e.target)||v(!1)},t=e=>{e.key===`Escape`&&_&&(v(!1),b.current?.focus())};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[_]);let E=e=>{if(e.disabled)return;let t=r.includes(e.value)?r.filter(t=>t!==e.value):[...r,e.value];i?.(t,n.filter(e=>t.includes(e.value))),p&&(v(!1),b.current?.focus())},D=(e,t)=>{let r=z(n,e,t);x.current[r]?.focus(),x.current[r]?.scrollIntoView({block:`nearest`})};return(0,e.jsxs)(`div`,{ref:y,className:[F.wrapper,c?F.errorState:``,u].filter(Boolean).join(` `),children:[s&&(0,e.jsx)(`label`,{htmlFor:g,className:F.label,children:s}),(0,e.jsxs)(`div`,{className:F.container,children:[(0,e.jsxs)(`button`,{ref:b,id:g,type:`button`,name:d,className:F.trigger,disabled:o,"aria-haspopup":`listbox`,"aria-expanded":_,"aria-controls":`${g}-listbox`,"aria-describedby":[w,T].filter(Boolean).join(` `)||void 0,"aria-invalid":!!c,onClick:()=>v(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),v(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>D(e.key===`ArrowDown`?0:n.length-1,t))}},children:[(0,e.jsx)(`span`,{className:S.length?F.value:F.placeholder,children:C||a}),(0,e.jsx)(`span`,{className:`${F.chevron} ${_?F.chevronOpen:``}`,"aria-hidden":`true`,children:`⌄`})]}),_&&(0,e.jsx)(`ul`,{id:`${g}-listbox`,className:F.menu,role:`listbox`,"aria-label":s,"aria-multiselectable":`true`,style:{maxHeight:m},children:n.map((t,i)=>{let a=r.includes(t.value);return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{x.current[i]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:`${F.option} ${a?F.selected:``}`,onClick:()=>E(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;D(i+t,t)}if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;D(e.key===`Home`?0:n.length-1,t)}e.key===`Tab`&&v(!1)},children:[(0,e.jsx)(`span`,{children:t.label}),(0,e.jsx)(`span`,{"aria-hidden":`true`,children:a?`✓`:``})]})},t.value)})})]}),l&&!c&&(0,e.jsx)(`span`,{id:w,className:F.message,children:l}),c&&(0,e.jsx)(`span`,{id:T,className:F.error,children:c})]})},fe={root:`_root_1y2s8_1`,header:`_header_1y2s8_21`,title:`_title_1y2s8_41`,dismiss:`_dismiss_1y2s8_55`,content:`_content_1y2s8_113`},pe=({title:n,children:r,dismissible:i=!1,onDismiss:a,dismissLabel:o=`Закрыть информационный блок`,headingAs:s=`h3`,className:c=``})=>{let l=`ds-info-block-${(0,t.useId)()}`;return(0,e.jsxs)(`section`,{className:`${fe.root} ${c}`,"aria-labelledby":l,children:[(0,e.jsxs)(`header`,{className:fe.header,children:[(0,e.jsx)(s,{id:l,className:fe.title,children:n}),i&&(0,e.jsx)(`button`,{type:`button`,className:fe.dismiss,onClick:a,"aria-label":o,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M5 5L15 15M15 5L5 15`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`})})})]}),(0,e.jsx)(`div`,{className:fe.content,children:r})]})},J={wrapper:`_wrapper_kz2dd_1`,control:`_control_kz2dd_3`,input:`_input_kz2dd_5`,disabledText:`_disabledText_kz2dd_5`,sm:`_sm_kz2dd_41`,md:`_md_kz2dd_53`,lg:`_lg_kz2dd_65`,inputError:`_inputError_kz2dd_77`,trailingAction:`_trailingAction_kz2dd_79`},me=({value:n,onChange:r,type:i=`text`,placeholder:a=``,disabled:o=!1,readOnly:s=!1,stringWhileDisabled:c=!1,label:l,error:u,hint:d,className:m=``,name:h,id:g,size:_=`md`,clearable:v=!0,required:y=!1,selectTextOnFocus:b=!1,isPassword:x=!1,passwordVisibleLabel:S=`Скрыть пароль`,passwordHiddenLabel:C=`Показать пароль`,onFocus:w,...T})=>{let E=(0,t.useId)(),D=g??`ds-input-${h??E}`,O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),j=d?`${D}-hint`:void 0,M=u?`${D}-error`:void 0,N=String(n??``),P=[j,M].filter(Boolean).join(` `)||void 0,F=x?k?`text`:`password`:i;return(0,t.useEffect)(()=>{x||A(!1)},[x]),(0,e.jsxs)(`div`,{className:`${J.wrapper} ${m}`,children:[l&&(0,e.jsx)(f,{htmlFor:D,required:y,disabled:o,children:l}),o&&c?(0,e.jsx)(`div`,{id:D,className:J.disabledText,"aria-describedby":P,children:N||a}):(0,e.jsxs)(`div`,{className:J.control,children:[(0,e.jsx)(`input`,{ref:O,id:D,name:h,type:F,value:N,placeholder:a,disabled:o,readOnly:s,required:y,"aria-invalid":!!u,"aria-describedby":P,className:`${J.input} ${J[_]} ${u?J.inputError:``}`,onChange:e=>{if(i===`number`&&!x){let t=e.target.value===``?``:Number(e.target.value);r?.(t,e);return}r?.(e.target.value,e)},onFocus:e=>{b&&e.currentTarget.value&&e.currentTarget.select(),w?.(e)},...T}),x&&(0,e.jsx)(`button`,{type:`button`,className:J.trailingAction,disabled:o,"aria-label":k?S:C,"aria-pressed":k,onClick:()=>A(e=>!e),children:k?(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5`})}):(0,e.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,e.jsx)(`path`,{d:`M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`})]})}),!x&&v&&N&&!o&&!s&&(0,e.jsx)(`button`,{type:`button`,className:J.trailingAction,"aria-label":`Очистить поле`,onClick:()=>{let e=O.current;e&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus())},children:`×`})]}),d&&!u&&(0,e.jsx)(p,{id:j,children:d}),u&&(0,e.jsx)(p,{id:M,variant:`error`,children:u})]})},he={wrapper:`_wrapper_vu1ob_1`,input:`_input_vu1ob_21`,switch:`_switch_vu1ob_35`,thumb:`_thumb_vu1ob_67`,label:`_label_vu1ob_111`,disabled:`_disabled_vu1ob_123`},ge=({checked:n,onChange:r,label:i,disabled:a=!1,readOnly:o=!1,className:s=``,name:c,id:l,value:u})=>{let d=(0,t.useId)(),f=l??`ds-radio-button-${c??d}`;return(0,e.jsxs)(`label`,{htmlFor:f,className:`${he.wrapper} ${a?he.disabled:``} ${s}`,children:[(0,e.jsx)(`input`,{id:f,className:he.input,type:`checkbox`,role:`switch`,name:c,value:u,checked:n,disabled:a,"aria-readonly":o||void 0,onChange:e=>{o||r?.(e.target.checked,e)}}),(0,e.jsx)(`span`,{className:he.switch,"aria-hidden":`true`,children:(0,e.jsx)(`span`,{className:he.thumb})}),i&&(0,e.jsx)(`span`,{className:he.label,children:i})]})},_e={root:`_root_kepgo_1`,grid:`_grid_kepgo_3`,actions:`_actions_kepgo_5`},ve=({filters:t,values:n,onChange:r,onApply:i,onReset:a,applyMode:o=`instant`,loading:s=!1,disabled:c=!1,className:l=``})=>{let d=(e,t)=>{let a={...n,[e]:t};r?.(a,e),o===`instant`&&i?.(a)};return(0,e.jsxs)(`section`,{className:`${_e.root} ${l}`,"aria-label":`Фильтры`,"aria-busy":s,children:[(0,e.jsx)(`div`,{className:_e.grid,children:t.filter(e=>!e.hidden).map(t=>{let r=c||s||t.disabled,i=n[t.id];if(t.type===`input`){let n={label:t.label,hint:t.hint,placeholder:t.placeholder,disabled:r};return t.inputType===`number`?(0,e.jsx)(me,{...n,type:`number`,value:i??``,onChange:e=>d(t.id,e)},t.id):(0,e.jsx)(me,{...n,type:`text`,value:String(i??``),onChange:e=>d(t.id,e)},t.id)}if(t.type===`dropdown`)return(0,e.jsx)(V,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:String(i??``),disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`multiple`)return(0,e.jsx)(de,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:Array.isArray(i)?i:[],disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`checkbox`)return(0,e.jsx)(h,{label:t.label,hint:t.hint,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`radio`)return(0,e.jsx)(ge,{label:t.label,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);let a=i&&typeof i==`object`&&!Array.isArray(i)?i:{from:null,to:null};return(0,e.jsx)(M,{hint:t.hint,mode:t.mode,min:t.min,max:t.max,value:a,disabled:r,onDraftChange:e=>d(t.id,e)},t.id)})}),(a||o===`manual`)&&(0,e.jsxs)(`div`,{className:_e.actions,children:[a&&(0,e.jsx)(u,{variant:`destructiveOutline`,disabled:c||s,onClick:a,children:`Сбросить`}),o===`manual`&&(0,e.jsx)(u,{isLoading:s,disabled:c,onClick:()=>i?.(n),children:`Применить`})]})]})},Y={wrapper:`_wrapper_1ymdr_1`,dropzone:`_dropzone_1ymdr_3`,dragActive:`_dragActive_1ymdr_5`,disabled:`_disabled_1ymdr_7`,error:`_error_1ymdr_9`,nativeInput:`_nativeInput_1ymdr_11`,empty:`_empty_1ymdr_13`,uploadIcon:`_uploadIcon_1ymdr_15`,browseButton:`_browseButton_1ymdr_17`,files:`_files_1ymdr_19`,file:`_file_1ymdr_19`,fileName:`_fileName_1ymdr_23`,fileSize:`_fileSize_1ymdr_25`},ye=e=>`${e.name}:${e.size}:${e.lastModified}`,be=e=>e<1024?`${e} Б`:e<1048576?`${(e/1024).toFixed(1)} КБ`:`${(e/1024/1024).toFixed(1)} МБ`,xe=(e,t)=>!t||t.split(`,`).map(e=>e.trim().toLowerCase()).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.startsWith(t.slice(0,-1)):e.type.toLowerCase()===t),Se=({value:n,onChange:r,multiple:i=!1,accept:a,maxSize:o,maxFiles:s,label:c,hint:l,error:d,required:m=!1,disabled:h=!1,readOnly:g=!1,name:_,id:v,className:y=``,dropLabel:b=`Перетащите файлы в эту область`,browseLabel:x=`Выбрать файлы`,addMoreLabel:S=`Добавить ещё`,onReject:C})=>{let w=(0,t.useId)(),T=v??`ds-file-input-${_??w}`,E=(0,t.useRef)(null),D=(0,t.useRef)(0),[O,k]=(0,t.useState)(!1),A=l?`${T}-hint`:void 0,j=d?`${T}-error`:void 0,M=[A,j].filter(Boolean).join(` `)||void 0,N=!h&&!g,P=e=>{let t=[],c=new Set(n.map(ye)),l=e.filter(e=>xe(e,a)?o!==void 0&&e.size>o?(t.push({file:e,reason:`maxSize`}),!1):!c.has(ye(e))&&(c.add(ye(e)),!0):(t.push({file:e,reason:`accept`}),!1)),u=i?s:1,d=i?[...n,...l]:l.slice(-1);u!==void 0&&d.length>u&&(d.slice(u).forEach(e=>t.push({file:e,reason:`maxFiles`})),d=d.slice(0,u)),t.length&&C?.(t),l.length&&r?.(d),E.current&&(E.current.value=``)};return(0,e.jsxs)(`div`,{className:`${Y.wrapper} ${y}`,children:[c&&(0,e.jsx)(f,{htmlFor:T,required:m,disabled:h,children:c}),(0,e.jsxs)(`div`,{className:`${Y.dropzone} ${O?Y.dragActive:``} ${h?Y.disabled:``} ${d?Y.error:``}`,onDragEnter:e=>{e.preventDefault(),N&&++D.current===1&&k(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.preventDefault(),--D.current<=0&&(D.current=0,k(!1))},onDrop:e=>{e.preventDefault(),D.current=0,k(!1),N&&P(Array.from(e.dataTransfer.files))},children:[(0,e.jsx)(`input`,{ref:E,id:T,name:_,className:Y.nativeInput,type:`file`,multiple:i,accept:a,required:m&&n.length===0,disabled:!N,"aria-describedby":M,"aria-invalid":!!d,onChange:e=>P(Array.from(e.target.files??[]))}),n.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`ul`,{className:Y.files,"aria-live":`polite`,children:n.map((t,i)=>(0,e.jsxs)(`li`,{className:Y.file,children:[(0,e.jsx)(`span`,{className:Y.fileName,title:t.name,children:t.name}),(0,e.jsx)(`span`,{className:Y.fileSize,children:be(t.size)}),N&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Удалить файл ${t.name}`,onClick:()=>r?.(n.filter((e,t)=>t!==i)),children:`×`})]},ye(t)))}),N&&(i||n.length===0)&&(0,e.jsx)(u,{className:Y.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:S}),N&&!i&&(0,e.jsx)(u,{className:Y.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:x})]}):(0,e.jsxs)(`div`,{className:Y.empty,children:[(0,e.jsx)(`span`,{className:Y.uploadIcon,"aria-hidden":`true`,children:`↑`}),(0,e.jsx)(`strong`,{children:O?`Отпустите файлы здесь`:b}),!O&&N&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{children:`или`}),(0,e.jsx)(u,{className:Y.browseButton,onClick:()=>E.current?.click(),children:x})]})]})]}),l&&!d&&(0,e.jsx)(p,{id:A,children:l}),d&&(0,e.jsx)(p,{id:j,variant:`error`,live:!0,children:d})]})},Ce=0,X=(0,i.create)(e=>({modals:[],openModal:(t,n={},r={})=>{Ce+=1;let i=`ds-modal-${Ce}`;return e(e=>({modals:[...e.modals,{id:i,name:t,payload:n,closeOnEscape:r.closeOnEscape??!0,closeOnBackdrop:r.closeOnBackdrop??!0}]})),i},closeModal:t=>e(e=>({modals:e.modals.filter(e=>e.id!==t)})),closeTopModal:()=>e(e=>({modals:e.modals.slice(0,-1)})),closeAllModals:()=>e({modals:[]})})),we=()=>X.setState({modals:[]}),Z={layer:`_layer_rnqi6_1`,backdrop:`_backdrop_rnqi6_3`,panel:`_panel_rnqi6_5`,header:`_header_rnqi6_9`,title:`_title_rnqi6_11`,description:`_description_rnqi6_13`,content:`_content_rnqi6_15`},Te=`button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,Ee=({children:n,title:r,description:i,modalId:a,closeLabel:o=`Закрыть модальное окно`,className:s=``,role:c=`dialog`})=>{let l=(0,t.useId)(),d=(0,t.useId)(),f=(0,t.useRef)(null),p=X(e=>e.closeModal);return(0,t.useEffect)(()=>{let e=document.activeElement,t=f.current;return(t?.querySelector(Te)??t)?.focus(),()=>e?.focus()},[]),(0,e.jsxs)(`div`,{ref:f,className:`${Z.panel} ${s}`,role:c,"aria-modal":`true`,"aria-labelledby":r?l:void 0,"aria-describedby":i?d:void 0,tabIndex:-1,onKeyDown:e=>{if(e.key!==`Tab`)return;let t=Array.from(f.current?.querySelectorAll(Te)??[]);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},children:[(r||o)&&(0,e.jsxs)(`header`,{className:Z.header,children:[r&&(0,e.jsx)(`h2`,{id:l,className:Z.title,children:r}),(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":o,onClick:()=>p(a),children:(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`M18 6 6 18`}),(0,e.jsx)(`path`,{d:`m6 6 12 12`})]})})]}),i&&(0,e.jsx)(`p`,{id:d,className:Z.description,children:i}),(0,e.jsx)(`div`,{className:Z.content,children:n})]})},De=({registry:r})=>{let i=X(e=>e.modals),a=X(e=>e.closeModal),o=X(e=>e.closeAllModals);return(0,t.useEffect)(()=>{let e=e=>{if(e.key!==`Escape`)return;let t=X.getState().modals.at(-1);t?.closeOnEscape&&a(t.id)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),!i.length||typeof document>`u`?null:(0,n.createPortal)((0,e.jsx)(`div`,{className:Z.layer,"aria-label":`Модальные окна`,children:i.map((t,n)=>{let s=r[t.name];return s?(0,e.jsx)(`div`,{className:Z.backdrop,"aria-hidden":n!==i.length-1||void 0,onMouseDown:e=>{e.target===e.currentTarget&&t.closeOnBackdrop&&a(t.id)},children:(0,e.jsx)(s,{...t.payload,modalId:t.id,close:()=>a(t.id),closeAll:o})},t.id):null})}),document.body)},Oe=({registry:n,children:r,lockBodyScroll:i=!0})=>{let a=X(e=>e.modals.length);return(0,t.useEffect)(()=>{if(!i||a===0)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[i,a]),(0,e.jsxs)(e.Fragment,{children:[r,(0,e.jsx)(De,{registry:n})]})},ke=e=>e,Ae={message:`_message_1vtru_1`,actions:`_actions_1vtru_3`},je=new Map,Me=0,Ne=({modalId:t,close:n,title:r=`Подтверждение`,message:i=`Продолжить действие?`,confirmLabel:a=`Подтвердить`,cancelLabel:o=`Отмена`,tone:s=`default`,requestId:c})=>{let l=e=>{je.get(c)?.(e),je.delete(c),n()};return(0,e.jsxs)(Ee,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:Ae.message,children:i}),(0,e.jsxs)(`div`,{className:Ae.actions,children:[(0,e.jsx)(u,{variant:`outline`,onClick:()=>l(!1),children:o}),(0,e.jsx)(u,{variant:s===`danger`?`destructive`:`primary`,onClick:()=>l(!0),children:a})]})]})},Pe=({modalId:t,close:n,title:r=`Ошибка`,message:i,closeLabel:a=`Закрыть`})=>(0,e.jsxs)(Ee,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:Ae.message,children:i}),(0,e.jsx)(`div`,{className:Ae.actions,children:(0,e.jsx)(u,{onClick:n,children:a})})]}),Fe=ke({ConfirmModal:Ne,ErrorModal:Pe}),Ie=()=>{let e=X(e=>e.openModal);return(t={})=>new Promise(n=>{Me+=1;let r=`confirm-${Me}`;je.set(r,n),e(`ConfirmModal`,{...t,requestId:r},{closeOnEscape:!1})})},Le=e=>e instanceof Error?e.message:typeof e==`string`?e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:`Произошла неизвестная ошибка`,Re=()=>{let e=X(e=>e.openModal);return{showError:(t,n)=>e(`ErrorModal`,{title:n,message:Le(t)})}},ze=(0,i.create)(()=>({})),Be=(0,i.create)(()=>({})),Ve=()=>{let e=X(e=>e.modals),t=X(e=>e.openModal);return{openModal:(e,n={},r)=>t(e,n,r),closeModal:X(e=>e.closeModal),closeTopModal:X(e=>e.closeTopModal),closeAllModals:X(e=>e.closeAllModals),isOpen:t=>e.some(e=>e.name===t),count:e.length}},He={root:`_root_fvxpr_1`},Ue=({label:t=`Загрузка страницы`,className:n=``})=>(0,e.jsxs)(`div`,{className:`${He.root} ${n}`,role:`status`,"aria-label":t,children:[(0,e.jsx)(c,{decorative:!0}),(0,e.jsx)(`span`,{children:t})]}),We={viewport:`_viewport_15mi5_1`,"top-right":`_top-right_15mi5_3`,"top-left":`_top-left_15mi5_5`,"bottom-right":`_bottom-right_15mi5_7`,"bottom-left":`_bottom-left_15mi5_9`,toast:`_toast_15mi5_11`,body:`_body_15mi5_13`,icon:`_icon_15mi5_15`,info:`_info_15mi5_17`,success:`_success_15mi5_19`,warning:`_warning_15mi5_21`,error:`_error_15mi5_23`},Ge=t=>{let n;return n=t===`info`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#179cf0`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`M12 16v-4`}),(0,e.jsx)(`path`,{d:`M12 8h.01`})]}):t===`success`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#179c66`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}):t===`warning`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,e.jsx)(`path`,{d:`M12 9v4`}),(0,e.jsx)(`path`,{d:`M12 17h.01`})]}):t===`error`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#dc2626`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,e.jsx)(`path`,{d:`M12 9v4`}),(0,e.jsx)(`path`,{d:`M12 17h.01`})]}):(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m15 9-6 6`}),(0,e.jsx)(`path`,{d:`m9 9 6 6`})]}),n},Ke=({toast:n,onClose:r})=>{let[i,a]=(0,t.useState)(!1),o=(0,t.useRef)(n.duration),s=(0,t.useRef)(Date.now());return(0,t.useEffect)(()=>{if(i||n.duration<=0)return;s.current=Date.now();let e=setTimeout(()=>r(n.id),o.current);return()=>{clearTimeout(e),o.current=Math.max(0,o.current-(Date.now()-s.current))}},[r,i,n.duration,n.id]),(0,e.jsxs)(`article`,{className:`${We.toast} ${We[n.variant]}`,role:n.variant===`error`?`alert`:`status`,"aria-live":n.variant===`error`?`assertive`:`polite`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,e.jsx)(`div`,{children:Ge(n.variant)}),(0,e.jsxs)(`div`,{className:We.body,children:[n.title&&(0,e.jsx)(`strong`,{children:n.title}),(0,e.jsx)(`div`,{children:n.message}),n.action&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,onClick:()=>{n.action?.onClick(),(n.action?.dismissOnClick??!0)&&r(n.id)},children:n.action.label})]}),n.closable&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Закрыть уведомление`,onClick:()=>r(n.id),children:(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`M18 6 6 18`}),(0,e.jsx)(`path`,{d:`m6 6 12 12`})]})})]})},qe=0,Q=(0,i.create)(e=>({toasts:[],showToast:t=>{qe+=1;let n=`ds-toast-${qe}`;return e(e=>({toasts:[...e.toasts,{variant:`info`,duration:5e3,closable:!0,...t,id:n}]})),n},removeToast:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)})),clearToasts:()=>e({toasts:[]})})),Je=()=>Q.setState({toasts:[]}),Ye=({position:t=`top-right`})=>{let n=Q(e=>e.toasts),r=Q(e=>e.removeToast);return(0,e.jsx)(`div`,{className:`${We.viewport} ${We[t]}`,"aria-label":`Уведомления`,children:n.map(t=>(0,e.jsx)(Ke,{toast:t,onClose:r},t.id))})},Xe=()=>{let e=Q(e=>e.showToast),n=Q(e=>e.removeToast),r=Q(e=>e.clearToasts),i=(0,t.useCallback)(t=>e({...t,variant:`info`}),[e]),a=(0,t.useCallback)(t=>e({...t,variant:`success`}),[e]),o=(0,t.useCallback)(t=>e({...t,variant:`warning`}),[e]),s=(0,t.useCallback)(t=>e({...t,variant:`error`}),[e]);return(0,t.useMemo)(()=>({showToast:e,infoToast:i,successToast:a,warningToast:o,errorToast:s,removeToast:n,clearToasts:r}),[r,s,i,n,e,a,o])},Ze={root:`_root_s9o0g_1`,tooltip:`_tooltip_s9o0g_3`,"ds-tooltip-in":`_ds-tooltip-in_s9o0g_1`,top:`_top_s9o0g_5`,bottom:`_bottom_s9o0g_7`,left:`_left_s9o0g_9`,right:`_right_s9o0g_11`},Qe=({content:n,children:r,placement:i=`top`,delay:a=450,disabled:o=!1,maxWidth:s=280,className:c=``})=>{let l=(0,t.useId)(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(null),p=()=>{o||!n||(f.current=setTimeout(()=>d(!0),a))},m=()=>{f.current&&clearTimeout(f.current),d(!1)};if((0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),f.current&&clearTimeout(f.current)}},[]),!(0,t.isValidElement)(r))return r;let h=(0,t.cloneElement)(r,{"aria-describedby":u?l:void 0,onMouseEnter:p,onMouseLeave:m,onFocus:p,onBlur:m});return(0,e.jsxs)(`span`,{className:`${Ze.root} ${c}`,onPointerDown:u?m:p,children:[h,u&&(0,e.jsx)(`span`,{id:l,role:`tooltip`,className:`${Ze.tooltip} ${Ze[i]}`,style:{maxWidth:s},children:n})]})},$e={root:`_root_1ue3g_1`,frame:`_frame_1ue3g_3`,video:`_video_1ue3g_5`,overlay:`_overlay_1ue3g_7`,error:`_error_1ue3g_7`,caption:`_caption_1ue3g_13`},et=({sources:n,tracks:r=[],title:i,aspectRatio:a=`16 / 9`,objectFit:o=`contain`,loading:s=!1,error:l,fallback:u,className:d=``,controls:f=!0,playsInline:p=!0,...m})=>{let[h,g]=(0,t.useState)(!1),_=l??(h?`Не удалось воспроизвести видео`:void 0);return(0,e.jsxs)(`figure`,{className:`${$e.root} ${d}`,children:[(0,e.jsxs)(`div`,{className:$e.frame,style:{aspectRatio:a},children:[!_&&n.length>0&&(0,e.jsxs)(`video`,{...m,"aria-label":i,controls:f,playsInline:p,className:$e.video,style:{objectFit:o},onError:e=>{g(!0),m.onError?.(e)},children:[n.map(t=>(0,e.jsx)(`source`,{...t},`${t.src}-${t.type}`)),r.map(t=>(0,e.jsx)(`track`,{...t},`${t.src}-${t.srcLang}`))]}),s&&(0,e.jsx)(`div`,{className:$e.overlay,children:(0,e.jsx)(c,{label:`Загрузка видео`})}),(_||n.length===0)&&(0,e.jsx)(`div`,{className:$e.error,role:`alert`,children:u??_??`Источник видео не указан`})]}),(0,e.jsx)(`figcaption`,{className:$e.caption,children:i})]})},tt={popup:`_popup_15ovj_1`,trigger:`_trigger_15ovj_15`,content:`_content_15ovj_23`,top:`_top_15ovj_107`,right:`_right_15ovj_141`,bottom:`_bottom_15ovj_175`,left:`_left_15ovj_209`},nt=({content:t,children:n,placement:r=`top`,disabled:i=!1})=>i?(0,e.jsx)(e.Fragment,{children:n}):(0,e.jsxs)(`span`,{className:`${tt.popup} ${tt[r]}`,children:[(0,e.jsx)(`span`,{className:tt.trigger,children:n}),(0,e.jsx)(`span`,{className:tt.content,role:`tooltip`,children:t})]}),$={root:`_root_1tdda_1`,trigger:`_trigger_1tdda_15`,heading:`_heading_1tdda_41`,title:`_title_1tdda_51`,subtitle:`_subtitle_1tdda_59`,icon:`_icon_1tdda_69`,open:`_open_1tdda_91`,content:`_content_1tdda_99`,contentInner:`_contentInner_1tdda_119`},rt=({title:n,subtitle:r,children:i,defaultOpen:a=!1,open:o,onOpenChange:s,className:c=``})=>{let l=(0,t.useId)(),[u,d]=(0,t.useState)(a),f=o??u;return(0,e.jsxs)(`section`,{className:`${$.root} ${f?$.open:``} ${c}`,children:[(0,e.jsxs)(`button`,{type:`button`,className:$.trigger,"aria-expanded":f,"aria-controls":l,onClick:()=>{let e=!f;o===void 0&&d(e),s?.(e)},children:[(0,e.jsxs)(`span`,{className:$.heading,children:[(0,e.jsx)(`span`,{className:$.title,children:n}),r&&(0,e.jsx)(`span`,{className:$.subtitle,children:r})]}),(0,e.jsx)(`span`,{className:$.icon,"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(0,e.jsx)(`div`,{id:l,className:$.content,"aria-hidden":!f,children:(0,e.jsx)(`div`,{className:$.contentInner,children:i})})]})},it=({children:e,containerId:r=`overlay-root`})=>{let[i,a]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=document.getElementById(r);if(e){a(e);return}let t=document.createElement(`div`);return t.id=r,document.body.appendChild(t),a(t),()=>{t.childElementCount===0&&t.parentElement&&t.remove()}},[r]),i?(0,n.createPortal)(e,i):null};exports.ConfirmModal=Ne,exports.DSAccordion=rt,exports.DSBadge=o,exports.DSButton=u,exports.DSCheckbox=h,exports.DSDataTable=ue,exports.DSDateRange=M,exports.DSDateTimePicker=k,exports.DSDropDown=V,exports.DSDropDownMultiple=de,exports.DSFieldLabel=f,exports.DSFieldMessage=p,exports.DSFileInput=Se,exports.DSFilters=ve,exports.DSIcon=G,exports.DSInfoBlock=pe,exports.DSInput=me,exports.DSLoader=c,exports.DSModal=De,exports.DSModalFrame=Ee,exports.DSPageLoader=Ue,exports.DSPopup=nt,exports.DSPortal=it,exports.DSRadioButton=ge,exports.DSSkeleton=P,exports.DSSort=U,exports.DSToast=Ke,exports.DSToastProvider=Ye,exports.DSTooltip=Qe,exports.DSVideoPlayerFrame=et,exports.ErrorModal=Pe,exports.ModalSystemProvider=Oe,exports.builtInModalRegistry=Fe,exports.defineModalRegistry=ke,exports.formatDateTimeLocalValue=x,exports.getDSDataTablePaginationItems=te,exports.getErrorMessage=Le,exports.getNextEnabledOptionIndex=z,exports.isValidDateRange=j,exports.parseDateTimeLocalValue=S,exports.resetModalStore=we,exports.resetToastStore=Je,exports.useConfirmModal=Ie,exports.useConfirmModalStore=ze,exports.useErrorModal=Re,exports.useErrorModalStore=Be,exports.useModals=Ve,exports.useModalsStore=X,exports.useToast=Xe,exports.useToastStore=Q,exports.validateDSDataTableData=ne;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("@tanstack/react-table"),i=require("zustand");var a={badge:`_badge_1pk53_1`,sm:`_sm_1pk53_3`,md:`_md_1pk53_5`,neutral:`_neutral_1pk53_7`,info:`_info_1pk53_9`,success:`_success_1pk53_11`,warning:`_warning_1pk53_13`,error:`_error_1pk53_15`,dot:`_dot_1pk53_17`,icon:`_icon_1pk53_19`,label:`_label_1pk53_21`},o=({children:t,variant:n=`neutral`,size:r=`md`,dot:i=!1,icon:o,className:s=``})=>(0,e.jsxs)(`span`,{className:`${a.badge} ${a[n]} ${a[r]} ${s}`,children:[i&&(0,e.jsx)(`span`,{className:a.dot,"aria-hidden":`true`}),o&&(0,e.jsx)(`span`,{className:a.icon,"aria-hidden":`true`,children:o}),(0,e.jsx)(`span`,{className:a.label,children:t})]}),s={container:`_container_dhg26_1`,inner:`_inner_dhg26_21`,line:`_line_dhg26_39`,primary:`_primary_dhg26_57`,secondary:`_secondary_dhg26_63`,outline:`_outline_dhg26_69`,ghost:`_ghost_dhg26_75`,empty:`_empty_dhg26_81`,destructive:`_destructive_dhg26_87`,destructiveOutline:`_destructiveOutline_dhg26_93`,grow:`_grow_dhg26_1`},c=({variant:t=`primary`})=>(0,e.jsx)(`div`,{className:`${s.container} ${s[t]}`,children:(0,e.jsxs)(`div`,{className:`${s.inner} ${s[t]}`,children:[(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`})]})}),l={button:`_button_1gql6_1`,sm:`_sm_1gql6_43`,md:`_md_1gql6_55`,lg:`_lg_1gql6_67`,primary:`_primary_1gql6_79`,secondary:`_secondary_1gql6_91`,outline:`_outline_1gql6_103`,ghost:`_ghost_1gql6_115`,empty:`_empty_1gql6_127`,destructive:`_destructive_1gql6_139`,destructiveOutline:`_destructiveOutline_1gql6_147`},u=(0,t.forwardRef)(({children:t,variant:n=`primary`,size:r=`md`,isLoading:i=!1,disabled:a,type:o=`button`,className:s=``,...u},d)=>(0,e.jsx)(`button`,{ref:d,className:`${l.button} ${l[n]} ${l[r]} ${s}`,disabled:a||i,"aria-busy":i||void 0,...u,type:o,children:i?(0,e.jsx)(c,{variant:n}):t}));u.displayName=`DSButton`;var d={label:`_label_fa00b_1`,required:`_required_fa00b_23`,error:`_error_fa00b_25`,optional:`_optional_fa00b_33`,hint:`_hint_fa00b_35`,disabled:`_disabled_fa00b_47`,message:`_message_fa00b_55`,success:`_success_fa00b_71`},f=({children:t,required:n=!1,optionalText:r,disabled:i=!1,className:a=``,...o})=>(0,e.jsxs)(`label`,{className:`${d.label} ${i?d.disabled:``} ${a}`,...o,children:[(0,e.jsx)(`span`,{children:t}),n&&(0,e.jsx)(`span`,{className:d.required,"aria-hidden":`true`,children:`*`}),r&&(0,e.jsx)(`span`,{className:d.optional,children:r})]}),p=({children:t,variant:n=`hint`,id:r,live:i=!1,className:a=``})=>(0,e.jsx)(`span`,{id:r,className:`${d.message} ${d[n]} ${a}`,role:i&&n===`error`?`alert`:void 0,"aria-live":i&&n!==`error`?`polite`:void 0,children:t}),m={wrapper:`_wrapper_1gq36_1`,label:`_label_1gq36_3`,input:`_input_1gq36_5`,control:`_control_1gq36_7`,disabled:`_disabled_1gq36_13`,controlError:`_controlError_1gq36_17`},h=({checked:n,onChange:r,label:i,hint:a,error:o,disabled:s=!1,readOnly:c=!1,className:l=``,name:u,id:d,indeterminate:f=!1,...h})=>{let g=(0,t.useId)(),_=d??`ds-checkbox-${u??g}`,v=(0,t.useRef)(null),y=a?`${_}-hint`:void 0,b=o?`${_}-error`:void 0;return(0,t.useEffect)(()=>{v.current&&(v.current.indeterminate=f&&!n)},[n,f]),(0,e.jsxs)(`div`,{className:`${m.wrapper} ${l}`,children:[(0,e.jsxs)(`label`,{className:`${m.label} ${s?m.disabled:``}`,htmlFor:_,children:[(0,e.jsx)(`input`,{ref:v,id:_,name:u,type:`checkbox`,checked:n,disabled:s,"aria-readonly":c||void 0,"aria-invalid":!!o,"aria-describedby":[y,b].filter(Boolean).join(` `)||void 0,className:m.input,onChange:e=>{c||r?.(e.target.checked,e)},...h}),(0,e.jsx)(`span`,{className:`${m.control} ${o?m.controlError:``}`,"aria-hidden":`true`,children:f&&!n?`−`:n?`✓`:``}),i&&(0,e.jsx)(`span`,{children:i})]}),a&&!o&&(0,e.jsx)(p,{id:y,children:a}),o&&(0,e.jsx)(p,{id:b,variant:`error`,children:o})]})},g={wrapper:`_wrapper_1or7y_1`,trigger:`_trigger_1or7y_17`,lg:`_lg_1or7y_51`,chevron:`_chevron_1or7y_63`,chevronOpen:`_chevronOpen_1or7y_89`,nav:`_nav_1or7y_99`,day:`_day_1or7y_101`,monthSelect:`_monthSelect_1or7y_103`,yearInput:`_yearInput_1or7y_105`,timeInput:`_timeInput_1or7y_107`,value:`_value_1or7y_131`,placeholder:`_placeholder_1or7y_139`,error:`_error_1or7y_147`,panel:`_panel_1or7y_155`,calendarHeader:`_calendarHeader_1or7y_181`,weekdays:`_weekdays_1or7y_271`,days:`_days_1or7y_273`,outside:`_outside_1or7y_309`,selected:`_selected_1or7y_317`,timeLabel:`_timeLabel_1or7y_337`},_=[`Пн`,`Вт`,`Ср`,`Чт`,`Пт`,`Сб`,`Вс`],v=[`Январь`,`Февраль`,`Март`,`Апрель`,`Май`,`Июнь`,`Июль`,`Август`,`Сентябрь`,`Октябрь`,`Ноябрь`,`Декабрь`],y=e=>String(e).padStart(2,`0`),b=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),x=(e,t)=>{if(!e)return``;let n=`${e.getFullYear()}-${y(e.getMonth()+1)}-${y(e.getDate())}`,r=`${y(e.getHours())}:${y(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n}T${r}`},S=(e,t)=>{if(!e)return null;if(t===`time`){let t=/^(\d{2}):(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(n>23||r>59)return null;let i=new Date;return i.setHours(n,r,0,0),i}if(t===`date`){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=new Date(n,r,i,12);return a.getFullYear()!==n||a.getMonth()!==r||a.getDate()!==i?null:a}let n=new Date(e);return Number.isNaN(n.getTime())?null:n},C=(e,t)=>{if(!e)return``;let n=`${y(e.getDate())}.${y(e.getMonth()+1)}.${e.getFullYear()}`,r=`${y(e.getHours())}:${y(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n} ${r}`},w=e=>{let t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=new Date(t);return r.setDate(t.getDate()-n),Array.from({length:42},(e,t)=>{let n=new Date(r);return n.setDate(r.getDate()+t),n})},T=(e,t)=>!!(e&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),E=(e,t,n)=>{let r=b(e).getTime();return!!(t&&r<b(t).getTime()||n&&r>b(n).getTime())},D=8,O=6,k=({value:r,onChange:i,mode:a=`date`,label:o,placeholder:s,hint:c,error:l,disabled:u=!1,readOnly:d=!1,required:m=!1,min:h,max:y,size:b=`md`,id:k,name:A,className:j=``})=>{let M=(0,t.useId)(),N=k??`ds-date-time-${A??M}`,P=c?`${N}-hint`:void 0,F=l?`${N}-error`:void 0,I=(0,t.useRef)(null),L=(0,t.useRef)(null),R=(0,t.useRef)(null),[z,B]=(0,t.useState)(!1),[V,H]=(0,t.useState)(r??new Date),[U,W]=(0,t.useState)(x(r,`time`)),[G,K]=(0,t.useState)(null),ee=(0,t.useMemo)(()=>w(V),[V]),te=a!==`time`,ne=a!==`date`;(0,t.useEffect)(()=>{r&&H(r),W(x(r,`time`))},[r]);let q=(0,t.useCallback)(()=>{let e=L.current,t=R.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-D,o=n.top-D,s=a<r.height&&o>a,c=Math.max(120,s?o:a),l=s?Math.max(D,n.top-r.height-O):n.bottom+O,u=n.left,d=i-r.width-D;K({top:l,left:Math.max(D,Math.min(u,d)),maxHeight:c})},[]);(0,t.useLayoutEffect)(()=>{if(!z){K(null);return}return q(),window.addEventListener(`resize`,q),window.addEventListener(`scroll`,q,!0),()=>{window.removeEventListener(`resize`,q),window.removeEventListener(`scroll`,q,!0)}},[z,q,V,U]),(0,t.useEffect)(()=>{if(!z)return;let e=e=>{let t=e.target,n=I.current?.contains(t),r=R.current?.contains(t);!n&&!r&&B(!1)},t=e=>{e.key===`Escape`&&(B(!1),L.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[z]);let re=e=>{if(E(e,h,y))return;let t=a===`date`?S(x(e,`date`),`date`):new Date(e);t&&(a!==`date`&&t.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(t),a===`date`&&B(!1))},ie=e=>{if(W(e),!e){i?.(null);return}let t=S(e,`time`);if(!t)return;let n=new Date(a===`datetime`?r??V:new Date);n.setHours(t.getHours(),t.getMinutes(),0,0),!(h&&n<h||y&&n>y)&&i?.(n)},ae=s??(a===`date`?`Выберите дату`:a===`time`?`Введите время`:`Выберите дату и время`),oe=[P,F].filter(Boolean).join(` `)||void 0,se=z&&!d?(0,e.jsxs)(`div`,{ref:R,className:g.panel,role:`dialog`,"aria-label":o??ae,style:G?{top:G.top,left:G.left,maxHeight:G.maxHeight}:{visibility:`hidden`,top:0,left:0},children:[te&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(`div`,{className:g.calendarHeader,children:[(0,e.jsx)(`button`,{type:`button`,className:g.nav,"aria-label":`Предыдущий месяц`,onClick:()=>H(new Date(V.getFullYear(),V.getMonth()-1,1)),children:`‹`}),(0,e.jsx)(`select`,{className:g.monthSelect,"aria-label":`Месяц`,value:V.getMonth(),onChange:e=>H(new Date(V.getFullYear(),Number(e.target.value),1)),children:v.map((t,n)=>(0,e.jsx)(`option`,{value:n,children:t},t))}),(0,e.jsx)(`input`,{className:g.yearInput,type:`number`,"aria-label":`Год`,value:V.getFullYear(),onChange:e=>H(new Date(Number(e.target.value),V.getMonth(),1))}),(0,e.jsx)(`button`,{type:`button`,className:g.nav,"aria-label":`Следующий месяц`,onClick:()=>H(new Date(V.getFullYear(),V.getMonth()+1,1)),children:`›`})]}),(0,e.jsx)(`div`,{className:g.weekdays,children:_.map(t=>(0,e.jsx)(`span`,{children:t},t))}),(0,e.jsx)(`div`,{className:g.days,children:ee.map(t=>{let n=T(r,t);return(0,e.jsx)(`button`,{type:`button`,className:`${g.day} ${t.getMonth()===V.getMonth()?``:g.outside} ${n?g.selected:``}`,disabled:E(t,h,y),"aria-pressed":n,onClick:()=>re(t),children:t.getDate()},t.toISOString())})})]}),ne&&(0,e.jsxs)(`label`,{className:g.timeLabel,children:[(0,e.jsx)(`span`,{children:`Время`}),(0,e.jsx)(`input`,{className:g.timeInput,type:`time`,value:U,onChange:e=>ie(e.target.value)})]})]}):null;return(0,e.jsxs)(`div`,{ref:I,className:`${g.wrapper} ${j}`,children:[o&&(0,e.jsx)(f,{htmlFor:N,required:m,disabled:u,children:o}),(0,e.jsxs)(`button`,{ref:L,id:N,name:A,type:`button`,className:`${g.trigger} ${g[b]} ${l?g.error:``}`,disabled:u,"aria-readonly":d||void 0,"aria-expanded":z,"aria-haspopup":`dialog`,"aria-describedby":oe,onClick:()=>{d||B(e=>!e)},children:[(0,e.jsx)(`span`,{className:r?g.value:g.placeholder,children:C(r,a)||ae}),(0,e.jsx)(`span`,{className:[g.chevron,se?g.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),se&&(0,n.createPortal)(se,document.body),c&&!l&&(0,e.jsx)(p,{id:P,children:c}),l&&(0,e.jsx)(p,{id:F,variant:`error`,children:l})]})},A={root:`_root_1q42e_1`,legend:`_legend_1q42e_3`,range:`_range_1q42e_5`},j=e=>!!(e.from&&e.to&&e.from.getTime()<=e.to.getTime()),M=({value:t,onChange:n,onDraftChange:r,mode:i=`date`,fromLabel:a=`От`,toLabel:o=`До`,hint:s,error:c,min:l,max:u,disabled:d=!1,readOnly:f=!1,required:m=!1,className:h=``})=>{let g=c??(t.from&&t.to&&t.from>t.to?`Дата «От» не может быть позже даты «До»`:void 0),_=e=>{r?.(e),j(e)&&n?.(e)};return(0,e.jsxs)(`fieldset`,{className:`${A.root} ${h}`,disabled:d,children:[(0,e.jsxs)(`div`,{className:A.range,children:[(0,e.jsx)(k,{value:t.from,mode:i===`datetime`?`datetime`:i,label:a,min:l,max:t.to??u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,from:e})}),(0,e.jsx)(k,{value:t.to,mode:i===`datetime`?`datetime`:i,label:o,min:t.from??l,max:u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,to:e})})]}),s&&!g&&(0,e.jsx)(p,{children:s})]})},N={group:`_group_1fs9e_1`,skeleton:`_skeleton_1fs9e_3`,text:`_text_1fs9e_5`,rectangular:`_rectangular_1fs9e_7`,circular:`_circular_1fs9e_9`,animated:`_animated_1fs9e_11`,"ds-skeleton":`_ds-skeleton_1fs9e_1`},P=({variant:t=`text`,width:n=`100%`,height:r,lines:i=1,animated:a=!0,className:o=``})=>(0,e.jsx)(`span`,{className:`${N.group} ${o}`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(o,s)=>(0,e.jsx)(`span`,{className:`${N.skeleton} ${N[t]} ${a?N.animated:``}`,style:{width:s===i-1&&i>1?`70%`:n,height:r}},s))}),F={wrapper:`_wrapper_1f1hc_1`,label:`_label_1f1hc_17`,container:`_container_1f1hc_29`,trigger:`_trigger_1f1hc_37`,disabledText:`_disabledText_1f1hc_39`,sm:`_sm_1f1hc_61`,md:`_md_1f1hc_71`,lg:`_lg_1f1hc_81`,value:`_value_1f1hc_141`,placeholder:`_placeholder_1f1hc_143`,chevron:`_chevron_1f1hc_195`,chevronOpen:`_chevronOpen_1f1hc_221`,menu:`_menu_1f1hc_229`,option:`_option_1f1hc_259`,selected:`_selected_1f1hc_329`,message:`_message_1f1hc_349`,error:`_error_1f1hc_351`,errorState:`_errorState_1f1hc_377`},I=8,L=6,R=120,z=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},B=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},V=({options:r,value:i,onChange:a,placeholder:o=`Выберите опцию`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,hint:p,className:m=``,required:h=!1,name:g,id:_,needMark:v=!0,maxMenuHeight:y})=>{let b=(0,t.useId)(),x=_??`ds-dropdown-${g??b}`,S=`${x}-listbox`,[C,w]=(0,t.useState)(!1),[T,E]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)([]),j=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),M=p?`${x}-hint`:void 0,N=u?`${x}-error`:void 0,P=[M,N].filter(Boolean).join(` `)||void 0,V=s&&c,H=(0,t.useCallback)(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-I,o=n.top-I,s=a<r.height&&o>a,c=Math.max(R,s?o:a),l=B(y),u=Math.min(c,l),d=n.left,f=i-n.width-I,p=Math.max(I,Math.min(d,f)),m=s?Math.max(I,n.top-r.height-L):n.bottom+L;E({top:m,left:p,width:n.width,maxHeight:u})},[y]);(0,t.useLayoutEffect)(()=>{if(!C){E(null);return}return H(),window.addEventListener(`resize`,H),window.addEventListener(`scroll`,H,!0),()=>{window.removeEventListener(`resize`,H),window.removeEventListener(`scroll`,H,!0)}},[C,H,r.length]),(0,t.useEffect)(()=>{if(!C)return;let e=e=>{let t=e.target,n=D.current?.contains(t),r=k.current?.contains(t);!n&&!r&&w(!1)},t=e=>{e.key===`Escape`&&(w(!1),O.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[C]);let U=(e,t)=>{let n=z(r,e,t);if(n===-1)return;let i=A.current[n];i?.focus(),i?.scrollIntoView({block:`nearest`})},W=e=>{e.disabled||(a?.(e.value,e),w(!1),O.current?.focus())},G=C?(0,e.jsx)(`ul`,{ref:k,id:S,className:F.menu,role:`listbox`,"aria-label":l,style:T?{position:`fixed`,top:T.top,left:T.left,width:T.width,maxHeight:T.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=t.value===i;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{A.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[F[d],F.option,a?F.selected:``].filter(Boolean).join(` `),onClick:()=>W(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;U(n+t,t)}if(e.key===`Tab`&&w(!1),e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;U(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),W(t))},children:[(0,e.jsx)(`span`,{children:t.label}),a&&v&&(0,e.jsx)(`span`,{"aria-hidden":`true`,children:`✓`})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:D,className:[F.wrapper,u?F.errorState:``,m].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{required:h,disabled:s,htmlFor:V?void 0:x,children:l}),(0,e.jsx)(`div`,{className:F.container,children:V?(0,e.jsx)(`div`,{id:x,className:F.disabledText,"aria-describedby":P,children:j?.label??o}):(0,e.jsxs)(`button`,{ref:O,id:x,type:`button`,name:g,className:`${F.trigger} ${F[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":C,"aria-controls":S,"aria-describedby":P,"aria-invalid":!!u,onClick:()=>w(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),w(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>{U(e.key===`ArrowDown`?0:r.length-1,t)})}if(e.key===`Enter`&&C){e.preventDefault();let t=r.findIndex(e=>e.value===i);U(t>=0?t:0,1)}},children:[(0,e.jsx)(`span`,{className:`${j?F.value:F.placeholder}
2
+ ${F[d]}`,children:j?.label??o}),(0,e.jsx)(`span`,{className:[F.chevron,C?F.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})}),C&&(0,n.createPortal)(G,document.body),p&&!u&&(0,e.jsx)(`span`,{id:M,className:F.message,children:p}),u&&(0,e.jsx)(`span`,{id:N,className:F.error,children:u})]})},H=e=>`${e.id}:${e.direction}`,U=({options:t,value:n,onChange:r,label:i=`Сортировка`,placeholder:a=`Выберите сортировку`,disabled:o=!1,className:s})=>{let c=t.flatMap(e=>[{value:H({id:e.id,direction:`asc`}),label:e.ascLabel??`${e.label} · по возрастанию`,disabled:e.disabled},{value:H({id:e.id,direction:`desc`}),label:e.descLabel??`${e.label} · по убыванию`,disabled:e.disabled}]);return(0,e.jsx)(V,{options:c,value:n?H(n):``,label:i,placeholder:a,disabled:o,className:s,onChange:e=>{let t=e.lastIndexOf(`:`);r?.({id:e.slice(0,t),direction:e.slice(t+1)})}})},W={approve:`M4 12l5 5L20 6`,reject:`M5 5l14 14M19 5L5 19`,edit:`M4 20h4L19 9l-4-4L4 16v4z`,cross:`M5 5l14 14M19 5L5 19`,chevron:`M6 9l6 6 6-6`,basket:`M4 7h16l-1 13H5L4 7zm3 0V4h10v3`,info:`M12 10v7m0-10v.01`,warning:`M12 4L3 20h18L12 4zm0 5v5m0 3v.01`},G=({name:t,title:n,width:r=24,height:i=24,...a})=>(0,e.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:r,height:i,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,role:n?`img`:void 0,"aria-hidden":!n||void 0,focusable:`false`,...a,children:[n&&(0,e.jsx)(`title`,{children:n}),(0,e.jsx)(`path`,{d:W[t]})]}),K={root:`_root_l2civ_1`,tableWrap:`_tableWrap_l2civ_3`,table:`_table_l2civ_3`,sticky:`_sticky_l2civ_15`,sortButton:`_sortButton_l2civ_17`,state:`_state_l2civ_21`,cards:`_cards_l2civ_23`,mobileSort:`_mobileSort_l2civ_23`,card:`_card_l2civ_23`,spanTwo:`_spanTwo_l2civ_37`,clickableRow:`_clickableRow_l2civ_41`,pagination:`_pagination_l2civ_49`,paginationRange:`_paginationRange_l2civ_75`,paginationControls:`_paginationControls_l2civ_87`,pageNumbers:`_pageNumbers_l2civ_89`,pageButton:`_pageButton_l2civ_101`,ellipsis:`_ellipsis_l2civ_111`,previousIcon:`_previousIcon_l2civ_123`,nextIcon:`_nextIcon_l2civ_131`,default:`_default_l2civ_169`,tableOnMobile:`_tableOnMobile_l2civ_169`,wide:`_wide_l2civ_173`},ee=(0,r.tableFeatures)({rowSortingFeature:r.rowSortingFeature,sortedRowModel:(0,r.createSortedRowModel)()}),te=(e,t)=>t<=7?Array.from({length:t},(e,t)=>t):e<=3?[0,1,2,3,4,`ellipsis-end`,t-1]:e>=t-4?[0,`ellipsis-start`,t-5,t-4,t-3,t-2,t-1]:[0,`ellipsis-start`,e-1,e,e+1,`ellipsis-end`,t-1],ne=(e,t)=>{let n=new Set;for(let t of e){if(!t.id.trim())return`Идентификатор колонки не может быть пустым`;if(n.has(t.id))return`Идентификатор колонки «${t.id}» повторяется`;n.add(t.id)}for(let n=0;n<t.length;n+=1){let r=t[n];for(let t of e)if(typeof t.accessor==`string`&&!(t.accessor in r))return`В строке ${n+1} отсутствует колонка «${t.id}»`}return null},q=(e,t)=>typeof e==`function`?e(t):t[e],re=e=>{if(e==null||e===``)return null;let t=Date.parse(String(e));return Number.isNaN(t)?null:t},ie=(e,t,n)=>{let r=re(e.getValue(n)),i=re(t.getValue(n));return r===null&&i===null?0:r===null?-1:i===null?1:r-i},ae=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(r)-Number(i)},oe=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(!!r)-Number(!!i)},se=(e,t,n)=>{let r=String(e.getValue(n)??``),i=String(t.getValue(n)??``);return r.localeCompare(i,void 0,{numeric:!0,sensitivity:`base`})},ce=e=>{switch(e){case`date`:return ie;case`number`:return ae;case`boolean`:return oe;case`text`:case void 0:return se;case`custom`:return}},le=e=>{let t=t=>q(e.accessor,t),n=e.sortFn??ce(e.dataType),r=e.enableSorting??(e.dataType!==`custom`&&n!==void 0),i={id:e.id,accessorFn:t,header:()=>e.header,cell:t=>{let n=t.getValue();return e.cell?.(t.row.original,n)??String(n??``)},enableSorting:r,sortDescFirst:e.sortDescFirst};return n!==void 0&&(i.sortFn=n),i},ue=({columns:n,data:i,tableOnMobile:a=!1,breakpoint:o=`default`,sorting:s,onSortingChange:c,renderMobileCard:l,getRowId:d,caption:f,ariaLabel:p,loading:m=!1,error:h,emptyState:g=`Нет данных`,stickyHeader:_=!1,maxHeight:v,className:y=``,onRowClick:b,pagination:x=!1,pageSize:S=30,visibleColumnIds:C})=>{let[w,T]=(0,t.useState)([]),[E,D]=(0,t.useState)(0),O=s??w,k=O.map(e=>`${e.id}:${e.desc?`desc`:`asc`}`).join(`|`),A=Number.isFinite(S)&&S>0?Math.floor(S):30,j=(0,t.useMemo)(()=>{if(C===void 0)return n;let e=new Set(C);return n.filter(t=>e.has(t.id))},[n,C]),M=(0,t.useMemo)(()=>j.length===0?`Должна быть видима хотя бы одна колонка`:ne(j,i),[i,j]),N=(0,t.useMemo)(()=>j.map(le),[j]),F=(0,r.useTable)({features:ee,columns:N,data:i,state:{sorting:O},onSortingChange:e=>{let t=typeof e==`function`?e(O):e;s===void 0&&T(t),D(0),c?.(t)},getRowId:d}),I=F.getRowModel().rows,L=x?Math.max(1,Math.ceil(I.length/A)):1,R=Math.min(E,L-1),z=(0,t.useMemo)(()=>x?I.slice(R*A,(R+1)*A):I,[A,x,R,I]),B=(0,t.useMemo)(()=>j.filter(e=>e.enableSorting??e.dataType!==`custom`).map(e=>({id:e.id,label:typeof e.header==`string`?e.header:e.id})),[j]),V=(0,t.useMemo)(()=>te(R,L),[L,R]),H=[K.root,o===`wide`?K.wide:K.default,a?K.tableOnMobile:``,y].filter(Boolean).join(` `),W=M??h,re=x&&!m&&!W&&I.length>A,ie=R*A+1,ae=Math.min((R+1)*A,I.length);return(0,t.useEffect)(()=>{D(0)},[i,A,x,k]),(0,t.useEffect)(()=>{E>=L&&D(L-1)},[L,E]),(0,e.jsxs)(`section`,{className:H,"aria-busy":m,children:[!a&&!m&&!W&&z.length>0&&B.length>0&&(0,e.jsx)(U,{className:K.mobileSort,options:B,value:O[0]?{id:O[0].id,direction:O[0].desc?`desc`:`asc`}:null,onChange:e=>F.setSorting([{id:e.id,desc:e.direction===`desc`}])}),(0,e.jsx)(`div`,{className:K.tableWrap,style:{maxHeight:v},children:(0,e.jsxs)(`table`,{className:K.table,"aria-label":p,children:[f&&(0,e.jsx)(`caption`,{children:f}),(0,e.jsx)(`thead`,{className:_?K.sticky:``,children:F.getHeaderGroups().map(t=>(0,e.jsx)(`tr`,{children:t.headers.map(t=>{let n=t.column.getIsSorted(),r=t.column.getCanSort(),i=t.column.getToggleSortingHandler();return(0,e.jsx)(`th`,{scope:`col`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:`none`,children:(0,e.jsxs)(`button`,{type:`button`,className:K.sortButton,disabled:!r,onClick:i,children:[(0,e.jsx)(F.FlexRender,{header:t}),(0,e.jsx)(`span`,{"aria-hidden":`true`,children:n===`asc`?`↑`:n===`desc`?`↓`:`↕`})]})},t.id)})},t.id))}),(0,e.jsx)(`tbody`,{children:m?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{colSpan:j.length,children:(0,e.jsx)(P,{lines:3})})}):W?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:K.state,colSpan:j.length,children:W})}):z.length===0?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:K.state,colSpan:j.length,children:g})}):z.map(t=>(0,e.jsx)(`tr`,{className:b?K.clickableRow:void 0,onClick:()=>b?.(t.original),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b?.(t.original))},tabIndex:b?0:void 0,role:b?`button`:void 0,children:t.getAllCells().map(t=>(0,e.jsx)(`td`,{children:(0,e.jsx)(F.FlexRender,{cell:t})},t.id))},t.id))})]})}),!a&&(0,e.jsx)(`div`,{className:K.cards,role:`list`,"aria-label":p??f,children:m?(0,e.jsx)(P,{lines:4}):W?(0,e.jsx)(`div`,{className:K.state,children:W}):z.length===0?(0,e.jsx)(`div`,{className:K.state,children:g}):z.map(t=>{if(l)return(0,e.jsx)(`div`,{role:`listitem`,children:l({row:t.original,columns:j})},t.id);let n=j.filter(e=>!e.mobile?.hideOnMobile).sort((e,t)=>(e.mobile?.mobileOrder??0)-(t.mobile?.mobileOrder??0)),r=n.find(e=>e.mobile?.primary)??n.find(e=>e.mobile?.mobileVariant!==`actions`),i=e=>q(e.accessor,t.original),a=e=>e.mobile?.renderMobile?.(t.original,i(e))??e.cell?.(t.original,i(e))??String(i(e)??``);return(0,e.jsxs)(`article`,{role:`listitem`,className:K.card,children:[(0,e.jsx)(`h3`,{children:r?a(r):`Строка ${t.index+1}`}),(0,e.jsx)(`dl`,{children:n.filter(e=>e!==r&&e.mobile?.mobileVariant!==`actions`).map(t=>(0,e.jsxs)(`div`,{className:t.mobile?.mobileSpan===2?K.spanTwo:``,children:[(0,e.jsx)(`dt`,{children:t.mobile?.mobileLabel??t.header}),(0,e.jsx)(`dd`,{children:a(t)})]},t.id))}),n.filter(e=>e.mobile?.mobileVariant===`actions`).map(t=>(0,e.jsx)(`footer`,{children:a(t)},t.id))]},t.id)})}),re&&(0,e.jsxs)(`nav`,{className:K.pagination,"aria-label":`Пагинация таблицы`,children:[(0,e.jsxs)(`span`,{className:K.paginationRange,"aria-live":`polite`,children:[ie,`–`,ae,` из `,I.length]}),(0,e.jsxs)(`div`,{className:K.paginationControls,children:[(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===0,"aria-label":`Предыдущая страница`,onClick:()=>{D(e=>Math.max(0,e-1))},children:[(0,e.jsx)(G,{name:`chevron`,width:18,height:18,className:K.previousIcon}),(0,e.jsx)(`span`,{className:K.paginationButtonLabel,children:`Назад`})]}),(0,e.jsx)(`div`,{className:K.pageNumbers,children:V.map(t=>typeof t==`number`?(0,e.jsx)(u,{variant:t===R?`secondary`:`empty`,size:`md`,className:K.pageButton,"aria-label":`Перейти на страницу ${t+1}`,"aria-current":t===R?`page`:void 0,onClick:()=>{D(t)},children:t+1},t):(0,e.jsx)(`span`,{className:K.ellipsis,"aria-hidden":`true`,children:`…`},t))}),(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===L-1,"aria-label":`Следующая страница`,onClick:()=>{D(e=>Math.min(L-1,e+1))},children:[(0,e.jsx)(`span`,{className:K.paginationButtonLabel,children:`Вперёд`}),(0,e.jsx)(G,{name:`chevron`,width:18,height:18,className:K.nextIcon})]})]})]})]})},de=8,fe=6,pe=120,me=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},he=({options:r,value:i,onChange:a,placeholder:o=`Выберите опции`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,required:p=!1,hint:m,className:h=``,name:g,id:_,closeOnSelect:v=!1,needMark:y=!0,maxMenuHeight:b})=>{let x=(0,t.useId)(),S=_??`ds-dropdown-multiple-${g??x}`,C=`${S}-listbox`,[w,T]=(0,t.useState)(!1),[E,D]=(0,t.useState)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),M=(0,t.useMemo)(()=>r.filter(e=>i.includes(e.value)),[r,i]).map(e=>e.label).join(`, `),N=m?`${S}-hint`:void 0,P=u?`${S}-error`:void 0,I=[N,P].filter(Boolean).join(` `)||void 0,L=s&&c,R=(0,t.useCallback)(()=>{let e=k.current,t=A.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerHeight-n.bottom-de,a=n.top-de,o=i<r.height&&a>i,s=Math.max(pe,o?a:i),c=window.innerWidth-n.width-de;D({top:o?Math.max(de,n.top-r.height-fe):n.bottom+fe,left:Math.max(de,Math.min(n.left,c)),width:n.width,maxHeight:Math.min(s,me(b))})},[b]);(0,t.useLayoutEffect)(()=>{if(!w){D(null);return}return R(),window.addEventListener(`resize`,R),window.addEventListener(`scroll`,R,!0),()=>{window.removeEventListener(`resize`,R),window.removeEventListener(`scroll`,R,!0)}},[w,r.length,R]),(0,t.useEffect)(()=>{if(!w)return;let e=e=>{let t=e.target;!O.current?.contains(t)&&!A.current?.contains(t)&&T(!1)},t=e=>{e.key===`Escape`&&(T(!1),k.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[w]);let B=(e,t)=>{let n=z(r,e,t);n!==-1&&(j.current[n]?.focus(),j.current[n]?.scrollIntoView({block:`nearest`}))},V=e=>{if(e.disabled)return;let t=i.includes(e.value)?i.filter(t=>t!==e.value):[...i,e.value];a?.(t,r.filter(e=>t.includes(e.value))),v&&(T(!1),k.current?.focus())},H=w?(0,e.jsx)(`ul`,{ref:A,id:C,className:F.menu,role:`listbox`,"aria-label":l,"aria-multiselectable":`true`,style:E?{position:`fixed`,top:E.top,left:E.left,width:E.width,maxHeight:E.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=i.includes(t.value);return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[F[d],F.option,a?F.selected:``].filter(Boolean).join(` `),onClick:()=>V(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;B(n+t,t)}if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;B(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),V(t)),e.key===`Tab`&&T(!1)},children:[(0,e.jsx)(`span`,{children:t.label}),a&&y&&(0,e.jsx)(`span`,{"aria-hidden":`true`,children:`✓`})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:O,className:[F.wrapper,u?F.errorState:``,h].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{htmlFor:L?void 0:S,required:p,disabled:s,children:l}),(0,e.jsx)(`div`,{className:F.container,children:L?(0,e.jsx)(`div`,{id:S,className:`${F.disabledText} ${F[d]}`,"aria-describedby":I,children:M||o}):(0,e.jsxs)(`button`,{ref:k,id:S,type:`button`,name:g,className:`${F.trigger} ${F[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":w,"aria-controls":C,"aria-describedby":I,"aria-invalid":!!u,onClick:()=>T(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),T(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>B(e.key===`ArrowDown`?0:r.length-1,t))}},children:[(0,e.jsx)(`span`,{className:`${M?F.value:F.placeholder} ${F[d]}`,children:M||o}),(0,e.jsx)(`span`,{className:[F.chevron,w?F.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})}),w&&(0,n.createPortal)(H,document.body),m&&!u&&(0,e.jsx)(`span`,{id:N,className:F.message,children:m}),u&&(0,e.jsx)(`span`,{id:P,className:F.error,children:u})]})},ge={wrapper:`_wrapper_kz2dd_1`,control:`_control_kz2dd_3`,input:`_input_kz2dd_5`,disabledText:`_disabledText_kz2dd_5`,sm:`_sm_kz2dd_41`,md:`_md_kz2dd_53`,lg:`_lg_kz2dd_65`,inputError:`_inputError_kz2dd_77`,trailingAction:`_trailingAction_kz2dd_79`},_e=({value:n,onChange:r,type:i=`text`,placeholder:a=``,disabled:o=!1,readOnly:s=!1,stringWhileDisabled:c=!1,label:l,error:u,hint:d,className:m=``,name:h,id:g,size:_=`md`,clearable:v=!0,required:y=!1,selectTextOnFocus:b=!1,isPassword:x=!1,passwordVisibleLabel:S=`Скрыть пароль`,passwordHiddenLabel:C=`Показать пароль`,onFocus:w,...T})=>{let E=(0,t.useId)(),D=g??`ds-input-${h??E}`,O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),j=d?`${D}-hint`:void 0,M=u?`${D}-error`:void 0,N=String(n??``),P=[j,M].filter(Boolean).join(` `)||void 0,F=x?k?`text`:`password`:i;return(0,t.useEffect)(()=>{x||A(!1)},[x]),(0,e.jsxs)(`div`,{className:`${ge.wrapper} ${m}`,children:[l&&(0,e.jsx)(f,{htmlFor:D,required:y,disabled:o,children:l}),o&&c?(0,e.jsx)(`div`,{id:D,className:ge.disabledText,"aria-describedby":P,children:N||a}):(0,e.jsxs)(`div`,{className:ge.control,children:[(0,e.jsx)(`input`,{ref:O,id:D,name:h,type:F,value:N,placeholder:a,disabled:o,readOnly:s,required:y,"aria-invalid":!!u,"aria-describedby":P,className:`${ge.input} ${ge[_]} ${u?ge.inputError:``}`,onChange:e=>{if(i===`number`&&!x){let t=e.target.value===``?``:Number(e.target.value);r?.(t,e);return}r?.(e.target.value,e)},onFocus:e=>{b&&e.currentTarget.value&&e.currentTarget.select(),w?.(e)},...T}),x&&(0,e.jsx)(`button`,{type:`button`,className:ge.trailingAction,disabled:o,"aria-label":k?S:C,"aria-pressed":k,onClick:()=>A(e=>!e),children:k?(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5`})}):(0,e.jsxs)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,e.jsx)(`path`,{d:`M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`})]})}),!x&&v&&N&&!o&&!s&&(0,e.jsx)(`button`,{type:`button`,className:ge.trailingAction,"aria-label":`Очистить поле`,onClick:()=>{let e=O.current;e&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus())},children:`×`})]}),d&&!u&&(0,e.jsx)(p,{id:j,children:d}),u&&(0,e.jsx)(p,{id:M,variant:`error`,children:u})]})},ve=(e,t)=>{let n=t.trim().toLocaleLowerCase();return n?e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.value.toLocaleLowerCase().includes(n)):e},ye=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},J={wrapper:`_wrapper_1uxs8_1`,control:`_control_1uxs8_5`,inputHost:`_inputHost_1uxs8_9`,sm:`_sm_1uxs8_25`,md:`_md_1uxs8_35`,lg:`_lg_1uxs8_43`,errorState:`_errorState_1uxs8_57`,disabledText:`_disabledText_1uxs8_65`,chevron:`_chevron_1uxs8_105`,chevronOpen:`_chevronOpen_1uxs8_129`,menu:`_menu_1uxs8_133`,option:`_option_1uxs8_161`,empty:`_empty_1uxs8_161`,selected:`_selected_1uxs8_205`,active:`_active_1uxs8_205`,visuallyHidden:`_visuallyHidden_1uxs8_217`},be=8,xe=6,Se=5,Ce={sm:20,md:30,lg:40},we=({options:r,value:i,onChange:a,placeholder:o=`Начните вводить`,noResultsText:s=`Ничего не найдено`,disabled:c=!1,readOnly:l=!1,stringWhileDisabled:u=!1,label:d,error:m,hint:h,size:g=`md`,required:_=!1,className:v=``,name:y,id:b,needMark:x=!0})=>{let S=(0,t.useId)(),C=b??`ds-search-dropdown-${y??S}`,w=`${C}-listbox`,T=`${C}-status`,E=h?`${C}-hint`:void 0,D=m?`${C}-error`:void 0,O=[T,E,D].filter(Boolean).join(` `),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),[M,N]=(0,t.useState)(!1),[P,F]=(0,t.useState)(``),[I,L]=(0,t.useState)(-1),[R,z]=(0,t.useState)(null),B=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),V=(0,t.useMemo)(()=>ve(r,P),[r,P]),H=c&&u,U=I>=0?V[I]:void 0;(0,t.useEffect)(()=>F(B?.label??``),[B?.label,i]);let W=(0,t.useCallback)(()=>k.current?.querySelector(`input`)??null,[]),G=(0,t.useCallback)((e,t)=>ye(V,e,t),[V]),K=(0,t.useCallback)(e=>{L(e),!(e<0)&&requestAnimationFrame(()=>j.current[e]?.scrollIntoView({block:`nearest`}))},[]),ee=(0,t.useCallback)(()=>{let e=W();if(!e)return;let t=e.getBoundingClientRect(),n=Math.max(1,Math.min(V.length,Se))*Ce[g]+2,r=window.innerHeight-t.bottom-be,i=t.top-be,a=r<n&&i>r,o=a?i:r,s=Math.max(Ce[g]+2,Math.min(n,o)),c=window.innerWidth-t.width-be,l=Math.max(be,Math.min(t.left,c)),u=a?Math.max(be,t.top-s-xe):t.bottom+xe;z({top:u,left:l,width:t.width,maxHeight:s})},[V.length,W,g]);(0,t.useLayoutEffect)(()=>{if(!M){z(null);return}return ee(),window.addEventListener(`resize`,ee),window.addEventListener(`scroll`,ee,!0),()=>{window.removeEventListener(`resize`,ee),window.removeEventListener(`scroll`,ee,!0)}},[M,ee]),(0,t.useEffect)(()=>{if(!M)return;let e=e=>{let t=e.target;!k.current?.contains(t)&&!A.current?.contains(t)&&(N(!1),L(-1))};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[M]);let te=()=>{c||l||(N(!0),L(G(0,1)))},ne=e=>{e.disabled||(F(e.label),N(!1),L(-1),a?.(e.value,e),W()?.focus())},q=M?(0,e.jsx)(`ul`,{ref:A,id:w,className:J.menu,role:`listbox`,"aria-label":d,style:R?{top:R.top,left:R.left,width:R.width,maxHeight:R.maxHeight}:{top:0,left:0,visibility:`hidden`,maxHeight:0},children:V.length===0?(0,e.jsx)(`li`,{className:`${J.empty} ${J[g]}`,children:s}):V.map((t,n)=>{let r=t.value===i,a=n===I;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},id:`${C}-option-${n}`,type:`button`,role:`option`,tabIndex:-1,disabled:t.disabled,"aria-disabled":t.disabled,"aria-selected":r,className:[J.option,J[g],r?J.selected:``,a?J.active:``].filter(Boolean).join(` `),onPointerMove:()=>{t.disabled||L(n)},onClick:()=>ne(t),children:[(0,e.jsx)(`span`,{children:t.label}),r&&x&&(0,e.jsx)(`span`,{"aria-hidden":`true`,children:`✓`})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:k,className:[J.wrapper,m?J.errorState:``,v].filter(Boolean).join(` `),children:[d&&(0,e.jsx)(f,{htmlFor:H?void 0:C,required:_,disabled:c,children:d}),H?(0,e.jsx)(`div`,{className:`${J.disabledText} ${J[g]}`,children:B?.label??o}):(0,e.jsxs)(`div`,{className:J.control,children:[(0,e.jsx)(_e,{id:C,name:y,value:P,placeholder:o,disabled:c,readOnly:l,required:_,size:g,clearable:!1,autoComplete:`off`,className:`${J.inputHost} ${J[g]}`,onFocus:te,onChange:e=>{let t=String(e),n=ve(r,t);F(t),N(!0),L(ye(n,0,1))},role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":M,"aria-controls":w,"aria-activedescendant":U?`${C}-option-${I}`:void 0,"aria-invalid":!!m,"aria-describedby":O,onClick:te,onKeyDown:e=>{if(!(c||l)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=I>=0?I+t:t===1?0:V.length-1;N(!0),K(G(n,t))}else if(e.key===`Home`||e.key===`End`){if(!M)return;e.preventDefault();let t=e.key===`Home`?1:-1;K(G(e.key===`Home`?0:V.length-1,t))}else e.key===`Enter`&&M&&U?(e.preventDefault(),ne(U)):e.key===`Escape`&&M?(e.preventDefault(),N(!1),L(-1)):e.key===`Tab`&&(N(!1),L(-1))}}}),(0,e.jsx)(`span`,{className:`${J.chevron} ${M?J.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),M&&typeof document<`u`&&(0,n.createPortal)(q,document.body),(0,e.jsxs)(`span`,{id:T,className:J.visuallyHidden,"aria-live":`polite`,children:[`Найдено вариантов: `,V.length]}),h&&!m&&(0,e.jsx)(p,{id:E,children:h}),m&&(0,e.jsx)(p,{id:D,variant:`error`,children:m})]})},Te={root:`_root_1y2s8_1`,header:`_header_1y2s8_21`,title:`_title_1y2s8_41`,dismiss:`_dismiss_1y2s8_55`,content:`_content_1y2s8_113`},Ee=({title:n,children:r,dismissible:i=!1,onDismiss:a,dismissLabel:o=`Закрыть информационный блок`,headingAs:s=`h3`,className:c=``})=>{let l=`ds-info-block-${(0,t.useId)()}`;return(0,e.jsxs)(`section`,{className:`${Te.root} ${c}`,"aria-labelledby":l,children:[(0,e.jsxs)(`header`,{className:Te.header,children:[(0,e.jsx)(s,{id:l,className:Te.title,children:n}),i&&(0,e.jsx)(`button`,{type:`button`,className:Te.dismiss,onClick:a,"aria-label":o,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M5 5L15 15M15 5L5 15`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`})})})]}),(0,e.jsx)(`div`,{className:Te.content,children:r})]})},De={wrapper:`_wrapper_ecmvo_1`,input:`_input_ecmvo_21`,switch:`_switch_ecmvo_35`,thumb:`_thumb_ecmvo_67`,label:`_label_ecmvo_113`,disabled:`_disabled_ecmvo_125`},Oe=({checked:n,onChange:r,label:i,disabled:a=!1,readOnly:o=!1,className:s=``,name:c,id:l,value:u})=>{let d=(0,t.useId)(),f=l??`ds-radio-button-${c??d}`;return(0,e.jsxs)(`label`,{htmlFor:f,className:`${De.wrapper} ${a?De.disabled:``} ${s}`,children:[(0,e.jsx)(`input`,{id:f,className:De.input,type:`checkbox`,role:`switch`,name:c,value:u,checked:n,disabled:a,"aria-readonly":o||void 0,onChange:e=>{o||r?.(e.target.checked,e)}}),(0,e.jsx)(`span`,{className:De.switch,"aria-hidden":`true`,children:(0,e.jsx)(`span`,{className:De.thumb})}),i&&(0,e.jsx)(`span`,{className:De.label,children:i})]})},ke={root:`_root_kepgo_1`,grid:`_grid_kepgo_3`,actions:`_actions_kepgo_5`},Ae=({filters:t,values:n,onChange:r,onApply:i,onReset:a,applyMode:o=`instant`,loading:s=!1,disabled:c=!1,className:l=``})=>{let d=(e,t)=>{let a={...n,[e]:t};r?.(a,e),o===`instant`&&i?.(a)};return(0,e.jsxs)(`section`,{className:`${ke.root} ${l}`,"aria-label":`Фильтры`,"aria-busy":s,children:[(0,e.jsx)(`div`,{className:ke.grid,children:t.filter(e=>!e.hidden).map(t=>{let r=c||s||t.disabled,i=n[t.id];if(t.type===`input`){let n={label:t.label,hint:t.hint,placeholder:t.placeholder,disabled:r};return t.inputType===`number`?(0,e.jsx)(_e,{...n,type:`number`,value:i??``,onChange:e=>d(t.id,e)},t.id):(0,e.jsx)(_e,{...n,type:`text`,value:String(i??``),onChange:e=>d(t.id,e)},t.id)}if(t.type===`dropdown`)return(0,e.jsx)(V,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:String(i??``),disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`multiple`)return(0,e.jsx)(he,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:Array.isArray(i)?i:[],disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`checkbox`)return(0,e.jsx)(h,{label:t.label,hint:t.hint,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`radio`)return(0,e.jsx)(Oe,{label:t.label,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);let a=i&&typeof i==`object`&&!Array.isArray(i)?i:{from:null,to:null};return(0,e.jsx)(M,{hint:t.hint,mode:t.mode,min:t.min,max:t.max,value:a,disabled:r,onDraftChange:e=>d(t.id,e)},t.id)})}),(a||o===`manual`)&&(0,e.jsxs)(`div`,{className:ke.actions,children:[a&&(0,e.jsx)(u,{variant:`destructiveOutline`,disabled:c||s,onClick:a,children:`Сбросить`}),o===`manual`&&(0,e.jsx)(u,{isLoading:s,disabled:c,onClick:()=>i?.(n),children:`Применить`})]})]})},Y={wrapper:`_wrapper_8w6xl_1`,dropzone:`_dropzone_8w6xl_3`,dragActive:`_dragActive_8w6xl_5`,disabled:`_disabled_8w6xl_7`,error:`_error_8w6xl_9`,nativeInput:`_nativeInput_8w6xl_11`,empty:`_empty_8w6xl_13`,uploadIcon:`_uploadIcon_8w6xl_15`,files:`_files_8w6xl_17`,file:`_file_8w6xl_17`,fileName:`_fileName_8w6xl_21`,fileSize:`_fileSize_8w6xl_23`},je=e=>`${e.name}:${e.size}:${e.lastModified}`,Me=e=>e<1024?`${e} Б`:e<1048576?`${(e/1024).toFixed(1)} КБ`:`${(e/1024/1024).toFixed(1)} МБ`,Ne=(e,t)=>!t||t.split(`,`).map(e=>e.trim().toLowerCase()).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.startsWith(t.slice(0,-1)):e.type.toLowerCase()===t),Pe=({value:n,onChange:r,multiple:i=!1,accept:a,maxSize:o,maxFiles:s,label:c,hint:l,error:d,required:m=!1,disabled:h=!1,readOnly:g=!1,name:_,id:v,className:y=``,dropLabel:b=`Перетащите файлы в эту область`,browseLabel:x=`Выбрать файлы`,addMoreLabel:S=`Добавить ещё`,onReject:C})=>{let w=(0,t.useId)(),T=v??`ds-file-input-${_??w}`,E=(0,t.useRef)(null),D=(0,t.useRef)(0),[O,k]=(0,t.useState)(!1),A=l?`${T}-hint`:void 0,j=d?`${T}-error`:void 0,M=[A,j].filter(Boolean).join(` `)||void 0,N=!h&&!g,P=e=>{let t=[],c=new Set(n.map(je)),l=e.filter(e=>Ne(e,a)?o!==void 0&&e.size>o?(t.push({file:e,reason:`maxSize`}),!1):!c.has(je(e))&&(c.add(je(e)),!0):(t.push({file:e,reason:`accept`}),!1)),u=i?s:1,d=i?[...n,...l]:l.slice(-1);u!==void 0&&d.length>u&&(d.slice(u).forEach(e=>t.push({file:e,reason:`maxFiles`})),d=d.slice(0,u)),t.length&&C?.(t),l.length&&r?.(d),E.current&&(E.current.value=``)};return(0,e.jsxs)(`div`,{className:`${Y.wrapper} ${y}`,children:[c&&(0,e.jsx)(f,{htmlFor:T,required:m,disabled:h,children:c}),(0,e.jsxs)(`div`,{className:`${Y.dropzone} ${O?Y.dragActive:``} ${h?Y.disabled:``} ${d?Y.error:``}`,onDragEnter:e=>{e.preventDefault(),N&&++D.current===1&&k(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.preventDefault(),--D.current<=0&&(D.current=0,k(!1))},onDrop:e=>{e.preventDefault(),D.current=0,k(!1),N&&P(Array.from(e.dataTransfer.files))},children:[(0,e.jsx)(`input`,{ref:E,id:T,name:_,className:Y.nativeInput,type:`file`,multiple:i,accept:a,required:m&&n.length===0,disabled:!N,"aria-describedby":M,"aria-invalid":!!d,onChange:e=>P(Array.from(e.target.files??[]))}),n.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`ul`,{className:Y.files,"aria-live":`polite`,children:n.map((t,i)=>(0,e.jsxs)(`li`,{className:Y.file,children:[(0,e.jsx)(`span`,{className:Y.fileName,title:t.name,children:t.name}),(0,e.jsx)(`span`,{className:Y.fileSize,children:Me(t.size)}),N&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Удалить файл ${t.name}`,onClick:()=>r?.(n.filter((e,t)=>t!==i)),children:`×`})]},je(t)))}),N&&(i||n.length===0)&&(0,e.jsx)(u,{className:Y.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:S}),N&&!i&&(0,e.jsx)(u,{className:Y.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:x})]}):(0,e.jsxs)(`div`,{className:Y.empty,children:[(0,e.jsx)(`span`,{className:Y.uploadIcon,"aria-hidden":`true`,children:`↑`}),(0,e.jsx)(`strong`,{children:O?`Отпустите файлы здесь`:b}),!O&&N&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{children:`или`}),(0,e.jsx)(u,{onClick:()=>E.current?.click(),children:x})]})]})]}),l&&!d&&(0,e.jsx)(p,{id:A,children:l}),d&&(0,e.jsx)(p,{id:j,variant:`error`,live:!0,children:d})]})},Fe=0,X=(0,i.create)(e=>({modals:[],openModal:(t,n={},r={})=>{Fe+=1;let i=`ds-modal-${Fe}`;return e(e=>({modals:[...e.modals,{id:i,name:t,payload:n,closeOnEscape:r.closeOnEscape??!0,closeOnBackdrop:r.closeOnBackdrop??!0}]})),i},closeModal:t=>e(e=>({modals:e.modals.filter(e=>e.id!==t)})),closeTopModal:()=>e(e=>({modals:e.modals.slice(0,-1)})),closeAllModals:()=>e({modals:[]})})),Ie=()=>X.setState({modals:[]}),Le={layer:`_layer_p0e8j_1`,backdrop:`_backdrop_p0e8j_3`,panel:`_panel_p0e8j_5`,header:`_header_p0e8j_9`,title:`_title_p0e8j_11`,description:`_description_p0e8j_13`,content:`_content_p0e8j_15`},Re=`button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,ze=({children:n,title:r,description:i,modalId:a,closeLabel:o=`Закрыть модальное окно`,className:s=``,role:c=`dialog`})=>{let l=(0,t.useId)(),d=(0,t.useId)(),f=(0,t.useRef)(null),p=X(e=>e.closeModal);return(0,t.useEffect)(()=>{let e=document.activeElement,t=f.current;return(t?.querySelector(Re)??t)?.focus(),()=>e?.focus()},[]),(0,e.jsxs)(`div`,{ref:f,className:`${Le.panel} ${s}`,role:c,"aria-modal":`true`,"aria-labelledby":r?l:void 0,"aria-describedby":i?d:void 0,tabIndex:-1,onKeyDown:e=>{if(e.key!==`Tab`)return;let t=Array.from(f.current?.querySelectorAll(Re)??[]);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},children:[(r||o)&&(0,e.jsxs)(`header`,{className:Le.header,children:[r&&(0,e.jsx)(`h2`,{id:l,className:Le.title,children:r}),(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":o,onClick:()=>p(a),children:(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`M18 6 6 18`}),(0,e.jsx)(`path`,{d:`m6 6 12 12`})]})})]}),i&&(0,e.jsx)(`p`,{id:d,className:Le.description,children:i}),(0,e.jsx)(`div`,{className:Le.content,children:n})]})},Be=({registry:r})=>{let i=X(e=>e.modals),a=X(e=>e.closeModal),o=X(e=>e.closeAllModals);return(0,t.useEffect)(()=>{let e=e=>{if(e.key!==`Escape`)return;let t=X.getState().modals.at(-1);t?.closeOnEscape&&a(t.id)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),!i.length||typeof document>`u`?null:(0,n.createPortal)((0,e.jsx)(`div`,{className:Le.layer,"aria-label":`Модальные окна`,children:i.map((t,n)=>{let s=r[t.name];return s?(0,e.jsx)(`div`,{className:Le.backdrop,"aria-hidden":n!==i.length-1||void 0,onMouseDown:e=>{e.target===e.currentTarget&&t.closeOnBackdrop&&a(t.id)},children:(0,e.jsx)(s,{...t.payload,modalId:t.id,close:()=>a(t.id),closeAll:o})},t.id):null})}),document.body)},Ve=({registry:n,children:r,lockBodyScroll:i=!0})=>{let a=X(e=>e.modals.length);return(0,t.useEffect)(()=>{if(!i||a===0)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[i,a]),(0,e.jsxs)(e.Fragment,{children:[r,(0,e.jsx)(Be,{registry:n})]})},He=e=>e,Ue={message:`_message_1vtru_1`,actions:`_actions_1vtru_3`},We=new Map,Ge=0,Ke=({modalId:t,close:n,title:r=`Подтверждение`,message:i=`Продолжить действие?`,confirmLabel:a=`Подтвердить`,cancelLabel:o=`Отмена`,tone:s=`default`,requestId:c})=>{let l=e=>{We.get(c)?.(e),We.delete(c),n()};return(0,e.jsxs)(ze,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:Ue.message,children:i}),(0,e.jsxs)(`div`,{className:Ue.actions,children:[(0,e.jsx)(u,{variant:`outline`,onClick:()=>l(!1),children:o}),(0,e.jsx)(u,{variant:s===`danger`?`destructive`:`primary`,onClick:()=>l(!0),children:a})]})]})},qe=({modalId:t,close:n,title:r=`Ошибка`,message:i,closeLabel:a=`Закрыть`})=>(0,e.jsxs)(ze,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:Ue.message,children:i}),(0,e.jsx)(`div`,{className:Ue.actions,children:(0,e.jsx)(u,{onClick:n,children:a})})]}),Je=He({ConfirmModal:Ke,ErrorModal:qe}),Ye=()=>{let e=X(e=>e.openModal);return(t={})=>new Promise(n=>{Ge+=1;let r=`confirm-${Ge}`;We.set(r,n),e(`ConfirmModal`,{...t,requestId:r},{closeOnEscape:!1})})},Xe=e=>e instanceof Error?e.message:typeof e==`string`?e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:`Произошла неизвестная ошибка`,Ze=()=>{let e=X(e=>e.openModal);return{showError:(t,n)=>e(`ErrorModal`,{title:n,message:Xe(t)})}},Qe=(0,i.create)(()=>({})),$e=(0,i.create)(()=>({})),et=()=>{let e=X(e=>e.modals),t=X(e=>e.openModal);return{openModal:(e,n={},r)=>t(e,n,r),closeModal:X(e=>e.closeModal),closeTopModal:X(e=>e.closeTopModal),closeAllModals:X(e=>e.closeAllModals),isOpen:t=>e.some(e=>e.name===t),count:e.length}},Z={wrapper:`_wrapper_1qbyz_1`,container:`_container_1qbyz_15`,inner:`_inner_1qbyz_35`,cube:`_cube_1qbyz_53`,jump:`_jump_1qbyz_1`,cube__inner:`_cube__inner_1qbyz_67`,morph:`_morph_1qbyz_1`},tt=()=>(0,e.jsx)(`div`,{className:Z.wrapper,children:(0,e.jsx)(`div`,{className:Z.container,children:(0,e.jsxs)(`div`,{className:Z.inner,children:[(0,e.jsx)(`div`,{className:Z.cube,children:(0,e.jsx)(`div`,{className:Z.cube__inner})}),(0,e.jsx)(`div`,{className:Z.cube,children:(0,e.jsx)(`div`,{className:Z.cube__inner})}),(0,e.jsx)(`div`,{className:Z.cube,children:(0,e.jsx)(`div`,{className:Z.cube__inner})})]})})}),nt={viewport:`_viewport_15mi5_1`,"top-right":`_top-right_15mi5_3`,"top-left":`_top-left_15mi5_5`,"bottom-right":`_bottom-right_15mi5_7`,"bottom-left":`_bottom-left_15mi5_9`,toast:`_toast_15mi5_11`,body:`_body_15mi5_13`,icon:`_icon_15mi5_15`,info:`_info_15mi5_17`,success:`_success_15mi5_19`,warning:`_warning_15mi5_21`,error:`_error_15mi5_23`},rt=t=>{let n;return n=t===`info`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#179cf0`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`M12 16v-4`}),(0,e.jsx)(`path`,{d:`M12 8h.01`})]}):t===`success`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#179c66`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}):t===`warning`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,e.jsx)(`path`,{d:`M12 9v4`}),(0,e.jsx)(`path`,{d:`M12 17h.01`})]}):t===`error`?(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#dc2626`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,e.jsx)(`path`,{d:`M12 9v4`}),(0,e.jsx)(`path`,{d:`M12 17h.01`})]}):(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m15 9-6 6`}),(0,e.jsx)(`path`,{d:`m9 9 6 6`})]}),n},it=({toast:n,onClose:r})=>{let[i,a]=(0,t.useState)(!1),o=(0,t.useRef)(n.duration),s=(0,t.useRef)(Date.now());return(0,t.useEffect)(()=>{if(i||n.duration<=0)return;s.current=Date.now();let e=setTimeout(()=>r(n.id),o.current);return()=>{clearTimeout(e),o.current=Math.max(0,o.current-(Date.now()-s.current))}},[r,i,n.duration,n.id]),(0,e.jsxs)(`article`,{className:`${nt.toast} ${nt[n.variant]}`,role:n.variant===`error`?`alert`:`status`,"aria-live":n.variant===`error`?`assertive`:`polite`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,e.jsx)(`div`,{children:rt(n.variant)}),(0,e.jsxs)(`div`,{className:nt.body,children:[n.title&&(0,e.jsx)(`strong`,{children:n.title}),(0,e.jsx)(`div`,{children:n.message}),n.action&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,onClick:()=>{n.action?.onClick(),(n.action?.dismissOnClick??!0)&&r(n.id)},children:n.action.label})]}),n.closable&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Закрыть уведомление`,onClick:()=>r(n.id),children:(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,e.jsx)(`path`,{d:`M18 6 6 18`}),(0,e.jsx)(`path`,{d:`m6 6 12 12`})]})})]})},at=0,ot=(0,i.create)(e=>({toasts:[],showToast:t=>{at+=1;let n=`ds-toast-${at}`;return e(e=>({toasts:[...e.toasts,{variant:`info`,duration:5e3,closable:!0,...t,id:n}]})),n},removeToast:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)})),clearToasts:()=>e({toasts:[]})})),st=()=>ot.setState({toasts:[]}),ct=({position:t=`top-right`})=>{let n=ot(e=>e.toasts),r=ot(e=>e.removeToast);return(0,e.jsx)(`div`,{className:`${nt.viewport} ${nt[t]}`,"aria-label":`Уведомления`,children:n.map(t=>(0,e.jsx)(it,{toast:t,onClose:r},t.id))})},lt=()=>{let e=ot(e=>e.showToast),n=ot(e=>e.removeToast),r=ot(e=>e.clearToasts),i=(0,t.useCallback)(t=>e({...t,variant:`info`}),[e]),a=(0,t.useCallback)(t=>e({...t,variant:`success`}),[e]),o=(0,t.useCallback)(t=>e({...t,variant:`warning`}),[e]),s=(0,t.useCallback)(t=>e({...t,variant:`error`}),[e]);return(0,t.useMemo)(()=>({showToast:e,infoToast:i,successToast:a,warningToast:o,errorToast:s,removeToast:n,clearToasts:r}),[r,s,i,n,e,a,o])},ut={root:`_root_s9o0g_1`,tooltip:`_tooltip_s9o0g_3`,"ds-tooltip-in":`_ds-tooltip-in_s9o0g_1`,top:`_top_s9o0g_5`,bottom:`_bottom_s9o0g_7`,left:`_left_s9o0g_9`,right:`_right_s9o0g_11`},dt=({content:n,children:r,placement:i=`top`,delay:a=450,disabled:o=!1,maxWidth:s=280,className:c=``})=>{let l=(0,t.useId)(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(null),p=()=>{o||!n||(f.current=setTimeout(()=>d(!0),a))},m=()=>{f.current&&clearTimeout(f.current),d(!1)};if((0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),f.current&&clearTimeout(f.current)}},[]),!(0,t.isValidElement)(r))return r;let h=(0,t.cloneElement)(r,{"aria-describedby":u?l:void 0,onMouseEnter:p,onMouseLeave:m,onFocus:p,onBlur:m});return(0,e.jsxs)(`span`,{className:`${ut.root} ${c}`,onPointerDown:u?m:p,children:[h,u&&(0,e.jsx)(`span`,{id:l,role:`tooltip`,className:`${ut.tooltip} ${ut[i]}`,style:{maxWidth:s},children:n})]})},Q={root:`_root_3casy_1`,frame:`_frame_3casy_15`,video:`_video_3casy_35`,overlay:`_overlay_3casy_49`,state:`_state_3casy_51`,loaderViewport:`_loaderViewport_3casy_89`,loaderScale:`_loaderScale_3casy_101`,stateIcon:`_stateIcon_3casy_115`,empty:`_empty_3casy_147`,error:`_error_3casy_157`,caption:`_caption_3casy_167`},ft=()=>(0,e.jsxs)(`svg`,{className:Q.stateIcon,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeWidth:`1.7`}),(0,e.jsx)(`path`,{d:`M12 10.5V16`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`7.5`,r:`1`,fill:`currentColor`})]}),pt=()=>(0,e.jsxs)(`svg`,{className:Q.stateIcon,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,e.jsx)(`path`,{d:`M12 3.5L21 19H3L12 3.5Z`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinejoin:`round`}),(0,e.jsx)(`path`,{d:`M12 9V13.5`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`16.5`,r:`1`,fill:`currentColor`})]}),mt=({sources:n,tracks:r=[],title:i,aspectRatio:a=`16 / 9`,objectFit:o=`contain`,loading:s=!1,error:c,fallback:l,className:u=``,controls:d=!0,playsInline:f=!0,...p})=>{let[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(n.length>0),v=n.map(({src:e,type:t})=>`${e}:${t??``}`).join(`|`);(0,t.useEffect)(()=>{h(!1),_(n.length>0)},[v,n.length]);let y=c??(m?`Не удалось воспроизвести видео`:void 0),b=s||g&&!y&&n.length>0,x=!b&&!y&&n.length===0;return(0,e.jsxs)(`figure`,{className:`${Q.root} ${u}`,children:[(0,e.jsxs)(`div`,{className:Q.frame,style:{aspectRatio:a},"aria-busy":b||void 0,children:[!y&&n.length>0&&(0,e.jsxs)(`video`,{...p,"aria-label":i,controls:d,playsInline:f,className:Q.video,style:{objectFit:o},onLoadStart:e=>{_(!0),p.onLoadStart?.(e)},onLoadedData:e=>{_(!1),p.onLoadedData?.(e)},onCanPlay:e=>{_(!1),p.onCanPlay?.(e)},onWaiting:e=>{_(!0),p.onWaiting?.(e)},onPlaying:e=>{_(!1),p.onPlaying?.(e)},onError:e=>{_(!1),h(!0),p.onError?.(e)},children:[n.map(t=>(0,e.jsx)(`source`,{...t},`${t.src}-${t.type}`)),r.map(t=>(0,e.jsx)(`track`,{...t},`${t.src}-${t.srcLang}`))]}),b&&(0,e.jsxs)(`div`,{className:Q.overlay,role:`status`,"aria-live":`polite`,children:[(0,e.jsx)(`div`,{className:Q.loaderViewport,"aria-hidden":`true`,children:(0,e.jsx)(`div`,{className:Q.loaderScale,children:(0,e.jsx)(tt,{})})}),(0,e.jsx)(`span`,{children:`Загрузка видео`})]}),x&&(0,e.jsxs)(`div`,{className:`${Q.state} ${Q.empty}`,role:`status`,children:[(0,e.jsx)(ft,{}),(0,e.jsx)(`strong`,{children:`Видео отсутствует`}),l??(0,e.jsx)(`span`,{children:`Источник видео не указан`})]}),!b&&y&&(0,e.jsxs)(`div`,{className:`${Q.state} ${Q.error}`,role:`alert`,children:[(0,e.jsx)(pt,{}),l??(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`strong`,{children:`Видео недоступно`}),(0,e.jsx)(`span`,{children:y})]})]})]}),(0,e.jsx)(`figcaption`,{className:Q.caption,children:i})]})},$={root:`_root_1tdda_1`,trigger:`_trigger_1tdda_15`,heading:`_heading_1tdda_41`,title:`_title_1tdda_51`,subtitle:`_subtitle_1tdda_59`,icon:`_icon_1tdda_69`,open:`_open_1tdda_91`,content:`_content_1tdda_99`,contentInner:`_contentInner_1tdda_119`},ht=(e,t,n,r=16)=>{if(t>Math.max(0,n-r*2)){let t=e-r;return Math.abs(t)<=1?{alignment:`none`,delta:0}:{alignment:`start`,delta:t}}let i=e+t,a=n-r;return i>a?{alignment:`end`,delta:i-a}:e<r?{alignment:`start`,delta:e-r}:{alignment:`none`,delta:0}},gt=({title:n,subtitle:r,children:i,defaultOpen:a=!1,open:o,onOpenChange:s,autoScrollOnOpen:c=!0,scrollOffset:l=16,className:u=``})=>{let d=(0,t.useId)(),[f,p]=(0,t.useState)(a),m=o??f,h=(0,t.useRef)(null),g=(0,t.useRef)(null),_=(0,t.useRef)(m);return(0,t.useEffect)(()=>{let e=_.current;if(_.current=m,!m||e||!c)return;let t=h.current,n=g.current;if(!t||!n||typeof window>`u`)return;let r=!1,i=()=>{if(r)return;r=!0;let e=t.getBoundingClientRect(),n=ht(e.top,e.height,window.innerHeight,l);if(n.alignment===`none`)return;let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;window.scrollBy({top:n.delta,behavior:i?`auto`:`smooth`})},a=e=>{e.target===n&&e.propertyName===`grid-template-rows`&&i()};n.addEventListener(`transitionend`,a);let o=window.setTimeout(i,280);return()=>{n.removeEventListener(`transitionend`,a),window.clearTimeout(o)}},[c,m,l]),(0,e.jsxs)(`section`,{ref:h,className:`${$.root} ${m?$.open:``} ${u}`,children:[(0,e.jsxs)(`button`,{type:`button`,className:$.trigger,"aria-expanded":m,"aria-controls":d,onClick:()=>{let e=!m;o===void 0&&p(e),s?.(e)},children:[(0,e.jsxs)(`span`,{className:$.heading,children:[(0,e.jsx)(`span`,{className:$.title,children:n}),r&&(0,e.jsx)(`span`,{className:$.subtitle,children:r})]}),(0,e.jsx)(`span`,{className:$.icon,"aria-hidden":`true`,children:(0,e.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(0,e.jsx)(`div`,{ref:g,id:d,className:$.content,"aria-hidden":!m,children:(0,e.jsx)(`div`,{className:$.contentInner,children:i})})]})},_t=({children:e,containerId:r=`overlay-root`})=>{let[i,a]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=document.getElementById(r);if(e){a(e);return}let t=document.createElement(`div`);return t.id=r,document.body.appendChild(t),a(t),()=>{t.childElementCount===0&&t.parentElement&&t.remove()}},[r]),i?(0,n.createPortal)(e,i):null};exports.ConfirmModal=Ke,exports.DSAccordion=gt,exports.DSBadge=o,exports.DSButton=u,exports.DSCheckbox=h,exports.DSDataTable=ue,exports.DSDateRange=M,exports.DSDateTimePicker=k,exports.DSDropDown=V,exports.DSDropDownMultiple=he,exports.DSFieldLabel=f,exports.DSFieldMessage=p,exports.DSFileInput=Pe,exports.DSFilters=Ae,exports.DSIcon=G,exports.DSInfoBlock=Ee,exports.DSInput=_e,exports.DSLoader=c,exports.DSModal=Be,exports.DSModalFrame=ze,exports.DSPageLoader=tt,exports.DSPortal=_t,exports.DSRadioButton=Oe,exports.DSSearchDropDown=we,exports.DSSkeleton=P,exports.DSSort=U,exports.DSToast=it,exports.DSToastProvider=ct,exports.DSTooltip=dt,exports.DSVideoPlayerFrame=mt,exports.ErrorModal=qe,exports.ModalSystemProvider=Ve,exports.builtInModalRegistry=Je,exports.defineModalRegistry=He,exports.formatDateTimeLocalValue=x,exports.getDSAccordionScrollTarget=ht,exports.getDSDataTablePaginationItems=te,exports.getErrorMessage=Xe,exports.getNextEnabledOptionIndex=z,exports.isValidDateRange=j,exports.parseDateTimeLocalValue=S,exports.resetModalStore=Ie,exports.resetToastStore=st,exports.useConfirmModal=Ye,exports.useConfirmModalStore=Qe,exports.useErrorModal=Ze,exports.useErrorModalStore=$e,exports.useModals=et,exports.useModalsStore=X,exports.useToast=lt,exports.useToastStore=ot,exports.validateDSDataTableData=ne;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './components/DSDateRange/DSDateRange';
6
6
  export * from './components/DSDataTable/DSDataTable';
7
7
  export * from './components/DSDropDown/DSDropDown';
8
8
  export * from './components/DSDropDownMultiple/DSDropDownMultiple';
9
+ export * from './components/DSSearchDropDown/DSSearchDropDown';
9
10
  export * from './components/DSIcon/DSIcon';
10
11
  export * from './components/DSInfoBlock/DSInfoBlock';
11
12
  export * from './components/DSFilters/DSFilters';
@@ -30,7 +31,6 @@ export * from './components/DSToast/useToast';
30
31
  export * from './components/DSTooltip/DSTooltip';
31
32
  export * from './components/DSVideoPlayerFrame/DSVideoPlayerFrame';
32
33
  export * from './components/Field/DSField';
33
- export * from './components/DSPopup/DSPopup';
34
34
  export * from './components/DSAccordion/DSAccordion';
35
35
  export * from './components/DSPortal/DSPortal';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC"}