vue-efko-data-view 1.0.1
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 +160 -0
- package/dist/data-view.cjs.js +36 -0
- package/dist/data-view.cjs.js.map +1 -0
- package/dist/data-view.es.js +2985 -0
- package/dist/data-view.es.js.map +1 -0
- package/dist/dataview/DataView.d.ts +2 -0
- package/dist/dataview/DataView.vue.d.ts +112 -0
- package/dist/dataview/card/CardFiltersDrawer.vue.d.ts +22 -0
- package/dist/dataview/card/CardFiltersModal.vue.d.ts +22 -0
- package/dist/dataview/card/CardGrid.vue.d.ts +57 -0
- package/dist/dataview/card/FilterInput.vue.d.ts +14 -0
- package/dist/dataview/card/TheCard.d.ts +5 -0
- package/dist/dataview/card/TheCard.vue.d.ts +43 -0
- package/dist/dataview/card/ui/CardCellActions.vue.d.ts +19 -0
- package/dist/dataview/lazyload/LazyLoadContainer.vue.d.ts +31 -0
- package/dist/dataview/lazyload/LazyLoadTrigger.vue.d.ts +13 -0
- package/dist/dataview/table/TheTable.vue.d.ts +69 -0
- package/dist/dataview/table/enum/table.d.ts +37 -0
- package/dist/dataview/table/interface/table.d.ts +33 -0
- package/dist/dataview/table/ui/ColumnSettingsDrawer.d.ts +8 -0
- package/dist/dataview/table/ui/ColumnSettingsDrawer.vue.d.ts +23 -0
- package/dist/dataview/table/ui/filter/FilterDropdown.vue.d.ts +15 -0
- package/dist/dataview/table/ui/filter/FilterTagCloud.vue.d.ts +14 -0
- package/dist/dataview/table/ui/table-cell/TableCellActions.vue.d.ts +20 -0
- package/dist/dataview/table/ui/table-cell/TableCellStatus.vue.d.ts +5 -0
- package/dist/dataview/ui/TheSelect.vue.d.ts +21 -0
- package/dist/index.d.ts +15 -0
- package/dist/style.css +1 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Компонент представления данных
|
|
2
|
+
=============================
|
|
3
|
+
Индекс пакета: VUEADV
|
|
4
|
+
|
|
5
|
+
## Описание
|
|
6
|
+
|
|
7
|
+
Библиотека компонентов Vue для отображения данных в таблице и виде карточек с поддержкой фильтрации, управления колонками и ленивой подгрузки — подходит для проектов, где требуется единый интерфейс просмотра и администрирования сущностей.
|
|
8
|
+
|
|
9
|
+
## Окружение
|
|
10
|
+
|
|
11
|
+
- Docker >= 26.0.0
|
|
12
|
+
- Docker Compose >= 1.29.2
|
|
13
|
+
|
|
14
|
+
### Переменные окружения
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Индекс проекта
|
|
18
|
+
PROJECT_INDEX=VUEADV
|
|
19
|
+
|
|
20
|
+
# Пользователь и группа контейнера (UID/GID)
|
|
21
|
+
APP_USER=1000
|
|
22
|
+
APP_GROUP=1000
|
|
23
|
+
|
|
24
|
+
# Настройки docker-реестра
|
|
25
|
+
DOCKER_REGISTRY=registry.local
|
|
26
|
+
DOCKER_APP_IMAGE_NAME=vueadv-library
|
|
27
|
+
DOCKER_IMAGE_VERSION=0.1.0
|
|
28
|
+
|
|
29
|
+
# Параметры приложения
|
|
30
|
+
APP_NODE_ENV=production
|
|
31
|
+
APP_PORT=4173
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Установка в проект
|
|
35
|
+
|
|
36
|
+
1. Установить пакет компонентов:
|
|
37
|
+
```bash
|
|
38
|
+
npm install @efko/data-view
|
|
39
|
+
```
|
|
40
|
+
2. Зарегистрировать компоненты и стиль в точке входа приложения:
|
|
41
|
+
```ts
|
|
42
|
+
import { createApp } from 'vue';
|
|
43
|
+
import Antd from 'ant-design-vue';
|
|
44
|
+
import 'ant-design-vue/dist/reset.css';
|
|
45
|
+
import { DataView } from '@efko/data-view';
|
|
46
|
+
|
|
47
|
+
const app = createApp(App);
|
|
48
|
+
app.use(Antd);
|
|
49
|
+
app.component('DataView', DataView);
|
|
50
|
+
app.mount('#app');
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Запуск для локальной разработки
|
|
54
|
+
|
|
55
|
+
1. Установить зависимости проекта внутри контейнера билдера:
|
|
56
|
+
```bash
|
|
57
|
+
make docker-build
|
|
58
|
+
```
|
|
59
|
+
2. Запустить контейнер `data-view-app` в режиме разработки:
|
|
60
|
+
```bash
|
|
61
|
+
make up
|
|
62
|
+
```
|
|
63
|
+
3. Просмотреть собранные артефакты и их состояние:
|
|
64
|
+
```bash
|
|
65
|
+
make logs
|
|
66
|
+
```
|
|
67
|
+
4. Для пересборки библиотеки и генерации типов выполнить:
|
|
68
|
+
```bash
|
|
69
|
+
make restart
|
|
70
|
+
```
|
|
71
|
+
5. Для интерактивной работы:
|
|
72
|
+
```bash
|
|
73
|
+
make shell
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Пример использования
|
|
77
|
+
|
|
78
|
+
```vue
|
|
79
|
+
<template>
|
|
80
|
+
<DataView
|
|
81
|
+
:loading="loading"
|
|
82
|
+
:columns="columns"
|
|
83
|
+
:data-source="rows"
|
|
84
|
+
:pagination="true"
|
|
85
|
+
:meta="meta"
|
|
86
|
+
:can-edit="true"
|
|
87
|
+
:edit-action="true"
|
|
88
|
+
:filter-values="filters"
|
|
89
|
+
@page-change="handlePage"
|
|
90
|
+
@size-change="handleSize"
|
|
91
|
+
@filter-apply="handleFilter"
|
|
92
|
+
@edit="handleEdit"
|
|
93
|
+
>
|
|
94
|
+
<template #title>
|
|
95
|
+
<h2 class="text-lg font-semibold">Список заявок</h2>
|
|
96
|
+
</template>
|
|
97
|
+
<template #bodyCell="{ column, record }">
|
|
98
|
+
<span v-if="column.dataIndex === 'amount'">
|
|
99
|
+
{{ new Intl.NumberFormat('ru-RU', { style: 'currency', currency: 'RUB' }).format(record.amount) }}
|
|
100
|
+
</span>
|
|
101
|
+
<span v-else>{{ record[column.dataIndex] }}</span>
|
|
102
|
+
</template>
|
|
103
|
+
<template #actionColumn="{ record }">
|
|
104
|
+
<a-space>
|
|
105
|
+
<a-button type="link" @click="handleEdit(record)">Изменить</a-button>
|
|
106
|
+
<a-button type="link" danger @click="handleDelete(record)">Удалить</a-button>
|
|
107
|
+
</a-space>
|
|
108
|
+
</template>
|
|
109
|
+
</DataView>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<script setup lang="ts">
|
|
113
|
+
import { ref } from 'vue';
|
|
114
|
+
import type { ColumnConfig, Meta, TableRecord } from '@efko/data-view';
|
|
115
|
+
|
|
116
|
+
const loading = ref(false);
|
|
117
|
+
const filters = ref({});
|
|
118
|
+
|
|
119
|
+
const columns: ColumnConfig<TableRecord>[] = [
|
|
120
|
+
{ title: 'ID', dataIndex: 'id', key: 'id', sortable: true },
|
|
121
|
+
{ title: 'Название', dataIndex: 'name', key: 'name', filterable: true },
|
|
122
|
+
{ title: 'Сумма', dataIndex: 'amount', key: 'amount', sortable: true, headerAlign: 'right', cellAlign: 'right' },
|
|
123
|
+
{ title: 'Статус', dataIndex: 'status', key: 'status', filterable: true }
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
const rows = ref<TableRecord[]>([
|
|
127
|
+
{ id: 101, name: 'Заявка №101', amount: 150000, status: 'draft' },
|
|
128
|
+
{ id: 102, name: 'Заявка №102', amount: 82000, status: 'approved' }
|
|
129
|
+
]);
|
|
130
|
+
|
|
131
|
+
const meta = ref<Meta>({
|
|
132
|
+
currentPage: 1,
|
|
133
|
+
pageSize: 10,
|
|
134
|
+
total: 2,
|
|
135
|
+
pageSizeOptions: [10, 20, 50]
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const handlePage = (page: number) => {
|
|
139
|
+
// загрузка данных для выбранной страницы
|
|
140
|
+
meta.value.currentPage = page;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const handleSize = (page: number, size: number) => {
|
|
144
|
+
meta.value.currentPage = page;
|
|
145
|
+
meta.value.pageSize = size;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const handleFilter = ({ key, value }: { key: string; value: unknown[] }) => {
|
|
149
|
+
filters.value = { ...filters.value, [key]: value };
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const handleEdit = (record: TableRecord) => {
|
|
153
|
+
console.log('Edit', record);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const handleDelete = (record: TableRecord) => {
|
|
157
|
+
console.log('Delete', record);
|
|
158
|
+
};
|
|
159
|
+
</script>
|
|
160
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),X=require("lodash"),Ce=require("@formkit/auto-animate"),T=require("@ant-design/icons-vue"),ht=require("@vueform/multiselect"),vt=require("efko-ui-library");function S(){return S=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)({}).hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},S.apply(null,arguments)}function je(t){for(var n=0,o,r=0,a=t.length;a>=4;++r,a-=4)o=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,n=(o&65535)*1540483477+((o>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(t.charCodeAt(r+2)&255)<<16;case 2:n^=(t.charCodeAt(r+1)&255)<<8;case 1:n^=t.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}const Te="%";class bt{constructor(n){this.cache=new Map,this.instanceId=n}get(n){return this.cache.get(Array.isArray(n)?n.join(Te):n)||null}update(n,o){const r=Array.isArray(n)?n.join(Te):n,a=this.cache.get(r),l=o(a);l===null?this.cache.delete(r):this.cache.set(r,l)}}const yt=t=>{const n=t;return n.install=function(o){o.component(n.displayName||n.name,t)},t};function Ue(t){return{type:Object,default:t}}function ae(t){return{type:Boolean,default:t}}function xt(t,n){const o={validator:()=>!0,default:t};return o}function Ne(t){return{type:Array,default:t}}function Ie(t){return{type:String,default:t}}function Ct(t,n){return t?{type:t,default:n}:xt(n)}const kt="data-token-hash",le="data-css-hash",G="__cssinjs_instance__";function W(){const t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const n=document.body.querySelectorAll(`style[${le}]`)||[],{firstChild:o}=document.head;Array.from(n).forEach(a=>{a[G]=a[G]||t,a[G]===t&&document.head.insertBefore(a,o)});const r={};Array.from(document.querySelectorAll(`style[${le}]`)).forEach(a=>{var l;const s=a.getAttribute(le);r[s]?a[G]===t&&((l=a.parentNode)===null||l===void 0||l.removeChild(a)):r[s]=!0})}return new bt(t)}const Ge=Symbol("StyleContextKey"),St=()=>{var t,n,o;const r=e.getCurrentInstance();let a;if(r&&r.appContext){const l=(o=(n=(t=r.appContext)===null||t===void 0?void 0:t.config)===null||n===void 0?void 0:n.globalProperties)===null||o===void 0?void 0:o.__ANTDV_CSSINJS_CACHE__;l?a=l:(a=W(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=a))}else a=W();return a},Xe={cache:W(),defaultCache:!0,hashPriority:"low"},ke=()=>{const t=St();return e.inject(Ge,e.shallowRef(S(S({},Xe),{cache:t})))},wt=t=>{const n=ke(),o=e.shallowRef(S(S({},Xe),{cache:W()}));return e.watch([()=>e.unref(t),n],()=>{const r=S({},n.value),a=e.unref(t);Object.keys(a).forEach(s=>{const c=a[s];a[s]!==void 0&&(r[s]=c)});const{cache:l}=a;r.cache=r.cache||W(),r.defaultCache=!l&&n.value.defaultCache,o.value=r},{immediate:!0}),e.provide(Ge,o),o},Et=()=>({autoClear:ae(),mock:Ie(),cache:Ue(),defaultCache:ae(),hashPriority:Ie(),container:Ct(),ssrInline:ae(),transformers:Ne(),linters:Ne()});yt(e.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:Et(),setup(t,{slots:n}){return wt(t),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function Bt(){return!1}let ge=!1;function At(){return ge}const Mt=process.env.NODE_ENV==="production"?Bt:At;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const t=window;if(typeof t.webpackHotUpdate=="function"){const n=t.webpackHotUpdate;t.webpackHotUpdate=(...o)=>(ge=!0,setTimeout(()=>{ge=!1},0),n(...o))}}function Vt(t,n,o,r){const a=ke(),l=e.shallowRef(""),s=e.shallowRef();e.watchEffect(()=>{l.value=[t,...n.value].join("%")});const c=Mt(),g=v=>{a.value.cache.update(v,u=>{const[m=0,x]=u||[];return m-1===0?(r==null||r(x,!1),null):[m-1,x]})};return e.watch(l,(v,u)=>{u&&g(u),a.value.cache.update(v,m=>{const[x=0,h]=m||[];let i=h;process.env.NODE_ENV!=="production"&&h&&c&&(r==null||r(i,c),i=null);const b=i||o();return[x+1,b]}),s.value=a.value.cache.get(l.value)[1]},{immediate:!0}),e.onBeforeUnmount(()=>{g(l.value)}),s}function Tt(t,n){if(t.length!==n.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==n[o])return!1;return!0}class O{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(n,o=!1){let r={map:this.cache};return n.forEach(a=>{var l;r?r=(l=r==null?void 0:r.map)===null||l===void 0?void 0:l.get(a):r=void 0}),r!=null&&r.value&&o&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(n){var o;return(o=this.internalGet(n,!0))===null||o===void 0?void 0:o[0]}has(n){return!!this.internalGet(n)}set(n,o){if(!this.has(n)){if(this.size()+1>O.MAX_CACHE_SIZE+O.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((l,s)=>{const[,c]=l;return this.internalGet(s)[1]<c?[s,this.internalGet(s)[1]]:l},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(n)}let r=this.cache;n.forEach((a,l)=>{if(l===n.length-1)r.set(a,{value:[o,this.cacheCallTimes++]});else{const s=r.get(a);s?s.map||(s.map=new Map):r.set(a,{map:new Map}),r=r.get(a).map}})}deleteByPath(n,o){var r;const a=n.get(o[0]);if(o.length===1)return a.map?n.set(o[0],{map:a.map}):n.delete(o[0]),(r=a.value)===null||r===void 0?void 0:r[0];const l=this.deleteByPath(a.map,o.slice(1));return(!a.map||a.map.size===0)&&!a.value&&n.delete(o[0]),l}delete(n){if(this.has(n))return this.keys=this.keys.filter(o=>!Tt(o,n)),this.deleteByPath(this.cache,n)}}O.MAX_CACHE_SIZE=20;O.MAX_CACHE_OFFSET=5;let he={};function Nt(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error(`Warning: ${n}`)}function It(){he={}}function Dt(t,n,o){!n&&!he[o]&&(t(!1,o),he[o]=!0)}function Ft(t,n){Dt(Nt,t,n)}function Ht(){}let We=Ht;process.env.NODE_ENV!=="production"&&(We=(t,n,o)=>{Ft(t,`[ant-design-vue: ${n}] ${o}`),process.env.NODE_ENV==="test"&&It()});let De=0;class qe{constructor(n){this.derivatives=Array.isArray(n)?n:[n],this.id=De,n.length===0&&We(n.length>0,"[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."),De+=1}getDerivativeToken(n){return this.derivatives.reduce((o,r)=>r(n,o),void 0)}}const ie=new O;function _t(t){const n=Array.isArray(t)?t:[t];return ie.has(n)||ie.set(n,new qe(n)),ie.get(n)}const Fe=new WeakMap;function ee(t){let n=Fe.get(t)||"";return n||(Object.keys(t).forEach(o=>{const r=t[o];n+=o,r instanceof qe?n+=r.id:r&&typeof r=="object"?n+=ee(r):n+=r}),Fe.set(t,n)),n}function $t(t,n){return je(`${n}_${ee(t)}`)}const He={},Lt=process.env.NODE_ENV==="production",Rt=process.env.NODE_ENV==="prerender",Pt=!Lt&&!Rt?"css-dev-only-do-not-override":"css",L=new Map;function Ot(t){L.set(t,(L.get(t)||0)+1)}function zt(t,n){typeof document<"u"&&document.querySelectorAll(`style[${kt}="${t}"]`).forEach(r=>{var a;r[G]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r))})}const jt=0;function Ut(t,n){L.set(t,(L.get(t)||0)-1);const o=Array.from(L.keys()),r=o.filter(a=>(L.get(a)||0)<=0);o.length-r.length>jt&&r.forEach(a=>{zt(a,n),L.delete(a)})}const Gt=(t,n,o,r)=>{const a=o.getDerivativeToken(t);let l=S(S({},a),n);return r&&(l=r(l)),l};function Xt(t,n,o=e.ref({})){const r=ke(),a=e.computed(()=>S({},...n.value)),l=e.computed(()=>ee(a.value)),s=e.computed(()=>ee(o.value.override||He));return Vt("token",e.computed(()=>[o.value.salt||"",t.value.id,l.value,s.value]),()=>{const{salt:g="",override:v=He,formatToken:u,getComputedToken:m}=o.value,x=m?m(a.value,v,t.value):Gt(a.value,v,t.value,u),h=$t(x,g);x._tokenKey=h,Ot(h);const i=`${Pt}-${je(h)}`;return x._hashId=i,[x,i]},g=>{var v;Ut(g[0]._tokenKey,(v=r.value)===null||v===void 0?void 0:v.cache.instanceId)})}const Wt="1.7.0";function A(t,n){qt(t)&&(t="100%");var o=Zt(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function Z(t){return Math.min(1,Math.max(0,t))}function qt(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Zt(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ze(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function K(t){return t<=1?"".concat(Number(t)*100,"%"):t}function R(t){return t.length===1?"0"+t:String(t)}function Kt(t,n,o){return{r:A(t,255)*255,g:A(n,255)*255,b:A(o,255)*255}}function _e(t,n,o){t=A(t,255),n=A(n,255),o=A(o,255);var r=Math.max(t,n,o),a=Math.min(t,n,o),l=0,s=0,c=(r+a)/2;if(r===a)s=0,l=0;else{var g=r-a;switch(s=c>.5?g/(2-r-a):g/(r+a),r){case t:l=(n-o)/g+(n<o?6:0);break;case n:l=(o-t)/g+2;break;case o:l=(t-n)/g+4;break}l/=6}return{h:l,s,l:c}}function se(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function Qt(t,n,o){var r,a,l;if(t=A(t,360),n=A(n,100),o=A(o,100),n===0)a=o,l=o,r=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;r=se(c,s,t+1/3),a=se(c,s,t),l=se(c,s,t-1/3)}return{r:r*255,g:a*255,b:l*255}}function ve(t,n,o){t=A(t,255),n=A(n,255),o=A(o,255);var r=Math.max(t,n,o),a=Math.min(t,n,o),l=0,s=r,c=r-a,g=r===0?0:c/r;if(r===a)l=0;else{switch(r){case t:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-t)/c+2;break;case o:l=(t-n)/c+4;break}l/=6}return{h:l,s:g,v:s}}function Jt(t,n,o){t=A(t,360)*6,n=A(n,100),o=A(o,100);var r=Math.floor(t),a=t-r,l=o*(1-n),s=o*(1-a*n),c=o*(1-(1-a)*n),g=r%6,v=[o,s,l,l,c,o][g],u=[c,o,o,s,l,l][g],m=[l,l,c,o,o,s][g];return{r:v*255,g:u*255,b:m*255}}function be(t,n,o,r){var a=[R(Math.round(t).toString(16)),R(Math.round(n).toString(16)),R(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Yt(t,n,o,r,a){var l=[R(Math.round(t).toString(16)),R(Math.round(n).toString(16)),R(Math.round(o).toString(16)),R(eo(r))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function eo(t){return Math.round(parseFloat(t)*255).toString(16)}function $e(t){return M(t)/255}function M(t){return parseInt(t,16)}function to(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var ye={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function P(t){var n={r:0,g:0,b:0},o=1,r=null,a=null,l=null,s=!1,c=!1;return typeof t=="string"&&(t=ro(t)),typeof t=="object"&&(F(t.r)&&F(t.g)&&F(t.b)?(n=Kt(t.r,t.g,t.b),s=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):F(t.h)&&F(t.s)&&F(t.v)?(r=K(t.s),a=K(t.v),n=Jt(t.h,r,a),s=!0,c="hsv"):F(t.h)&&F(t.s)&&F(t.l)&&(r=K(t.s),l=K(t.l),n=Qt(t.h,r,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=Ze(o),{ok:s,format:t.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var oo="[-\\+]?\\d+%?",no="[-\\+]?\\d*\\.\\d+%?",_="(?:".concat(no,")|(?:").concat(oo,")"),ce="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),de="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),N={CSS_UNIT:new RegExp(_),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+de),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+de),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+de),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ro(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(ye[t])t=ye[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=N.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=N.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=N.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=N.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=N.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=N.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=N.hex8.exec(t),o?{r:M(o[1]),g:M(o[2]),b:M(o[3]),a:$e(o[4]),format:n?"name":"hex8"}:(o=N.hex6.exec(t),o?{r:M(o[1]),g:M(o[2]),b:M(o[3]),format:n?"name":"hex"}:(o=N.hex4.exec(t),o?{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),a:$e(o[4]+o[4]),format:n?"name":"hex8"}:(o=N.hex3.exec(t),o?{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function F(t){return!!N.CSS_UNIT.exec(String(t))}var I=function(){function t(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof t)return n;typeof n=="number"&&(n=to(n)),this.originalInput=n;var a=P(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},t.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,l=n.r/255,s=n.g/255,c=n.b/255;return l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?a=c/12.92:a=Math.pow((c+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(n){return this.a=Ze(n),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},t.prototype.toHsv=function(){var n=ve(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},t.prototype.toHsvString=function(){var n=ve(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var n=_e(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},t.prototype.toHslString=function(){var n=_e(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(n){return n===void 0&&(n=!1),be(this.r,this.g,this.b,n)},t.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},t.prototype.toHex8=function(n){return n===void 0&&(n=!1),Yt(this.r,this.g,this.b,this.a,n)},t.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},t.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(A(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(A(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+be(this.r,this.g,this.b,!1),o=0,r=Object.entries(ye);o<r.length;o++){var a=r[o],l=a[0],s=a[1];if(n===s)return l}return!1},t.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,l=!o&&a&&(n.startsWith("hex")||n==="name");return l?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=Z(o.l),new t(o)},t.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new t(o)},t.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=Z(o.l),new t(o)},t.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},t.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},t.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=Z(o.s),new t(o)},t.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=Z(o.s),new t(o)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new t(o)},t.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new t(n).toRgb(),l=o/100,s={r:(a.r-r.r)*l+r.r,g:(a.g-r.g)*l+r.g,b:(a.b-r.b)*l+r.b,a:(a.a-r.a)*l+r.a};return new t(s)},t.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,l=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,l.push(new t(r));return l},t.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new t(n)},t.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,l=o.v,s=[],c=1/n;n--;)s.push(new t({h:r,s:a,v:l})),l=(l+c)%1;return s},t.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new t({h:(o+72)%360,s:n.s,l:n.l}),new t({h:(o+216)%360,s:n.s,l:n.l})]},t.prototype.onBackground=function(n){var o=this.toRgb(),r=new t(n).toRgb(),a=o.a+r.a*(1-o.a);return new t({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],l=360/n,s=1;s<n;s++)a.push(new t({h:(r+s*l)%360,s:o.s,l:o.l}));return a},t.prototype.equals=function(n){return this.toRgbString()===new t(n).toRgbString()},t}(),Q=2,Le=.16,ao=.05,lo=.05,io=.15,Ke=5,Qe=4,so=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Re(t){var n=t.r,o=t.g,r=t.b,a=ve(n,o,r);return{h:a.h*360,s:a.s,v:a.v}}function J(t){var n=t.r,o=t.g,r=t.b;return"#".concat(be(n,o,r,!1))}function co(t,n,o){var r=o/100,a={r:(n.r-t.r)*r+t.r,g:(n.g-t.g)*r+t.g,b:(n.b-t.b)*r+t.b};return a}function Pe(t,n,o){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=o?Math.round(t.h)-Q*n:Math.round(t.h)+Q*n:r=o?Math.round(t.h)+Q*n:Math.round(t.h)-Q*n,r<0?r+=360:r>=360&&(r-=360),r}function Oe(t,n,o){if(t.h===0&&t.s===0)return t.s;var r;return o?r=t.s-Le*n:n===Qe?r=t.s+Le:r=t.s+ao*n,r>1&&(r=1),o&&n===Ke&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ze(t,n,o){var r;return o?r=t.v+lo*n:r=t.v-io*n,r>1&&(r=1),Number(r.toFixed(2))}function te(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],r=P(t),a=Ke;a>0;a-=1){var l=Re(r),s=J(P({h:Pe(l,a,!0),s:Oe(l,a,!0),v:ze(l,a,!0)}));o.push(s)}o.push(J(r));for(var c=1;c<=Qe;c+=1){var g=Re(r),v=J(P({h:Pe(g,c),s:Oe(g,c),v:ze(g,c)}));o.push(v)}return n.theme==="dark"?so.map(function(u){var m=u.index,x=u.opacity,h=J(co(P(n.backgroundColor||"#141414"),P(o[m]),x*100));return h}):o}var ue={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},fe={},pe={};Object.keys(ue).forEach(function(t){fe[t]=te(ue[t]),fe[t].primary=fe[t][5],pe[t]=te(ue[t],{theme:"dark",backgroundColor:"#141414"}),pe[t].primary=pe[t][5]});const uo=t=>{const{controlHeight:n}=t;return{controlHeightSM:n*.75,controlHeightXS:n*.5,controlHeightLG:n*1.25}};function fo(t){const{sizeUnit:n,sizeStep:o}=t;return{sizeXXL:n*(o+8),sizeXL:n*(o+4),sizeLG:n*(o+2),sizeMD:n*(o+1),sizeMS:n*o,size:n*o,sizeSM:n*(o-1),sizeXS:n*(o-2),sizeXXS:n*(o-3)}}const Je={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Se=S(S({},Je),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
2
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
3
|
+
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function po(t,{generateColorPalettes:n,generateNeutralColorPalettes:o}){const{colorSuccess:r,colorWarning:a,colorError:l,colorInfo:s,colorPrimary:c,colorBgBase:g,colorTextBase:v}=t,u=n(c),m=n(r),x=n(a),h=n(l),i=n(s),b=o(g,v);return S(S({},b),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:m[1],colorSuccessBgHover:m[2],colorSuccessBorder:m[3],colorSuccessBorderHover:m[4],colorSuccessHover:m[4],colorSuccess:m[6],colorSuccessActive:m[7],colorSuccessTextHover:m[8],colorSuccessText:m[9],colorSuccessTextActive:m[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:x[1],colorWarningBgHover:x[2],colorWarningBorder:x[3],colorWarningBorderHover:x[4],colorWarningHover:x[4],colorWarning:x[6],colorWarningActive:x[7],colorWarningTextHover:x[8],colorWarningText:x[9],colorWarningTextActive:x[10],colorInfoBg:i[1],colorInfoBgHover:i[2],colorInfoBorder:i[3],colorInfoBorderHover:i[4],colorInfoHover:i[4],colorInfo:i[6],colorInfoActive:i[7],colorInfoTextHover:i[8],colorInfoText:i[9],colorInfoTextActive:i[10],colorBgMask:new I("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const mo=t=>{let n=t,o=t,r=t,a=t;return t<6&&t>=5?n=t+1:t<16&&t>=6?n=t+2:t>=16&&(n=16),t<7&&t>=5?o=4:t<8&&t>=7?o=5:t<14&&t>=8?o=6:t<16&&t>=14?o=7:t>=16&&(o=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?a=4:t>=8&&(a=6),{borderRadius:t>16?16:t,borderRadiusXS:r,borderRadiusSM:o,borderRadiusLG:n,borderRadiusOuter:a}};function go(t){const{motionUnit:n,motionBase:o,borderRadius:r,lineWidth:a}=t;return S({motionDurationFast:`${(o+n).toFixed(1)}s`,motionDurationMid:`${(o+n*2).toFixed(1)}s`,motionDurationSlow:`${(o+n*3).toFixed(1)}s`,lineWidthBold:a+1},mo(r))}const H=(t,n)=>new I(t).setAlpha(n).toRgbString(),U=(t,n)=>new I(t).darken(n).toHexString(),ho=t=>{const n=te(t);return{1:n[0],2:n[1],3:n[2],4:n[3],5:n[4],6:n[5],7:n[6],8:n[4],9:n[5],10:n[6]}},vo=(t,n)=>{const o=t||"#fff",r=n||"#000";return{colorBgBase:o,colorTextBase:r,colorText:H(r,.88),colorTextSecondary:H(r,.65),colorTextTertiary:H(r,.45),colorTextQuaternary:H(r,.25),colorFill:H(r,.15),colorFillSecondary:H(r,.06),colorFillTertiary:H(r,.04),colorFillQuaternary:H(r,.02),colorBgLayout:U(o,4),colorBgContainer:U(o,0),colorBgElevated:U(o,0),colorBgSpotlight:H(r,.85),colorBorder:U(o,15),colorBorderSecondary:U(o,6)}};function bo(t){const n=new Array(10).fill(null).map((o,r)=>{const a=r-1,l=t*Math.pow(2.71828,a/5),s=r>1?Math.floor(l):Math.ceil(l);return Math.floor(s/2)*2});return n[1]=t,n.map(o=>{const r=o+8;return{size:o,lineHeight:r/o}})}const yo=t=>{const n=bo(t),o=n.map(a=>a.size),r=n.map(a=>a.lineHeight);return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function xo(t){const n=Object.keys(Je).map(o=>{const r=te(t[o]);return new Array(10).fill(1).reduce((a,l,s)=>(a[`${o}-${s+1}`]=r[s],a),{})}).reduce((o,r)=>(o=S(S({},o),r),o),{});return S(S(S(S(S(S(S({},t),n),po(t,{generateColorPalettes:ho,generateNeutralColorPalettes:vo})),yo(t.fontSize)),fo(t)),uo(t)),go(t))}function me(t){return t>=0&&t<=255}function Y(t,n){const{r:o,g:r,b:a,a:l}=new I(t).toRgb();if(l<1)return t;const{r:s,g:c,b:g}=new I(n).toRgb();for(let v=.01;v<=1;v+=.01){const u=Math.round((o-s*(1-v))/v),m=Math.round((r-c*(1-v))/v),x=Math.round((a-g*(1-v))/v);if(me(u)&&me(m)&&me(x))return new I({r:u,g:m,b:x,a:Math.round(v*100)/100}).toRgbString()}return new I({r:o,g:r,b:a,a:1}).toRgbString()}var Co=function(t,n){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(o[r[a]]=t[r[a]]);return o};function ko(t){const{override:n}=t,o=Co(t,["override"]),r=S({},n);Object.keys(Se).forEach(h=>{delete r[h]});const a=S(S({},o),r),l=480,s=576,c=768,g=992,v=1200,u=1600,m=2e3;return S(S(S({},a),{colorLink:a.colorInfoText,colorLinkHover:a.colorInfoHover,colorLinkActive:a.colorInfoActive,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:Y(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:Y(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:Y(a.colorWarningBg,a.colorBgContainer),colorLogo:a.colorLogo,colorSelectedMenu:a.colorSelectedMenu,mainBgColor:a.mainBgColor,fontSizeIcon:a.fontSizeSM,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:Y(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
4
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
5
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
6
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
7
|
+
`,boxShadowSecondary:`
|
|
8
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
9
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
10
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
11
|
+
`,boxShadowTertiary:`
|
|
12
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
13
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
14
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
15
|
+
`,screenXS:l,screenXSMin:l,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:g-1,screenLG:g,screenLGMin:g,screenLGMax:v-1,screenXL:v,screenXLMin:v,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:m-1,screenXXXL:m,screenXXXLMin:m,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
16
|
+
0 1px 2px -2px ${new I("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
17
|
+
0 3px 6px 0 ${new I("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
18
|
+
0 5px 12px 4px ${new I("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
19
|
+
`,boxShadowDrawerRight:`
|
|
20
|
+
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
21
|
+
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
22
|
+
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
23
|
+
`,boxShadowDrawerLeft:`
|
|
24
|
+
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
25
|
+
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
26
|
+
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
27
|
+
`,boxShadowDrawerUp:`
|
|
28
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
29
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
30
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
31
|
+
`,boxShadowDrawerDown:`
|
|
32
|
+
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
33
|
+
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
34
|
+
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
35
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}const So=_t(xo),wo={token:Se,hashed:!0},Ye=Symbol("DesignTokenContext"),xe=e.shallowRef(),Eo=t=>{e.provide(Ye,t),e.watch(t,()=>{xe.value=e.unref(t),e.triggerRef(xe)},{immediate:!0,deep:!0})};e.defineComponent({props:{value:Ue()},setup(t,{slots:n}){return Eo(e.computed(()=>t.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function et(){const t=e.inject(Ye,e.computed(()=>xe.value||wo)),n=e.computed(()=>`${Wt}-${t.value.hashed||""}`),o=e.computed(()=>t.value.theme||So),r=Xt(o,e.computed(()=>[Se,t.value.token]),e.computed(()=>({salt:n.value,override:S({override:t.value.token},t.value.components),formatToken:ko})));return[o,e.computed(()=>r.value[0]),e.computed(()=>t.value.hashed?r.value[1]:"")]}const Bo={class:"d-flex flex-wrap tag-cloud"},Ao={class:"d-flex flex-wrap"},Mo=e.defineComponent({__name:"FilterTagCloud",props:{filters:{}},emits:["update:filters","remove","clear"],setup(t,{emit:n}){const o=t,r=n,[,a]=et(),l=e.computed(()=>({color:a.value.colorSelectedMenu,borderColor:a.value.colorBorderSecondary,backgroundColor:a.value.mainBgColor||a.value.colorPrimaryBg})),s=i=>i==null?!1:Array.isArray(i)?i.length>0:!!i,c=e.computed(()=>Object.values(o.filters).some(s));function g(i){return typeof i=="object"&&i!==null&&"name"in i&&typeof i.name=="string"}const v=i=>{if(typeof i=="string")return{key:i,label:i,original:i};if(Array.isArray(i)){if(i.length===2&&typeof i[0]=="string"&&typeof i[1]=="string"){const d=`${i[0]} - ${i[1]}`;return{key:d,label:d,original:i}}const k=i.join(", ");return{key:k,label:k,original:i}}if(g(i)){const k=i.name;return{key:k,label:k,original:i}}const b=JSON.stringify(i);return{key:b,label:b,original:i}},u=i=>i==null?[]:Array.isArray(i)?i.map(b=>v(b)):[v(i)],m=(i,b)=>typeof i=="string"||typeof b=="string"?i===b:JSON.stringify(i)===JSON.stringify(b),x=(i,b,k)=>{if(Array.isArray(b)){const d=b.filter(p=>!m(p,k));r("update:filters",{...o.filters,[i]:d})}else r("update:filters",{...o.filters,[i]:null});r("remove",i,b,k)},h=()=>{r("update:filters",{}),r("clear")};return(i,b)=>{const k=e.resolveComponent("a-tag"),d=e.resolveComponent("a-button");return e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("div",Ao,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(t.filters),([p,f])=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(f),w=>(e.openBlock(),e.createBlock(k,{key:w.key,class:"filter-tag",closable:!0,style:e.normalizeStyle(l.value),onClose:()=>x(p,f,w.original)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["style","onClose"]))),128))],64))),128))]),c.value?(e.openBlock(),e.createBlock(d,{key:0,type:"link",onClick:h},{default:e.withCtx(()=>[...b[0]||(b[0]=[e.createTextVNode(" Очистить все ",-1)])]),_:1})):e.createCommentVNode("",!0)])}}}),z=(t,n)=>{const o=t.__vccOpts||t;for(const[r,a]of n)o[r]=a;return o},Vo=z(Mo,[["__scopeId","data-v-0e8e5dd7"]]),To={class:"d-flex align-items-center justify-content-center fs-5"},oe=e.defineComponent({__name:"TableCellStatus",props:{value:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",To,[t.value?(e.openBlock(),e.createBlock(e.unref(T.CheckCircleTwoTone),{key:1,"two-tone-color":"#bfbfbf"})):(e.openBlock(),e.createBlock(e.unref(T.CheckCircleTwoTone),{key:0,"two-tone-color":"#4ade80"}))]))}}),No={class:"flex items-center justify-center gap-2"},Io=e.defineComponent({__name:"CardCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean}},emits:["edit","delete","restore"],setup(t,{emit:n}){const o=t,r=n,a=o.canEdit??!0,l=o.editAction??!0,s=v=>r("delete",v),c=v=>r("restore",v),g=v=>r("edit",v);return(v,u)=>{const m=e.resolveComponent("a-button"),x=e.resolveComponent("a-tooltip");return e.openBlock(),e.createElementBlock("div",No,[e.unref(a)===!1?(e.openBlock(),e.createBlock(x,{key:0,title:"Смотреть"},{default:e.withCtx(()=>[e.createVNode(m,{icon:e.h(e.unref(T.EyeOutlined)),onClick:u[0]||(u[0]=h=>g(t.record))},null,8,["icon"])]),_:1})):e.createCommentVNode("",!0),e.unref(a)!==!1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(l)!==!1?(e.openBlock(),e.createBlock(x,{key:0,title:"Редактировать"},{default:e.withCtx(()=>[e.createVNode(m,{icon:e.h(e.unref(T.EditOutlined)),onClick:u[1]||(u[1]=h=>g(t.record))},null,8,["icon"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{title:t.record.deletedAt?"Восстановить":"Удалить"},{default:e.withCtx(()=>[e.createVNode(m,{icon:e.h(t.record.deletedAt?e.unref(T.RedoOutlined):e.unref(T.DeleteOutlined)),onClick:u[2]||(u[2]=h=>t.record.deletedAt?c(t.record):s(t.record))},null,8,["icon"])]),_:1},8,["title"])],64)):e.createCommentVNode("",!0)])}}}),Do={class:"data-card__header"},Fo={class:"data-card__body"},Ho={class:"data-card__label"},_o={class:"data-card__value"},$o={key:0},Lo={key:2},Ro={key:3},Po={key:4},Oo={key:5},zo={key:0,class:"data-card__footer"},jo=e.defineComponent({__name:"TheCard",props:{loading:{type:Boolean},record:{},columns:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean}},emits:["delete","restore","edit"],setup(t,{emit:n}){const o=t,r=h=>o.record[String(h.dataIndex)],a=h=>{const i=r(h);return Array.isArray(i)?i:[]},l=h=>{if(h===null||typeof h!="object")return"";if("name"in h){const i=h.name;return typeof i=="string"?i:""}return""},s=n,c=o.canEdit??!0,g=o.editAction??!0,v=o.showActionsColumn??!0,u=h=>s("delete",h),m=h=>s("restore",h),x=h=>s("edit",h);return(h,i)=>{const b=e.resolveComponent("a-tag"),k=e.resolveComponent("a-card");return e.openBlock(),e.createBlock(k,{loading:t.loading,bordered:!1,class:"data-card bg-white rounded-3 shadow-sm"},e.createSlots({title:e.withCtx(()=>[e.createElementVNode("div",Do,[e.renderSlot(h.$slots,"title",{},void 0,!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.renderSlot(h.$slots,"body",{record:t.record,columns:t.columns},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("div",{key:d.dataIndex,class:"data-card__row"},[e.createElementVNode("span",Ho,e.toDisplayString(d.title)+": ",1),e.createElementVNode("span",_o,[d.dataIndex==="deletedAt"?(e.openBlock(),e.createElementBlock("span",$o,[e.createVNode(oe,{value:t.record.deletedAt},null,8,["value"])])):Array.isArray(r(d))?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[d.tag===!0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a(d),(p,f)=>(e.openBlock(),e.createBlock(b,{key:f,class:"me-1 mb-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof p=="object"?l(p):p),1)]),_:2},1024))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a(d),(p,f)=>(e.openBlock(),e.createElementBlock("span",{key:f},[typeof p=="object"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(l(p)),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(p),1)],64)),f<a(d).length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" , ")],64)):e.createCommentVNode("",!0)]))),128))],64)):typeof r(d)=="boolean"?(e.openBlock(),e.createElementBlock("span",Lo,[e.createVNode(oe,{value:!r(d)},null,8,["value"])])):r(d)!==null&&typeof r(d)=="object"?(e.openBlock(),e.createElementBlock("span",Ro,e.toDisplayString(l(r(d))),1)):d.tag===!0?(e.openBlock(),e.createElementBlock("span",Po,[e.createVNode(b,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(d)),1)]),_:2},1024)])):(e.openBlock(),e.createElementBlock("span",Oo,e.toDisplayString(r(d)),1))])]))),128))],!0)]),h.$slots.footer?(e.openBlock(),e.createElementBlock("div",zo,[e.renderSlot(h.$slots,"footer",{record:t.record,columns:t.columns},void 0,!0)])):e.createCommentVNode("",!0)]),_:2},[e.unref(v)?{name:"actions",fn:e.withCtx(()=>[e.createVNode(Io,{record:t.record,"can-edit":e.unref(c),"edit-action":e.unref(g),onEdit:x,onDelete:u,onRestore:m},null,8,["record","can-edit","edit-action"])]),key:"0"}:void 0]),1032,["loading"])}}}),Uo=z(jo,[["__scopeId","data-v-65504714"]]),tt=e.defineComponent({__name:"LazyLoadTrigger",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},loading:{type:Boolean}},setup(t){const n=t,o=e.ref(null);let r=null;const a=l=>{var c;l[0].isIntersecting&&((c=n.onIntersect)==null||c.call(n),n.once&&r&&r.disconnect())};return e.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold}),o.value&&r.observe(o.value)}),e.onBeforeUnmount(()=>{r&&r.disconnect()}),(l,s)=>{const c=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o,style:{height:"1px"},class:"d-flex align-items-center justify-content-center pb-5 pt-5"},[e.createVNode(c,{spinning:t.loading},null,8,["spinning"])],512)}}}),Go={class:"d-flex flex-column gap-4"},Xo=e.defineComponent({__name:"CardGrid",props:{loading:{type:Boolean},columns:{},dataSource:{},cardLayout:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean},pagination:{type:Boolean},meta:{}},emits:["delete","restore","edit","pageChange","sizeChange"],setup(t,{emit:n}){const o=t,r=n;e.onMounted(()=>{const u=document.querySelector(".card-grid");u!==null&&Ce(u)});const a=e.computed(()=>o.cardLayout==="row"?"card-grid card-grid--row":"card-grid card-grid--grid"),l=e.computed(()=>o.columns),s=e.ref([]),c=()=>{var x;if(((x=o.meta)==null?void 0:x.currentPage)===1){s.value=[...o.dataSource];return}const u=new Set(s.value.map(h=>h.id)),m=o.dataSource.filter(h=>!u.has(h.id));s.value.push(...m)};c(),e.watch(()=>{var u;return[o.dataSource,(u=o.meta)==null?void 0:u.currentPage]},c,{deep:!0});const g=e.computed(()=>o.meta===void 0?!0:o.meta.currentPage*o.meta.pageSize>=o.meta.total),v=()=>{o.loading||g.value||!o.meta||r("pageChange",o.meta.currentPage+1)};return(u,m)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",{class:e.normalizeClass(a.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(x,h)=>(e.openBlock(),e.createBlock(Uo,{key:String(x.id??`card-${h}`),loading:t.loading,record:x,columns:l.value,"can-edit":t.canEdit,"edit-action":t.editAction,"show-actions-column":t.showActionsColumn,onEdit:m[0]||(m[0]=i=>r("edit",i)),onDelete:m[1]||(m[1]=i=>r("delete",i)),onRestore:m[2]||(m[2]=i=>r("restore",i))},e.createSlots({_:2},[u.$slots.titleCard?{name:"title",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"titleCard",{record:x,columns:l.value},void 0,!0)]),key:"0"}:void 0,u.$slots.bodyCard?{name:"body",fn:e.withCtx(({record:i,columns:b})=>[e.renderSlot(u.$slots,"bodyCard",{record:i,columns:b},void 0,!0)]),key:"1"}:void 0,u.$slots.footerCard?{name:"footer",fn:e.withCtx(({record:i,columns:b})=>[e.renderSlot(u.$slots,"footerCard",{record:i,columns:b},void 0,!0)]),key:"2"}:void 0]),1032,["loading","record","columns","can-edit","edit-action","show-actions-column"]))),128))],2),t.pagination&&!g.value?(e.openBlock(),e.createBlock(tt,{key:0,loading:t.loading,once:!1,"on-intersect":v},null,8,["loading"])):e.createCommentVNode("",!0)]))}}),ot=z(Xo,[["__scopeId","data-v-07cfb68f"]]),nt="10",Wo="20",qo="50",Zo="100",Ko="1000",Qo=1,Jo=nt;var $=(t=>(t.SEARCH="search",t.SELECT="select",t.DATE="date",t))($||{}),rt=(t=>(t.SMALL="10",t.MEDIUM="20",t.LARGE="50",t.EXTRA_LARGE="100",t.ULTRA="1000",t))(rt||{});const Yo=["10","20","50","100"];var at=(t=>(t[t.NONE=0]="NONE",t[t.SMALL=10]="SMALL",t[t.MEDIUM=20]="MEDIUM",t[t.LARGE=50]="LARGE",t))(at||{}),lt=(t=>(t[t.DEFAULT_CURRENT_PAGE=1]="DEFAULT_CURRENT_PAGE",t))(lt||{}),ne=(t=>(t.ASCEND="ascend",t.DESCEND="descend",t))(ne||{}),it=(t=>(t.ASC="asc",t.DESC="desc",t))(it||{});const en=e.defineComponent({name:"MultiselectWrapper",components:{VueMultiselect:ht},props:{modelValue:{type:[Array,String,Number,Object,Boolean,null],default:null}},emits:["update:modelValue"],data(){return{simpleImage:vt.Empty.PRESENTED_IMAGE_SIMPLE}}});function tn(t,n,o,r,a,l){const s=e.resolveComponent("a-empty"),c=e.resolveComponent("VueMultiselect");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$attrs,{class:"filter-select",modelValue:t.modelValue,"onUpdate:modelValue":n[0]||(n[0]=g=>t.$emit("update:modelValue",g)),label:"name","value-prop":"id"}),{nooptions:e.withCtx(()=>[e.createVNode(s,{image:t.simpleImage},null,8,["image"])]),_:1},16,["modelValue"])}const st=z(en,[["render",tn],["__scopeId","data-v-cfb3f123"]]),on={class:"d-flex align-items-center gap-2 p-2"},nn=e.defineComponent({__name:"FilterDropdown",props:{placeholder:{},filterMode:{},componentProps:{}},emits:["update:modelValue","apply"],setup(t,{emit:n}){const o=t,r=n,a=e.computed(()=>o.filterMode===$.SEARCH?"a-input":o.filterMode===$.SELECT?st:o.filterMode===$.DATE?"a-range-picker":null),l=e.ref(null),s=()=>{r("update:modelValue",l.value),r("apply")};return(c,g)=>{const v=e.resolveComponent("a-button");return e.openBlock(),e.createElementBlock("div",on,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.mergeProps(t.componentProps,{value:l.value,"onUpdate:value":g[0]||(g[0]=u=>l.value=u),modelValue:l.value,"onUpdate:modelValue":g[1]||(g[1]=u=>l.value=u),placeholder:t.placeholder,style:{"min-width":"240px","max-width":"300px","font-size":"14px"},object:""}),null,16,["value","modelValue","placeholder"])),e.createVNode(v,{type:"primary",size:"small",onClick:s},{default:e.withCtx(()=>[...g[2]||(g[2]=[e.createTextVNode(" Добавить ",-1)])]),_:1})])}}}),rn={class:"d-flex align-items-center justify-content-center gap-2"},an=e.defineComponent({__name:"TableCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean}},emits:["edit","delete","restore"],setup(t,{emit:n}){const o=t,r=n,a=c=>{r("delete",c)},l=c=>{r("restore",c)},s=c=>{r("edit",c)};return(c,g)=>{const v=e.resolveComponent("a-button"),u=e.resolveComponent("a-tooltip");return e.openBlock(),e.createElementBlock("div",rn,[o.canEdit===!1?(e.openBlock(),e.createBlock(u,{key:0,title:"Смотреть"},{default:e.withCtx(()=>[e.createVNode(v,{icon:e.h(e.unref(T.EyeOutlined)),onClick:g[0]||(g[0]=m=>s(t.record))},null,8,["icon"])]),_:1})):e.createCommentVNode("",!0),t.canEdit!==!1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.editAction!==!1?(e.openBlock(),e.createBlock(u,{key:0,title:"Редактировать"},{default:e.withCtx(()=>[e.createVNode(v,{icon:e.h(e.unref(T.EditOutlined)),onClick:g[1]||(g[1]=m=>s(t.record))},null,8,["icon"])]),_:1})):e.createCommentVNode("",!0),t.deleteAction!==!1?(e.openBlock(),e.createBlock(u,{key:1,title:t.record.isDeleted?"Восстановить":"Удалить"},{default:e.withCtx(()=>[e.createVNode(v,{icon:e.h(t.record.isDeleted?e.unref(T.RedoOutlined):e.unref(T.DeleteOutlined)),onClick:g[2]||(g[2]=m=>t.record.isDeleted?l(t.record):a(t.record))},null,8,["icon"])]),_:1},8,["title"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])}}}),ln={class:"d-flex align-items-center justify-content-between"},sn={class:"d-flex align-items-center gap-2"},cn={key:0},dn={key:1},un={key:2},fn={key:3},pn={key:4},mn={key:5},ct=e.defineComponent({__name:"TheTable",props:{loading:{type:Boolean},pagination:{type:Boolean},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean},showActionsColumn:{type:Boolean},columnsVisibility:{},disableColumnFilterDropdowns:{type:Boolean},showFilterButton:{type:Boolean}},emits:["update:filterValues","filterApply","restore","edit","delete","sortChange","pageChange","sizeChange","openColumnDrawer","openFilterDrawer"],setup(t,{emit:n}){const[,o]=et(),r=t,a=n,l=e.computed(()=>r.showFilterButton===!0),s=e.ref(r.filterValues||{}),c=e.ref([...r.columns]),g=e.ref({}),v=e.computed(()=>r.disableColumnFilterDropdowns===!0?[]:c.value.filter(d=>d.filterable)),u=e.computed(()=>{const p=c.value.filter(f=>{if(f.filterOnly)return!1;const w=f.key||String(f.dataIndex);return r.columnsVisibility[w]!==!1}).map(f=>{const{headerAlign:w,cellAlign:E,...V}=f;return{...V,sorter:!!V.sortable,sortDirections:V.sortable?[ne.ASCEND,ne.DESCEND]:void 0,customHeaderCell:()=>w?{style:{textAlign:w}}:void 0,customCell:()=>E?{style:{textAlign:E}}:void 0,customFilterDropdown:!!V.filterable,slots:V.filterable?{filterDropdown:`filter${String(V.dataIndex)}Dropdown`}:void 0}});return r.showActionsColumn!==!1&&r.columnsVisibility.actions!==!1&&p.push({title:"Действия",key:"actions",dataIndex:"actions",width:100,slots:{customRender:"actionColumn"}}),p}),m=e.computed(()=>Object.keys(r.columnsVisibility).filter(d=>r.columnsVisibility[d]===!1).length),x=e.computed(()=>({color:o.value.colorSelectedMenu,borderColor:o.value.colorBorderSecondary,backgroundColor:o.value.mainBgColor||o.value.colorPrimaryBg})),h=(d,p)=>{const f=s.value[d];if(p===null){const E={...s.value,[d]:null};g.value[d]=null,a("filterApply",{key:d,value:[]}),a("update:filterValues",E),s.value=E;return}if(X.isEqual(f,p)){g.value[d]=null;return}const w={...s.value,[d]:p};a("filterApply",{key:d,value:[p]}),a("update:filterValues",w),s.value=w,g.value[d]=null},i=d=>d.isGroup?"parent-row":"",b=(d,p,f)=>{a("sortChange",{columnKey:f.columnKey||"",order:f.order||null})},k=(d,p)=>{const f=p.key||String(p.dataIndex),w=c.value.findIndex(E=>(E.key||String(E.dataIndex))===f);w!==-1&&c.value.splice(w,1,{...p,width:d})};return e.watch(()=>r.filterValues,d=>{s.value=d||{}}),e.watch(()=>r.columns,d=>{c.value=[...d]},{immediate:!0}),e.onMounted(()=>{const d=document.querySelector(".the-table tbody");d!==null&&Ce(d)}),(d,p)=>{var Ee,Be,Ae,Me;const f=e.resolveComponent("Icon"),w=e.resolveComponent("a-button"),E=e.resolveComponent("a-badge"),V=e.resolveComponent("a-skeleton"),y=e.resolveComponent("a-tag"),j=e.resolveComponent("a-table"),gt=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(j,{bordered:"","table-layout":"fixed",class:"the-table",loading:t.loading,columns:u.value,"data-source":t.dataSource,"row-key":C=>C.id,pagination:!1,scroll:{x:"max-content"},"row-class-name":i,onChange:b,onResizeColumn:k},e.createSlots({title:e.withCtx(()=>[e.createElementVNode("div",ln,[e.createElementVNode("div",sn,[e.createVNode(E,{dot:"",count:m.value},{default:e.withCtx(()=>[e.createVNode(w,{class:"d-flex align-items-center justify-content-center p-2",onClick:p[0]||(p[0]=C=>d.$emit("openColumnDrawer"))},{default:e.withCtx(()=>[e.createVNode(f,{name:"solar:settings-outline",class:"fs-5"})]),_:1})]),_:1},8,["count"]),l.value?(e.openBlock(),e.createBlock(w,{key:0,class:"d-flex align-items-center justify-content-center p-2",onClick:p[1]||(p[1]=C=>d.$emit("openFilterDrawer"))},{default:e.withCtx(()=>[e.createVNode(f,{name:"ant-design:filter-outlined",class:"fs-5"})]),_:1})):e.createCommentVNode("",!0)]),e.renderSlot(d.$slots,"title")])]),bodyCell:e.withCtx(({column:C,record:B})=>[e.renderSlot(d.$slots,"bodyCell",{column:C,record:B},()=>{var Ve;return[t.loading?(e.openBlock(),e.createBlock(V,{key:0,active:!0,loading:!0,title:!1,paragraph:{rows:1}})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[C.dataIndex==="isDeleted"?(e.openBlock(),e.createElementBlock("span",cn,[e.createVNode(oe,{value:B.isDeleted},null,8,["value"])])):Array.isArray(B[C.dataIndex])?(e.openBlock(),e.createElementBlock("span",dn,[C.tag===!0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B[C.dataIndex],(D,q)=>(e.openBlock(),e.createBlock(y,{key:q,style:e.normalizeStyle(x.value),class:"me-1 mb-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof D=="object"?(D==null?void 0:D.name)||"":D),1)]),_:2},1032,["style"]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B[C.dataIndex],(D,q)=>(e.openBlock(),e.createElementBlock("span",{key:q},[typeof D=="object"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(D.name),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(D),1)],64)),q<B[C.dataIndex].length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" , ")],64)):e.createCommentVNode("",!0)]))),128))])):typeof B[C.dataIndex]=="boolean"?(e.openBlock(),e.createElementBlock("span",un,[e.createVNode(oe,{value:!B[C.dataIndex]},null,8,["value"])])):typeof B[C.dataIndex]=="object"?(e.openBlock(),e.createElementBlock("span",fn,e.toDisplayString(((Ve=B[C.dataIndex])==null?void 0:Ve.name)||""),1)):C.tag===!0?(e.openBlock(),e.createElementBlock("span",pn,[e.createVNode(y,{style:e.normalizeStyle(x.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B[C.dataIndex]),1)]),_:2},1032,["style"])])):(e.openBlock(),e.createElementBlock("span",mn,e.toDisplayString(B[C.dataIndex]),1))],64))]})]),actionColumn:e.withCtx(({record:C})=>[e.renderSlot(d.$slots,"actionColumn",{record:C},()=>[e.createVNode(an,{"edit-action":t.editAction,"delete-action":t.deleteAction,"can-edit":t.canEdit,record:C,onEdit:()=>d.$emit("edit",C),onDelete:()=>d.$emit("delete",C),onRestore:()=>d.$emit("restore",C)},null,8,["edit-action","delete-action","can-edit","record","onEdit","onDelete","onRestore"])])]),_:2},[e.renderList(v.value,C=>({name:`filter${String(C.dataIndex)}Dropdown`,fn:e.withCtx(()=>[e.createVNode(nn,{modelValue:g.value[C.dataIndex],"onUpdate:modelValue":[B=>g.value[C.dataIndex]=B,B=>h(C.dataIndex,B)],"filter-mode":C.filterMode,"component-props":C.componentProps,placeholder:C.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])])}))]),1032,["loading","columns","data-source","row-key"]),t.pagination?(e.openBlock(),e.createBlock(gt,{key:0,class:"mt-4 text-end",current:(Ee=t.meta)==null?void 0:Ee.currentPage,"page-size":(Be=t.meta)==null?void 0:Be.pageSize,total:(Ae=t.meta)==null?void 0:Ae.total,"show-total":C=>`Всего ${C} элементов`,"page-size-options":(Me=t.meta)==null?void 0:Me.pageSizeOptions,"show-size-changer":!0,onChange:p[2]||(p[2]=C=>d.$emit("pageChange",C)),onShowSizeChange:p[3]||(p[3]=(C,B)=>d.$emit("sizeChange",C,B))},null,8,["current","page-size","total","show-total","page-size-options"])):e.createCommentVNode("",!0)])}}}),gn={class:"mb-4"},hn={class:"d-flex flex-column gap-1"},dt=e.defineComponent({__name:"ColumnSettingsDrawer",props:{visible:{type:Boolean},columns:{},modelValue:{},showActionsColumn:{type:Boolean},disableViewMode:{type:Boolean},viewMode:{},cardLayout:{}},emits:["update:visible","update:modelValue","update:viewMode","update:cardLayout"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(o.visible),l=e.ref(o.viewMode),s=e.ref(o.cardLayout),c=e.reactive({...o.modelValue}),g=e.computed(()=>l.value==="grid"),v=o.disableViewMode||!1;return e.watch(()=>o.visible,u=>{a.value=u}),e.watch(a,u=>{r("update:visible",u)}),e.watch(()=>o.viewMode,u=>{l.value=u}),e.watch(l,u=>{r("update:viewMode",u)}),e.watch(()=>o.cardLayout,u=>{s.value=u}),e.watch(s,u=>{r("update:cardLayout",u)}),e.watch(()=>o.modelValue,u=>Object.assign(c,u),{deep:!0}),e.watch(c,u=>r("update:modelValue",{...u}),{deep:!0}),o.showActionsColumn&&c.actions===void 0&&(c.actions=!0),(u,m)=>{const x=e.resolveComponent("a-checkbox"),h=e.resolveComponent("a-radio"),i=e.resolveComponent("a-radio-group"),b=e.resolveComponent("a-radio-button"),k=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(k,{open:a.value,"onUpdate:open":m[2]||(m[2]=d=>a.value=d),title:"Настройки представления",placement:"right"},{default:e.withCtx(()=>[e.createElementVNode("section",gn,[m[3]||(m[3]=e.createElementVNode("h3",{class:"fw-bold fs-6 mb-2"},"Отображение колонок",-1)),e.createElementVNode("div",hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("div",{key:d.key??d.dataIndex},[e.createVNode(x,{checked:c[d.key??d.dataIndex],"onUpdate:checked":p=>c[d.key??d.dataIndex]=p,disabled:g.value,class:"d-flex"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.title),1)]),_:2},1032,["checked","onUpdate:checked","disabled"])]))),128))])]),e.createElementVNode("section",null,[m[8]||(m[8]=e.createElementVNode("h3",{class:"fw-bold fs-6 mb-2"},"Вид",-1)),e.createVNode(i,{value:l.value,"onUpdate:value":m[0]||(m[0]=d=>l.value=d),"button-style":"solid",class:"mb-3",disabled:e.unref(v)},{default:e.withCtx(()=>[e.createVNode(h,{value:"table"},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("Таблица",-1)])]),_:1}),e.createVNode(h,{value:"grid"},{default:e.withCtx(()=>[...m[5]||(m[5]=[e.createTextVNode("Карточки",-1)])]),_:1})]),_:1},8,["value","disabled"]),e.createVNode(i,{value:s.value,"onUpdate:value":m[1]||(m[1]=d=>s.value=d),"button-style":"solid",disabled:!g.value},{default:e.withCtx(()=>[e.createVNode(b,{value:"grid"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.AppstoreOutlined),{class:"me-2"}),m[6]||(m[6]=e.createTextVNode("Сетка ",-1))]),_:1}),e.createVNode(b,{value:"row"},{default:e.withCtx(()=>[e.createVNode(e.unref(T.PicCenterOutlined),{class:"me-2"}),m[7]||(m[7]=e.createTextVNode("Строка ",-1))]),_:1})]),_:1},8,["value","disabled"])])]),_:1},8,["open"])}}}),ut=e.defineComponent({__name:"FilterInput",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null]},filterMode:{},componentProps:{},placeholder:{}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,r=n,a=e.computed(()=>o.filterMode===$.SEARCH?"a-input":o.filterMode===$.SELECT?st:o.filterMode===$.DATE?"a-range-picker":"a-input"),l=e.ref(o.modelValue);return e.watch(()=>o.modelValue,s=>{l.value=s}),e.watch(l,s=>r("update:modelValue",s)),(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.mergeProps(t.componentProps,{value:l.value,"onUpdate:value":c[0]||(c[0]=g=>l.value=g),modelValue:l.value,"onUpdate:modelValue":c[1]||(c[1]=g=>l.value=g),placeholder:t.placeholder,class:"w-100 small"}),null,16,["value","modelValue","placeholder"]))}}),vn={class:"small fw-medium"},bn={class:"d-flex flex-column gap-2 mt-2"},yn=e.defineComponent({__name:"CardFiltersDrawer",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(o.visible),l=e.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>Array.isArray(i)?i:i!=null?[i]:[],g=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=e.computed(()=>o.columns.filter(i=>i.filterable)),u=e.computed(()=>Object.keys(l).some(i=>!X.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(b=>{delete l[b]}),Object.assign(l,i)};e.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),e.watch(a,i=>{r("update:visible",i)}),e.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const x=()=>{const i={...o.filterValues};Object.entries(l).forEach(([b,k])=>{if(g(k)){i[b]=null,r("filterApply",{key:b,value:[]});return}i[b]=k,r("filterApply",{key:b,value:c(k)})}),r("update:filterValues",i),a.value=!1},h=()=>{Object.keys(l).forEach(b=>{delete l[b]}),r("update:filterValues",{})};return(i,b)=>{const k=e.resolveComponent("a-button"),d=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(d,{open:a.value,"onUpdate:open":b[0]||(b[0]=p=>a.value=p),placement:"right",width:"360",title:"Фильтры","body-style":"padding: 24px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,p=>(e.openBlock(),e.createElementBlock("section",{key:s(p),class:"mb-4 d-flex flex-column gap-2"},[e.createElementVNode("span",vn,e.toDisplayString(p.title),1),e.createVNode(ut,{modelValue:l[s(p)],"onUpdate:modelValue":f=>l[s(p)]=f,"filter-mode":p.filterMode,"component-props":p.componentProps,placeholder:p.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128)),e.createElementVNode("div",bn,[e.createVNode(k,{block:"",onClick:h},{default:e.withCtx(()=>[...b[1]||(b[1]=[e.createTextVNode(" Сбросить ",-1)])]),_:1}),e.createVNode(k,{type:"primary",block:"",disabled:!u.value,onClick:x},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createTextVNode(" Применить ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),ft=z(yn,[["__scopeId","data-v-35036cad"]]),xn={class:"small fw-medium"},Cn=e.defineComponent({__name:"CardFiltersModal",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(o.visible),l=e.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>Array.isArray(i)?i:i!=null?[i]:[],g=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=e.computed(()=>o.columns.filter(i=>i.filterable)),u=e.computed(()=>Object.keys(l).some(i=>!X.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(b=>{delete l[b]}),Object.assign(l,i)};e.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),e.watch(a,i=>{r("update:visible",i)}),e.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const x=()=>{const i={...o.filterValues};Object.entries(l).forEach(([b,k])=>{if(g(k)){i[b]=null,r("filterApply",{key:b,value:[]});return}i[b]=k,r("filterApply",{key:b,value:c(k)})}),r("update:filterValues",i),a.value=!1},h=()=>{a.value=!1};return(i,b)=>{const k=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(k,{visible:a.value,"onUpdate:visible":b[0]||(b[0]=d=>a.value=d),title:"Фильтры","destroy-on-close":"","ok-text":"Применить","cancel-text":"Сбросить","ok-button-props":{disabled:!u.value},onOk:x,onCancel:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,d=>(e.openBlock(),e.createElementBlock("section",{key:s(d),class:"mb-4 d-flex flex-column gap-2"},[e.createElementVNode("span",xn,e.toDisplayString(d.title),1),e.createVNode(ut,{modelValue:l[s(d)],"onUpdate:modelValue":p=>l[s(d)]=p,"filter-mode":d.filterMode,"component-props":d.componentProps,placeholder:d.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128))]),_:1},8,["visible","ok-button-props"])}}}),pt=z(Cn,[["__scopeId","data-v-454326bc"]]);var re=(t=>(t.Table="table",t.Grid="grid",t))(re||{}),we=(t=>(t.Grid="grid",t.Row="row",t))(we||{});const kn={class:"d-flex justify-content-between align-items-center gap-2 mb-2"},Sn={class:"d-flex align-items-center gap-1"},mt=e.defineComponent({__name:"DataView",props:{viewMode:{},loading:{type:Boolean},pagination:{type:Boolean,default:!1},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean,default:!0},editAction:{type:Boolean,default:!0},deleteAction:{type:Boolean,default:!0},showActionsColumn:{type:Boolean,default:!0},disableViewMode:{type:Boolean,default:!1},enableTableFilterDrawer:{type:Boolean,default:!1},disableColumnFilterDropdowns:{type:Boolean,default:!1},useFilterModal:{type:Boolean,default:!1}},emits:["update:viewMode","update:filterValues","filterApply","edit","delete","restore","sortChange","pageChange","sizeChange"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(o.viewMode||re.Table),l=e.computed(()=>(a==null?void 0:a.value)===re.Grid),s=e.ref(we.Grid),c=e.ref(o.filterValues||{}),g=e.ref(null),v=p=>{c.value=p,r("update:filterValues",p)},u=(p,f,w)=>{const E={...c.value};if(f===void 0){v(E);return}if(Array.isArray(f)){E[p]=f.filter(V=>!X.isEqual(V,w)),v(E);return}if(X.isEqual(f,w)){E[p]=[],v(E);return}E[p]=[f],v(E)},m=()=>v({}),x=p=>{r("filterApply",p)},h=e.ref(!1),i=e.ref(!1),b=e.ref({}),k=e.computed(()=>a.value==="table"?Object.keys(b.value).filter(p=>b.value[p]===!1).length:0),d=p=>{p.forEach(f=>{const w=f.key??String(f.dataIndex);b.value[w]===void 0&&(b.value[w]=!0)}),o.showActionsColumn&&b.value.actions===void 0&&(b.value.actions=!0)};return e.watch(()=>o.filterValues,p=>{c.value=p||{}}),e.watch(()=>o.viewMode,p=>{p!==void 0&&(a.value=p)}),e.watch(()=>o.columns,d),e.watch(a,p=>r("update:viewMode",p)),e.onMounted(()=>d(o.columns)),e.onMounted(()=>{g.value&&Ce(g.value)}),(p,f)=>{const w=e.resolveComponent("Icon"),E=e.resolveComponent("a-button"),V=e.resolveComponent("a-badge");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"tagCloudContainer",ref:g},[e.createVNode(Vo,{filters:c.value,"onUpdate:filters":v,onRemove:u,onClear:m},null,8,["filters"])],512),l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",kn,[e.createElementVNode("div",Sn,[e.createVNode(V,{dot:"",count:k.value},{default:e.withCtx(()=>[e.createVNode(E,{class:"d-flex align-items-center justify-content-center p-2",onClick:f[0]||(f[0]=y=>i.value=!0)},{default:e.withCtx(()=>[e.createVNode(w,{name:"solar:settings-outline",class:"fs-5"})]),_:1})]),_:1},8,["count"]),e.createVNode(E,{class:"d-flex align-items-center justify-content-center p-2",onClick:f[1]||(f[1]=y=>h.value=!0)},{default:e.withCtx(()=>[e.createVNode(w,{name:"ant-design:filter-outlined",class:"fs-5"})]),_:1})]),e.renderSlot(p.$slots,"headerCardContainer"),e.renderSlot(p.$slots,"title")]),l.value?(e.openBlock(),e.createBlock(ot,{key:0,loading:t.loading,columns:t.columns,"data-source":t.dataSource,"card-layout":s.value,"can-edit":t.canEdit,"edit-action":t.editAction,"show-actions-column":t.showActionsColumn,pagination:t.pagination,meta:t.meta,onRestore:f[2]||(f[2]=y=>r("restore",y)),onEdit:f[3]||(f[3]=y=>r("edit",y)),onDelete:f[4]||(f[4]=y=>r("delete",y)),onPageChange:f[5]||(f[5]=y=>r("pageChange",y)),onSizeChange:f[6]||(f[6]=(y,j)=>r("sizeChange",y,j))},e.createSlots({_:2},[p.$slots.titleCard?{name:"titleCard",fn:e.withCtx(y=>[e.renderSlot(p.$slots,"titleCard",e.normalizeProps(e.guardReactiveProps(y)))]),key:"0"}:void 0,p.$slots.body?{name:"bodyCard",fn:e.withCtx(y=>[e.renderSlot(p.$slots,"body",e.normalizeProps(e.guardReactiveProps(y)))]),key:"1"}:void 0,p.$slots.footer?{name:"footerCard",fn:e.withCtx(y=>[e.renderSlot(p.$slots,"footer",e.normalizeProps(e.guardReactiveProps(y)))]),key:"2"}:void 0]),1032,["loading","columns","data-source","card-layout","can-edit","edit-action","show-actions-column","pagination","meta"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(ct,{key:1,loading:t.loading,pagination:t.pagination,columns:t.columns,"data-source":t.dataSource,"filter-values":c.value,meta:t.meta,"can-edit":t.canEdit,"edit-action":t.editAction,"delete-action":t.deleteAction,"show-actions-column":t.showActionsColumn,"columns-visibility":b.value,"disable-column-filter-dropdowns":o.disableColumnFilterDropdowns===!0,"show-filter-button":o.enableTableFilterDrawer===!0,onOpenColumnDrawer:f[7]||(f[7]=y=>i.value=!0),onOpenFilterDrawer:f[8]||(f[8]=y=>h.value=!0),"onUpdate:filterValues":v,onFilterApply:f[9]||(f[9]=y=>r("filterApply",y)),onRestore:f[10]||(f[10]=y=>r("restore",y)),onEdit:f[11]||(f[11]=y=>r("edit",y)),onDelete:f[12]||(f[12]=y=>r("delete",y)),onSortChange:f[13]||(f[13]=y=>r("sortChange",y)),onPageChange:f[14]||(f[14]=y=>r("pageChange",y)),onSizeChange:f[15]||(f[15]=(y,j)=>r("sizeChange",y,j))},{title:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),bodyCell:e.withCtx(y=>[e.renderSlot(p.$slots,"bodyCell",e.normalizeProps(e.guardReactiveProps(y)))]),actionColumn:e.withCtx(y=>[e.renderSlot(p.$slots,"actionColumn",e.normalizeProps(e.guardReactiveProps(y)))]),_:3},8,["loading","pagination","columns","data-source","filter-values","meta","can-edit","edit-action","delete-action","show-actions-column","columns-visibility","disable-column-filter-dropdowns","show-filter-button"])),e.renderSlot(p.$slots,"filtersDrawer",{visible:h.value,setVisible:y=>{h.value=y},filters:c.value,updateFilters:v,emitFilterApply:x},()=>[o.useFilterModal===!0?(e.openBlock(),e.createBlock(pt,{key:0,visible:h.value,"onUpdate:visible":f[16]||(f[16]=y=>h.value=y),columns:t.columns,"filter-values":c.value,"onUpdate:filterValues":v,onFilterApply:f[17]||(f[17]=y=>r("filterApply",y))},null,8,["visible","columns","filter-values"])):(e.openBlock(),e.createBlock(ft,{key:1,visible:h.value,"onUpdate:visible":f[18]||(f[18]=y=>h.value=y),columns:t.columns,"filter-values":c.value,"onUpdate:filterValues":v,onFilterApply:f[19]||(f[19]=y=>r("filterApply",y))},null,8,["visible","columns","filter-values"]))]),e.createVNode(dt,{visible:i.value,"onUpdate:visible":f[20]||(f[20]=y=>i.value=y),"model-value":b.value,"onUpdate:modelValue":f[21]||(f[21]=y=>b.value=y),"view-mode":a.value,"onUpdate:viewMode":f[22]||(f[22]=y=>a.value=y),"card-layout":s.value,"onUpdate:cardLayout":f[23]||(f[23]=y=>s.value=y),columns:t.columns,"show-actions-column":t.showActionsColumn,"disable-view-mode":t.disableViewMode},null,8,["visible","model-value","view-mode","card-layout","columns","show-actions-column","disable-view-mode"])],64)}}}),wn=e.defineComponent({__name:"LazyLoadContainer",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},rootMargin:{default:"0px"}},setup(t){const n=t,o=e.ref(null);let r=null;const a=l=>{l[0].isIntersecting&&n.onIntersect&&(n.onIntersect(),n.once&&r&&r.disconnect())};return e.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold,rootMargin:n.rootMargin}),o.value&&r.observe(o.value)}),e.onBeforeUnmount(()=>{r==null||r.disconnect()}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o},[e.renderSlot(l.$slots,"default")],512))}});exports.CardFiltersDrawer=ft;exports.CardFiltersModal=pt;exports.CardGrid=ot;exports.CardLayout=we;exports.ColumnSettingsDrawer=dt;exports.DEFAULT_PAGE_NUMBER=Qo;exports.DEFAULT_PAGE_SIZE=Jo;exports.DataTable=ct;exports.DataView=mt;exports.FilterMode=$;exports.LazyLoadContainer=wn;exports.LazyLoadTrigger=tt;exports.PAGE_SIZE_EXTRA_LARGE=Zo;exports.PAGE_SIZE_LARGE=qo;exports.PAGE_SIZE_MEDIUM=Wo;exports.PAGE_SIZE_OPTIONS=Yo;exports.PAGE_SIZE_SMALL=nt;exports.PAGE_SIZE_ULTRA=Ko;exports.PageSizes=rt;exports.SkipSizes=at;exports.SortOrder=it;exports.TableDefaults=lt;exports.TableSortOrder=ne;exports.ViewMode=re;exports.default=mt;
|
|
36
|
+
//# sourceMappingURL=data-view.cjs.js.map
|