@topvisor/ui 1.5.4-groupSelector.2 → 1.5.4-groupSelector.3

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.
@@ -1,15 +1,24 @@
1
+ import { Ref } from 'vue';
1
2
  import { Item, Props } from './types';
3
+ /**
4
+ * Кеш результата
5
+ */
6
+ type Cache = Api.ResponseSuccess<Item[], 'get'>;
2
7
  /**
3
8
  * Список кешей для конкретного API метода
4
9
  */
5
- export declare const cacheByMethod: Map<Api.PathAbstract, Map<string, any>>;
10
+ export declare const cacheByMethod: Map<Api.PathAbstract, Map<string, Cache>>;
11
+ /**
12
+ * Получить счетчик изменений кеша
13
+ */
14
+ export declare const getCacheVersion: (apiPath: Api.PathAbstract) => Ref<number, number>;
6
15
  /**
7
16
  * Сброс кеша конкретного API метода
8
17
  */
9
18
  export declare const clearCache: (apiPath: Api.PathAbstract) => void;
10
19
  export declare const genCacheKey: (api: NonNullable<Props["api"]>) => string;
11
- export declare const getCache: (cacheKey: string, apiPath: Api.PathAbstract) => any;
12
- export declare const setCache: (cacheKey: string, apiPath: Api.PathAbstract, data: any) => void;
20
+ export declare const getCache: (cacheKey: string, apiPath: Api.PathAbstract) => Cache | undefined;
21
+ export declare const setCache: (cacheKey: string, apiPath: Api.PathAbstract, data: Cache) => void;
13
22
  /**
14
23
  * Обновить элемент во всех кешах API метода
15
24
  */
@@ -18,3 +27,4 @@ export declare const updateCacheItemById: (apiPath: Api.PathAbstract, itemId: It
18
27
  * Удалить элемент из всех кешей API метода
19
28
  */
20
29
  export declare const deleteCacheItemById: (apiPath: Api.PathAbstract, itemId: Item["id"]) => void;
30
+ export {};
@@ -5,7 +5,7 @@ import { ITEM_ID_NEW } from '../utils';
5
5
  /**
6
6
  * Функционал поиска
7
7
  */
8
- export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, appendSearchAllowDuplicate: Ref<Props["appendSearchAllowDuplicate"]>, appendSearchToResultCond: Ref<Props["appendSearchToResultCond"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
8
+ export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, prepareItemsBeforeRender: Props["prepareItemsBeforeRender"], multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, appendSearchAllowDuplicate: Ref<Props["appendSearchAllowDuplicate"]>, appendSearchToResultCond: Ref<Props["appendSearchToResultCond"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
9
9
  searchText: Ref<string, string>;
10
10
  resetSearch: () => void;
11
11
  genIsShort: () => boolean;
@@ -61,6 +61,15 @@ export interface Props {
61
61
  * Только для `searchType` = `popup`
62
62
  */
63
63
  hasCloserBtn?: boolean;
64
+ /**
65
+ * Нормализовать элементы перед отображением
66
+ *
67
+ * @note Для случаев, когда надо подменить какие-то данные в items перед выводом
68
+ * @note Константа, после установки менять нельзя
69
+ *
70
+ * @subcategory Api
71
+ */
72
+ prepareItemsBeforeRender?: (items: Item[]) => Item[];
64
73
  /**
65
74
  * Если указан, будет выполнена загрузка результатов через API
66
75
  *
@@ -41,8 +41,11 @@ export interface Props {
41
41
  }
42
42
  export interface Emits {
43
43
  addGroup: [group: Group];
44
- editGroup: [group: Group];
45
- delGroup: [group: Group];
44
+ editGroup: [group: {
45
+ id: number;
46
+ name: string;
47
+ }];
48
+ delGroup: [id: number];
46
49
  }
47
50
  /**
48
51
  * Информация о группе
@@ -112,6 +112,12 @@ export interface Props {
112
112
  * Показывать поле для выбора группы
113
113
  */
114
114
  showGroups?: boolean;
115
+ /**
116
+ * Показывать пути папок к группам в списке групп
117
+ *
118
+ * Включается автоматически, если включен режим вывода папок `showFolders`
119
+ */
120
+ showGroupsPaths?: boolean;
115
121
  /**
116
122
  * Выводить иконку в полях выбора папки и группы
117
123
  */
@@ -1,2 +0,0 @@
1
- define([`require`,`exports`,`./forms-DKVIpGnH.amd`,`./field-DEusYVqS.amd`,`../utils/keyboard.amd`,`./popup-CtiL5V44.amd`,`vue`,`./api-D-JuUXVn.amd`,`../require/css.amd!../assets/formsExt.css`],function(e,t,n,r,i,a,o){"use strict";if(s===void 0)var s=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.u=t.t=t.s=t.r=t.o=t.n=t.l=t.i=t.d=t.c=t.a=void 0;var c={key:0,class:`top-menu_selectAll`},l=(0,o.defineComponent)({__name:`menu`,props:(0,o.mergeModels)({modelValue:{},items:{},isMultiple:{type:Boolean},canBeEmptyMultiple:{type:Boolean},styling:{default:`default`},selectAllItem:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=(0,o.useModel)(e,`modelValue`),i=(0,o.ref)();!t.isMultiple&&typeof r.value!=`string`&&typeof r.value!=`number`&&console.warn(`Type check failed for prop "modelValue". Expected String: `+typeof r.value),t.isMultiple&&!Array.isArray(r.value)&&console.warn(`Type check failed for prop "modelValue". Expected Array: `+typeof r.value),t.isMultiple&&!t.canBeEmptyMultiple&&Array.isArray(r.value)&&!r.value.length&&t.items[0]&&(r.value=[t.items[0]?.href??t.items[0]?.value]);let a=e=>Array.isArray(r.value)?r.value.includes(e.value):e.value===r.value,s=(e,n=!1)=>{if(Array.isArray(r.value)){let i=r.value.slice();if(n){i.length||(i=t.items.map(e=>e.value));let n=i.indexOf(e.value);n===-1?i.push(e.value):i.splice(n,1)}else i=i.length===1&&i[0]===e.value?[]:[e.value];!t.canBeEmptyMultiple&&!i.length&&(i=[e.value]),r.value=i;return}r.value=e.value},l=e=>{if(i.value.scrollWidth<=i.value.offsetWidth||e.shiftKey||Math.abs(e.deltaY)<50)return;e.preventDefault();let t=e.deltaY>0?30:-30;i.value.scrollLeft=i.value.scrollLeft+t},u=(e=!0)=>{let t=i.value.querySelector(`.top-active`);if(!t)return;let r=t.offsetLeft-i.value.offsetLeft-24,a=t.offsetLeft-i.value.offsetLeft+t.clientWidth+24,o=i.value.scrollLeft,s=i.value.clientWidth+i.value.scrollLeft,c;r<o&&(c=r),a>s&&(c=a-i.value.clientWidth),c!==void 0&&((0,n.G)()?n.O.$?.(i.value).animate({scrollLeft:c},e?200:0):i.value.scrollTo({left:c,behavior:e?`smooth`:`auto`}))},d=()=>{if(Array.isArray(r.value)){if(r.value.length===t.items.length){r.value=[t.items[0].href??t.items[0].value];return}r.value=t.items.map(e=>e.href??e.value)}};return(0,o.onMounted)(()=>u(!1)),(0,o.onUpdated)(()=>u(!0)),(t,u)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`el`,ref:i,class:(0,o.normalizeClass)({"top-menu":!0,[`top-style_`+e.styling]:!0}),onWheel:l},[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.items,e=>((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({ref_for:!0},e,{class:`top-menu_item`,color:`theme`,onClick:t=>s(e,t.ctrlKey||t.metaKey),isActive:a(e)}),(0,o.createSlots)({_:2},[e.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.content),1)]),key:`0`}:void 0]),1040,[`onClick`,`isActive`]))),256)),Array.isArray(r.value)&&e.selectAllItem?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,c,[(0,o.createVNode)(n.h,(0,o.mergeProps)(e.selectAllItem,{class:`top-menu_item`,color:`theme`,styling:``,onClick:u[0]||=e=>d(),isActive:r.value.length===e.items.length}),(0,o.createSlots)({_:2},[e.selectAllItem.content?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.selectAllItem.content),1)]),key:`0`}:void 0]),1040,[`isActive`])])):(0,o.createCommentVNode)(``,!0)],34))}}),u={class:`top-selector2_itemMulti top-ellipsis`},d=(0,o.defineComponent)({__name:`itemMulti`,props:{id:{},name:{}},emits:[`delete`],setup(e){return(t,n)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createTextVNode)((0,o.toDisplayString)(e.name)+` `,1),(0,o.createElementVNode)(`span`,{class:`top-selector2_itemMultiDelete`,"data-top-icon":``,onClick:n[0]||=n=>t.$emit(`delete`,{id:e.id,name:e.name}),onMousedown:n[1]||=(0,o.withModifiers)(()=>{},[`stop`])},null,32)]))}}),f=new Map,p=e=>{f.get(e)?.clear()},m=(e,t)=>{let n=f.get(e);if(n)for(let e of n.values())Array.isArray(e?.result)&&t(e.result)},h=e=>{let t=window.mo?.user?.id;return JSON.stringify(e.params)+`:`+e.url+`:`+t},g=(e,t)=>f.get(t)?.get(e),_=(e,t,n)=>{f.has(t)||f.set(t,new Map),f.get(t)?.set(e,n)},v=(e,t,n)=>{m(e,e=>{let r=e.find(e=>e.id===t);r&&Object.assign(r,n)})},y=(e,t)=>{m(e,e=>{let n=e.findIndex(e=>e.id===t);n!==-1&&e.splice(n,1)})},b=(e,t,r,i)=>{let a=(0,o.ref)([]),s=(0,o.ref)(!1),c=(0,o.ref)(0),l=``,u;e&&!e.params.limit&&(e.params.limit=100);let d=async()=>{if(!e)return;let t=i?h(e):void 0;if(t){let n=g(t,e.path);if(n)return e.abortByFingerprint(),n}let n=await e.call();if(n.errors)return;if(!Array.isArray(n.result)){console.warn("Array expected in `res.result`");return}let r=n.result.findIndex(e=>e.id===void 0||e.name===void 0);if(r!==-1){console.warn(`В result[${r}] нет id или name`);return}return t&&_(t,e.path,n),n},f=async n=>{if(!e)return;if(n){if(!u||s.value)return;e.params.offset=u}else e.params.offset=0;t?.(e,l),s.value=!0;let r=await d();s.value=!1,c.value++,r&&(u=r.nextOffset,n?a.value=a.value.concat(r.result):a.value=r.result)},p=(0,n.P)(()=>f(!1),200);return{apiRequest:e,items:a,isLoading:s,countLoading:c,load:f,setSearchTextAndLoad:(t,n=!0)=>{if(e){if(t.length<r){e.abortByFingerprint(),a.value=[];return}t===l&&a.value.length||(l=t,n?p():f(!1))}}}},x=0,S=null,C=(e,t,n=!0)=>n&&t.id===null?Array.isArray(e)?e.some(e=>e.id===t.id&&e.name===t.name):t.name===e.name:Array.isArray(e)?e.some(e=>e.id===t.id):t.id===e.id,w=(e,t,n)=>{let i=e.params.filters??[];i=i.filter(e=>e.name!==n),t&&i.push((0,r.t)(n,`CONTAINS`,[t])),e.changeParams({filters:i})},T=(e,t,r,a,s,c,l,u,d,f,p,m,h)=>{let g=(0,o.ref)(``),_={id:0,name:(0,n.E)().Common.All},v=()=>{g.value=``},y=()=>!(!h.apiRequest||g.value.length>=m),b=(0,o.computed)(()=>{let e=[];return!a&&s.value&&(typeof s.value==`string`&&(_.name=s.value),e.push(_)),r.value?.forEach(t=>e.push({...t})),e}),x=(0,o.ref)([]),S=()=>{x.value=w()},w=()=>{let t=g.value.toLowerCase(),n=(0,i.invertKeyboardLayout)(t),r=[],o,s=[],p=()=>{s.at(-1)?.listItemProps?.type===`delimiter`&&s.pop(),s.length&&=(o&&r.push(o),r.push(...s),0)},m=e=>{let r=f.value?.includes(`id`),i=e.name.toLowerCase(),a=f.value?.filter(e=>e!==`id`).map(t=>typeof e[t]==`string`||typeof e[t]==`number`?e[t]:``).join(`☼`).toLowerCase();(r&&e.id===Number(t)||a?.includes(t)||a?.includes(n))&&(i===t||i===n?s.unshift(e):s.push(e))};for(let e of b.value)switch(e.listItemProps?.type){case`title`:p(),o=e;break;case`delimiter`:if(s.length){let t=s.length;s.at(-1)?.listItemProps?.type===`delimiter`&&t--,s[t]=e}break;default:m(e)}if(p(),r.push(...h.items.value),c.value&&g.value&&(!u.value||u.value(t))&&(l.value||!r.find(e=>e.name.toLowerCase()===t))){let e={id:null,name:g.value};d.value&&(e.listItemProps={closeByClick:!1}),r.push(e)}return a&&(r=r.filter(t=>!C(e.value,t))),r},T=n=>{n.listItemProps?.type===`title`||n.listItemProps?.type===`delimiter`||n.id===null&&(t(`appendItem`,n),d.value)||(a&&Array.isArray(e.value)?C(e.value,n)||(e.value=[...e.value,n]):e.value=n,setTimeout(()=>{v()}))};if(h.apiRequest){let t=[r,h.items];a&&t.push(e),(0,o.watch)(t,()=>{S()},{deep:2})}else(0,o.watch)([e,r,g],()=>{S()},{immediate:!0,deep:2});return{searchText:g,resetSearch:v,genIsShort:y,itemsForShow:x,selectItem:T,selectNextItem:()=>{if(Array.isArray(e.value))return;let t=x.value.filter(e=>![`title`,`delimiter`].includes(e.listItemProps?.type??``));e.value={...t[(t.findIndex(t=>t.id===e.value.id)+1)%t.length]}},deleteItemByItem:async t=>{Array.isArray(e.value)&&(e.value=e.value.filter(e=>e.id!==t.id||e.name!==t.name))}}},E={key:0,class:`top-selector2_activeItems`},D={key:1,class:`top-selector2_activeName top-ellipsis`},O={key:2,class:`top-selector2_placeholder top-ellipsis`},k={class:`top-selector2_searchWidget`},A=(0,o.defineComponent)({__name:`selector2`,props:(0,o.mergeModels)({modelValue:{},items:{default:()=>[]},title:{},disabled:{type:Boolean},icon:{},modificator:{},size:{default:`s`},isError:{type:Boolean},openByFocusInput:{type:Boolean,default:void 0},searchType:{default:`popup`},searchFields:{default:()=>[`id`,`name`]},placeholder:{},hasCloserBtn:{type:Boolean},api:{},apiSetSearchParams:{},minLength:{default:0},useCache:{type:Boolean},appendSearchToResult:{type:Boolean},appendSearchAllowDuplicate:{type:Boolean},appendSearchToResultCond:{},appendWithoutSelect:{type:Boolean},multiselect:{type:Boolean},useAllItem:{type:[Boolean,String]},addChanger:{type:Boolean},buttonProps:{},selectedAsPlaceholder:{type:Boolean},openerShortcut:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:(0,o.mergeModels)([`appendItem`,`open`],[`update:modelValue`]),setup(e,{expose:t,emit:r}){let i=e,s=(0,o.useModel)(e,`modelValue`),c=r;t({resetCache:(e=!1)=>{u.apiRequest&&(e&&p(u.apiRequest.path),u.items.value=[],u.countLoading.value=0,u.apiRequest.params.offset=0,requestAnimationFrame(()=>{f.itemsForShow.value=[]}),g()?.elPopup&&u.setSearchTextAndLoad(f.searchText.value))},updateItemById:(e,t)=>{let n=u.items.value.find(t=>t.id===e);n&&Object.assign(n,t),u.apiRequest&&v(u.apiRequest.path,e,t)},deleteItemById:e=>{let t=u.items.value.findIndex(t=>t.id===e);t!==-1&&u.items.value.splice(t,1),u.apiRequest&&y(u.apiRequest.path,e)}});let l=(0,o.computed)(()=>i.searchType===`inline`&&i.multiselect||i.searchType===`inline`&&n.O.state.isMobile?`popup`:i.searchType),u=b(i.api,i.apiSetSearchParams,i.minLength,i.useCache),f=T(s,c,(0,o.toRef)(i,`items`),i.multiselect,(0,o.toRef)(i,`useAllItem`),(0,o.toRef)(i,`appendSearchToResult`),(0,o.toRef)(i,`appendSearchAllowDuplicate`),(0,o.toRef)(i,`appendSearchToResultCond`),(0,o.toRef)(i,`appendWithoutSelect`),(0,o.toRef)(i,`searchFields`),l,i.minLength,u),m=(0,o.computed)(()=>i.buttonProps?`TopButton`:l.value===`inline`?`TopInput`:`div`),h=(0,o.ref)(null),g=()=>h.value?.popup;u.apiRequest&&(0,o.watch)(f.searchText,()=>{u.setSearchTextAndLoad(f.searchText.value)});let _=(0,o.computed)(()=>Array.isArray(s.value)||i.multiselect||!i.selectedAsPlaceholder&&l.value!==`inline`?i.placeholder:s.value?.name||i.placeholder),x=e=>{let t=!1;switch(e.key){case`Delete`:case`Backspace`:Array.isArray(s.value)&&(e.preventDefault(),e.stopPropagation(),s.value.pop());break;case`ArrowUp`:case`ArrowRight`:case`ArrowDown`:case`ArrowLeft`:case`Enter`:case` `:t=!0;break;case`Escape`:l.value===`inline`&&f.resetSearch();break}let n=e.key.length===1&&!e.ctrlKey&&!e.metaKey;(l.value===`popup`||l.value===`inline`)&&n&&(t=!0),g()?.elPopup&&(t=!1),t&&(l.value===`popup`&&(e.preventDefault(),e.stopPropagation(),n&&(f.searchText.value||(f.searchText.value=e.key))),e.currentTarget?.click())},S=e=>{e.preventDefault(),f.selectNextItem()},C=()=>{u.apiRequest&&u.setSearchTextAndLoad(f.searchText.value,!1),c(`open`)},w=()=>{l.value===`popup`&&f.searchText.value&&f.resetSearch()},A=e=>{let t=e.target;t.scrollTop/(t.scrollHeight-t.offsetHeight)>.8&&u.load(!0)};return(t,r)=>{let i=(0,o.resolveComponent)(`TopButton`),c=(0,o.resolveComponent)(`TopLoadbar`),p=(0,o.resolveDirective)(`top-focus`),g=(0,o.resolveDirective)(`top-shortcut`);return(0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.s),{ref_key:`popupRef`,ref:h,onOpen:r[3]||=e=>C(),onClose:r[4]||=e=>w(),onScrollContentList:r[5]||=e=>(0,o.unref)(u)?A(e):void 0,notch:!1,transitionDuration:0,openByFocusInput:l.value===`inline`&&(e.openByFocusInput??!0),disabled:l.value===`inline`&&(0,o.unref)(f).genIsShort()},(0,o.createSlots)({opener:(0,o.withCtx)(()=>[(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createBlock)((0,o.resolveDynamicComponent)(m.value),(0,o.mergeProps)(e.buttonProps,{class:{"top-selector2":!0,"top-selector2-multiselect":e.multiselect,[`top-selector2-`+e.modificator]:!!e.modificator,"top-as-input":!e.buttonProps&&l.value!==`inline`,"top-as-selector":!0,[`top-size_`+e.size]:!0,"top-disabled":e.disabled,"top-forms-focusable":!e.disabled,"top-error":e.isError},icon:e.icon,tabindex:`0`,onKeydown:x,onBlur:r[0]||=e=>l.value===`inline`&&(0,o.unref)(f).resetSearch(),placeholder:_.value,title:e.title,captionType:l.value===`inline`&&e.title!==void 0?`top`:void 0,modelValue:(0,o.unref)(f).searchText.value,"onUpdate:modelValue":r[1]||=e=>(0,o.unref)(f).searchText.value=e}),{default:(0,o.withCtx)(()=>[e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,E,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.value,e=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:e.id??void 0,id:e.id,name:e.name,onDelete:(0,o.unref)(f).deleteItemByItem},null,8,[`id`,`name`,`onDelete`]))),128))])):(0,o.createCommentVNode)(``,!0),l.value!==`inline`&&!e.multiselect?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,D,(0,o.toDisplayString)(Array.isArray(s.value)?``:s.value.name),1)):(0,o.createCommentVNode)(``,!0),e.multiselect&&!s.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,O,(0,o.toDisplayString)(_.value),1)):(0,o.createCommentVNode)(``,!0),e.addChanger&&!e.buttonProps&&!e.multiselect&&(0,o.unref)(f).itemsForShow.value.length>1&&!e.disabled?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,{key:3,class:`top-changer top-changer-selector`,"data-top-popup-disabled":`true`,onClick:S})):(0,o.createCommentVNode)(``,!0)]),_:1},16,[`class`,`icon`,`placeholder`,`title`,`captionType`,`modelValue`])),[[p,e.isError,void 0,{onupdate:!0}],[g,e.openerShortcut]])]),contentList:(0,o.withCtx)(()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)((0,o.unref)(f).itemsForShow.value,r=>((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),(0,o.mergeProps)({key:r.id??void 0,class:{"top-active":!Array.isArray(s.value)&&!e.multiselect&&s.value.id===r.id&&s.value.name===r.name,"top-selector2_item-all":r.id===(0,o.unref)(0),"top-selector2_item-new":r.id===(0,o.unref)(null)},closeByClick:!e.multiselect||(0,o.unref)(n.O).state.isMobile},{ref_for:!0},r.listItemProps,{onClick:e=>(0,o.unref)(f).selectItem(r)}),(0,o.createSlots)({default:(0,o.withCtx)(()=>[t.$slots.item?(0,o.renderSlot)(t.$slots,`item`,{key:0,item:r}):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(r.name),1)],64))]),_:2},[t.$slots.actions?{name:`actions`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`actions`,{item:r})]),key:`0`}:void 0]),1040,[`class`,`closeByClick`,`onClick`]))),128)),!(0,o.unref)(f).itemsForShow.value.length&&!(0,o.unref)(f).genIsShort()?((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(a.o),{key:0,type:`regular`},{default:(0,o.withCtx)(()=>[!(0,o.unref)(u).isLoading.value||(0,o.unref)(u).countLoading.value?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.No_results),1)],64)):((0,o.openBlock)(),(0,o.createBlock)((0,o.unref)(n.t),{key:1,type:`circles`}))]),_:1})):(0,o.createCommentVNode)(``,!0),(0,o.unref)(u).countLoading.value&&(0,o.unref)(u).isLoading.value&&l.value===`inline`?((0,o.openBlock)(),(0,o.createBlock)(c,{key:1})):(0,o.createCommentVNode)(``,!0)]),_:2},[l.value===`popup`?{name:`widget`,fn:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,k,[(0,o.withDirectives)((0,o.createVNode)((0,o.unref)(a.a),{title:`Поиск`,icon:``,modelValue:(0,o.unref)(f).searchText.value,"onUpdate:modelValue":r[2]||=e=>(0,o.unref)(f).searchText.value=e,isLoading:!!(0,o.unref)(u).countLoading.value&&(0,o.unref)(u).isLoading.value,placeholder:_.value},null,8,[`modelValue`,`isLoading`,`placeholder`]),[[p,s.value,void 0,{onupdate:!0}]]),e.hasCloserBtn&&!t.$core.state.isMobile?((0,o.openBlock)(),(0,o.createBlock)(i,{key:0,class:`closer`,color:`theme`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(t.$i18n.Common.Cancel),1)]),_:1})):(0,o.createCommentVNode)(``,!0)])]),key:`0`}:void 0]),1032,[`openByFocusInput`,`disabled`])}}}),j={class:`top-editArea_footer`},M=(0,o.defineComponent)({__name:`editArea`,props:{defaultValue:{default:``},title:{},cancelText:{default:`Cancel`},submitText:{default:`Send`},closeText:{default:`Close`},isFocused:{type:Boolean},forceShowCloseBtn:{type:Boolean},attachToKeyboard:{type:Boolean},modelValue:{},name:{},placeholder:{},styling:{},rows:{},minHeight:{},expandable:{type:Boolean,default:!0},disabled:{type:Boolean},readonly:{type:Boolean},isError:{type:Boolean},hint:{},maxLength:{}},emits:[`submit`,`close`,`clickOnTitle`],setup(e,{emit:t}){let r=e,i=t,a=(0,o.ref)(r.defaultValue),s=(0,o.ref)(r.isFocused),c=(0,o.computed)(()=>a.value!==r.defaultValue),l=e=>{i(`submit`,e),a.value=r.defaultValue},u=()=>{if(r.forceShowCloseBtn&&!c.value){i(`close`);return}a.value=r.defaultValue},d=()=>{r.attachToKeyboard&&i(`clickOnTitle`)};return(t,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-editArea":!0,"top-editArea-attachedToKeyboard":e.attachToKeyboard})},[e.title||t.$slots.caption?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{key:0,class:`top-editArea_caption`,onClick:r[0]||=e=>d()},[(0,o.renderSlot)(t.$slots,`caption`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.title),1)])])):(0,o.createCommentVNode)(``,!0),(0,o.createElementVNode)(`div`,{class:(0,o.normalizeClass)({"top-editArea_form":!0,"top-forms-focusable":!0,"top-as-input":!0,"top-error":e.isError,"top-focus":s.value})},[(0,o.createVNode)(n.r,{modelValue:a.value,"onUpdate:modelValue":r[1]||=e=>a.value=e,name:e.name,placeholder:e.placeholder,rows:e.rows,minHeight:e.minHeight,expandable:e.expandable,disabled:e.disabled,readonly:e.readonly,isError:e.isError,hint:e.hint,class:`top-editArea_element`,onFocus:r[2]||=()=>s.value=!0,onBlur:r[3]||=()=>s.value=!1,onKeyup:[(0,o.withKeys)(u,[`esc`]),r[4]||=(0,o.withKeys)((0,o.withModifiers)(e=>l(a.value),[`ctrl`]),[`enter`])]},null,8,[`modelValue`,`name`,`placeholder`,`rows`,`minHeight`,`expandable`,`disabled`,`readonly`,`isError`,`hint`]),(0,o.createElementVNode)(`div`,j,[c.value||e.forceShowCloseBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:0,icon:t.$core.state.isMobile?``:``,class:`top-editArea_button`,color:`theme`,styling:`soft`,onClick:u},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.cancelText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0),c.value?((0,o.openBlock)(),(0,o.createBlock)(n.h,{key:1,class:`top-editArea_button`,icon:t.$core.state.isMobile?``:``,onClick:r[5]||=e=>l(a.value)},(0,o.createSlots)({_:2},[t.$core.state.isMobile?void 0:{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.submitText),1)]),key:`0`}]),1032,[`icon`])):(0,o.createCommentVNode)(``,!0)])],2)],2))}}),N={class:`top-editInput`},P=(0,o.defineComponent)({__name:`editInput`,props:{modelValue:{},alwaysShowSubmitBtn:{type:Boolean},input:{},button:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=(0,o.ref)(r.modelValue);(0,o.watch)(()=>r.modelValue,()=>{i.value=r.modelValue});let a=t,s=()=>{a(`update:modelValue`,i.value)};return(t,r)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,N,[(0,o.createVNode)(n.c,(0,o.mergeProps)(e.input,{onKeydownCapture:r[0]||=(0,o.withKeys)((0,o.withModifiers)(t=>i.value=e.modelValue,[`stop`]),[`esc`]),onKeydown:(0,o.withKeys)((0,o.withModifiers)(s,[`stop`]),[`enter`]),modelValue:i.value,"onUpdate:modelValue":r[1]||=e=>i.value=e}),(0,o.createSlots)({_:2},[t.$slots.caption?{name:`caption`,fn:(0,o.withCtx)(()=>[(0,o.renderSlot)(t.$slots,`caption`)]),key:`0`}:void 0]),1040,[`onKeydown`,`modelValue`]),i.value!==e.modelValue||e.alwaysShowSubmitBtn?((0,o.openBlock)(),(0,o.createBlock)(n.h,(0,o.mergeProps)({key:0,icon:``,styling:`soft`},e.button,{onClick:s}),null,16)):(0,o.createCommentVNode)(``,!0)]))}}),F=(0,o.defineComponent)({__name:`optionGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{default:`s`},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`),r=e,i=(0,o.ref)(null);(0,o.watch)(t,()=>{let e=r.items.map(e=>e.value);Array.isArray(t.value)?t.value.find(t=>!e.includes(t))&&(t.value=t.value.filter(t=>e.includes(t))):e.includes(t.value)||(t.value=e[0]??``),i.value?.querySelector(`.radioGroup_item-selected`)?.scrollIntoView()},{immediate:!0});let a=`optionGroup-`+Math.random();return(r,s)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{ref_key:`elRef`,ref:i,class:(0,o.normalizeClass)({"top-optionGroup":!0,[`top-optionGroup-showIndicator_`+Number(e.showIndicator)]:!0,"top-scrollBarXHidding":!0,[`top-size_`+e.size]:!!e.size,"top-error":e.isError})},[Array.isArray(t.value)?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.f,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":t.value.includes(r.value),"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[0]||=e=>t.value=e,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256)):((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:1},(0,o.renderList)(e.items,r=>((0,o.openBlock)(),(0,o.createBlock)(n.a,{class:(0,o.normalizeClass)({"top-optionGroup_item-selected":r.value===t.value,"top-optionGroup_item":!0}),modelValue:t.value,"onUpdate:modelValue":s[1]||=e=>t.value=e,name:a,value:r.value,title:r.title,disabled:r.disabled,isError:e.isError,"data-top-icon":r.icon},(0,o.createSlots)({_:2},[r.label?{name:`default`,fn:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(r.label),1)]),key:`0`}:void 0]),1032,[`class`,`modelValue`,`value`,`title`,`disabled`,`isError`,`data-top-icon`]))),256))],2))}}),I=(0,o.defineComponent)({__name:`radioGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`);return(e,n)=>((0,o.openBlock)(),(0,o.createBlock)(F,{class:`top-radioGroup`,modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,items:e.$props.items,size:e.$props.size,showIndicator:e.$props.showIndicator,isError:e.$props.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),L=(0,o.defineComponent)({__name:`checkboxGroup`,props:(0,o.mergeModels)({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,o.useModel)(e,`modelValue`);return(e,n)=>((0,o.openBlock)(),(0,o.createBlock)(F,{class:`top-checkboxGroup`,modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,items:e.$props.items,size:e.$props.size,showIndicator:e.$props.showIndicator,isError:e.$props.isError},{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`items`,`size`,`showIndicator`,`isError`]))}}),R=[`data-top-icon`],z={class:`top-info_text`},B={key:0,class:`top-info_value`},V=(0,o.defineComponent)({__name:`info`,props:{icon:{},styling:{default:`default`},size:{default:`default`}},setup(e){return(t,n)=>((0,o.openBlock)(),(0,o.createElementBlock)(`div`,{class:(0,o.normalizeClass)({"top-info":!0,[`top-size_`+e.size]:!0,[`top-info-styling_`+e.styling]:!0}),"data-top-icon":e.icon},[(0,o.createElementVNode)(`div`,z,[(0,o.renderSlot)(t.$slots,`default`)]),t.$slots.additional?((0,o.openBlock)(),(0,o.createElementBlock)(`span`,B,[(0,o.renderSlot)(t.$slots,`additional`)])):(0,o.createCommentVNode)(``,!0)],10,R))}}),H={key:0,class:`top-policy`},U={class:`top-policy_title`},W=[`innerHTML`],G=(0,o.defineComponent)({__name:`policy`,props:{title:{},description:{},acceptText:{}},emits:[`accept`],setup(e,{emit:t}){let r=t,i=(0,o.ref)(!0),a=()=>{i.value=!1,r(`accept`)};return(t,r)=>i.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,H,[(0,o.createElementVNode)(`div`,U,(0,o.toDisplayString)(e.title),1),(0,o.createElementVNode)(`div`,{class:`top-policy_description`,innerHTML:e.description},null,8,W),(0,o.createVNode)((0,o.unref)(n.h),{size:`m`,onClick:a},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.acceptText),1)]),_:1})])):(0,o.createCommentVNode)(``,!0)}});t.d=l,t.c=x,t.l=S,t.u=w,t.s=A,t.o=M,t.a=P,t.i=I,t.r=L,t.n=V,t.t=G});
2
- //# sourceMappingURL=formsExt-UkSw445A.amd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[".chunks/formsExt-UkSw445A.esm.js","../../src/components/formsExt/menu/menu.vue","../../src/components/formsExt/selector2/itemMulti.vue","../../src/components/formsExt/selector2/cache.ts","../../src/components/formsExt/selector2/composables/useAPI.ts","../../src/components/formsExt/selector2/utils.ts","../../src/components/formsExt/selector2/composables/useMenu.ts","../../src/components/formsExt/selector2/selector2.vue","../../src/components/formsExt/editArea/editArea.vue","../../src/components/formsExt/editInput/editInput.vue","../../src/components/formsExt/libs/optionGroup/optionGroup.vue","../../src/components/formsExt/radioGroup/radioGroup.vue","../../src/components/formsExt/checkboxGroup/checkboxGroup.vue","../../src/components/formsExt/info/info.vue","../../src/components/formsExt/policy/policy.vue"],"names":["vue","exports","G","te","vue_1","r","i","a","o","c","n","t","s","l","forms_DKVIpGnH_esm_js_1","K","ne","q","re","J","Y","X","ie","ae","oe","se","u","d","f","ce","le","Z","ue","field_DEusYVqS_esm_js_1","de","h","m","p","C","e","keyboard_js_1","g","w","fe","pe","me","he","ge","T","D","O","k","U","W","popup_CtiL5V44_esm_js_1","$slots","$i18n","_e","ve","$core","ye","be","Q","xe","$props","Se","Ce","$","we","Te","Ee","De","Oe","ke"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,uBAA2B,uBAA2B,wBAAwB,uBAA2B,MAAO,qBAAuB,2CAAA,EAAA,SAAa,EAAS,EAAS,EAAyB,EAAyB,EAAe,EAAyB,EAAO,CACjS,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACA,OAAO,eAAeC,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,EAAQ,EAAI,IAAK,GAEzI,IAAIC,EAAI,CACJ,IAAK,EACL,MAAO,oBACX,EAAGC,GAAsB,EAAGC,EAAM,gBAAe,CAAE,CAC/C,OAAQ,OACR,OAAsB,EAAGA,EAAM,YAAW,CAAE,CACxC,WAAY,CAAC,EACb,MAAO,CAA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"vue\", \"./api-D-JuUXVn.esm.js\"], function (require, exports, forms_DKVIpGnH_esm_js_1, field_DEusYVqS_esm_js_1, keyboard_js_1, popup_CtiL5V44_esm_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.u = exports.t = exports.s = exports.r = exports.o = exports.n = exports.l = exports.i = exports.d = exports.c = exports.a = void 0;\n //#region src/components/formsExt/menu/menu.vue?vue&type=script&setup=true&lang.ts\n var G = {\n key: 0,\n class: \"top-menu_selectAll\"\n }, te = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menu\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n items: {},\n isMultiple: { type: Boolean },\n canBeEmptyMultiple: { type: Boolean },\n styling: { default: \"default\" },\n selectAllItem: {}\n }, {\n modelValue: { required: !0 },\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n let r = e, i = (0, vue_1.useModel)(e, \"modelValue\"), a = (0, vue_1.ref)();\n !r.isMultiple && typeof i.value != \"string\" && typeof i.value != \"number\" && console.warn(\"Type check failed for prop \\\"modelValue\\\". Expected String: \" + typeof i.value), r.isMultiple && !Array.isArray(i.value) && console.warn(\"Type check failed for prop \\\"modelValue\\\". Expected Array: \" + typeof i.value), r.isMultiple && !r.canBeEmptyMultiple && Array.isArray(i.value) && !i.value.length && r.items[0] && (i.value = [r.items[0]?.href ?? r.items[0]?.value]);\n let o = (e) => Array.isArray(i.value) ? i.value.includes(e.value) : e.value === i.value, c = (e, t = !1) => {\n if (Array.isArray(i.value)) {\n let n = i.value.slice();\n if (t) {\n n.length || (n = r.items.map((e) => e.value));\n let t = n.indexOf(e.value);\n t === -1 ? n.push(e.value) : n.splice(t, 1);\n }\n else\n n = n.length === 1 && n[0] === e.value ? [] : [e.value];\n !r.canBeEmptyMultiple && !n.length && (n = [e.value]), i.value = n;\n return;\n }\n i.value = e.value;\n }, l = (e) => {\n if (a.value.scrollWidth <= a.value.offsetWidth || e.shiftKey || Math.abs(e.deltaY) < 50)\n return;\n e.preventDefault();\n let t = e.deltaY > 0 ? 30 : -30;\n a.value.scrollLeft = a.value.scrollLeft + t;\n }, u = (e = !0) => {\n let r = a.value.querySelector(\".top-active\");\n if (!r)\n return;\n let i = r.offsetLeft - a.value.offsetLeft - 24, o = r.offsetLeft - a.value.offsetLeft + r.clientWidth + 24, s = a.value.scrollLeft, c = a.value.clientWidth + a.value.scrollLeft, l;\n i < s && (l = i), o > c && (l = o - a.value.clientWidth), l !== void 0 && ((0, forms_DKVIpGnH_esm_js_1.G)() ? forms_DKVIpGnH_esm_js_1.O.$?.(a.value).animate({ scrollLeft: l }, e ? 200 : 0) : a.value.scrollTo({\n left: l,\n behavior: e ? \"smooth\" : \"auto\"\n }));\n }, d = () => {\n if (Array.isArray(i.value)) {\n if (i.value.length === r.items.length) {\n i.value = [r.items[0].href ?? r.items[0].value];\n return;\n }\n i.value = r.items.map((e) => e.href ?? e.value);\n }\n };\n return (0, vue_1.onMounted)(() => u(!1)), (0, vue_1.onUpdated)(() => u(!0)), (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n ref_key: \"el\",\n ref: a,\n class: (0, vue_1.normalizeClass)({\n \"top-menu\": !0,\n [\"top-style_\" + e.styling]: !0\n }),\n onWheel: l\n }, [((0, vue_1.openBlock)(!0), (0, vue_1.createElementBlock)(vue_1.Fragment, null, (0, vue_1.renderList)(e.items, (e) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.h, (0, vue_1.mergeProps)({ ref_for: !0 }, e, {\n class: \"top-menu_item\",\n color: \"theme\",\n onClick: (t) => c(e, t.ctrlKey || t.metaKey),\n isActive: o(e)\n }), (0, vue_1.createSlots)({ _: 2 }, [e.content ? {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.content), 1)]),\n key: \"0\"\n } : void 0]), 1040, [\"onClick\", \"isActive\"]))), 256)), Array.isArray(i.value) && e.selectAllItem ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", G, [(0, vue_1.createVNode)(forms_DKVIpGnH_esm_js_1.h, (0, vue_1.mergeProps)(e.selectAllItem, {\n class: \"top-menu_item\",\n color: \"theme\",\n styling: \"\",\n onClick: n[0] ||= (e) => d(),\n isActive: i.value.length === e.items.length\n }), (0, vue_1.createSlots)({ _: 2 }, [e.selectAllItem.content ? {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.selectAllItem.content), 1)]),\n key: \"0\"\n } : void 0]), 1040, [\"isActive\"])])) : (0, vue_1.createCommentVNode)(\"\", !0)], 34));\n }\n }), K = { class: \"top-selector2_itemMulti top-ellipsis\" }, ne = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"itemMulti\",\n props: {\n id: {},\n name: {}\n },\n emits: [\"delete\"],\n setup(e) {\n return (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", K, [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.name) + \" \", 1), (0, vue_1.createElementVNode)(\"span\", {\n class: \"top-selector2_itemMultiDelete\",\n \"data-top-icon\": \"\",\n onClick: n[0] ||= (n) => t.$emit(\"delete\", {\n id: e.id,\n name: e.name\n }),\n onMousedown: n[1] ||= (0, vue_1.withModifiers)(() => { }, [\"stop\"])\n }, null, 32)]));\n }\n }), q = /* @__PURE__ */ new Map(), re = (e) => {\n q.get(e)?.clear();\n }, J = (e, t) => {\n let n = q.get(e);\n if (n)\n for (let e of n.values())\n Array.isArray(e?.result) && t(e.result);\n }, Y = (e) => {\n let t = window.mo?.user?.id;\n return JSON.stringify(e.params) + \":\" + e.url + \":\" + t;\n }, X = (e, t) => q.get(t)?.get(e), ie = (e, t, n) => {\n q.has(t) || q.set(t, /* @__PURE__ */ new Map()), q.get(t)?.set(e, n);\n }, ae = (e, t, n) => {\n J(e, (e) => {\n let r = e.find((e) => e.id === t);\n r && Object.assign(r, n);\n });\n }, oe = (e, t) => {\n J(e, (e) => {\n let n = e.findIndex((e) => e.id === t);\n n !== -1 && e.splice(n, 1);\n });\n }, se = (e, t, n, i) => {\n let a = (0, vue_1.ref)([]), o = (0, vue_1.ref)(!1), s = (0, vue_1.ref)(0), c = \"\", l;\n e && !e.params.limit && (e.params.limit = 100);\n let u = async () => {\n if (!e)\n return;\n let t = i ? Y(e) : void 0;\n if (t) {\n let n = X(t, e.path);\n if (n)\n return e.abortByFingerprint(), n;\n }\n let n = await e.call();\n if (n.errors)\n return;\n if (!Array.isArray(n.result)) {\n console.warn(\"Array expected in `res.result`\");\n return;\n }\n let r = n.result.findIndex((e) => e.id === void 0 || e.name === void 0);\n if (r !== -1) {\n console.warn(`В result[${r}] нет id или name`);\n return;\n }\n return t && ie(t, e.path, n), n;\n }, d = async (n) => {\n if (!e)\n return;\n if (n) {\n if (!l || o.value)\n return;\n e.params.offset = l;\n }\n else\n e.params.offset = 0;\n t?.(e, c), o.value = !0;\n let r = await u();\n o.value = !1, s.value++, r && (l = r.nextOffset, n ? a.value = a.value.concat(r.result) : a.value = r.result);\n }, f = (0, forms_DKVIpGnH_esm_js_1.P)(() => d(!1), 200);\n return {\n apiRequest: e,\n items: a,\n isLoading: o,\n countLoading: s,\n load: d,\n setSearchTextAndLoad: (t, r = !0) => {\n if (e) {\n if (t.length < n) {\n e.abortByFingerprint(), a.value = [];\n return;\n }\n t === c && a.value.length || (c = t, r ? f() : d(!1));\n }\n }\n };\n }, ce = 0, le = null, Z = (e, t, n = !0) => n && t.id === null ? Array.isArray(e) ? e.some((e) => e.id === t.id && e.name === t.name) : t.name === e.name : Array.isArray(e) ? e.some((e) => e.id === t.id) : t.id === e.id, ue = (e, t, n) => {\n let r = e.params.filters ?? [];\n r = r.filter((e) => e.name !== n), t && r.push((0, field_DEusYVqS_esm_js_1.t)(n, \"CONTAINS\", [t])), e.changeParams({ filters: r });\n }, de = (t, n, r, i, a, o, s, c, l, u, f, p, m) => {\n let h = (0, vue_1.ref)(\"\"), _ = {\n id: 0,\n name: (0, forms_DKVIpGnH_esm_js_1.E)().Common.All\n }, v = () => {\n h.value = \"\";\n }, y = () => !(!m.apiRequest || h.value.length >= p), b = (0, vue_1.computed)(() => {\n let e = [];\n return !i && a.value && (typeof a.value == \"string\" && (_.name = a.value), e.push(_)), r.value?.forEach((t) => e.push({ ...t })), e;\n }), x = (0, vue_1.ref)([]), S = () => {\n x.value = C();\n }, C = () => {\n let e = h.value.toLowerCase(), n = (0, keyboard_js_1.invertKeyboardLayout)(e), r = [], a, f = [], p = () => {\n f.at(-1)?.listItemProps?.type === \"delimiter\" && f.pop(), f.length &&= (a && r.push(a), r.push(...f), 0);\n }, g = (t) => {\n let r = u.value?.includes(\"id\"), i = t.name.toLowerCase(), a = u.value?.filter((e) => e !== \"id\").map((e) => typeof t[e] == \"string\" || typeof t[e] == \"number\" ? t[e] : \"\").join(\"☼\").toLowerCase();\n (r && t.id === Number(e) || a?.includes(e) || a?.includes(n)) && (i === e || i === n ? f.unshift(t) : f.push(t));\n };\n for (let e of b.value)\n switch (e.listItemProps?.type) {\n case \"title\":\n p(), a = e;\n break;\n case \"delimiter\":\n if (f.length) {\n let t = f.length;\n f.at(-1)?.listItemProps?.type === \"delimiter\" && t--, f[t] = e;\n }\n break;\n default: g(e);\n }\n if (p(), r.push(...m.items.value), o.value && h.value && (!c.value || c.value(e)) && (s.value || !r.find((t) => t.name.toLowerCase() === e))) {\n let e = {\n id: null,\n name: h.value\n };\n l.value && (e.listItemProps = { closeByClick: !1 }), r.push(e);\n }\n return i && (r = r.filter((e) => !Z(t.value, e))), r;\n }, w = (e) => {\n e.listItemProps?.type === \"title\" || e.listItemProps?.type === \"delimiter\" || e.id === null && (n(\"appendItem\", e), l.value) || (i && Array.isArray(t.value) ? Z(t.value, e) || (t.value = [...t.value, e]) : t.value = e, setTimeout(() => {\n v();\n }));\n };\n if (m.apiRequest) {\n let e = [r, m.items];\n i && e.push(t), (0, vue_1.watch)(e, () => {\n S();\n }, { deep: 2 });\n }\n else\n (0, vue_1.watch)([\n t,\n r,\n h\n ], () => {\n S();\n }, {\n immediate: !0,\n deep: 2\n });\n return {\n searchText: h,\n resetSearch: v,\n genIsShort: y,\n itemsForShow: x,\n selectItem: w,\n selectNextItem: () => {\n if (Array.isArray(t.value))\n return;\n let e = x.value.filter((e) => ![\"title\", \"delimiter\"].includes(e.listItemProps?.type ?? \"\"));\n t.value = { ...e[(e.findIndex((e) => e.id === t.value.id) + 1) % e.length] };\n },\n deleteItemByItem: async (e) => {\n Array.isArray(t.value) && (t.value = t.value.filter((t) => t.id !== e.id || t.name !== e.name));\n }\n };\n }, fe = {\n key: 0,\n class: \"top-selector2_activeItems\"\n }, pe = {\n key: 1,\n class: \"top-selector2_activeName top-ellipsis\"\n }, me = {\n key: 2,\n class: \"top-selector2_placeholder top-ellipsis\"\n }, he = { class: \"top-selector2_searchWidget\" }, ge = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"selector2\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n items: { default: () => [] },\n title: {},\n disabled: { type: Boolean },\n icon: {},\n modificator: {},\n size: { default: \"s\" },\n isError: { type: Boolean },\n openByFocusInput: {\n type: Boolean,\n default: void 0\n },\n searchType: { default: \"popup\" },\n searchFields: { default: () => [\"id\", \"name\"] },\n placeholder: {},\n hasCloserBtn: { type: Boolean },\n api: {},\n apiSetSearchParams: {},\n minLength: { default: 0 },\n useCache: { type: Boolean },\n appendSearchToResult: { type: Boolean },\n appendSearchAllowDuplicate: { type: Boolean },\n appendSearchToResultCond: {},\n appendWithoutSelect: { type: Boolean },\n multiselect: { type: Boolean },\n useAllItem: { type: [Boolean, String] },\n addChanger: { type: Boolean },\n buttonProps: {},\n selectedAsPlaceholder: { type: Boolean },\n openerShortcut: {}\n }, {\n modelValue: { required: !0 },\n modelModifiers: {}\n }),\n emits: /*@__PURE__*/ (0, vue_1.mergeModels)([\"appendItem\", \"open\"], [\"update:modelValue\"]),\n setup(e, { expose: t, emit: r }) {\n let i = e, a = (0, vue_1.useModel)(e, \"modelValue\"), o = r;\n t({\n resetCache: (e = !1) => {\n c.apiRequest && (e && re(c.apiRequest.path), c.items.value = [], c.countLoading.value = 0, c.apiRequest.params.offset = 0, requestAnimationFrame(() => {\n u.itemsForShow.value = [];\n }), T()?.elPopup && c.setSearchTextAndLoad(u.searchText.value));\n },\n updateItemById: (e, t) => {\n let n = c.items.value.find((t) => t.id === e);\n n && Object.assign(n, t), c.apiRequest && ae(c.apiRequest.path, e, t);\n },\n deleteItemById: (e) => {\n let t = c.items.value.findIndex((t) => t.id === e);\n t !== -1 && c.items.value.splice(t, 1), c.apiRequest && oe(c.apiRequest.path, e);\n }\n });\n let s = (0, vue_1.computed)(() => i.searchType === \"inline\" && i.multiselect || i.searchType === \"inline\" && forms_DKVIpGnH_esm_js_1.O.state.isMobile ? \"popup\" : i.searchType), c = se(i.api, i.apiSetSearchParams, i.minLength, i.useCache), u = de(a, o, (0, vue_1.toRef)(i, \"items\"), i.multiselect, (0, vue_1.toRef)(i, \"useAllItem\"), (0, vue_1.toRef)(i, \"appendSearchToResult\"), (0, vue_1.toRef)(i, \"appendSearchAllowDuplicate\"), (0, vue_1.toRef)(i, \"appendSearchToResultCond\"), (0, vue_1.toRef)(i, \"appendWithoutSelect\"), (0, vue_1.toRef)(i, \"searchFields\"), s, i.minLength, c), d = (0, vue_1.computed)(() => i.buttonProps ? \"TopButton\" : s.value === \"inline\" ? \"TopInput\" : \"div\"), w = (0, vue_1.ref)(null), T = () => w.value?.popup;\n c.apiRequest && (0, vue_1.watch)(u.searchText, () => {\n c.setSearchTextAndLoad(u.searchText.value);\n });\n let D = (0, vue_1.computed)(() => Array.isArray(a.value) || i.multiselect || !i.selectedAsPlaceholder && s.value !== \"inline\" ? i.placeholder : a.value?.name || i.placeholder), O = (e) => {\n let t = !1;\n switch (e.key) {\n case \"Delete\":\n case \"Backspace\":\n Array.isArray(a.value) && (e.preventDefault(), e.stopPropagation(), a.value.pop());\n break;\n case \"ArrowUp\":\n case \"ArrowRight\":\n case \"ArrowDown\":\n case \"ArrowLeft\":\n case \"Enter\":\n case \" \":\n t = !0;\n break;\n case \"Escape\":\n s.value === \"inline\" && u.resetSearch();\n break;\n }\n let n = e.key.length === 1 && !e.ctrlKey && !e.metaKey;\n (s.value === \"popup\" || s.value === \"inline\") && n && (t = !0), T()?.elPopup && (t = !1), t && (s.value === \"popup\" && (e.preventDefault(), e.stopPropagation(), n && (u.searchText.value || (u.searchText.value = e.key))), e.currentTarget?.click());\n }, k = (e) => {\n e.preventDefault(), u.selectNextItem();\n }, U = () => {\n c.apiRequest && c.setSearchTextAndLoad(u.searchText.value, !1), o(\"open\");\n }, W = () => {\n s.value === \"popup\" && u.searchText.value && u.resetSearch();\n }, G = (e) => {\n let t = e.target;\n t.scrollTop / (t.scrollHeight - t.offsetHeight) > .8 && c.load(!0);\n };\n return (t, r) => {\n let i = (0, vue_1.resolveComponent)(\"TopButton\"), o = (0, vue_1.resolveComponent)(\"TopLoadbar\"), g = (0, vue_1.resolveDirective)(\"top-focus\"), T = (0, vue_1.resolveDirective)(\"top-shortcut\");\n return (0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.s), {\n ref_key: \"popupRef\",\n ref: w,\n onOpen: r[3] ||= (e) => U(),\n onClose: r[4] ||= (e) => W(),\n onScrollContentList: r[5] ||= (e) => (0, vue_1.unref)(c) ? G(e) : void 0,\n notch: !1,\n transitionDuration: 0,\n openByFocusInput: s.value === \"inline\" && (e.openByFocusInput ?? !0),\n disabled: s.value === \"inline\" && (0, vue_1.unref)(u).genIsShort()\n }, (0, vue_1.createSlots)({\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.withDirectives)(((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(d.value), (0, vue_1.mergeProps)(e.buttonProps, {\n class: {\n \"top-selector2\": !0,\n \"top-selector2-multiselect\": e.multiselect,\n [\"top-selector2-\" + e.modificator]: !!e.modificator,\n \"top-as-input\": !e.buttonProps && s.value !== \"inline\",\n \"top-as-selector\": !0,\n [\"top-size_\" + e.size]: !0,\n \"top-disabled\": e.disabled,\n \"top-forms-focusable\": !e.disabled,\n \"top-error\": e.isError\n },\n icon: e.icon,\n tabindex: \"0\",\n onKeydown: O,\n onBlur: r[0] ||= (e) => s.value === \"inline\" && (0, vue_1.unref)(u).resetSearch(),\n placeholder: D.value,\n title: e.title,\n captionType: s.value === \"inline\" && e.title !== void 0 ? \"top\" : void 0,\n modelValue: (0, vue_1.unref)(u).searchText.value,\n \"onUpdate:modelValue\": r[1] ||= (e) => (0, vue_1.unref)(u).searchText.value = e\n }), {\n default: (0, vue_1.withCtx)(() => [\n e.multiselect ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", fe, [((0, vue_1.openBlock)(!0), (0, vue_1.createElementBlock)(vue_1.Fragment, null, (0, vue_1.renderList)(a.value, (e) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(ne, {\n key: e.id ?? void 0,\n id: e.id,\n name: e.name,\n onDelete: (0, vue_1.unref)(u).deleteItemByItem\n }, null, 8, [\n \"id\",\n \"name\",\n \"onDelete\"\n ]))), 128))])) : (0, vue_1.createCommentVNode)(\"\", !0),\n s.value !== \"inline\" && !e.multiselect ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", pe, (0, vue_1.toDisplayString)(Array.isArray(a.value) ? \"\" : a.value.name), 1)) : (0, vue_1.createCommentVNode)(\"\", !0),\n e.multiselect && !a.value.length ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", me, (0, vue_1.toDisplayString)(D.value), 1)) : (0, vue_1.createCommentVNode)(\"\", !0),\n e.addChanger && !e.buttonProps && !e.multiselect && (0, vue_1.unref)(u).itemsForShow.value.length > 1 && !e.disabled ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", {\n key: 3,\n class: \"top-changer top-changer-selector\",\n \"data-top-popup-disabled\": \"true\",\n onClick: k\n })) : (0, vue_1.createCommentVNode)(\"\", !0)\n ]),\n _: 1\n }, 16, [\n \"class\",\n \"icon\",\n \"placeholder\",\n \"title\",\n \"captionType\",\n \"modelValue\"\n ])), [[\n g,\n e.isError,\n void 0,\n { onupdate: !0 }\n ], [T, e.openerShortcut]])]),\n contentList: (0, vue_1.withCtx)(() => [\n ((0, vue_1.openBlock)(!0), (0, vue_1.createElementBlock)(vue_1.Fragment, null, (0, vue_1.renderList)((0, vue_1.unref)(u).itemsForShow.value, (r) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.o), (0, vue_1.mergeProps)({\n key: r.id ?? void 0,\n class: {\n \"top-active\": !Array.isArray(a.value) && !e.multiselect && a.value.id === r.id && a.value.name === r.name,\n \"top-selector2_item-all\": r.id === (0, vue_1.unref)(0),\n \"top-selector2_item-new\": r.id === (0, vue_1.unref)(null)\n },\n closeByClick: !e.multiselect || (0, vue_1.unref)(forms_DKVIpGnH_esm_js_1.O).state.isMobile\n }, { ref_for: !0 }, r.listItemProps, { onClick: (e) => (0, vue_1.unref)(u).selectItem(r) }), (0, vue_1.createSlots)({\n default: (0, vue_1.withCtx)(() => [t.$slots.item ? (0, vue_1.renderSlot)(t.$slots, \"item\", {\n key: 0,\n item: r\n }) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(r.name), 1)], 64))]),\n _: 2\n }, [t.$slots.actions ? {\n name: \"actions\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"actions\", { item: r })]),\n key: \"0\"\n } : void 0]), 1040, [\n \"class\",\n \"closeByClick\",\n \"onClick\"\n ]))), 128)),\n !(0, vue_1.unref)(u).itemsForShow.value.length && !(0, vue_1.unref)(u).genIsShort() ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.o), {\n key: 0,\n type: \"regular\"\n }, {\n default: (0, vue_1.withCtx)(() => [!(0, vue_1.unref)(c).isLoading.value || (0, vue_1.unref)(c).countLoading.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 0 }, [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(t.$i18n.Common.No_results), 1)], 64)) : ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(forms_DKVIpGnH_esm_js_1.t), {\n key: 1,\n type: \"circles\"\n }))]),\n _: 1\n })) : (0, vue_1.createCommentVNode)(\"\", !0),\n (0, vue_1.unref)(c).countLoading.value && (0, vue_1.unref)(c).isLoading.value && s.value === \"inline\" ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(o, { key: 1 })) : (0, vue_1.createCommentVNode)(\"\", !0)\n ]),\n _: 2\n }, [s.value === \"popup\" ? {\n name: \"widget\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createElementVNode)(\"div\", he, [(0, vue_1.withDirectives)((0, vue_1.createVNode)((0, vue_1.unref)(popup_CtiL5V44_esm_js_1.a), {\n title: \"Поиск\",\n icon: \"\",\n modelValue: (0, vue_1.unref)(u).searchText.value,\n \"onUpdate:modelValue\": r[2] ||= (e) => (0, vue_1.unref)(u).searchText.value = e,\n isLoading: !!(0, vue_1.unref)(c).countLoading.value && (0, vue_1.unref)(c).isLoading.value,\n placeholder: D.value\n }, null, 8, [\n \"modelValue\",\n \"isLoading\",\n \"placeholder\"\n ]), [[\n g,\n a.value,\n void 0,\n { onupdate: !0 }\n ]]), e.hasCloserBtn && !t.$core.state.isMobile ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(i, {\n key: 0,\n class: \"closer\",\n color: \"theme\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(t.$i18n.Common.Cancel), 1)]),\n _: 1\n })) : (0, vue_1.createCommentVNode)(\"\", !0)])]),\n key: \"0\"\n } : void 0]), 1032, [\"openByFocusInput\", \"disabled\"]);\n };\n }\n }), _e = { class: \"top-editArea_footer\" }, ve = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"editArea\",\n props: {\n defaultValue: { default: \"\" },\n title: {},\n cancelText: { default: \"Cancel\" },\n submitText: { default: \"Send\" },\n closeText: { default: \"Close\" },\n isFocused: { type: Boolean },\n forceShowCloseBtn: { type: Boolean },\n attachToKeyboard: { type: Boolean },\n modelValue: {},\n name: {},\n placeholder: {},\n styling: {},\n rows: {},\n minHeight: {},\n expandable: {\n type: Boolean,\n default: !0\n },\n disabled: { type: Boolean },\n readonly: { type: Boolean },\n isError: { type: Boolean },\n hint: {},\n maxLength: {}\n },\n emits: [\n \"submit\",\n \"close\",\n \"clickOnTitle\"\n ],\n setup(e, { emit: t }) {\n let n = e, r = t, i = (0, vue_1.ref)(n.defaultValue), a = (0, vue_1.ref)(n.isFocused), o = (0, vue_1.computed)(() => i.value !== n.defaultValue), l = (e) => {\n r(\"submit\", e), i.value = n.defaultValue;\n }, u = () => {\n if (n.forceShowCloseBtn && !o.value) {\n r(\"close\");\n return;\n }\n i.value = n.defaultValue;\n }, d = () => {\n n.attachToKeyboard && r(\"clickOnTitle\");\n };\n return (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-editArea\": !0,\n \"top-editArea-attachedToKeyboard\": e.attachToKeyboard\n }) }, [e.title || t.$slots.caption ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 0,\n class: \"top-editArea_caption\",\n onClick: n[0] ||= (e) => d()\n }, [(0, vue_1.renderSlot)(t.$slots, \"caption\", {}, () => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.title), 1)])])) : (0, vue_1.createCommentVNode)(\"\", !0), (0, vue_1.createElementVNode)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-editArea_form\": !0,\n \"top-forms-focusable\": !0,\n \"top-as-input\": !0,\n \"top-error\": e.isError,\n \"top-focus\": a.value\n }) }, [(0, vue_1.createVNode)(forms_DKVIpGnH_esm_js_1.r, {\n modelValue: i.value,\n \"onUpdate:modelValue\": n[1] ||= (e) => i.value = e,\n name: e.name,\n placeholder: e.placeholder,\n rows: e.rows,\n minHeight: e.minHeight,\n expandable: e.expandable,\n disabled: e.disabled,\n readonly: e.readonly,\n isError: e.isError,\n hint: e.hint,\n class: \"top-editArea_element\",\n onFocus: n[2] ||= () => a.value = !0,\n onBlur: n[3] ||= () => a.value = !1,\n onKeyup: [(0, vue_1.withKeys)(u, [\"esc\"]), n[4] ||= (0, vue_1.withKeys)((0, vue_1.withModifiers)((e) => l(i.value), [\"ctrl\"]), [\"enter\"])]\n }, null, 8, [\n \"modelValue\",\n \"name\",\n \"placeholder\",\n \"rows\",\n \"minHeight\",\n \"expandable\",\n \"disabled\",\n \"readonly\",\n \"isError\",\n \"hint\"\n ]), (0, vue_1.createElementVNode)(\"div\", _e, [o.value || e.forceShowCloseBtn ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.h, {\n key: 0,\n icon: t.$core.state.isMobile ? \"\" : \"\",\n class: \"top-editArea_button\",\n color: \"theme\",\n styling: \"soft\",\n onClick: u\n }, (0, vue_1.createSlots)({ _: 2 }, [t.$core.state.isMobile ? void 0 : {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.cancelText), 1)]),\n key: \"0\"\n }]), 1032, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0), o.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.h, {\n key: 1,\n class: \"top-editArea_button\",\n icon: t.$core.state.isMobile ? \"\" : \"\",\n onClick: n[5] ||= (e) => l(i.value)\n }, (0, vue_1.createSlots)({ _: 2 }, [t.$core.state.isMobile ? void 0 : {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.submitText), 1)]),\n key: \"0\"\n }]), 1032, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0)])], 2)], 2));\n }\n }), ye = { class: \"top-editInput\" }, be = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"editInput\",\n props: {\n modelValue: {},\n alwaysShowSubmitBtn: { type: Boolean },\n input: {},\n button: {}\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n let n = e, r = (0, vue_1.ref)(n.modelValue);\n (0, vue_1.watch)(() => n.modelValue, () => {\n r.value = n.modelValue;\n });\n let i = t, o = () => {\n i(\"update:modelValue\", r.value);\n };\n return (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", ye, [(0, vue_1.createVNode)(forms_DKVIpGnH_esm_js_1.c, (0, vue_1.mergeProps)(e.input, {\n onKeydownCapture: n[0] ||= (0, vue_1.withKeys)((0, vue_1.withModifiers)((t) => r.value = e.modelValue, [\"stop\"]), [\"esc\"]),\n onKeydown: (0, vue_1.withKeys)((0, vue_1.withModifiers)(o, [\"stop\"]), [\"enter\"]),\n modelValue: r.value,\n \"onUpdate:modelValue\": n[1] ||= (e) => r.value = e\n }), (0, vue_1.createSlots)({ _: 2 }, [t.$slots.caption ? {\n name: \"caption\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"caption\")]),\n key: \"0\"\n } : void 0]), 1040, [\"onKeydown\", \"modelValue\"]), r.value !== e.modelValue || e.alwaysShowSubmitBtn ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.h, (0, vue_1.mergeProps)({\n key: 0,\n icon: \"\",\n styling: \"soft\"\n }, e.button, { onClick: o }), null, 16)) : (0, vue_1.createCommentVNode)(\"\", !0)]));\n }\n }), Q = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"optionGroup\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n items: {},\n size: { default: \"s\" },\n showIndicator: { type: Boolean },\n isError: { type: Boolean }\n }, {\n modelValue: { required: !0 },\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"modelValue\"), n = e, r = (0, vue_1.ref)(null);\n (0, vue_1.watch)(t, () => {\n let e = n.items.map((e) => e.value);\n Array.isArray(t.value) ? t.value.find((t) => !e.includes(t)) && (t.value = t.value.filter((t) => e.includes(t))) : e.includes(t.value) || (t.value = e[0] ?? \"\"), r.value?.querySelector(\".radioGroup_item-selected\")?.scrollIntoView();\n }, { immediate: !0 });\n let a = \"optionGroup-\" + Math.random();\n return (n, s) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n ref_key: \"elRef\",\n ref: r,\n class: (0, vue_1.normalizeClass)({\n \"top-optionGroup\": !0,\n [\"top-optionGroup-showIndicator_\" + Number(e.showIndicator)]: !0,\n \"top-scrollBarXHidding\": !0,\n [\"top-size_\" + e.size]: !!e.size,\n \"top-error\": e.isError\n })\n }, [Array.isArray(t.value) ? ((0, vue_1.openBlock)(!0), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 0 }, (0, vue_1.renderList)(e.items, (n) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.f, {\n class: (0, vue_1.normalizeClass)({\n \"top-optionGroup_item-selected\": t.value.includes(n.value),\n \"top-optionGroup_item\": !0\n }),\n modelValue: t.value,\n \"onUpdate:modelValue\": s[0] ||= (e) => t.value = e,\n value: n.value,\n title: n.title,\n disabled: n.disabled,\n isError: e.isError,\n \"data-top-icon\": n.icon\n }, (0, vue_1.createSlots)({ _: 2 }, [n.label ? {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(n.label), 1)]),\n key: \"0\"\n } : void 0]), 1032, [\n \"class\",\n \"modelValue\",\n \"value\",\n \"title\",\n \"disabled\",\n \"isError\",\n \"data-top-icon\"\n ]))), 256)) : ((0, vue_1.openBlock)(!0), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, (0, vue_1.renderList)(e.items, (n) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_DKVIpGnH_esm_js_1.a, {\n class: (0, vue_1.normalizeClass)({\n \"top-optionGroup_item-selected\": n.value === t.value,\n \"top-optionGroup_item\": !0\n }),\n modelValue: t.value,\n \"onUpdate:modelValue\": s[1] ||= (e) => t.value = e,\n name: a,\n value: n.value,\n title: n.title,\n disabled: n.disabled,\n isError: e.isError,\n \"data-top-icon\": n.icon\n }, (0, vue_1.createSlots)({ _: 2 }, [n.label ? {\n name: \"default\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(n.label), 1)]),\n key: \"0\"\n } : void 0]), 1032, [\n \"class\",\n \"modelValue\",\n \"value\",\n \"title\",\n \"disabled\",\n \"isError\",\n \"data-top-icon\"\n ]))), 256))], 2));\n }\n }), xe = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"radioGroup\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n items: {},\n size: {},\n showIndicator: { type: Boolean },\n isError: { type: Boolean }\n }, {\n modelValue: { required: !0 },\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"modelValue\");\n return (e, n) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(Q, {\n class: \"top-radioGroup\",\n modelValue: t.value,\n \"onUpdate:modelValue\": n[0] ||= (e) => t.value = e,\n items: e.$props.items,\n size: e.$props.size,\n showIndicator: e.$props.showIndicator,\n isError: e.$props.isError\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\")]),\n _: 3\n }, 8, [\n \"modelValue\",\n \"items\",\n \"size\",\n \"showIndicator\",\n \"isError\"\n ]));\n }\n }), Se = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"checkboxGroup\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n items: {},\n size: {},\n showIndicator: { type: Boolean },\n isError: { type: Boolean }\n }, {\n modelValue: { required: !0 },\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"modelValue\");\n return (e, n) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(Q, {\n class: \"top-checkboxGroup\",\n modelValue: t.value,\n \"onUpdate:modelValue\": n[0] ||= (e) => t.value = e,\n items: e.$props.items,\n size: e.$props.size,\n showIndicator: e.$props.showIndicator,\n isError: e.$props.isError\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\")]),\n _: 3\n }, 8, [\n \"modelValue\",\n \"items\",\n \"size\",\n \"showIndicator\",\n \"isError\"\n ]));\n }\n }), Ce = [\"data-top-icon\"], $ = { class: \"top-info_text\" }, we = {\n key: 0,\n class: \"top-info_value\"\n }, Te = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"info\",\n props: {\n icon: {},\n styling: { default: \"default\" },\n size: { default: \"default\" }\n },\n setup(e) {\n return (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n class: (0, vue_1.normalizeClass)({\n \"top-info\": !0,\n [\"top-size_\" + e.size]: !0,\n [\"top-info-styling_\" + e.styling]: !0\n }),\n \"data-top-icon\": e.icon\n }, [(0, vue_1.createElementVNode)(\"div\", $, [(0, vue_1.renderSlot)(t.$slots, \"default\")]), t.$slots.additional ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", we, [(0, vue_1.renderSlot)(t.$slots, \"additional\")])) : (0, vue_1.createCommentVNode)(\"\", !0)], 10, Ce));\n }\n }), Ee = {\n key: 0,\n class: \"top-policy\"\n }, De = { class: \"top-policy_title\" }, Oe = [\"innerHTML\"], ke = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"policy\",\n props: {\n title: {},\n description: {},\n acceptText: {}\n },\n emits: [\"accept\"],\n setup(e, { emit: t }) {\n let n = t, r = (0, vue_1.ref)(!0), i = () => {\n r.value = !1, n(\"accept\");\n };\n return (t, n) => r.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", Ee, [\n (0, vue_1.createElementVNode)(\"div\", De, (0, vue_1.toDisplayString)(e.title), 1),\n (0, vue_1.createElementVNode)(\"div\", {\n class: \"top-policy_description\",\n innerHTML: e.description\n }, null, 8, Oe),\n (0, vue_1.createVNode)((0, vue_1.unref)(forms_DKVIpGnH_esm_js_1.h), {\n size: \"m\",\n onClick: i\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)(e.acceptText), 1)]),\n _: 1\n })\n ])) : (0, vue_1.createCommentVNode)(\"\", !0);\n }\n });\n exports.d = te;\n exports.c = ce;\n exports.l = le;\n exports.u = ue;\n exports.s = ge;\n exports.o = ve;\n exports.a = be;\n exports.i = xe;\n exports.r = Se;\n exports.n = Te;\n exports.t = ke;\n});\n//# sourceMappingURL=formsExt-UkSw445A.esm.js.map\n","<script setup lang=\"ts\">\nimport { onMounted, onUpdated, ref } from 'vue';\nimport type { Item, Props } from './types';\nimport Core from '@/core/core/core';\nimport { isSafari } from '@/core/utils/device';\nimport TopButton from '@/components/forms/button/button.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tstyling: 'default',\n});\n\nconst model = defineModel({\n\trequired: true,\n});\n\nconst el = ref();\n\n// валидация типа modelValue без возможности выбора нескольких значений (ожидается строка или число)\nif (!props.isMultiple && typeof (model.value) !== 'string' && typeof (model.value) !== 'number') {\n\tconsole.warn('Type check failed for prop \"modelValue\". Expected String: ' + typeof (model.value));\n}\n\n// валидация типа modelValue с возможностью выбора нескольких значений (ожидается массив)\nif (props.isMultiple && !Array.isArray(model.value)) {\n\tconsole.warn('Type check failed for prop \"modelValue\". Expected Array: ' + typeof (model.value));\n}\n\n/**\n * Для множественного выбора без пустого множества\n *\n * Если ничего не выбрано, присваиваем 1-ое значение\n */\nif (props.isMultiple && !props.canBeEmptyMultiple && Array.isArray(model.value) && !model.value.length && props.items[0]) {\n\tmodel.value = [props.items[0]?.href ?? props.items[0]?.value];\n}\n\nconst itemIsActive = (item: Item) => {\n\tif (!Array.isArray(model.value)) {\n\t\treturn item.value === model.value;\n\t}\n\n\treturn model.value.includes(item.value);\n};\n\n/**\n * Выбрать элемент\n * @param item\n * @param toggle - добавить или исключить элемент, для isMultiple\n */\nconst select = (item: Item, toggle = false) => {\n\tif (Array.isArray(model.value)) {\n\t\tlet modelNew = model.value.slice();\n\n\t\tif (toggle) {\n\t\t\tif (!modelNew.length) modelNew = props.items.map(item => item.value);\n\n\t\t\tconst index = modelNew.indexOf(item.value);\n\t\t\tif (index === -1) {\n\t\t\t\tmodelNew.push(item.value);\n\t\t\t} else {\n\t\t\t\tmodelNew.splice(index, 1);\n\t\t\t}\n\t\t} else {\n\t\t\tif (modelNew.length === 1 && modelNew[0] === item.value) {\n\t\t\t\tmodelNew = [];\n\t\t\t} else {\n\t\t\t\tmodelNew = [item.value];\n\t\t\t}\n\t\t}\n\n\t\tif (!props.canBeEmptyMultiple && !modelNew.length) modelNew = [item.value];\n\n\t\tmodel.value = modelNew;\n\n\t\treturn;\n\t}\n\n\tmodel.value = item.value;\n};\n\n// вертикальный скролл в горизонтальный скролл\nconst onWheel = (event: WheelEvent) => {\n\tif (el.value.scrollWidth <= el.value.offsetWidth) return;\n\tif (event.shiftKey) return;\n\tif (Math.abs(event.deltaY) < 50) return; // устройство с высокой точностью, например тачпад\n\n\tevent.preventDefault();\n\n\tconst delta = event.deltaY > 0 ? 30 : -30;\n\tel.value.scrollLeft = el.value.scrollLeft + delta;\n};\n\n/**\n * Замена стандартному scrollIntoView, который меняет скролл документа\n *\n * Выравнивание по ближнему краю элемента\n *\n * Выравнивается таким образом, чтобы был виден соседний элемент\n */\nconst scrollIntoView = (isSmooth = true) => {\n\tconst elBtn = el.value.querySelector('.top-active');\n\tif (!elBtn) return;\n\n\tconst gap = 24;\n\n\t// левая и правая координаты элемента\n\tconst leftMargin = elBtn.offsetLeft - el.value.offsetLeft - gap;\n\tconst rightMargin = elBtn.offsetLeft - el.value.offsetLeft + elBtn.clientWidth + gap;\n\n\t// левая и правая границы видимой части меню\n\tconst leftMarginParent = el.value.scrollLeft;\n\tconst rightMarginParent = el.value.clientWidth + el.value.scrollLeft;\n\n\tlet scrollLeft: number | undefined = undefined;\n\n\t// левую границу элемента к левой границе меню\n\tif (leftMargin < leftMarginParent) scrollLeft = leftMargin;\n\n\t// правую границу элемента к правой границе меню\n\tif (rightMargin > rightMarginParent) scrollLeft = rightMargin - el.value.clientWidth;\n\n\tif (scrollLeft !== undefined) {\n\t\tif (isSafari()) {\n\t\t\tCore.$?.(el.value).animate({ scrollLeft: scrollLeft }, isSmooth ? 200 : 0);\n\t\t} else {\n\t\t\tel.value.scrollTo({ left: scrollLeft, behavior: isSmooth ? 'smooth' : 'auto' });\n\t\t}\n\t}\n};\n\n/**\n * Выбрать все элементы в меню\n */\nconst selectAll = () => {\n\tif (!Array.isArray(model.value)) return;\n\n\tif (model.value.length === props.items.length) {\n\t\tmodel.value = [props.items[0].href ?? props.items[0].value];\n\t\treturn;\n\t}\n\n\tmodel.value = props.items.map(item => item.href ?? item.value);\n};\n\nonMounted(() => scrollIntoView(false));\nonUpdated(() => scrollIntoView(true));\n\n</script>\n\n<template>\n\t<div\n\t\tref=\"el\"\n\t\t:class=\"{\n\t\t\t'top-menu': true,\n\t\t\t['top-style_' + styling]: true,\n\t\t\t// ['top-unwrap-x']: styling === 'default',\n\t\t}\"\n\t\t@wheel=\"onWheel\"\n\t>\n\t\t<TopButton\n\t\t\tv-for=\"item in items\"\n\t\t\t:=\"item\"\n\t\t\tclass=\"top-menu_item\"\n\t\t\tcolor=\"theme\"\n\t\t\t@click=\"select(item, $event.ctrlKey || $event.metaKey)\"\n\t\t\t:isActive=\"itemIsActive(item)\"\n\t\t>\n\t\t\t<template #default v-if=\"item.content\">\n\t\t\t\t{{ item.content }}\n\t\t\t</template>\n\t\t</TopButton>\n\n\t\t<div\n\t\t\tv-if=\"Array.isArray(model) && selectAllItem\"\n\t\t\tclass=\"top-menu_selectAll\"\n\t\t>\n\t\t\t<TopButton\n\t\t\t\t:=\"selectAllItem\"\n\t\t\t\tclass=\"top-menu_item\"\n\t\t\t\tcolor=\"theme\"\n\t\t\t\tstyling=\"\"\n\t\t\t\t@click=\"selectAll()\"\n\t\t\t\t:isActive=\"model.length === items.length\"\n\t\t\t>\n\t\t\t\t<template #default v-if=\"selectAllItem.content\">\n\t\t\t\t\t{{ selectAllItem.content }}\n\t\t\t\t</template>\n\t\t\t</TopButton>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n.top-menu {\n\t--scroll-thumb-color: var(--color-line-1);\n\t--scroll-thumb-color-hover: var(--color-line-2);\n\t--scroll-thumb-color-active: var(--color-line-3);\n\n\tmax-width: 100%;\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: var(--top-gap-2);\n\toverflow-x: auto;\n\tscrollbar-width: none; /* firefox */\n\n\t/* предотвратить натинвые события браузера (назад / вперед) */\n\toverscroll-behavior-x: contain;\n}\n\n.top-menu::-webkit-scrollbar { display: none; }\n\n.top-menu .top-menu_item {\n\t--top-button-color: var(--color-text-2);\n\n\toutline-offset: -2px !important;\n\tmin-width: 0;\n\tmax-width: 200px;\n\tmargin: 0;\n\tflex-shrink: 0;\n}\n\n.top-menu .top-menu_item[data-top-icon] {\n\t--top-icon-color: var(--color-text-2);\n}\n\n.top-menu_selectAll {\n\tposition: sticky;\n\tright: 0;\n\tbackground: var(--color-layout-front-1);\n\tborder-left: 1px solid var(--color-line-1);\n\tpadding-left: var(--top-padding-1);\n\tbox-shadow: var(--color-layout-front-1) var(--top-padding-2) 0px;\n}\n\n/* style default */\n.top-menu.top-style_default .top-menu_item {\n\t--top-forms-radius: 0;\n\t--top-forms-border-color: transparent;\n\t--top-forms-border-width: 2px;\n\n\tfilter: none;\n\tbox-shadow: none;\n\tborder: none;\n\tborder-bottom: var(--top-forms-border-width) solid var(--top-forms-border-color);\n\tbackground: none;\n}\n\n.top-style_default > .top-menu_item > [data-top-badge] {\n\tmargin-top: 0;\n}\n\n.top-menu.top-style_default .top-menu_item:hover {\n\t--top-icon-color: var(--color-text-1);\n\t--top-button-color: var(--color-text-1);\n\t--top-forms-border-color: var(--color-line-2);\n}\n\n.top-menu.top-style_default .top-menu_item:active,\n.top-menu.top-style_default .top-menu_item.top-active {\n\t--top-icon-color: var(--color-text-primary);\n\t--top-button-color: var(--color-text-1);\n\t--top-forms-border-color: var(--color-line-primary-1);\n}\n\n.top-menu.top-style_default .top-menu_selectAll {\n\tpadding-left: var(--top-padding-2);\n}\n\n/* style bar */\n.top-menu.top-style_bar {\n\tborder-radius: var(--top-radius-3);\n\tborder: 1px solid var(--color-line-2);\n\tpadding: var(--top-padding-1);\n\tgap: 3px;\n}\n.top-menu.top-style_bar .top-menu_item {\n\t--top-button-background-color-hover: var(--color-layer-1);\n\t--top-button-background-color-active: var(--color-layer-2);\n\t--top-button-background-color-selected: var(--color-layer-primary-1);\n\n\tposition: relative;\n}\n\n.top-menu.top-style_bar .top-menu_item:hover {\n\t--top-icon-color: var(--color-text-1);\n\t--top-button-color: var(--color-text-1);\n}\n\n.top-menu.top-style_bar .top-menu_item.top-active {\n\t--top-icon-color: var(--color-text-primary);\n\t--top-button-color: var(--color-text-primary);\n}\n\n/* разделители кнопок в баре */\n.top-menu.top-style_bar .top-menu_item:not(:first-child):not(.top-active):not(:hover):after {\n\tcontent: \"\";\n\tbackground: var(--color-line-1-opacity);\n\twidth: 1px;\n\theight: 60%;\n\tdisplay: block;\n\tposition: absolute;\n\tleft: -2px;\n}\n.top-menu.top-style_bar .top-menu_item.top-active + .top-menu_item:after,\n.top-menu.top-style_bar .top-menu_item:hover + .top-menu_item:after {\n\tcontent: none !important;\n}\n\n/*\n.top-style_bar > .top-menu_item > [data-top-badge] {\n\tmargin-top: -3px;\n}\n*/\n\n/** TODO: .top-unwrap-x надо вынести глобально в UI или добавить в стили для storybook */\n/*\n.top-menu.top-unwrap-x {\n\tpadding-right: var(--top-unwrap-x);\n\tpadding-left: var(--top-unwrap-x);\n\tmargin-right: calc(0px - var(--top-unwrap-x));\n\tmargin-left: calc(0px - var(--top-unwrap-x));\n}\n*/\n</style>\n","<script setup lang=\"ts\">\nimport type { EmitsItemMulti, PropsItemMulti } from './types';\n\ndefineProps<PropsItemMulti>();\ndefineEmits<EmitsItemMulti>();\n</script>\n\n<template>\n\t<div class=\"top-selector2_itemMulti top-ellipsis\">\n\t\t{{ name }}\n\n\t\t<span\n\t\t\tclass=\"top-selector2_itemMultiDelete\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t@click=\"$emit('delete', {id, name})\"\n\t\t\t@mousedown.stop\n\t\t></span>\n\t</div>\n</template>\n\n<style>\n.top-selector2_itemMulti {\n\tbox-sizing: border-box;\n\tpadding-left: var(--top-padding-2);\n\tborder-radius: var(--top-radius-1, 4px);\n\tborder: 1px solid var(--color-line-primary-1);\n\tbackground: var(--color-layer-primary-2);\n\tmin-height: 22px;\n\tmax-width: 100%;\n\tcolor: var(--color-text-1);\n\tflex-grow: 0;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: var(--top-gap-1);\n}\n\n.top-selector2_itemMultiDelete {\n\t--top-icon-size: 14px;\n\t--top-icon-width: 18px;\n\t--top-icon-color: var(--color-text-1);\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 100%;\n\tcursor: pointer;\n}\n\n.top-selector2_itemMultiDelete:hover {\n\tbackground: var(--color-layer-primary-2);\n}\n\n@media screen and (min-width: 900px) {\n\t.top-selector2.top-active .top-selector2_itemMultiDelete {\n\t\tz-index: calc(var(--top-popup-z-index) + 1);\n\t}\n}\n</style>\n","import type { Item, Props } from './types';\n\n/**\n * Список кешей для конкретного API метода\n */\nexport const cacheByMethod = new Map<Api.PathAbstract, Map<string, any>>();\n\n/**\n * Сброс кеша конкретного API метода\n */\nexport const clearCache = (apiPath: Api.PathAbstract) => {\n\tcacheByMethod.get(apiPath)?.clear();\n};\n\n/**\n * Обойти все кеши конкретного API метода\n */\nconst eachCacheResult = (apiPath: Api.PathAbstract, cb: (result: Item[]) => void) => {\n\tconst caches = cacheByMethod.get(apiPath);\n\tif (!caches) return;\n\n\tfor (const cache of caches.values()) {\n\t\tif (!Array.isArray(cache?.result)) continue;\n\n\t\tcb(cache.result as Item[]);\n\t}\n};\n\nexport const genCacheKey = (api: NonNullable<Props['api']>) => {\n\tconst userId = window['mo']?.user?.id;\n\n\tconst cacheKey = JSON.stringify(api.params) + ':' + api.url + ':' + userId;\n\n\treturn cacheKey;\n};\n\nexport const getCache = (cacheKey: string, apiPath: Api.PathAbstract) => {\n\treturn cacheByMethod.get(apiPath)?.get(cacheKey);\n};\n\nexport const setCache = (cacheKey: string, apiPath: Api.PathAbstract, data: any) => {\n\tif (!cacheByMethod.has(apiPath)) {\n\t\tcacheByMethod.set(apiPath, new Map());\n\t}\n\n\tcacheByMethod.get(apiPath)?.set(cacheKey, data);\n};\n\n/**\n * Обновить элемент во всех кешах API метода\n */\nexport const updateCacheItemById = (\n\tapiPath: Api.PathAbstract,\n\titemId: Item['id'],\n\tpatch: Partial<Item>,\n) => {\n\teachCacheResult(apiPath, (result) => {\n\t\tconst item = result.find((item) => item.id === itemId);\n\t\tif (!item) return;\n\n\t\tObject.assign(item, patch);\n\t});\n};\n\n/**\n * Удалить элемент из всех кешей API метода\n */\nexport const deleteCacheItemById = (\n\tapiPath: Api.PathAbstract,\n\titemId: Item['id'],\n) => {\n\teachCacheResult(apiPath, (result) => {\n\t\tconst itemIndex = result.findIndex((item) => item.id === itemId);\n\t\tif (itemIndex === -1) return;\n\n\t\tresult.splice(itemIndex, 1);\n\t});\n};\n","import { ref } from 'vue';\nimport { debounce } from '../../../../core/utils/lodash';\nimport type { Item, Props } from '../types';\nimport { genCacheKey, getCache, setCache } from '../cache';\n\nexport type API = ReturnType<typeof useAPI>;\n\nexport const useAPI = (\n\tapi: Props['api'],\n\tapiSetSearchParams: Props['apiSetSearchParams'],\n\tminLength: number,\n\tuseCache: Props['useCache'],\n) => {\n\t/**\n\t * Список, полученный через API\n\t */\n\tconst items = ref<Item[]>([]);\n\n\t/**\n\t * Флаг - идет загрузка\n\t */\n\tconst isLoading = ref(false);\n\n\tconst countLoading = ref(0);\n\n\tlet searchText = '';\n\tlet nextOffset: number | null | undefined;\n\n\tif (api && !api.params.limit) {\n\t\tapi.params.limit = 100;\n\t}\n\n\t/**\n\t * Выполнить обращение к API\n\t *\n\t * При ошибке вернет undefined\n\t */\n\tconst callAPI = async (): Promise<Api.ResponseSuccess<any, 'get'> | undefined> => {\n\t\tif (!api) return;\n\n\t\tconst cacheKey = useCache ? genCacheKey(api) : undefined;\n\n\t\tif (cacheKey) {\n\t\t\tconst cache = getCache(cacheKey, api.path);\n\t\t\tif (cache) {\n\t\t\t\t// остановить запущенные api запросы\n\t\t\t\tapi.abortByFingerprint();\n\n\t\t\t\treturn cache;\n\t\t\t}\n\t\t}\n\n\t\tconst res = await api.call();\n\n\t\tif (res.errors) return;\n\n\t\tif (!Array.isArray(res.result)) {\n\t\t\tconsole.warn('Array expected in `res.result`');\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst indexWithError = (res.result as Array<Item | any>).findIndex(item => item.id === undefined || item.name === undefined);\n\t\tif (indexWithError !== -1) {\n\t\t\tconsole.warn(`В result[${indexWithError}] нет id или name`);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (cacheKey) {\n\t\t\tsetCache(cacheKey, api.path, res);\n\t\t}\n\n\t\treturn res as Api.ResponseSuccess<any, 'get'>;\n\t};\n\n\t/**\n\t * Загрузить items\n\t */\n\tconst load = async (append: boolean) => {\n\t\tif (!api) return;\n\n\t\tif (append) {\n\t\t\t// данных о следующих страницах не обнаружено\n\t\t\tif (!nextOffset) return;\n\n\t\t\t// дозагружать нельзя, если не завершена предыдущая загрузка\n\t\t\tif (isLoading.value) return;\n\n\t\t\tapi.params.offset = nextOffset;\n\t\t} else {\n\t\t\tapi.params.offset = 0;\n\t\t}\n\n\t\tapiSetSearchParams?.(api, searchText);\n\n\t\tisLoading.value = true;\n\t\tconst res = await callAPI();\n\t\tisLoading.value = false;\n\n\t\tcountLoading.value++;\n\n\t\tif (!res) return;\n\n\t\tnextOffset = res.nextOffset;\n\n\t\tif (append) {\n\t\t\titems.value = items.value.concat(res.result);\n\t\t} else {\n\t\t\titems.value = res.result;\n\t\t}\n\t};\n\n\tconst loadDebounce = debounce(() => load(false), 200);\n\n\t/**\n\t * Выполнить поиск по указанному тексту\n\t *\n\t * Если длина текста меньше minLength, поиск не будет произведен\n\t *\n\t * Если текст не изменился, поиск не будет произведен\n\t *\n\t * @param newSearchText - текст поиска\n\t * @param useDebounce - дедупликация загрузки списка\n\t */\n\tconst setSearchTextAndLoad = (newSearchText: string, useDebounce = true) => {\n\t\tif (!api) return;\n\n\t\t// остановить начатый поиск и сбросить результаты\n\t\tif (newSearchText.length < minLength) {\n\t\t\tapi.abortByFingerprint();\n\n\t\t\titems.value = [];\n\n\t\t\treturn;\n\t\t}\n\n\t\t// условия поиска не поменялись, данные загружены\n\t\tif (newSearchText === searchText && items.value.length) return;\n\n\t\tsearchText = newSearchText;\n\n\t\tif (useDebounce) {\n\t\t\tvoid loadDebounce();\n\t\t} else {\n\t\t\tvoid load(false);\n\t\t}\n\t};\n\n\treturn {\n\t\tapiRequest: api,\n\t\titems,\n\t\tisLoading,\n\t\tcountLoading,\n\t\tload,\n\t\tsetSearchTextAndLoad,\n\t};\n};\n","import type { Item, Props } from './types';\nimport { genFieldFilter } from '@/api/api';\n\n/**\n * Универсальный id для всех элементов \"Все элементы\" / \"Без фильтра\" в `TopSelector`\n */\nexport const ITEM_ID_ALL = 0;\n\n/**\n * Универсальный id для всех добавляемых элементов через `TopSelector`\n */\nexport const ITEM_ID_NEW = null;\n\n/**\n * Выбран ли элемент\n */\nexport const isSelected = (modelValue: Props['modelValue'], item: Item, checkNameForNullId = true) => {\n\tif (checkNameForNullId && item.id === ITEM_ID_NEW) {\n\t\tif (Array.isArray(modelValue)) {\n\t\t\treturn modelValue.some(itemSelected => itemSelected.id === item.id && itemSelected.name === item.name);\n\t\t} else {\n\t\t\treturn item.name === modelValue.name;\n\t\t}\n\t}\n\n\tif (Array.isArray(modelValue)) {\n\t\treturn modelValue.some(itemSelected => itemSelected.id === item.id);\n\t} else {\n\t\treturn item.id === modelValue.id;\n\t}\n};\n\n/**\n * Вспомогательная утилита для создания `callback` функции на добавление фильтра по полю в api запрос\n *\n * Другие фильтры по указанному полю будут удалены\n *\n * @param api - api, которое используется в `TopSelector`\n * @param search - введенная строка поиска\n * @param fieldName - имя поля, по которому надо добавить фильтр на поиск по нестрогому соответствию\n *\n * @todo Объединить с apiSetSearchParamsFilter() из @/components/project/projectSelector/utils.ts\n */\nexport const apiSetSearchParamsFilter = (api: NonNullable<Props['api']>, search: string, fieldName: string) => {\n\tlet filters = api.params.filters ?? [];\n\n\t// удаление других фильтров по этому полю\n\tfilters = filters.filter((filter) => filter.name !== fieldName);\n\n\tif (search) {\n\t\tfilters.push(genFieldFilter(fieldName, 'CONTAINS', [search]));\n\t}\n\n\tapi.changeParams({ filters });\n};\n","import { computed, type ComputedRef, ref, type Ref, watch } from 'vue';\nimport { invertKeyboardLayout } from '@/core/utils/keyboard';\nimport type { Item, Props } from '../types';\nimport { type API } from './useAPI';\nimport { isSelected, ITEM_ID_ALL, ITEM_ID_NEW } from '../utils';\nimport { useI18n } from '@/core/plugins/i18n';\n\n/**\n * Функционал поиска\n */\nexport const useMenu = (\n\tmodel: Ref<Props['modelValue']>,\n\temits: ReturnType<typeof defineEmits>,\n\titems: Ref<Props['items']>,\n\tmultiselect: Props['multiselect'],\n\tuseAllItem: Ref<Props['useAllItem']>,\n\tappendSearchToResult: Ref<Props['appendSearchToResult']>,\n\tappendSearchAllowDuplicate: Ref<Props['appendSearchAllowDuplicate']>,\n\tappendSearchToResultCond: Ref<Props['appendSearchToResultCond']>,\n\tappendWithoutSelect: Ref<Props['appendWithoutSelect']>,\n\tsearchFields: Ref<Props['searchFields']>,\n\tsearchType: Ref<Props['searchType']>,\n\tminLength: number,\n\tapi: API,\n) => {\n\t/**\n\t * Текст поиска по результатам\n\t */\n\tconst searchText = ref('');\n\n\t/**\n\t * Объект, представляющий опцию \"Все\"\n\t */\n\tconst itemAll = {\n\t\tid: ITEM_ID_ALL,\n\t\tname: useI18n().Common.All as string,\n\t};\n\n\t/**\n\t * Сброс поиска\n\t */\n\tconst resetSearch = () => {\n\t\tsearchText.value = '';\n\t};\n\n\t/**\n\t * Является ли строка поиска достаточной длины для отображения меню\n\t */\n\tconst genIsShort = () => {\n\t\tif (!api.apiRequest) return false;\n\t\tif (searchText.value.length >= minLength) return false;\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * Варианты выбора: props.items + \"Выбрать все\"\n\t */\n\tconst localItems: ComputedRef<Item[]> = computed(() => {\n\t\tconst localItems: Item[] = [];\n\n\t\tif (!multiselect && useAllItem.value) {\n\t\t\tif (typeof useAllItem.value === 'string') {\n\t\t\t\titemAll.name = useAllItem.value;\n\t\t\t}\n\n\t\t\tlocalItems.push(itemAll);\n\t\t}\n\n\t\titems.value?.forEach(item => localItems.push({ ...item }));\n\n\t\treturn localItems;\n\t});\n\n\t/**\n\t * Не используем `computed` в пользу ручного порядка пересчета значения\n\t */\n\tconst itemsForShow = ref<Item[]>([]);\n\n\tconst recalcItemsForShow = () => {\n\t\titemsForShow.value = genItemsForShow();\n\t};\n\n\t/**\n\t * Подготовленный список меню, который содержит в сумме:\n\t * - prop.items: указанный список с учетом фильтра и опций компонента\n\t * - api.items: результаты api запроса, если используется api\n\t *\n\t * @returns Отфильтрованный массив элементов для отображения\n\t */\n\tconst genItemsForShow = () => {\n\t\tconst searchString = searchText.value.toLowerCase();\n\t\tconst searchStringInvertKeyboard = invertKeyboardLayout(searchString);\n\n\t\tlet items: Item[] = [];\n\n\t\t/**\n\t\t * Элемент текущего разделителя в цикле\n\t\t *\n\t\t * Для скрытия / отображения только нужных заголовков и разделителей при поиске\n\t\t *\n\t\t * Логика для `api.items` должна реализовываться в api или api клиенте при генерации элементов\n\t\t */\n\t\tlet itemTitleCategory: Item | undefined;\n\t\tconst itemsCategory: Item[] = [];\n\n\t\t/**\n\t\t * Добавить элементы в результирующий список\n\t\t */\n\t\tconst flushCategory = () => {\n\t\t\t// крайний разделитель не выводить\n\t\t\tif (itemsCategory.at(-1)?.listItemProps?.type === 'delimiter') {\n\t\t\t\titemsCategory.pop();\n\t\t\t}\n\n\t\t\tif (itemsCategory.length) {\n\t\t\t\tif (itemTitleCategory) {\n\t\t\t\t\titems.push(itemTitleCategory);\n\t\t\t\t}\n\n\t\t\t\titems.push(...itemsCategory);\n\n\t\t\t\titemsCategory.length = 0;\n\t\t\t}\n\t\t};\n\n\t\tconst pushMatchedItemToCategory = (item: Item) => {\n\t\t\tconst hasIdSearch = searchFields.value?.includes('id');\n\t\t\tconst name = item.name.toLowerCase();\n\n\t\t\tconst searchFieldsText = searchFields.value\n\t\t\t\t?.filter(field => field !== 'id')\n\t\t\t\t.map(field => typeof item[field] === 'string' || typeof item[field] === 'number' ? item[field] : '')\n\t\t\t\t.join('☼')\n\t\t\t\t.toLowerCase();\n\n\t\t\tif (\n\t\t\t\t(hasIdSearch && item.id === Number(searchString)) ||\n\t\t\t\tsearchFieldsText?.includes(searchString) ||\n\t\t\t\tsearchFieldsText?.includes(searchStringInvertKeyboard)\n\t\t\t) {\n\t\t\t\tif (name === searchString || name === searchStringInvertKeyboard) {\n\t\t\t\t\t// точные совпадения в начало\n\t\t\t\t\titemsCategory.unshift(item);\n\t\t\t\t} else {\n\t\t\t\t\titemsCategory.push(item);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tfor (const item of localItems.value) {\n\t\t\tswitch (item.listItemProps?.type) {\n\t\t\t\tcase 'title':\n\t\t\t\t\tflushCategory();\n\n\t\t\t\t\titemTitleCategory = item;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delimiter':\n\t\t\t\t\t// вставить разделитель один раз и только если категория не пуста\n\t\t\t\t\tif (itemsCategory.length) {\n\t\t\t\t\t\tlet index = itemsCategory.length;\n\t\t\t\t\t\tif (itemsCategory.at(-1)?.listItemProps?.type === 'delimiter') index--;\n\n\t\t\t\t\t\titemsCategory[index] = item;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tpushMatchedItemToCategory(item);\n\t\t\t}\n\t\t}\n\n\t\tflushCategory();\n\n\t\titems.push(...api.items.value);\n\n\t\t// ввод произвольного значения\n\t\tif (\n\t\t\tappendSearchToResult.value &&\n\t\t\t!!searchText.value &&\n\t\t\t(!appendSearchToResultCond.value || appendSearchToResultCond.value(searchString)) &&\n\n\t\t\t// предложить добавить элемент, если нет точного совпадения или разрешены дубликаты\n\t\t\t(\n\t\t\t\tappendSearchAllowDuplicate.value ||\n\t\t\t\t!items.find((item) => item.name.toLowerCase() === searchString)\n\t\t\t)\n\t\t) {\n\t\t\tconst itemNew: Item = {\n\t\t\t\tid: ITEM_ID_NEW,\n\t\t\t\tname: searchText.value,\n\t\t\t};\n\n\t\t\tif (appendWithoutSelect.value) {\n\t\t\t\titemNew.listItemProps = { closeByClick: false };\n\t\t\t}\n\n\t\t\t// предложение всегда отображается внизу, чтобы не мешать результатам поиска\n\t\t\titems.push(itemNew);\n\t\t}\n\n\t\tif (multiselect) {\n\t\t\titems = items.filter(item => !isSelected(model.value, item));\n\t\t}\n\n\t\treturn items;\n\t};\n\n\t/**\n\t * Выбрать элемент\n\t *\n\t * @param item Элемент для выбора\n\t */\n\tconst selectItem = (item: Item) => {\n\t\t// это невыбираемый элемент\n\t\tif (item.listItemProps?.type === 'title' || item.listItemProps?.type === 'delimiter') {\n\t\t\treturn;\n\t\t}\n\n\t\tif (item.id === ITEM_ID_NEW) {\n\t\t\temits('appendItem', item);\n\n\t\t\tif (appendWithoutSelect.value) return;\n\t\t}\n\n\t\tif (multiselect && Array.isArray(model.value)) {\n\t\t\tif (!isSelected(model.value, item)) {\n\t\t\t\tmodel.value = [...model.value, item];\n\t\t\t}\n\t\t} else {\n\t\t\tmodel.value = item;\n\t\t}\n\n\t\t/**\n\t\t * Отложить перерисовку\n\t\t *\n\t\t * fix: Перерисовка меню выполняется раньше, чем срабатывает `click`.\n\t\t * Из-за этого обработчик кликов думает, что клик был вне меню и не закрывает окно\n\t\t *\n\t\t * Файл: @/components/popup/lib/popup.globalEvents.ts\n\t\t *\n\t\t * Функция: onclick()\n\t\t *\n\t\t * ```\n\t\t * const elPopup = e.target.closest<HTMLElement>('.top-popup-wrapper');\n\t\t * ```\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\t/**\n\t\t\t * Завершить поиск после выбора\n\t\t\t */\n\t\t\tresetSearch();\n\t\t});\n\n\t\t// /**\n\t\t// * При изменении значения модели в режиме inline необходимо очистить поле поиска,\n\t\t// * так как поиск больше не актуален после выбора значения\n\t\t// */\n\t\t// if (searchType.value === 'inline') {\n\t\t// \tresetSearch();\n\t\t// }\n\t};\n\n\tif (api.apiRequest) {\n\t\t// загрузка только при открытии popup\n\t\tconst fieldsForWatch: any = [items, api.items];\n\n\t\t// model нужен только для multiselect, без необходимости не использовать для улучшения UX при работе с API\n\t\tif (multiselect) {\n\t\t\tfieldsForWatch.push(model);\n\t\t}\n\n\t\twatch(fieldsForWatch, () => {\n\t\t\trecalcItemsForShow();\n\t\t}, {\n\t\t\tdeep: 2,\n\t\t});\n\t} else {\n\t\twatch([model, items, searchText], () => {\n\t\t\trecalcItemsForShow();\n\t\t}, {\n\t\t\timmediate: true,\n\n\t\t\t// слежение за изменениями `items`\n\t\t\tdeep: 2,\n\t\t});\n\t}\n\n\t/**\n\t * Выбрать следующее значение\n\t */\n\tconst selectNextItem = () => {\n\t\tif (Array.isArray(model.value)) return;\n\n\t\tconst selectableItems = itemsForShow.value.filter((item) => !['title', 'delimiter'].includes(item.listItemProps?.type ?? ''));\n\n\t\tconst currentIndex = selectableItems.findIndex(item => item.id === (model.value as Item).id);\n\t\tconst nextIndex = (currentIndex + 1) % selectableItems.length;\n\t\tmodel.value = { ...selectableItems[nextIndex] };\n\t};\n\n\t/**\n\t * Удалить элемент, `id` и `name` которого равны указанному `item`\n\t */\n\tconst deleteItemByItem = async (item: Item) => {\n\t\tif (Array.isArray(model.value)) {\n\t\t\tmodel.value = model.value.filter((itemI) => itemI.id !== item.id || itemI.name !== item.name);\n\t\t}\n\t};\n\n\treturn {\n\t\tsearchText,\n\t\tresetSearch,\n\t\tgenIsShort,\n\t\titemsForShow,\n\t\tselectItem,\n\t\tselectNextItem,\n\t\tdeleteItemByItem,\n\t};\n};\n","<script setup lang=\"ts\">\nimport { computed, ref, toRef, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { TopPopup, TopPopupListItem, TopPopupWidgetInput } from '@/components/popup/popup';\nimport { TopPreloader } from '@/components/forms/forms';\nimport type { Emits, Item, Props, Slots } from './types';\nimport Selector2ItemMulti from './itemMulti.vue';\nimport { useAPI } from './composables/useAPI';\nimport { useMenu } from './composables/useMenu';\nimport type { TopLibPopup } from '../../popup/lib/popup';\nimport { clearCache, deleteCacheItemById, updateCacheItemById } from './cache';\nimport { ITEM_ID_ALL, ITEM_ID_NEW } from './utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\titems: () => [] as Item[],\n\tsize: 's',\n\tminLength: 0,\n\tsearchType: 'popup',\n\topenByFocusInput: undefined,\n\tsearchFields: () => ['id', 'name'],\n});\n\nconst model = defineModel<Props['modelValue']>({ required: true });\n\ndefineSlots<Slots>();\n\nconst emits = defineEmits<Emits>();\n\ndefineExpose({\n\t/**\n\t * Сброс локального кеша и кеша api\n\t *\n\t * @param resetAPICache - Сбросить API кеш, по умолчанию не сбрасывается. Для случаев, когда загруженные данные становятся неактуальными\n\t */\n\tresetCache: (resetAPICache: boolean = false) => {\n\t\tif (!api.apiRequest) return;\n\n\t\t// сброс кеша api\n\t\tif (resetAPICache) {\n\t\t\tclearCache(api.apiRequest.path);\n\t\t}\n\n\t\t// сброс кеша списка\n\t\tapi.items.value = [];\n\n\t\t// сброс флага первичной загрузки\n\t\tapi.countLoading.value = 0;\n\n\t\t// сброс параметров дозагрузки\n\t\tapi.apiRequest.params.offset = 0;\n\n\t\t// сброс кеша локального списка с дополнительными элементами, например `useAllItem`\n\t\trequestAnimationFrame(() => {\n\t\t\tmenu.itemsForShow.value = [];\n\t\t});\n\n\t\t// сразу загрузить данные после сброса, если popup уже открыт\n\t\tif (getPopup()?.elPopup) {\n\t\t\tapi.setSearchTextAndLoad(menu.searchText.value);\n\t\t}\n\t},\n\n\t/**\n\t * Локально обновить элемент списка по `id`, без перезагрузки через API\n\t */\n\tupdateItemById: (id: Item['id'], patch: Partial<Item>) => {\n\t\tconst item = api.items.value.find((item) => item.id === id);\n\n\t\tif (item) {\n\t\t\tObject.assign(item, patch);\n\t\t}\n\n\t\tif (api.apiRequest) {\n\t\t\tupdateCacheItemById(api.apiRequest.path, id, patch);\n\t\t}\n\t},\n\n\t/**\n\t * Локально удалить элемент списка по `id`, без перезагрузки через API\n\t */\n\tdeleteItemById: (id: Item['id']) => {\n\t\tconst itemIndex = api.items.value.findIndex((item) => item.id === id);\n\n\t\tif (itemIndex !== -1) {\n\t\t\tapi.items.value.splice(itemIndex, 1);\n\t\t}\n\n\t\tif (api.apiRequest) {\n\t\t\tdeleteCacheItemById(api.apiRequest.path, id);\n\t\t}\n\t},\n});\n\nconst searchTypeLocal = computed(() => {\n\t// multiselect не поддерживает inline ввода\n\tif (props.searchType === 'inline' && props.multiselect) return 'popup';\n\n\t// В мобильной версии popup работает в полноэкранном режиме\n\tif (props.searchType === 'inline' && Core.state.isMobile) return 'popup';\n\n\treturn props.searchType;\n});\n\n/**\n * Объект для работы с API\n */\nconst api = useAPI(props.api, props.apiSetSearchParams, props.minLength, props.useCache);\n\n/**\n * Объект для работы с меню\n */\nconst menu = useMenu(\n\tmodel,\n\temits,\n\ttoRef(props, 'items'),\n\tprops.multiselect,\n\ttoRef(props, 'useAllItem'),\n\ttoRef(props, 'appendSearchToResult'),\n\ttoRef(props, 'appendSearchAllowDuplicate'),\n\ttoRef(props, 'appendSearchToResultCond'),\n\ttoRef(props, 'appendWithoutSelect'),\n\ttoRef(props, 'searchFields'),\n\tsearchTypeLocal,\n\tprops.minLength,\n\tapi,\n);\n\nconst component = computed(() => {\n\tif (props.buttonProps) return 'TopButton';\n\tif (searchTypeLocal.value === 'inline') return 'TopInput';\n\n\treturn 'div';\n});\n\n/**\n * Экземпляр компонента Popup\n */\nconst popupRef = ref<any>(null);\n\n/**\n * Получить доступ к объекту popup\n */\nconst getPopup = (): TopLibPopup | undefined => {\n\treturn popupRef.value?.popup;\n};\n\nif (api.apiRequest) {\n\t// отложенный поиск при вводе текста\n\twatch(menu.searchText, () => {\n\t\tapi.setSearchTextAndLoad(menu.searchText.value);\n\t});\n}\n\nconst placeholder = computed(() => {\n\tif (Array.isArray(model.value) || props.multiselect || !props.selectedAsPlaceholder && searchTypeLocal.value !== 'inline') {\n\t\treturn props.placeholder;\n\t}\n\n\treturn model.value?.name || props.placeholder;\n});\n\n/**\n * Обработчик ввода клавиш на кнопке или поле ввода\n */\nconst onOpenerKeydown = (e: KeyboardEvent) => {\n\tlet needOpen = false;\n\n\tswitch (e.key) {\n\t\tcase 'Delete':\n\t\tcase 'Backspace':\n\t\t\tif (Array.isArray(model.value)) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\n\t\t\t\tmodel.value.pop();\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'ArrowUp':\n\t\tcase 'ArrowRight':\n\t\tcase 'ArrowDown':\n\t\tcase 'ArrowLeft':\n\t\tcase 'Enter':\n\t\tcase ' ':\n\t\t\tneedOpen = true;\n\n\t\t\tbreak;\n\t\tcase 'Escape':\n\t\t\tif (searchTypeLocal.value === 'inline') {\n\t\t\t\t// очистка введенного текста\n\t\t\t\tmenu.resetSearch();\n\t\t\t}\n\n\t\t\tbreak;\n\t}\n\n\t// введен символ\n\tconst symbolPressed = e.key.length === 1 && !e.ctrlKey && !e.metaKey;\n\n\t// введен символ\n\tif (searchTypeLocal.value === 'popup' || searchTypeLocal.value === 'inline') {\n\t\tif (symbolPressed) {\n\t\t\tneedOpen = true;\n\t\t}\n\t}\n\n\t// popup уже открыт\n\tif (getPopup()?.elPopup) {\n\t\tneedOpen = false;\n\t}\n\n\tif (needOpen) {\n\t\tif (searchTypeLocal.value === 'popup') {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\t// введен символ\n\t\t\tif (symbolPressed) {\n\t\t\t\t// начало ввода, сразу ввести первый символ вместе с открытием popup\n\t\t\t\tif (!menu.searchText.value) {\n\t\t\t\t\tmenu.searchText.value = e.key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t(e.currentTarget as HTMLElement)?.click();\n\t}\n};\n\nconst onClickChanger = (e: MouseEvent) => {\n\te.preventDefault();\n\n\tmenu.selectNextItem();\n};\n\n/**\n * Обработчик открытия попапа\n */\nconst onOpen = () => {\n\tif (api.apiRequest) {\n\t\t// при открытии сразу выполнить поиск\n\t\tapi.setSearchTextAndLoad(menu.searchText.value, false);\n\t}\n\n\temits('open');\n};\n\n/**\n * Обработчик закрытия попапа\n */\nconst onClose = () => {\n\t// очистка введенного текста, в режиме `inline` input вызывается при `blur`\n\tif (searchTypeLocal.value === 'popup') {\n\t\tif (menu.searchText.value) menu.resetSearch();\n\t}\n};\n\n/**\n * Обработчик прокрутки списка контента\n *\n * Для дозагрузки элеменов через api\n *\n * @param {Event} e - Событие прокрутки\n */\nconst onScrollContentList = (e: Event) => {\n\tconst el = e.target as HTMLElement;\n\n\tif (el.scrollTop / (el.scrollHeight - el.offsetHeight) > 0.8) {\n\t\tapi.load(true);\n\t}\n};\n\nif (import.meta.env.STORYBOOK) {\n\twatch(\n\t\t() => props.multiselect,\n\t\t() => {\n\t\t\tif (props.multiselect) {\n\t\t\t\tif (!Array.isArray(model.value)) {\n\t\t\t\t\tmodel.value = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\t\tname: 'Выбери меня',\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (Array.isArray(model.value)) {\n\t\t\t\t\tmodel.value = {\n\t\t\t\t\t\tid: null,\n\t\t\t\t\t\tname: '',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{ immediate: true },\n\t);\n\n\twatch(\n\t\t() => props.searchType,\n\t\t() => {\n\t\t\t// пауза для установки props в адресной строке\n\t\t\tsetTimeout(() => {\n\t\t\t\tlocation.reload();\n\t\t\t}, 500);\n\t\t},\n\t);\n}\n</script>\n\n<template>\n\t<TopPopup\n\t\tref=\"popupRef\"\n\t\t@open=\"onOpen()\"\n\t\t@close=\"onClose()\"\n\t\t@scrollContentList=\"api ? onScrollContentList($event) : undefined\"\n\t\t:notch=\"false\"\n\t\t:transitionDuration=\"0\"\n\t\t:openByFocusInput=\"searchTypeLocal === 'inline' && (openByFocusInput ?? true)\"\n\t\t:disabled=\"searchTypeLocal === 'inline' && menu.genIsShort()\"\n\t>\n\t\t<template #opener>\n\t\t\t<component\n\t\t\t\t:is=\"component\"\n\n\t\t\t\t:=\"buttonProps\"\n\n\t\t\t\t:class=\"{\n\t\t\t\t\t'top-selector2': true,\n\t\t\t\t\t'top-selector2-multiselect': multiselect,\n\t\t\t\t\t['top-selector2-' + modificator]: !!modificator,\n\t\t\t\t\t'top-as-input': !buttonProps && searchTypeLocal !== 'inline',\n\t\t\t\t\t'top-as-selector': true,\n\t\t\t\t\t['top-size_' + size]: true,\n\t\t\t\t\t['top-disabled']: disabled,\n\t\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t\t['top-error']: isError,\n\t\t\t\t}\"\n\t\t\t\t:icon\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@keydown=\"onOpenerKeydown\"\n\t\t\t\t@blur=\"searchTypeLocal === 'inline' && menu.resetSearch()\"\n\t\t\t\tv-top-focus.onupdate=\"isError\"\n\t\t\t\tv-top-shortcut=\"openerShortcut\"\n\n\t\t\t\t:placeholder\n\t\t\t\t:title\n\t\t\t\t:captionType=\"searchTypeLocal === 'inline' && title !== undefined ? 'top' : undefined\"\n\t\t\t\tv-model=\"menu.searchText.value\"\n\t\t\t>\n\t\t\t\t<template v-if=\"multiselect\">\n\t\t\t\t\t<div class=\"top-selector2_activeItems\">\n\t\t\t\t\t\t<Selector2ItemMulti\n\t\t\t\t\t\t\tv-for=\"item of model as Item[]\"\n\t\t\t\t\t\t\t:key=\"item.id ?? undefined\"\n\t\t\t\t\t\t\t:id=\"item.id\"\n\t\t\t\t\t\t\t:name=\"item.name\"\n\t\t\t\t\t\t\t@delete=\"menu.deleteItemByItem\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\n\t\t\t\t<span v-if=\"searchTypeLocal !== 'inline' && !multiselect\" class=\"top-selector2_activeName top-ellipsis\">\n\t\t\t\t\t{{ !Array.isArray(model) ? model.name : '' }}\n\t\t\t\t</span>\n\n\t\t\t\t<span v-if=\"multiselect && !model.length\" class=\"top-selector2_placeholder top-ellipsis\">\n\t\t\t\t\t{{ placeholder }}\n\t\t\t\t</span>\n\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"addChanger && !buttonProps && !multiselect && menu.itemsForShow.value.length > 1 && !disabled\"\n\t\t\t\t\tclass=\"top-changer top-changer-selector\"\n\t\t\t\t\tdata-top-popup-disabled=\"true\"\n\t\t\t\t\t@click=\"onClickChanger\"\n\t\t\t\t></span>\n\t\t\t</component>\n\t\t</template>\n\n\t\t<template #widget v-if=\"searchTypeLocal === 'popup'\">\n\t\t\t<div class=\"top-selector2_searchWidget\">\n\t\t\t\t<TopPopupWidgetInput\n\t\t\t\t\ttitle=\"Поиск\"\n\t\t\t\t\ticon=\"\"\n\t\t\t\t\tv-model=\"menu.searchText.value\"\n\t\t\t\t\tv-top-focus.onupdate=\"model\"\n\t\t\t\t\t:isLoading=\"!!api.countLoading.value && api.isLoading.value\"\n\t\t\t\t\t:placeholder\n\t\t\t\t/>\n\n\t\t\t\t<TopButton\n\t\t\t\t\tv-if=\"hasCloserBtn && !$core.state.isMobile\"\n\t\t\t\t\tclass=\"closer\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t>\n\t\t\t\t\t{{ $i18n.Common.Cancel }}\n\t\t\t\t</TopButton>\n\t\t\t</div>\n\t\t</template>\n\n\t\t<template #contentList>\n\t\t\t<TopPopupListItem\n\t\t\t\tv-for=\"item of menu.itemsForShow.value\"\n\t\t\t\t:key=\"item.id ?? undefined\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'top-active': !Array.isArray(model) && !multiselect && model.id === item.id && model.name === item.name,\n\t\t\t\t\t'top-selector2_item-all':item.id === ITEM_ID_ALL,\n\t\t\t\t\t'top-selector2_item-new':item.id === ITEM_ID_NEW,\n\t\t\t\t}\"\n\t\t\t\t:closeByClick=\"!multiselect || Core.state.isMobile\"\n\t\t\t\t:=\"item.listItemProps\"\n\t\t\t\t@click=\"menu.selectItem(item)\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\tv-if=\"$slots.item\"\n\t\t\t\t\tname=\"item\"\n\t\t\t\t\t:item\n\t\t\t\t></slot>\n\n\t\t\t\t<template\n\t\t\t\t\tv-else\n\t\t\t\t>\n\t\t\t\t\t{{ item.name }}\n\t\t\t\t</template>\n\n\t\t\t\t<template v-if=\"$slots.actions\" #actions>\n\t\t\t\t\t<slot name=\"actions\" :item></slot>\n\t\t\t\t</template>\n\t\t\t</TopPopupListItem>\n\n\t\t\t<!-- Элементов для отображения нет -->\n\t\t\t<template v-if=\"!menu.itemsForShow.value.length && !menu.genIsShort()\">\n\t\t\t\t<TopPopupListItem type=\"regular\">\n\t\t\t\t\t<template v-if=\"!api.isLoading.value || api.countLoading.value\">\n\t\t\t\t\t\t{{ $i18n.Common.No_results }}\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<!-- Индикатор первичной загрузки -->\n\t\t\t\t\t<TopPreloader\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\ttype=\"circles\"\n\t\t\t\t\t/>\n\t\t\t\t</TopPopupListItem>\n\t\t\t</template>\n\n\t\t\t<!-- Индикатор повторной загрузки -->\n\t\t\t<TopLoadbar v-if=\"!!api.countLoading.value && api.isLoading.value && searchTypeLocal === 'inline'\"/>\n\t\t</template>\n\t</TopPopup>\n</template>\n\n<style>\n.top-selector2 {\n\twidth: 180px;\n}\n\n.top-selector2::placeholder,\n.top-selector2_placeholder {\n\tcolor: var(--color-text-2);\n}\n\n.top-selector2_placeholder {\n\tpadding-left: var(--top-padding-1);\n}\n\n.top-selector2.top-as-input {\n\tpadding: var(--top-padding-1) var(--top-forms-padding);\n}\n\n.top-selector2.top-selector2-multiselect {\n\twidth: auto;\n\tpadding: var(--top-padding-1);\n\tflex-grow: 1;\n}\n\n.top-selector2.top-active {\n\t--top-forms-border-color: var(--top-forms-border-color-hover);\n}\n\n.top-selector2_searchWidget {\n\tdisplay: flex;\n\tgap: var(--top-gap-2);\n}\n\n.top-selector2_activeItems {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: var(--top-padding-1);\n\tmax-width: 100%;\n}\n\n.top-selector2_activeName {\n\tfont-size: var(--top-font-size);\n\twhite-space: nowrap;\n}\n\n.top-changer-selector {\n\twidth: auto;\n\tpadding: var(--top-padding-1);\n\tmargin: calc(0px - var(--top-padding-1));\n\ttransform: translateX(0);\n}\n\n.top-selector2.top-button {\n\tjustify-content: start;\n}\n\n.top-selector2.top-input_input ~ .top-changer-selector {\n\ttransform: translateX(-52px);\n}\n\n.top-selector2.top-as-selector {\n\tpadding-right: calc(var(--top-selector-arrow-width) + var(--top-padding-2));\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport Button from '@/components/forms/button/button.vue';\nimport type { Emits, Props, Slots } from './types';\nimport Textarea from '@/components/forms/textarea/textarea.vue';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tdefaultValue: '',\n\tcancelText: 'Cancel',\n\tsubmitText: 'Send',\n\tcloseText: 'Close',\n\texpandable: true,\n});\n\ndefineSlots<Slots>();\nconst emit = defineEmits<Emits>();\n\nconst localValue = ref(props.defaultValue);\n\nconst isFocused = ref(props.isFocused);\n\nconst isChanged = computed(() => localValue.value !== props.defaultValue);\n\nconst submit = (value: string) => {\n\temit('submit', value);\n\n\tlocalValue.value = props.defaultValue;\n};\n\nconst cancel = () => {\n\tif (props.forceShowCloseBtn && !isChanged.value) {\n\t\temit('close');\n\n\t\treturn;\n\t}\n\n\tlocalValue.value = props.defaultValue;\n};\n\nconst clickOnTitle = () => {\n\tif (props.attachToKeyboard) emit('clickOnTitle');\n};\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-editArea': true,\n\t\t\t'top-editArea-attachedToKeyboard': attachToKeyboard,\n\t\t}\"\n\t>\n\t\t<div\n\t\t\tv-if=\"title || $slots.caption\"\n\t\t\tclass=\"top-editArea_caption\"\n\t\t\t@click=\"clickOnTitle()\"\n\t\t>\n\t\t\t<slot name=\"caption\">\n\t\t\t\t{{ title }}\n\t\t\t</slot>\n\t\t</div>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-editArea_form': true,\n\t\t\t\t'top-forms-focusable': true,\n\t\t\t\t'top-as-input': true,\n\t\t\t\t'top-error': isError,\n\t\t\t\t'top-focus': isFocused,\n\t\t\t}\"\n\t\t>\n\t\t\t<Textarea\n\t\t\t\tv-model=\"localValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\t:minHeight=\"minHeight\"\n\t\t\t\t:expandable=\"expandable\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:isError=\"isError\"\n\t\t\t\t:hint=\"hint\"\n\t\t\t\tclass=\"top-editArea_element\"\n\t\t\t\t@focus=\"() => isFocused = true\"\n\t\t\t\t@blur=\"() => isFocused = false\"\n\t\t\t\t@keyup.esc=\"cancel\"\n\t\t\t\t@keyup.ctrl.enter=\"submit(localValue)\"\n\t\t\t/>\n\n\t\t\t<div class=\"top-editArea_footer\">\n\t\t\t\t<Button\n\t\t\t\t\tv-if=\"isChanged || forceShowCloseBtn\"\n\t\t\t\t\t:icon=\"$core.state.isMobile ? '': ''\"\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\tcolor=\"theme\"\n\t\t\t\t\tstyling=\"soft\"\n\t\t\t\t\t@click=\"cancel\"\n\t\t\t\t>\n\t\t\t\t\t<template\n\t\t\t\t\t\t#default\n\t\t\t\t\t\tv-if=\"!$core.state.isMobile\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ cancelText }}\n\t\t\t\t\t</template>\n\t\t\t\t</Button>\n\n\t\t\t\t<Button\n\t\t\t\t\tclass=\"top-editArea_button\"\n\t\t\t\t\tv-if=\"isChanged\"\n\t\t\t\t\t:icon=\"$core.state.isMobile ? '': ''\"\n\t\t\t\t\t@click=\"submit(localValue)\"\n\t\t\t\t>\n\t\t\t\t\t<template\n\t\t\t\t\t\t#default\n\t\t\t\t\t\tv-if=\"!$core.state.isMobile\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ submitText }}\n\t\t\t\t\t</template>\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n.top-editArea {\n\t--top-editArea-bottom: env(keyboard-inset-height, 0px);\n\t--top-editArea-offset-bottom: 0px;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.top-editArea_caption {\n\tfont-size: 12px;\n}\n\n.top-editArea_form {\n\tflex-direction: column;\n}\n\n/* textarea в EditArea */\n.top-textarea {\n\twidth: 100%;\n}\n\n.top-editArea_element.top-textarea_textarea {\n\t--top-forms-border-width: 0px;\n\n\toutline: none;\n\tanimation: none;\n}\n\n/* footer */\n.top-editArea_footer {\n\tpadding: var(--top-forms-padding);\n\tdisplay: flex;\n\tmin-height: 32px;\n\talign-self: flex-end;\n\tjustify-content: flex-end;\n\tgap: var(--top-forms-padding);\n}\n\n/* attachedToKeyboard */\n.top-editArea-attachedToKeyboard {\n\tbackground: var(--top-forms-background-color);\n\tposition: fixed;\n\tbottom: calc(var(--top-editArea-offset-bottom) + var(--top-editArea-bottom));\n\tright: 0;\n\tleft: 0;\n\tz-index: 2;\n\tgap: 0;\n\ttransition: bottom var(--transition-fast);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_form {\n\tborder-radius: 0;\n\tborder: none;\n\tborder-top: 1px solid var(--top-forms-border-color);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_title {\n\tcursor: pointer;\n\tborder-top: 1px solid var(--color-line-2-opacity);\n\tpadding: var(--top-forms-padding);\n}\n\n.top-editArea-attachedToKeyboard .top-editArea_footer > [data-top-icon] {\n\tborder-radius: 100%;\n}\n\n@media screen and (max-width: 900px) {\n\t.top-editArea_form {\n\t\tflex-direction: row;\n\t}\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport type { Emits, Props } from './types';\nimport TopInput from '@/components/forms/input/input.vue';\nimport TopButton from '@/components/forms/button/button.vue';\n\nconst props = defineProps<Props>();\n\nconst intermediateValue = ref(props.modelValue);\n\nwatch(() => props.modelValue, () => {\n\tintermediateValue.value = props.modelValue;\n});\n\nconst emit = defineEmits<Emits>();\n\nconst submit = () => {\n\temit('update:modelValue', intermediateValue.value);\n};\n</script>\n\n<template>\n\t<div class=\"top-editInput\">\n\t\t<TopInput\n\t\t\t:=\"input\"\n\t\t\t@keydown.esc.capture.stop=\"intermediateValue = modelValue\"\n\t\t\t@keydown.enter.stop=\"submit\"\n\t\t\tv-model=\"intermediateValue\"\n\t\t>\n\t\t\t<template #caption v-if=\"$slots.caption\">\n\t\t\t\t<slot name=\"caption\"></slot>\n\t\t\t</template>\n\t\t</TopInput>\n\n\t\t<TopButton\n\t\t\tv-if=\"intermediateValue !== modelValue || alwaysShowSubmitBtn\"\n\t\t\ticon=\"\"\n\t\t\tstyling=\"soft\"\n\t\t\t:=\"button\"\n\t\t\t@click=\"submit\"\n\t\t/>\n\t</div>\n</template>\n\n<style>\n.top-editInput {\n\twidth: 220px;\n\tflex-grow: 1;\n\tdisplay: flex;\n\talign-items: flex-end;\n\tgap: var(--top-gap-1);\n}\n\n.top-editInput .top-input {\n\twidth: unset;\n\tflex-grow: 1;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport type { Props } from './types';\nimport TopCheckbox from '@/components/forms/checkbox/checkbox.vue';\nimport TopRadio from '@/components/forms/radio/radio.vue';\n\nconst model = defineModel<Props['modelValue']>({\n\trequired: true,\n});\n\nconst props = withDefaults(defineProps<Props>(), {\n\tsize: 's',\n});\n\nconst elRef = ref<HTMLElement | null>(null);\n\nwatch(model, () => {\n\tconst valuesAvailable = props.items.map(item => item.value);\n\n\tif (Array.isArray(model.value)) {\n\t\t// есть ли неподдерживаемые значения\n\t\tconst valueIsWrong = model.value.find((value) => {\n\t\t\treturn !valuesAvailable.includes(value);\n\t\t});\n\n\t\tif (valueIsWrong) {\n\t\t\t// оставить только поддерживаемые значения\n\t\t\tmodel.value = model.value.filter((value) => {\n\t\t\t\treturn valuesAvailable.includes(value);\n\t\t\t});\n\t\t}\n\t} else {\n\t\tif (!valuesAvailable.includes(model.value)) {\n\t\t\tmodel.value = valuesAvailable[0] ?? '';\n\t\t}\n\t}\n\n\telRef.value?.querySelector('.radioGroup_item-selected')?.scrollIntoView();\n}, { immediate: true });\n\nconst name = 'optionGroup-' + Math.random();\n</script>\n\n<template>\n\t<div\n\t\tref=\"elRef\"\n\t\t:class=\"{\n\t\t\t['top-optionGroup']: true,\n\t\t\t['top-optionGroup-showIndicator_' + Number(showIndicator)]: true,\n\t\t\t['top-scrollBarXHidding']: true,\n\t\t\t['top-size_' + size]: !!size,\n\t\t\t['top-error']: isError,\n\t\t}\"\n\t>\n\t\t<template v-if=\"Array.isArray(model)\">\n\t\t\t<TopCheckbox\n\t\t\t\t:class=\"{\n\t\t\t\t\t['top-optionGroup_item-selected']: model.includes(item.value),\n\t\t\t\t\t['top-optionGroup_item']: true,\n\t\t\t\t}\"\n\t\t\t\tv-for=\"item of items\"\n\t\t\t\tv-model=\"model\"\n\t\t\t\t:value=\"item.value\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t:isError\n\t\t\t\t:data-top-icon=\"item.icon\"\n\t\t\t>\n\t\t\t\t<template #default v-if=\"item.label\">\n\t\t\t\t\t{{ item.label }}\n\t\t\t\t</template>\n\t\t\t</TopCheckbox>\n\t\t</template>\n\n\t\t<template v-else>\n\t\t\t<TopRadio\n\t\t\t\t:class=\"{\n\t\t\t\t\t['top-optionGroup_item-selected']: item.value === model,\n\t\t\t\t\t['top-optionGroup_item']: true,\n\t\t\t\t}\"\n\t\t\t\tv-for=\"item of items\"\n\t\t\t\tv-model=\"model\"\n\t\t\t\t:name\n\t\t\t\t:value=\"item.value\"\n\t\t\t\t:title=\"item.title\"\n\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t:isError\n\t\t\t\t:data-top-icon=\"item.icon\"\n\t\t\t>\n\t\t\t\t<template #default v-if=\"item.label\">\n\t\t\t\t\t{{ item.label }}\n\t\t\t\t</template>\n\t\t\t</TopRadio>\n\t\t</template>\n\t</div>\n</template>\n\n<style>\n.top-optionGroup {\n\tuser-select: none;\n\tbox-sizing: border-box;\n\tborder-radius: 8px;\n\tbackground-color: var(--color-layout-middle);\n\theight: var(--top-forms-base-height);\n\tpadding: 2px;\n\tgap: 2px;\n\tdisplay: flex;\n\talign-items: flex-start;\n}\n\n.top-optionGroup_item {\n\tcursor: pointer;\n\tbox-sizing: border-box;\n\tborder-radius: 6px;\n\theight: calc(var(--top-forms-base-height) - 4px);\n\tpadding: 1px var(--top-padding-2);\n\tcolor: var(--color-text-2);\n\tfont-weight: 400;\n\twhite-space: nowrap;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-grow: 1;\n\tgap: var(--top-gap-1);\n}\n\n.top-optionGroup_item:hover {\n\tbackground-color: var(--color-layout-front-1);\n\tbox-shadow: 0px 4px 32px 0px rgba(4, 9, 84, 0.10), 0px 0px 4px 0px rgba(4, 9, 84, 0.08);\n}\n\n.top-optionGroup_item-selected {\n\tcolor: var(--color-text-1);\n\tbackground-color: var(--color-bg-lightning-1);\n\tbox-shadow: 0px 4px 32px 0px rgba(4, 9, 84, 0.10), 0px 0px 4px 0px rgba(4, 9, 84, 0.08);\n}\n\n.top-optionGroup_item > .top-forms-optionLabel {\n\tflex-grow: 0;\n}\n\n/* indicator */\n.top-optionGroup-showIndicator_0 > .top-optionGroup_item {\n\tjustify-content: center;\n}\n\n.top-optionGroup-showIndicator_0 > .top-optionGroup_item:has(:focus-visible) {\n\toutline: 2px solid var(--color-bg-primary-2);\n\toutline-offset: -1px;\n}\n\n.top-optionGroup-showIndicator_1 > .top-optionGroup_item {\n\tpadding: 1px 3px;\n\tjustify-content: flex-start;\n}\n\n.top-optionGroup-showIndicator_0 > .top-optionGroup_item > .top-forms-option {\n\topacity: 0;\n\twidth: 0;\n\theight: 0;\n\tposition: absolute;\n}\n\n.top-optionGroup_item > .top-forms-option {\n\torder: -1;\n}\n</style>\n","<script setup lang=\"ts\">\nimport OptionGroup from '../libs/optionGroup/optionGroup.vue';\n\nimport type { Props } from './types';\n\nconst model = defineModel<Props['modelValue']>({\n\trequired: true,\n});\n\ndefineProps<Props>();\n</script>\n\n<template>\n\t<OptionGroup\n\t\tclass=\"top-radioGroup\"\n\t\tv-model=\"model\"\n\t\t:items=\"$props.items\"\n\t\t:size=\"$props.size\"\n\t\t:showIndicator=\"$props.showIndicator\"\n\t\t:isError=\"$props.isError\"\n\t>\n\t\t<slot/>\n\t</OptionGroup>\n</template>\n","<script setup lang=\"ts\">\nimport OptionGroup from '../libs/optionGroup/optionGroup.vue';\n\nimport type { Props } from './types';\n\nconst model = defineModel<Props['modelValue']>({\n\trequired: true,\n});\n\ndefineProps<Props>();\n</script>\n\n<template>\n\t<OptionGroup\n\t\tclass=\"top-checkboxGroup\"\n\t\tv-model=\"model\"\n\t\t:items=\"$props.items\"\n\t\t:size=\"$props.size\"\n\t\t:showIndicator=\"$props.showIndicator\"\n\t\t:isError=\"$props.isError\"\n\t>\n\t\t<slot/>\n\t</OptionGroup>\n</template>\n","<script lang=\"ts\" setup>\nimport type { Props, Slots } from './types';\n\nwithDefaults(defineProps<Props>(), {\n\tstyling: 'default',\n\tsize: 'default',\n});\n\ndefineSlots<Slots>();\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t['top-info']: true,\n\t\t\t['top-size_' + size]: true,\n\t\t\t['top-info-styling_' + styling]: true,\n\t\t}\"\n\t\t:data-top-icon=\"icon\"\n\t>\n\t\t<div class=\"top-info_text\">\n\t\t\t<slot></slot>\n\t\t</div>\n\n\t\t<span v-if=\"$slots.additional\" class=\"top-info_value\">\n\t\t\t<slot name=\"additional\"></slot>\n\t\t</span>\n\t</div>\n</template>\n\n<style>\n.top-info {\n\t--top-icon-width: var(--top-icon-size);\n\n\tborder-radius: var(--top-forms-radius);\n\tbox-sizing: border-box;\n\tmin-height: var(--top-forms-base-height);\n\tpadding: var(--top-padding-1) var(--top-padding-2);\n\tflex-grow: 5;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: var(--top-gap-2);\n}\n\n.top-info_text {\n\tflex-grow: 1;\n}\n\n.top-info_value {\n\tfont-weight: bold;\n}\n\n/* size */\n.top-info.top-size_default {\n\tborder-radius: var(--top-radius-3);\n\tpadding: var(--top-padding-4);\n}\n\n/* styling */\n.top-info-styling_default {\n\t--top-icon-color: var(--color-text-2);\n\n\tbackground: var(--color-layer-1);\n}\n\n.top-info-styling_info {\n\t--top-icon-color: var(--color-text-primary);\n\n\tbackground: var(--color-layer-primary-1);\n}\n\n.top-info-styling_warning {\n\t--top-icon-color: var(--color-text-warning);\n\n\tbackground: var(--color-layer-warning-1);\n}\n\n.top-info-styling_negative {\n\t--top-icon-color: var(--color-text-negative);\n\n\tbackground: var(--color-layer-negative-1);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { TopButton } from '@/components/forms/forms';\nimport type { Emits, Props } from '@/components/formsExt/policy/types';\n\ndefineProps<Props>();\nconst emits = defineEmits<Emits>();\n\nconst isVisible = ref(true);\n\nconst onAccept = () => {\n\tisVisible.value = false;\n\n\temits('accept');\n};\n</script>\n\n<template>\n\t<div\n\t\tv-if=\"isVisible\"\n\t\tclass=\"top-policy\"\n\t>\n\t\t<div class=\"top-policy_title\">\n\t\t\t{{ title }}\n\t\t</div>\n\n\t\t<div\n\t\t\tclass=\"top-policy_description\"\n\t\t\tv-html=\"description\"\n\t\t></div>\n\n\t\t<TopButton\n\t\t\tsize=\"m\"\n\t\t\t@click=\"onAccept\"\n\t\t>\n\t\t\t{{ acceptText }}\n\t\t</TopButton>\n\t</div>\n</template>\n\n<style>\n.top-policy {\n\tbox-sizing: border-box;\n\tbox-shadow: var(--top-shadow-b);\n\tborder-radius: var(--top-radius-4);\n\tbackground: var(--color-bg-lightning-1);\n\twidth: 600px;\n\tpadding: var(--top-padding-4);\n\tposition: fixed;\n\tright: var(--top-gap-10);\n\tbottom: var(--top-gap-10);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--top-gap-4);\n\tz-index: 10000;\n}\n\n.top-policy_title {\n\tfont-size: 24px;\n\tfont-weight: 700;\n}\n\n.top-policy_description {\n\tfont-size: 14px;\n}\n\n@media screen and (max-width: 900px) {\n\t.top-policy {\n\t\twidth: 100%;\n\t\tright: 0;\n\t\tbottom: calc(var(--top-gap-5) + var(--toolbar-height, 0px));\n\t}\n}\n</style>\n"]}