@topvisor/ui 1.4.3-fixDialogPage.2 → 1.4.3-fixGroupSelector.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.chunks/core-DoIr-EAf.es.js +268 -0
  2. package/.chunks/core-DoIr-EAf.es.js.map +1 -0
  3. package/.chunks/core-DzDFXOdI.amd.js +2 -0
  4. package/.chunks/core-DzDFXOdI.amd.js.map +1 -0
  5. package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js +517 -0
  6. package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js.map +1 -0
  7. package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js +2 -0
  8. package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js.map +1 -0
  9. package/assets/policy.css +1 -1
  10. package/assets/project.css +1 -1
  11. package/core/app.amd.js +1 -1
  12. package/core/app.js +1 -1
  13. package/formsExt/formsExt.amd.js +1 -1
  14. package/formsExt/formsExt.js +1 -1
  15. package/icomoon/Topvisor icons.json +307 -228
  16. package/icomoon/demo.html +43 -1
  17. package/icomoon/fonts/Topvisor-2.eot +0 -0
  18. package/icomoon/fonts/Topvisor-2.svg +3 -0
  19. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  20. package/icomoon/fonts/Topvisor-2.woff +0 -0
  21. package/icomoon/selection.json +1 -1
  22. package/icomoon/style.css +14 -5
  23. package/package.json +1 -1
  24. package/project/project.amd.js +1 -1
  25. package/project/project.amd.js.map +1 -1
  26. package/project/project.js +1001 -622
  27. package/project/project.js.map +1 -1
  28. package/src/components/formsExt/selector2/composables/useMenu.d.ts +1 -1
  29. package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
  30. package/src/components/formsExt/selector2/types.d.ts +29 -1
  31. package/src/components/formsExt/selector2/utils.d.ts +2 -0
  32. package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
  33. package/src/components/project/groupSelector/groups/groups.vue.d.ts +10 -2
  34. package/src/components/project/groupSelector/groups/utils.d.ts +7 -3
  35. package/src/components/project/groupSelector/utils.d.ts +37 -0
  36. package/src/components/project/project.d.ts +1 -0
  37. package/src/components/project/projectSelector/cache.d.ts +29 -0
  38. package/src/components/project/projectSelector/projectSelector.vue.d.ts +129 -0
  39. package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
  40. package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
  41. package/src/components/project/projectSelector/types.d.ts +48 -0
  42. package/src/components/project/projectSelector/utils.d.ts +230 -0
  43. package/src/core/directives/shortcut.d.ts +2 -1
  44. package/src/core/directives/tooltip.d.ts +2 -6
  45. package/utils/searchers.amd.js +1 -1
  46. package/utils/searchers.js +1 -1
  47. package/.chunks/core-BE1XXQSp.es.js +0 -242
  48. package/.chunks/core-BE1XXQSp.es.js.map +0 -1
  49. package/.chunks/core-Bzx1xzSh.amd.js +0 -2
  50. package/.chunks/core-Bzx1xzSh.amd.js.map +0 -1
  51. package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js +0 -2
  52. package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js.map +0 -1
  53. package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js +0 -498
  54. package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ define(["require","exports","vue","./forms-DDNzqU6o.amd","./popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd","./widgetInput.vue_vue_type_script_setup_true_lang-CkOmb3VD.amd","../utils/keyboard.amd","./field-Cvv0SRcJ.amd","../require/css.amd!../assets/policy.css"],(function(se,b,e,S,V,W,O,z){"use strict";if(typeof e>"u")var e=window.Vue;const U={key:0,class:"top-menu_selectAll"},Y=e.defineComponent({__name:"menu",props:e.mergeModels({modelValue:{},items:{},isMultiple:{type:Boolean},canBeEmptyMultiple:{type:Boolean},styling:{default:"default"},selectAllItem:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=e.ref();!o.isMultiple&&typeof n.value!="string"&&typeof n.value!="number"&&console.warn('Type check failed for prop "modelValue". Expected String: '+typeof n.value),o.isMultiple&&!Array.isArray(n.value)&&console.warn('Type check failed for prop "modelValue". Expected Array: '+typeof n.value),o.isMultiple&&!o.canBeEmptyMultiple&&Array.isArray(n.value)&&!n.value.length&&o.items[0]&&(n.value=[o.items[0]?.href??o.items[0]?.value]);const c=d=>Array.isArray(n.value)?n.value.includes(d.value):d.value===n.value,C=(d,y=!1)=>{if(Array.isArray(n.value)){let r=n.value.slice();if(y){r.length||(r=o.items.map(h=>h.value));const v=r.indexOf(d.value);v===-1?r.push(d.value):r.splice(v,1)}else r.length===1&&r[0]===d.value?r=[]:r=[d.value];!o.canBeEmptyMultiple&&!r.length&&(r=[d.value]),n.value=r;return}n.value=d.value},p=d=>{if(l.value.scrollWidth<=l.value.offsetWidth||d.shiftKey||Math.abs(d.deltaY)<50)return;d.preventDefault();const y=d.deltaY>0?30:-30;l.value.scrollLeft=l.value.scrollLeft+y},u=(d=!0)=>{const y=l.value.querySelector(".top-active");if(!y)return;const r=24,v=y.offsetLeft-l.value.offsetLeft-r,h=y.offsetLeft-l.value.offsetLeft+y.clientWidth+r,g=l.value.scrollLeft,w=l.value.clientWidth+l.value.scrollLeft;let B;v<g&&(B=v),h>w&&(B=h-l.value.clientWidth),B!==void 0&&(S.isSafari()?S.Core.$?.(l.value).animate({scrollLeft:B},d?200:0):l.value.scrollTo({left:B,behavior:d?"smooth":"auto"}))},a=()=>{if(Array.isArray(n.value)){if(n.value.length===o.items.length){n.value=[o.items[0].href??o.items[0].value];return}n.value=o.items.map(d=>d.href??d.value)}};return e.onMounted(()=>u(!1)),e.onUpdated(()=>u(!0)),(d,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"el",ref:l,class:e.normalizeClass({"top-menu":!0,["top-style_"+t.styling]:!0}),onWheel:p},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,r=>(e.openBlock(),e.createBlock(S._sfc_main$1,e.mergeProps({ref_for:!0},r,{class:"top-menu_item",color:"theme",onClick:v=>C(r,v.ctrlKey||v.metaKey),isActive:c(r)}),e.createSlots({_:2},[r.content?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.content),1)]),key:"0"}:void 0]),1040,["onClick","isActive"]))),256)),Array.isArray(n.value)&&t.selectAllItem?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(S._sfc_main$1,e.mergeProps(t.selectAllItem,{class:"top-menu_item",color:"theme",styling:"",onClick:y[0]||(y[0]=r=>a()),isActive:n.value.length===t.items.length}),e.createSlots({_:2},[t.selectAllItem.content?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.selectAllItem.content),1)]),key:"0"}:void 0]),1040,["isActive"])])):e.createCommentVNode("",!0)],34))}}),j={class:"top-selector2_itemMulti top-ellipsis"},H=e.defineComponent({__name:"itemMulti",props:{id:{},name:{}},emits:["delete"],setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",j,[e.createTextVNode(e.toDisplayString(t.name)+" ",1),e.createElementVNode("span",{class:"top-selector2_itemMultiDelete","data-top-icon":"",onClick:n[0]||(n[0]=l=>o.$emit("delete",{id:t.id,name:t.name})),onMousedown:n[1]||(n[1]=e.withModifiers(()=>{},["stop"]))},null,32)]))}}),M=new Map,J=t=>{M.get(t)?.clear()},G=t=>{const o=window.mo?.user?.id;return JSON.stringify(t.params)+":"+t.url+":"+o},Q=(t,o)=>M.get(o)?.get(t),X=(t,o,n)=>{M.has(o)||M.set(o,new Map),M.get(o)?.set(t,n)},Z=(t,o,n,l)=>{const c=e.ref([]),C=e.ref(!1),p=e.ref(0);let u="",a;t&&!t.params.limit&&(t.params.limit=100);const d=async()=>{if(!t)return;const h=l?G(t):void 0;if(h){const B=Q(h,t.path);if(B)return t.abortByFingerprint(),B}const g=await t.call();if(g.errors)return;if(!Array.isArray(g.result)){console.warn("Array expected in `res.result`");return}const w=g.result.findIndex(B=>B.id===void 0||B.name===void 0);if(w!==-1){console.warn(`В result[${w}] нет id или name`);return}return h&&X(h,t.path,g),g},y=async h=>{if(!t)return;if(h){if(!a||C.value)return;t.params.offset=a}else t.params.offset=0;o?.(t,u),C.value=!0;const g=await d();C.value=!1,p.value++,g&&(a=g.nextOffset,h?c.value=c.value.concat(g.result):c.value=g.result)},r=S.debounce(()=>y(!1),200);return{apiRequest:t,items:c,isLoading:C,countLoading:p,load:y,setSearchTextAndLoad:(h,g=!0)=>{if(t){if(h.length<n){t.abortByFingerprint(),c.value=[];return}h===u&&c.value.length||(u=h,g?r():y(!1))}}}},N=0,E=null,F=(t,o,n=!0)=>n&&o.id===E?Array.isArray(t)?t.some(l=>l.id===o.id&&l.name===o.name):o.name===t.name:Array.isArray(t)?t.some(l=>l.id===o.id):o.id===t.id,_=(t,o,n)=>{let l=t.params.filters??[];l=l.filter(c=>c.name!==n),o&&l.push(z.genFieldFilter(n,"CONTAINS",[o])),t.changeParams({filters:l})},ee=(t,o,n,l,c,C,p,u,a,d,y,r)=>{const v=e.ref(""),h={id:N,name:S.useI18n().Common.All},g=()=>{v.value=""},w=()=>!(!r.apiRequest||v.value.length>=y),B=e.computed(()=>{const s=[];return!l&&c.value&&(typeof c.value=="string"&&(h.name=c.value),s.push(h)),n.value?.forEach(i=>s.push({...i})),s}),P=e.ref([]),f=()=>{P.value=m()},m=()=>{const s=v.value.toLowerCase(),i=O.invertKeyboardLayout(s);let A=[],L;const I=[],R=()=>{I.at(-1)?.listItemProps?.type==="delimiter"&&I.pop(),I.length&&(L&&A.push(L),A.push(...I),I.length=0)};for(const k of B.value)switch(k.listItemProps?.type){case"title":R(),L=k;break;case"delimiter":if(I.length){let T=I.length;I.at(-1)?.listItemProps?.type==="delimiter"&&T--,I[T]=k}break;default:const re=a.value?.includes("id"),q=k.name.toLowerCase(),K=a.value?.filter(T=>T!=="id").map(T=>typeof k[T]=="string"||typeof k[T]=="number"?k[T]:"").join("☼").toLowerCase();(re&&k.id===Number(s)||K?.includes(s)||K?.includes(i))&&(q===s||q===i?I.unshift(k):I.push(k))}if(R(),A.push(...r.items.value),C.value&&v.value&&(!p.value||p.value(s))&&!A.find(k=>k.name.toLowerCase()===s)){const k={id:E,name:v.value};u.value&&(k.listItemProps={closeByClick:!1}),A.push(k)}return l&&(A=A.filter(k=>!F(t.value,k))),A},x=s=>{s.listItemProps?.type==="title"||s.listItemProps?.type==="delimiter"||s.id===E&&(o("appendItem",s),u.value)||(l&&Array.isArray(t.value)?F(t.value,s)||(t.value=[...t.value,s]):t.value=s,setTimeout(()=>{g()}))};if(r.apiRequest){const s=[n,r.items];l&&s.push(t),e.watch(s,()=>{f()})}else e.watch([t,n,v],()=>{f()},{immediate:!0,deep:2});return{searchText:v,resetSearch:g,genIsShort:w,itemsForShow:P,selectItem:x,selectNextItem:()=>{if(Array.isArray(t.value))return;const s=P.value.filter(L=>!["title","delimiter"].includes(L.listItemProps?.type??"")),A=(s.findIndex(L=>L.id===t.value.id)+1)%s.length;t.value={...s[A]}},deleteItemByItem:async s=>{Array.isArray(t.value)&&(t.value=t.value.filter(i=>i.id!==s.id||i.name!==s.name))}}},te={key:0,class:"top-selector2_activeItems"},le={key:1,class:"top-selector2_activeName top-ellipsis"},ne={key:2,class:"top-selector2_placeholder top-ellipsis"},oe={class:"top-selector2_searchWidget"},ae=e.defineComponent({__name:"selector2",props:e.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},appendSearchToResultCond:{},appendWithoutSelect:{type:Boolean},multiselect:{type:Boolean},useAllItem:{type:[Boolean,String]},addChanger:{type:Boolean},buttonProps:{},selectedAsPlaceholder:{type:Boolean},openerShortcut:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:e.mergeModels(["appendItem","open"],["update:modelValue"]),setup(t,{expose:o,emit:n}){const l=t,c=e.useModel(t,"modelValue"),C=n;o({resetCache:(f=!1)=>{u.apiRequest&&(f&&J(u.apiRequest.path),u.items.value=[],u.countLoading.value=0,u.apiRequest.params.offset=0,requestAnimationFrame(()=>{a.itemsForShow.value=[]}),r()?.elPopup&&u.setSearchTextAndLoad(a.searchText.value))}});const p=e.computed(()=>l.searchType==="inline"&&l.multiselect||l.searchType==="inline"&&S.Core.state.isMobile?"popup":l.searchType),u=Z(l.api,l.apiSetSearchParams,l.minLength,l.useCache),a=ee(c,C,e.toRef(l,"items"),l.multiselect,e.toRef(l,"useAllItem"),e.toRef(l,"appendSearchToResult"),e.toRef(l,"appendSearchToResultCond"),e.toRef(l,"appendWithoutSelect"),e.toRef(l,"searchFields"),p,l.minLength,u),d=e.computed(()=>l.buttonProps?"TopButton":p.value==="inline"?"TopInput":"div"),y=e.ref(null),r=()=>y.value?.popup;u.apiRequest&&e.watch(a.searchText,()=>{u.setSearchTextAndLoad(a.searchText.value)});const v=e.computed(()=>Array.isArray(c.value)||l.multiselect||!l.selectedAsPlaceholder&&p.value!=="inline"?l.placeholder:c.value?.name||l.placeholder),h=f=>{let m=!1;switch(f.key){case"Delete":case"Backspace":Array.isArray(c.value)&&(f.preventDefault(),f.stopPropagation(),c.value.pop());break;case"ArrowUp":case"ArrowRight":case"ArrowDown":case"ArrowLeft":case"Enter":case" ":m=!0;break;case"Escape":p.value==="inline"&&a.resetSearch();break}const x=f.key.length===1&&!f.ctrlKey&&!f.metaKey;(p.value==="popup"||p.value==="inline")&&x&&(m=!0),r()?.elPopup&&(m=!1),m&&(p.value==="popup"&&(f.preventDefault(),f.stopPropagation(),x&&(a.searchText.value||(a.searchText.value=f.key))),f.currentTarget?.click())},g=f=>{f.preventDefault(),a.selectNextItem()},w=()=>{u.apiRequest&&u.setSearchTextAndLoad(a.searchText.value,!1),C("open")},B=()=>{p.value==="popup"&&a.searchText.value&&a.resetSearch()},P=f=>{const m=f.target;m.scrollTop/(m.scrollHeight-m.offsetHeight)>.8&&u.load(!0)};return(f,m)=>{const x=e.resolveComponent("TopButton"),$=e.resolveComponent("TopLoadbar"),D=e.resolveDirective("top-focus"),s=e.resolveDirective("top-shortcut");return e.openBlock(),e.createBlock(e.unref(V._sfc_main),{ref_key:"popupRef",ref:y,onOpen:m[3]||(m[3]=i=>w()),onClose:m[4]||(m[4]=i=>B()),onScrollContentList:m[5]||(m[5]=i=>e.unref(u)?P(i):void 0),notch:!1,transitionDuration:0,openByFocusInput:p.value==="inline"&&(t.openByFocusInput??!0),disabled:p.value==="inline"&&e.unref(a).genIsShort()},e.createSlots({opener:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),e.mergeProps(t.buttonProps,{class:{"top-selector2":!0,"top-selector2-multiselect":t.multiselect,["top-selector2-"+t.modificator]:!!t.modificator,"top-as-input":!t.buttonProps&&p.value!=="inline","top-as-selector":!0,["top-size_"+t.size]:!0,"top-disabled":t.disabled,"top-forms-focusable":!t.disabled,"top-error":t.isError},icon:t.icon,tabindex:"0",onKeydown:h,onBlur:m[0]||(m[0]=i=>p.value==="inline"&&e.unref(a).resetSearch()),placeholder:v.value,title:t.title,captionType:p.value==="inline"&&t.title!==void 0?"top":void 0,modelValue:e.unref(a).searchText.value,"onUpdate:modelValue":m[1]||(m[1]=i=>e.unref(a).searchText.value=i)}),{default:e.withCtx(()=>[t.multiselect?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,i=>(e.openBlock(),e.createBlock(H,{id:i.id,name:i.name,onDelete:e.unref(a).deleteItemByItem},null,8,["id","name","onDelete"]))),256))])):e.createCommentVNode("",!0),p.value!=="inline"&&!t.multiselect?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(Array.isArray(c.value)?"":c.value.name),1)):e.createCommentVNode("",!0),t.multiselect&&!c.value.length?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(v.value),1)):e.createCommentVNode("",!0),t.addChanger&&!t.buttonProps&&!t.multiselect&&e.unref(a).itemsForShow.value.length>1&&!t.disabled?(e.openBlock(),e.createElementBlock("span",{key:3,class:"top-changer top-changer-selector","data-top-popup-disabled":"true",onClick:g})):e.createCommentVNode("",!0)]),_:1},16,["class","icon","placeholder","title","captionType","modelValue"])),[[D,t.isError,void 0,{onupdate:!0}],[s,t.openerShortcut]])]),contentList:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).itemsForShow.value,i=>(e.openBlock(),e.createBlock(e.unref(V._sfc_main$2),e.mergeProps({key:i.id??void 0,class:{"top-active":!Array.isArray(c.value)&&!t.multiselect&&c.value.id===i.id&&c.value.name===i.name,"top-selector2_item-all":i.id===e.unref(N),"top-selector2_item-new":i.id===e.unref(E)},closeByClick:!t.multiselect||e.unref(S.Core).state.isMobile},{ref_for:!0},i.listItemProps,{onClick:A=>e.unref(a).selectItem(i)}),{default:e.withCtx(()=>[f.$slots.item?e.renderSlot(f.$slots,"item",{key:0,item:i}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.name),1)],64))]),_:2},1040,["class","closeByClick","onClick"]))),128)),!e.unref(a).itemsForShow.value.length&&!e.unref(a).genIsShort()?(e.openBlock(),e.createBlock(e.unref(V._sfc_main$2),{key:0,type:"regular"},{default:e.withCtx(()=>[!e.unref(u).isLoading.value||e.unref(u).countLoading.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f.$i18n.Common.No_results),1)],64)):(e.openBlock(),e.createBlock(e.unref(S._sfc_main$12),{key:1,type:"circles"}))]),_:1})):e.createCommentVNode("",!0),e.unref(u).countLoading.value&&e.unref(u).isLoading.value&&p.value==="inline"?(e.openBlock(),e.createBlock($,{key:1})):e.createCommentVNode("",!0)]),_:2},[p.value==="popup"?{name:"widget",fn:e.withCtx(()=>[e.createElementVNode("div",oe,[e.withDirectives(e.createVNode(e.unref(W._sfc_main),{title:"Поиск",icon:"",modelValue:e.unref(a).searchText.value,"onUpdate:modelValue":m[2]||(m[2]=i=>e.unref(a).searchText.value=i),isLoading:!!e.unref(u).countLoading.value&&e.unref(u).isLoading.value,placeholder:v.value},null,8,["modelValue","isLoading","placeholder"]),[[D,c.value,void 0,{onupdate:!0}]]),t.hasCloserBtn&&!f.$core.state.isMobile?(e.openBlock(),e.createBlock(x,{key:0,class:"closer",color:"theme"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.$i18n.Common.Cancel),1)]),_:1})):e.createCommentVNode("",!0)])]),key:"0"}:void 0]),1032,["openByFocusInput","disabled"])}}});b.ITEM_ID_ALL=N,b.ITEM_ID_NEW=E,b._sfc_main=ae,b._sfc_main$1=Y,b.apiSetSearchParamsFilter=_}));
2
+ //# sourceMappingURL=policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js","sources":["../../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"],"sourcesContent":["<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 { 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\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","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\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\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\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\tconst hasIdSearch = searchFields.value?.includes('id');\n\t\t\t\t\tconst name = item.name.toLowerCase();\n\n\t\t\t\t\tconst searchFieldsText = searchFields.value\n\t\t\t\t\t\t?.filter(field => field !== 'id')\n\t\t\t\t\t\t.map(field => typeof item[field] === 'string' || typeof item[field] === 'number' ? item[field] : '')\n\t\t\t\t\t\t.join('☼')\n\t\t\t\t\t\t.toLowerCase();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(hasIdSearch && item.id === Number(searchString)) ||\n\t\t\t\t\t\tsearchFieldsText?.includes(searchString) ||\n\t\t\t\t\t\tsearchFieldsText?.includes(searchStringInvertKeyboard)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (name === searchString || name === searchStringInvertKeyboard) {\n\t\t\t\t\t\t\t// точные совпадения в начало\n\t\t\t\t\t\t\titemsCategory.unshift(item);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titemsCategory.push(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\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!items.find((item) => item.name.toLowerCase() === searchString)\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} 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 } 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\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, '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: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\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\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"],"names":["el","vue","props","model","itemIsActive","item","index","modelNew","onWheel","event","delta","scrollIntoView","isSmooth","leftMargin","elBtn","gap","rightMargin","leftMarginParent","rightMarginParent","scrollLeft","$event","select","_cache","selectAll","__props","_ctx","cacheByMethod","clearCache","apiPath","genCacheKey","api","getCache","cacheKey","data","items","isLoading","countLoading","nextOffset","cache","res","indexWithError","load","append","apiSetSearchParams","searchText","callAPI","loadDebounce","forms","newSearchText","minLength","ITEM_ID_ALL","ITEM_ID_NEW","modelValue","itemSelected","apiSetSearchParamsFilter","search","fieldName","filters","filter","field","localItems","multiselect","useAllItem","itemAll","localItems2","itemsForShow","genItemsForShow","searchStringInvertKeyboard","utils_keyboard","searchString","itemTitleCategory","itemsCategory","items2","flushCategory","appendWithoutSelect","itemNew","isSelected","selectItem","emits","resetSearch","fieldsForWatch","recalcItemsForShow","genIsShort","selectableItems","itemI","__expose","resetAPICache","menu","getPopup","searchTypeLocal","component","popupRef","placeholder","onOpenerKeydown","e","symbolPressed","onClickChanger","onScrollContentList","onOpen","onClose","_hoisted_1","popupHint_vue_vue_type_style_index_0_lang","_hoisted_4"],"mappings":"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"}
package/assets/policy.css CHANGED
@@ -1 +1 @@
1
- .top-menu{--scroll-thumb-color: var(--color-line-1);--scroll-thumb-color-hover: var(--color-line-2);--scroll-thumb-color-active: var(--color-line-3);max-width:100%;display:flex;align-items:flex-start;gap:var(--top-gap-2);overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}.top-menu::-webkit-scrollbar{display:none}.top-menu .top-menu_item{--top-button-color: var(--color-text-2);outline-offset:-2px!important;min-width:0;max-width:200px;margin:0;flex-shrink:0}.top-menu .top-menu_item[data-top-icon]{--top-icon-color: var(--color-text-2)}.top-menu_selectAll{position:sticky;right:0;background:var(--color-layout-front-1);border-left:1px solid var(--color-line-1);padding-left:var(--top-padding-1);box-shadow:var(--color-layout-front-1) var(--top-padding-2) 0}.top-menu.top-style_default .top-menu_item{--top-forms-radius: 0;--top-forms-border-color: transparent;--top-forms-border-width: 2px;filter:none;box-shadow:none;border:none;border-bottom:var(--top-forms-border-width) solid var(--top-forms-border-color);background:none}.top-style_default>.top-menu_item>[data-top-badge]{margin-top:0}.top-menu.top-style_default .top-menu_item:hover{--top-icon-color: var(--color-text-1);--top-button-color: var(--color-text-1);--top-forms-border-color: var(--color-line-2)}.top-menu.top-style_default .top-menu_item:active,.top-menu.top-style_default .top-menu_item.top-active{--top-icon-color: var(--color-text-primary);--top-button-color: var(--color-text-1);--top-forms-border-color: var(--color-line-primary-1)}.top-menu.top-style_default .top-menu_selectAll{padding-left:var(--top-padding-2)}.top-menu.top-style_bar{border-radius:var(--top-radius-3);border:1px solid var(--color-line-2);padding:var(--top-padding-1);gap:3px}.top-menu.top-style_bar .top-menu_item{--top-button-background-color-hover: var(--color-layer-1);--top-button-background-color-active: var(--color-layer-2);--top-button-background-color-selected: var(--color-layer-primary-1);position:relative}.top-menu.top-style_bar .top-menu_item:hover{--top-icon-color: var(--color-text-1);--top-button-color: var(--color-text-1)}.top-menu.top-style_bar .top-menu_item.top-active{--top-icon-color: var(--color-text-primary);--top-button-color: var(--color-text-primary)}.top-menu.top-style_bar .top-menu_item:not(:first-child):not(.top-active):not(:hover):after{content:"";background:var(--color-line-1-opacity);width:1px;height:60%;display:block;position:absolute;left:-2px}.top-menu.top-style_bar .top-menu_item.top-active+.top-menu_item:after,.top-menu.top-style_bar .top-menu_item:hover+.top-menu_item:after{content:none!important}.top-selector2_itemMulti{box-sizing:border-box;padding-left:var(--top-padding-2);border-radius:var(--top-radius-1, 4px);border:1px solid var(--color-line-primary-1);background:var(--color-layer-primary-2);min-height:22px;max-width:100%;color:var(--color-text-1);flex-grow:0;display:inline-flex;align-items:center;gap:var(--top-gap-1)}.top-selector2_itemMultiDelete{--top-icon-size: 14px;--top-icon-width: 18px;--top-icon-color: var(--color-text-1);display:flex;align-items:center;justify-content:center;height:100%;cursor:pointer}.top-selector2_itemMultiDelete:hover{background:var(--color-layer-primary-2)}@media screen and (min-width:900px){.top-selector2.top-active .top-selector2_itemMultiDelete{z-index:calc(var(--top-popup-z-index) + 1)}}.top-selector2{width:180px}.top-selector2::placeholder,.top-selector2_placeholder{color:var(--color-text-2)}.top-selector2_placeholder{padding-left:var(--top-padding-1)}.top-selector2.top-as-input{padding:var(--top-padding-1) var(--top-forms-padding)}.top-selector2.top-selector2-multiselect{width:auto;padding:var(--top-padding-1);flex-grow:1}.top-selector2.top-active{--top-forms-border-color: var(--top-forms-border-color-hover)}.top-selector2_activeItems{display:flex;flex-wrap:wrap;gap:var(--top-padding-1);max-width:100%}.top-selector2_activeName{white-space:nowrap}.top-changer-selector{width:auto;padding:var(--top-padding-1);margin:calc(0px - var(--top-padding-1));transform:translate(0)}.top-selector2.top-button{justify-content:start}.top-selector2.top-input_input~.top-changer-selector{transform:translate(-52px)}.top-selector2.top-as-selector{padding-right:calc(var(--top-selector-arrow-width) + var(--top-padding-2))}.top-editArea{--top-editArea-bottom: env(keyboard-inset-height, 0px);--top-editArea-offset-bottom: 0px;display:flex;flex-direction:column;gap:6px}.top-editArea_caption{font-size:12px}.top-editArea_form{flex-direction:column}.top-textarea{width:100%}.top-editArea_element.top-textarea_textarea{--top-forms-border-width: 0px;outline:none;animation:none}.top-editArea_footer{padding:var(--top-forms-padding);display:flex;min-height:32px;align-self:flex-end;justify-content:flex-end;gap:var(--top-forms-padding)}.top-editArea-attachedToKeyboard{background:var(--top-forms-background-color);position:fixed;bottom:calc(var(--top-editArea-offset-bottom) + var(--top-editArea-bottom));right:0;left:0;z-index:2;gap:0;transition:bottom var(--transition-fast)}.top-editArea-attachedToKeyboard .top-editArea_form{border-radius:0;border:none;border-top:1px solid var(--top-forms-border-color)}.top-editArea-attachedToKeyboard .top-editArea_title{cursor:pointer;border-top:1px solid var(--color-line-2-opacity);padding:var(--top-forms-padding)}.top-editArea-attachedToKeyboard .top-editArea_footer>[data-top-icon]{border-radius:100%}@media screen and (max-width:900px){.top-editArea_form{flex-direction:row}}.top-editInput{width:220px;flex-grow:1;display:flex;align-items:flex-end;gap:var(--top-gap-1)}.top-editInput .top-input{width:unset;flex-grow:1}.top-optionGroup{-webkit-user-select:none;user-select:none;box-sizing:border-box;border-radius:8px;background-color:var(--color-layout-middle);height:var(--top-forms-base-height);padding:2px;gap:2px;display:flex;align-items:flex-start}.top-optionGroup_item{cursor:pointer;box-sizing:border-box;border-radius:6px;height:calc(var(--top-forms-base-height) - 4px);padding:1px var(--top-padding-2);color:var(--color-text-2);font-weight:400;white-space:nowrap;display:flex;align-items:center;justify-content:center;flex-grow:1;gap:var(--top-gap-1)}.top-optionGroup_item:hover{background-color:var(--color-layout-front-1);box-shadow:0 4px 32px #0409541a,0 0 4px #04095414}.top-optionGroup_item-selected{color:var(--color-text-1);background-color:var(--color-bg-lightning-1);box-shadow:0 4px 32px #0409541a,0 0 4px #04095414}.top-optionGroup_item>.top-forms-optionLabel{flex-grow:0}.top-optionGroup-showIndicator_0>.top-optionGroup_item{justify-content:center}.top-optionGroup-showIndicator_0>.top-optionGroup_item:has(:focus-visible){outline:2px solid var(--color-bg-primary-2);outline-offset:-1px}.top-optionGroup-showIndicator_1>.top-optionGroup_item{padding:1px 3px;justify-content:flex-start}.top-optionGroup-showIndicator_0>.top-optionGroup_item>.top-forms-option{opacity:0;width:0;height:0;position:absolute}.top-optionGroup_item>.top-forms-option{order:-1}.top-info{--top-icon-width: var(--top-icon-size);border-radius:var(--top-forms-radius);box-sizing:border-box;min-height:var(--top-forms-base-height);padding:var(--top-padding-1) var(--top-padding-2);flex-grow:5;display:flex;align-items:center;justify-content:space-between;gap:var(--top-gap-2)}.top-info_text{flex-grow:1}.top-info_value{font-weight:700}.top-info.top-size_default{border-radius:var(--top-radius-3);padding:var(--top-padding-4)}.top-info-styling_default{--top-icon-color: var(--color-text-2);background:var(--color-layer-1)}.top-info-styling_info{--top-icon-color: var(--color-text-primary);background:var(--color-layer-primary-1)}.top-info-styling_warning{--top-icon-color: var(--color-text-warning);background:var(--color-layer-warning-1)}.top-info-styling_negative{--top-icon-color: var(--color-text-negative);background:var(--color-layer-negative-1)}.top-policy{box-sizing:border-box;box-shadow:var(--top-shadow-b);border-radius:var(--top-radius-4);background:var(--color-bg-lightning-1);width:600px;padding:var(--top-padding-4);position:fixed;right:var(--top-gap-10);bottom:var(--top-gap-10);display:flex;flex-direction:column;gap:var(--top-gap-4);z-index:10000}.top-policy_title{font-size:24px;font-weight:700}.top-policy_description{font-size:14px}@media screen and (max-width:900px){.top-policy{width:100%;right:0;bottom:calc(var(--top-gap-5) + var(--toolbar-height, 0px))}}
1
+ .top-menu{--scroll-thumb-color: var(--color-line-1);--scroll-thumb-color-hover: var(--color-line-2);--scroll-thumb-color-active: var(--color-line-3);max-width:100%;display:flex;align-items:flex-start;gap:var(--top-gap-2);overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}.top-menu::-webkit-scrollbar{display:none}.top-menu .top-menu_item{--top-button-color: var(--color-text-2);outline-offset:-2px!important;min-width:0;max-width:200px;margin:0;flex-shrink:0}.top-menu .top-menu_item[data-top-icon]{--top-icon-color: var(--color-text-2)}.top-menu_selectAll{position:sticky;right:0;background:var(--color-layout-front-1);border-left:1px solid var(--color-line-1);padding-left:var(--top-padding-1);box-shadow:var(--color-layout-front-1) var(--top-padding-2) 0}.top-menu.top-style_default .top-menu_item{--top-forms-radius: 0;--top-forms-border-color: transparent;--top-forms-border-width: 2px;filter:none;box-shadow:none;border:none;border-bottom:var(--top-forms-border-width) solid var(--top-forms-border-color);background:none}.top-style_default>.top-menu_item>[data-top-badge]{margin-top:0}.top-menu.top-style_default .top-menu_item:hover{--top-icon-color: var(--color-text-1);--top-button-color: var(--color-text-1);--top-forms-border-color: var(--color-line-2)}.top-menu.top-style_default .top-menu_item:active,.top-menu.top-style_default .top-menu_item.top-active{--top-icon-color: var(--color-text-primary);--top-button-color: var(--color-text-1);--top-forms-border-color: var(--color-line-primary-1)}.top-menu.top-style_default .top-menu_selectAll{padding-left:var(--top-padding-2)}.top-menu.top-style_bar{border-radius:var(--top-radius-3);border:1px solid var(--color-line-2);padding:var(--top-padding-1);gap:3px}.top-menu.top-style_bar .top-menu_item{--top-button-background-color-hover: var(--color-layer-1);--top-button-background-color-active: var(--color-layer-2);--top-button-background-color-selected: var(--color-layer-primary-1);position:relative}.top-menu.top-style_bar .top-menu_item:hover{--top-icon-color: var(--color-text-1);--top-button-color: var(--color-text-1)}.top-menu.top-style_bar .top-menu_item.top-active{--top-icon-color: var(--color-text-primary);--top-button-color: var(--color-text-primary)}.top-menu.top-style_bar .top-menu_item:not(:first-child):not(.top-active):not(:hover):after{content:"";background:var(--color-line-1-opacity);width:1px;height:60%;display:block;position:absolute;left:-2px}.top-menu.top-style_bar .top-menu_item.top-active+.top-menu_item:after,.top-menu.top-style_bar .top-menu_item:hover+.top-menu_item:after{content:none!important}.top-selector2_itemMulti{box-sizing:border-box;padding-left:var(--top-padding-2);border-radius:var(--top-radius-1, 4px);border:1px solid var(--color-line-primary-1);background:var(--color-layer-primary-2);min-height:22px;max-width:100%;color:var(--color-text-1);flex-grow:0;display:inline-flex;align-items:center;gap:var(--top-gap-1)}.top-selector2_itemMultiDelete{--top-icon-size: 14px;--top-icon-width: 18px;--top-icon-color: var(--color-text-1);display:flex;align-items:center;justify-content:center;height:100%;cursor:pointer}.top-selector2_itemMultiDelete:hover{background:var(--color-layer-primary-2)}@media screen and (min-width:900px){.top-selector2.top-active .top-selector2_itemMultiDelete{z-index:calc(var(--top-popup-z-index) + 1)}}.top-selector2{width:180px}.top-selector2::placeholder,.top-selector2_placeholder{color:var(--color-text-2)}.top-selector2_placeholder{padding-left:var(--top-padding-1)}.top-selector2.top-as-input{padding:var(--top-padding-1) var(--top-forms-padding)}.top-selector2.top-selector2-multiselect{width:auto;padding:var(--top-padding-1);flex-grow:1}.top-selector2.top-active{--top-forms-border-color: var(--top-forms-border-color-hover)}.top-selector2_searchWidget{display:flex;gap:var(--top-gap-2)}.top-selector2_activeItems{display:flex;flex-wrap:wrap;gap:var(--top-padding-1);max-width:100%}.top-selector2_activeName{white-space:nowrap}.top-changer-selector{width:auto;padding:var(--top-padding-1);margin:calc(0px - var(--top-padding-1));transform:translate(0)}.top-selector2.top-button{justify-content:start}.top-selector2.top-input_input~.top-changer-selector{transform:translate(-52px)}.top-selector2.top-as-selector{padding-right:calc(var(--top-selector-arrow-width) + var(--top-padding-2))}.top-editArea{--top-editArea-bottom: env(keyboard-inset-height, 0px);--top-editArea-offset-bottom: 0px;display:flex;flex-direction:column;gap:6px}.top-editArea_caption{font-size:12px}.top-editArea_form{flex-direction:column}.top-textarea{width:100%}.top-editArea_element.top-textarea_textarea{--top-forms-border-width: 0px;outline:none;animation:none}.top-editArea_footer{padding:var(--top-forms-padding);display:flex;min-height:32px;align-self:flex-end;justify-content:flex-end;gap:var(--top-forms-padding)}.top-editArea-attachedToKeyboard{background:var(--top-forms-background-color);position:fixed;bottom:calc(var(--top-editArea-offset-bottom) + var(--top-editArea-bottom));right:0;left:0;z-index:2;gap:0;transition:bottom var(--transition-fast)}.top-editArea-attachedToKeyboard .top-editArea_form{border-radius:0;border:none;border-top:1px solid var(--top-forms-border-color)}.top-editArea-attachedToKeyboard .top-editArea_title{cursor:pointer;border-top:1px solid var(--color-line-2-opacity);padding:var(--top-forms-padding)}.top-editArea-attachedToKeyboard .top-editArea_footer>[data-top-icon]{border-radius:100%}@media screen and (max-width:900px){.top-editArea_form{flex-direction:row}}.top-editInput{width:220px;flex-grow:1;display:flex;align-items:flex-end;gap:var(--top-gap-1)}.top-editInput .top-input{width:unset;flex-grow:1}.top-optionGroup{-webkit-user-select:none;user-select:none;box-sizing:border-box;border-radius:8px;background-color:var(--color-layout-middle);height:var(--top-forms-base-height);padding:2px;gap:2px;display:flex;align-items:flex-start}.top-optionGroup_item{cursor:pointer;box-sizing:border-box;border-radius:6px;height:calc(var(--top-forms-base-height) - 4px);padding:1px var(--top-padding-2);color:var(--color-text-2);font-weight:400;white-space:nowrap;display:flex;align-items:center;justify-content:center;flex-grow:1;gap:var(--top-gap-1)}.top-optionGroup_item:hover{background-color:var(--color-layout-front-1);box-shadow:0 4px 32px #0409541a,0 0 4px #04095414}.top-optionGroup_item-selected{color:var(--color-text-1);background-color:var(--color-bg-lightning-1);box-shadow:0 4px 32px #0409541a,0 0 4px #04095414}.top-optionGroup_item>.top-forms-optionLabel{flex-grow:0}.top-optionGroup-showIndicator_0>.top-optionGroup_item{justify-content:center}.top-optionGroup-showIndicator_0>.top-optionGroup_item:has(:focus-visible){outline:2px solid var(--color-bg-primary-2);outline-offset:-1px}.top-optionGroup-showIndicator_1>.top-optionGroup_item{padding:1px 3px;justify-content:flex-start}.top-optionGroup-showIndicator_0>.top-optionGroup_item>.top-forms-option{opacity:0;width:0;height:0;position:absolute}.top-optionGroup_item>.top-forms-option{order:-1}.top-info{--top-icon-width: var(--top-icon-size);border-radius:var(--top-forms-radius);box-sizing:border-box;min-height:var(--top-forms-base-height);padding:var(--top-padding-1) var(--top-padding-2);flex-grow:5;display:flex;align-items:center;justify-content:space-between;gap:var(--top-gap-2)}.top-info_text{flex-grow:1}.top-info_value{font-weight:700}.top-info.top-size_default{border-radius:var(--top-radius-3);padding:var(--top-padding-4)}.top-info-styling_default{--top-icon-color: var(--color-text-2);background:var(--color-layer-1)}.top-info-styling_info{--top-icon-color: var(--color-text-primary);background:var(--color-layer-primary-1)}.top-info-styling_warning{--top-icon-color: var(--color-text-warning);background:var(--color-layer-warning-1)}.top-info-styling_negative{--top-icon-color: var(--color-text-negative);background:var(--color-layer-negative-1)}.top-policy{box-sizing:border-box;box-shadow:var(--top-shadow-b);border-radius:var(--top-radius-4);background:var(--color-bg-lightning-1);width:600px;padding:var(--top-padding-4);position:fixed;right:var(--top-gap-10);bottom:var(--top-gap-10);display:flex;flex-direction:column;gap:var(--top-gap-4);z-index:10000}.top-policy_title{font-size:24px;font-weight:700}.top-policy_description{font-size:14px}@media screen and (max-width:900px){.top-policy{width:100%;right:0;bottom:calc(var(--top-gap-5) + var(--toolbar-height, 0px))}}
@@ -1 +1 @@
1
- .top-competitorSelector_opener.top-button{width:100%}.top-select-searcher_key[data-value="0"]:after,.top-select-searcher_key[data-value="20"]:after,.top-select-searcher_key[data-value="21"]:after{color:red}.top-select-searcher_key[data-value="1"]:after{color:var(--color-bg-primary-2)}.top-select-searcher_key[data-value="2"]:after{color:#005ff9}.top-select-searcher_key[data-value="3"]:after{color:#01509b}.top-select-searcher_key[data-value="4"]:after{color:red}.top-select-searcher_key[data-value="5"]:after{color:#008373}.top-select-searcher_key[data-value="6"]:after{color:#4800b5}.top-select-searcher_key[data-value="7"]:after{color:#c00}.top-select-searcher_key[data-value="8"]:after{color:#1badf8}.top-select-searcher_key[data-value="9"]:after{color:#00ceff}.top-selectorRegion{width:340px;display:inline-flex;vertical-align:middle}.top-selectorRegion>.top-select{flex-grow:1}.top-selectorRegion>.top-select:focus-within{z-index:4}.top-selectorRegion>.top-select>.top-select_select:hover,.top-selectorRegion>.top-select>.top-select_select.top-error{z-index:1}.top-selectorRegion>.top-select-searcher_key{width:140px;max-width:160px;margin-right:-1px}.top-selectorRegion>.top-select-region>select{border-top-left-radius:0;border-bottom-left-radius:0}.top-selectorRegion>.top-select-region{--top-icon-size: 20px;--top-icon-color: var(--color-text-primary);--top-icon2-size: 20px;--top-icon2-color: var(--color-text-primary)}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]{--top-icon2-size: 16px}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]:after{text-indent:-4px}.top-selectorRegion>[name=compare]{border-top-left-radius:0;border-bottom-left-radius:0;flex-grow:1}.top-selectorRegion>[name=compare]:after{content:"(" attr(data-count-compare-regions-indexes) ")";margin:0 0 0 6px}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key>select{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key[data-value="-1"]>select{border-right:none}.top-selectorRegion-onlySearcher{width:140px}.top-groupSelector_groupItem{display:flex;flex-direction:column;gap:var(--top-padding-1)}.top-groupSelector_groupItemFolderPath{width:100%;color:var(--color-text-4);font-size:12px}.top-groupSelector{display:inline-flex;gap:var(--top-padding-1)}[data-tag_id]{display:inline-flex;gap:var(--top-gap-2);align-items:center}[data-tag_id=""]{border-color:#bdc3c7!important;color:#55555f!important}[data-tag_color_id="1"]{border-color:var(--color-tag-1)!important;color:#55555f!important}[data-tag_color_id="2"]{border-color:var(--color-tag-2)!important;color:var(--color-tag-2)!important}[data-tag_color_id="3"]{border-color:var(--color-tag-3)!important;color:var(--color-tag-3)!important}[data-tag_color_id="4"]{border-color:var(--color-tag-4)!important;color:var(--color-tag-4)!important}[data-tag_color_id="5"]{border-color:var(--color-tag-5)!important;color:var(--color-tag-5)!important}[data-tag_color_id="6"]{border-color:var(--color-tag-6)!important;color:var(--color-tag-6)!important}[data-tag_color_id="7"]{border-color:var(--color-tag-7)!important;color:var(--color-tag-7)!important}[data-tag_color_id="8"]{border-color:var(--color-tag-8)!important;color:var(--color-tag-8)!important}[data-tag_color_id="9"]{border-color:var(--color-tag-9)!important;color:var(--color-tag-9)!important}[data-tag_color_id="10"]{border-color:var(--color-tag-10)!important;color:var(--color-tag-10)!important}[data-tag_id=""].top-tagSelector-active{background:#bdc3c7!important}[data-tag_color_id="1"].top-tagSelector-active{background:var(--color-tag-1)!important}[data-tag_color_id="2"].top-tagSelector-active{background:var(--color-tag-2)!important}[data-tag_color_id="3"].top-tagSelector-active{background:var(--color-tag-3)!important}[data-tag_color_id="4"].top-tagSelector-active{background:var(--color-tag-4)!important}[data-tag_color_id="5"].top-tagSelector-active{background:var(--color-tag-5)!important}[data-tag_color_id="6"].top-tagSelector-active{background:var(--color-tag-6)!important}[data-tag_color_id="7"].top-tagSelector-active{background:var(--color-tag-7)!important}[data-tag_color_id="8"].top-tagSelector-active{background:var(--color-tag-8)!important}[data-tag_color_id="9"].top-tagSelector-active{background:var(--color-tag-9)!important}[data-tag_color_id="10"].top-tagSelector-active{background:var(--color-tag-10)!important}[data-tag_id=all]{border-color:transparent!important;background:none!important}[data-tag_id=all]:before{content:"";color:var(--color-tag-all)!important;font-size:26px;min-width:calc(100% + 4px);height:calc(100% + 4px);margin-top:-18px;margin-left:-8px}.top-tagSelector-useTopButton [data-tag_id],.top-tagSelector_popup [data-tag_id]{--top-tag-selector-size: 10px;box-sizing:content-box;border-radius:100%;border:2px solid var(--color-layout-front-1);background:var(--color-layout-front-1);width:var(--top-tag-selector-size);height:var(--top-tag-selector-size);font-size:calc(var(--top-tag-selector-size) + 4px)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id],[data-tag_id].top-tagSelector-excluded{position:relative}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:before,[data-tag_id].top-tagSelector-excluded:before{content:"";width:calc(var(--top-tag-selector-size) * 2);height:1px;background:inherit;transform:rotate(-45deg);filter:brightness(80%);display:block;position:absolute;top:calc(var(--top-tag-selector-size) / 2);left:calc(0px - var(--top-tag-selector-size) / 2)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:not([data-tag_id=all]):not(.top-tagSelector-active):before{background:#aaa}[data-tag_id].top-tagSelector-excluded:after,[data-tag_id].top-tagSelector-excluded~.top-tagSelector_tagListItemName{text-decoration:line-through}.top-popup_listItem.top-tagSelector-active{background:var(--top-popup-background-color-active)!important}.top-popup_listItem:hover [data-tag_id=all]:before{border-color:var(--top-popup-background-color-hover)}.top-popup_listItem.top-tagSelector-active [data-tag_id=all]:before,.top-popup_listItem.top-active [data-tag_id=all]:before{border-color:var(--top-popup-background-color-active)}.top-tagSelector_tagListItem.top-popup_listItem{padding-top:var(--top-padding-2)!important;padding-bottom:var(--top-padding-2)!important;gap:10px}.top-tagSelector_tagListItemName{border-radius:var(--top-radius-1);width:120px;padding:4px 2px;margin:-4px -2px;text-overflow:ellipsis;overflow:hidden;flex-grow:1}.top-tagSelector_edit{--top-icon-size: 18px;--top-icon-color: var(--color-text-3);width:20px;flex-grow:0}.top-tagSelector_edit:before{line-height:0}.top-tagSelector_edit{opacity:0}.top-tagSelector_edit:hover{--top-icon-color: var(--color-text-primary)}.top-tagSelector_tagListItem:hover .top-tagSelector_edit,.top-tagSelector_tagListItem-inEdit .top-tagSelector_edit{cursor:pointer;opacity:1}.top-tagSelector_tagListItem-inEdit{background:var(--color-layout-front-3)!important;outline:1px dashed var(--color-line-2);outline-offset:-1px}.top-tagSelector_tagListItem-inEdit .top-tagSelector_tagListItemName{cursor:text;background:var(--color-layout-front-1)}.top-tagSelector_tagListItem-disabled{cursor:not-allowed!important;opacity:.85}.top-tagSelector_tagListItem-disabled:hover{background:inherit}.top-tagSelector_tagListItem-disabled [data-tag_id]{opacity:.6}.top-tagSelector{cursor:pointer;min-width:0;white-space:nowrap;justify-content:left}.top-tagSelector-useTopButton{width:112px;gap:var(--top-gap-1);vertical-align:middle}.top-tagSelector.top-button.top-as-selector{width:120px}.top-tagSelector-useTopButton [data-tag_id=all]:before{margin-right:6px}.top-tagSelector-useTopButton.top-tagSelector-selectedOne [data-tag_id]:after{content:attr(title);margin-left:20px;min-width:74px;text-align:left;line-height:1.2;text-overflow:ellipsis;overflow:hidden}.top-tagSelector-useTopButton.top-tagSelector-selectedOne [data-tag_id=all]:after{margin-left:0}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine{flex-wrap:wrap;align-content:center}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine [data-tag_id]{--top-tag-selector-size: 8px}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine [data-tag_id]:nth-child(5){margin-right:4px}.top-tagSelector-useTopButton.top-tagSelector-setter_several,.top-tagSelector-useTopButton.top-tagSelector-setter_several.top-as-selector{width:auto}.top-tagSelector-custom{position:relative;display:flex!important;flex-direction:column;flex-wrap:wrap;align-items:stretch!important}.top-tagSelector-custom [data-tag_id]{width:auto;min-height:20%;min-width:50%;flex:1 1 auto}.top-tagSelector_popup .top-popup{-webkit-user-select:none;user-select:none;min-width:220px!important;text-align:left}.top-tagSelector_popup .top-popup_header .top-select{flex-grow:1}
1
+ .top-competitorSelector_opener.top-button{width:100%}.top-select-searcher_key[data-value="0"]:after,.top-select-searcher_key[data-value="20"]:after,.top-select-searcher_key[data-value="21"]:after{color:red}.top-select-searcher_key[data-value="1"]:after{color:var(--color-bg-primary-2)}.top-select-searcher_key[data-value="2"]:after{color:#005ff9}.top-select-searcher_key[data-value="3"]:after{color:#01509b}.top-select-searcher_key[data-value="4"]:after{color:red}.top-select-searcher_key[data-value="5"]:after{color:#008373}.top-select-searcher_key[data-value="6"]:after{color:#4800b5}.top-select-searcher_key[data-value="7"]:after{color:#c00}.top-select-searcher_key[data-value="8"]:after{color:#1badf8}.top-select-searcher_key[data-value="9"]:after{color:#00ceff}.top-selectorRegion{width:340px;display:inline-flex;vertical-align:middle}.top-selectorRegion>.top-select{flex-grow:1}.top-selectorRegion>.top-select:focus-within{z-index:4}.top-selectorRegion>.top-select>.top-select_select:hover,.top-selectorRegion>.top-select>.top-select_select.top-error{z-index:1}.top-selectorRegion>.top-select-searcher_key{width:140px;max-width:160px;margin-right:-1px}.top-selectorRegion>.top-select-region>select{border-top-left-radius:0;border-bottom-left-radius:0}.top-selectorRegion>.top-select-region{--top-icon-size: 20px;--top-icon-color: var(--color-text-primary);--top-icon2-size: 20px;--top-icon2-color: var(--color-text-primary)}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]{--top-icon2-size: 16px}.top-selectorRegion>.top-select-region[data-top-icon][data-top-icon2]:after{text-indent:-4px}.top-selectorRegion>[name=compare]{border-top-left-radius:0;border-bottom-left-radius:0;flex-grow:1}.top-selectorRegion>[name=compare]:after{content:"(" attr(data-count-compare-regions-indexes) ")";margin:0 0 0 6px}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key>select{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0}.top-selectorRegion:not(.top-selectorRegion-onlySearcher)>.top-select-searcher_key[data-value="-1"]>select{border-right:none}.top-selectorRegion-onlySearcher{width:140px}.top-groupSelector_groupItem{display:flex;flex-direction:column;gap:var(--top-padding-1)}.top-groupSelector_groupItemFolderPath{width:100%;color:var(--color-text-4);font-size:12px}.top-groupSelector{display:inline-flex;gap:var(--top-padding-1)}.top-projectSelectorSubmenu .top-popup{min-width:170px}.top-projectSelectorSubmenu ul{flex-direction:row;flex-wrap:wrap}.top-projectSelectorSubmenu_item{width:32%}.top-projectSelectorSubmenu_item a{justify-content:center}.top-projectSelectorSubmenu ul.top-popup_content li>a[data-top-icon]:before{--top-icon-size: 24px;--top-icon-width: 32px;height:var(--top-icon-width);margin:0}.top-projectSelectorSubmenu_item{flex-grow:1}.top-projectSelector .top-popup{width:278px}.top-projectSelector_item{--top-icon-size: 14px;display:flex;flex-grow:1;gap:var(--top-gap-1)}.top-projectSelector_itemLink{position:absolute;inset:0}.top-projectSelector_itemText{flex-grow:1;display:flex;flex-direction:column;gap:var(--top-gap-1)}.top-projectSelector_itemExtLink,.top-projectSelector_item [class*=opener]{opacity:0;position:relative;z-index:1}.top-popup_listItem:hover .top-projectSelector_item>*,.top-popup_listItem.top-active .top-projectSelector_item>*{opacity:1}@media screen and (min-width:900px){.top-projectSelector.p3 div.top-popup{max-height:min(calc(var(--top-popup-bottom) - 16px),800px)}}@media screen and (max-width:900px){.top-projectSelector_item [class*=opener]{opacity:1}}[data-tag_id]{display:inline-flex;gap:var(--top-gap-2);align-items:center}[data-tag_id=""]{border-color:#bdc3c7!important;color:#55555f!important}[data-tag_color_id="1"]{border-color:var(--color-tag-1)!important;color:#55555f!important}[data-tag_color_id="2"]{border-color:var(--color-tag-2)!important;color:var(--color-tag-2)!important}[data-tag_color_id="3"]{border-color:var(--color-tag-3)!important;color:var(--color-tag-3)!important}[data-tag_color_id="4"]{border-color:var(--color-tag-4)!important;color:var(--color-tag-4)!important}[data-tag_color_id="5"]{border-color:var(--color-tag-5)!important;color:var(--color-tag-5)!important}[data-tag_color_id="6"]{border-color:var(--color-tag-6)!important;color:var(--color-tag-6)!important}[data-tag_color_id="7"]{border-color:var(--color-tag-7)!important;color:var(--color-tag-7)!important}[data-tag_color_id="8"]{border-color:var(--color-tag-8)!important;color:var(--color-tag-8)!important}[data-tag_color_id="9"]{border-color:var(--color-tag-9)!important;color:var(--color-tag-9)!important}[data-tag_color_id="10"]{border-color:var(--color-tag-10)!important;color:var(--color-tag-10)!important}[data-tag_id=""].top-tagSelector-active{background:#bdc3c7!important}[data-tag_color_id="1"].top-tagSelector-active{background:var(--color-tag-1)!important}[data-tag_color_id="2"].top-tagSelector-active{background:var(--color-tag-2)!important}[data-tag_color_id="3"].top-tagSelector-active{background:var(--color-tag-3)!important}[data-tag_color_id="4"].top-tagSelector-active{background:var(--color-tag-4)!important}[data-tag_color_id="5"].top-tagSelector-active{background:var(--color-tag-5)!important}[data-tag_color_id="6"].top-tagSelector-active{background:var(--color-tag-6)!important}[data-tag_color_id="7"].top-tagSelector-active{background:var(--color-tag-7)!important}[data-tag_color_id="8"].top-tagSelector-active{background:var(--color-tag-8)!important}[data-tag_color_id="9"].top-tagSelector-active{background:var(--color-tag-9)!important}[data-tag_color_id="10"].top-tagSelector-active{background:var(--color-tag-10)!important}[data-tag_id=all]{border-color:transparent!important;background:none!important}[data-tag_id=all]:before{content:"";color:var(--color-tag-all)!important;font-size:26px;min-width:calc(100% + 4px);height:calc(100% + 4px);margin-top:-18px;margin-left:-8px}.top-tagSelector-useTopButton [data-tag_id],.top-tagSelector_popup [data-tag_id]{--top-tag-selector-size: 10px;box-sizing:content-box;border-radius:100%;border:2px solid var(--color-layout-front-1);background:var(--color-layout-front-1);width:var(--top-tag-selector-size);height:var(--top-tag-selector-size);font-size:calc(var(--top-tag-selector-size) + 4px)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id],[data-tag_id].top-tagSelector-excluded{position:relative}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:before,[data-tag_id].top-tagSelector-excluded:before{content:"";width:calc(var(--top-tag-selector-size) * 2);height:1px;background:inherit;transform:rotate(-45deg);filter:brightness(80%);display:block;position:absolute;top:calc(var(--top-tag-selector-size) / 2);left:calc(0px - var(--top-tag-selector-size) / 2)}.top-body-press_ctrl .top-tagSelector_tagListItem-canExclude:hover [data-tag_id]:not([data-tag_id=all]):not(.top-tagSelector-active):before{background:#aaa}[data-tag_id].top-tagSelector-excluded:after,[data-tag_id].top-tagSelector-excluded~.top-tagSelector_tagListItemName{text-decoration:line-through}.top-popup_listItem.top-tagSelector-active{background:var(--top-popup-background-color-active)!important}.top-popup_listItem:hover [data-tag_id=all]:before{border-color:var(--top-popup-background-color-hover)}.top-popup_listItem.top-tagSelector-active [data-tag_id=all]:before,.top-popup_listItem.top-active [data-tag_id=all]:before{border-color:var(--top-popup-background-color-active)}.top-tagSelector_tagListItem.top-popup_listItem{padding-top:var(--top-padding-2)!important;padding-bottom:var(--top-padding-2)!important;gap:10px}.top-tagSelector_tagListItemName{border-radius:var(--top-radius-1);width:120px;padding:4px 2px;margin:-4px -2px;text-overflow:ellipsis;overflow:hidden;flex-grow:1}.top-tagSelector_edit{--top-icon-size: 18px;--top-icon-color: var(--color-text-3);width:20px;flex-grow:0}.top-tagSelector_edit:before{line-height:0}.top-tagSelector_edit{opacity:0}.top-tagSelector_edit:hover{--top-icon-color: var(--color-text-primary)}.top-tagSelector_tagListItem:hover .top-tagSelector_edit,.top-tagSelector_tagListItem-inEdit .top-tagSelector_edit{cursor:pointer;opacity:1}.top-tagSelector_tagListItem-inEdit{background:var(--color-layout-front-3)!important;outline:1px dashed var(--color-line-2);outline-offset:-1px}.top-tagSelector_tagListItem-inEdit .top-tagSelector_tagListItemName{cursor:text;background:var(--color-layout-front-1)}.top-tagSelector_tagListItem-disabled{cursor:not-allowed!important;opacity:.85}.top-tagSelector_tagListItem-disabled:hover{background:inherit}.top-tagSelector_tagListItem-disabled [data-tag_id]{opacity:.6}.top-tagSelector{cursor:pointer;min-width:0;white-space:nowrap;justify-content:left}.top-tagSelector-useTopButton{width:112px;gap:var(--top-gap-1);vertical-align:middle}.top-tagSelector.top-button.top-as-selector{width:120px}.top-tagSelector-useTopButton [data-tag_id=all]:before{margin-right:6px}.top-tagSelector-useTopButton.top-tagSelector-selectedOne [data-tag_id]:after{content:attr(title);margin-left:20px;min-width:74px;text-align:left;line-height:1.2;text-overflow:ellipsis;overflow:hidden}.top-tagSelector-useTopButton.top-tagSelector-selectedOne [data-tag_id=all]:after{margin-left:0}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine{flex-wrap:wrap;align-content:center}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine [data-tag_id]{--top-tag-selector-size: 8px}.top-button.top-tagSelector-useTopButton.top-tagSelector-toTwoLine [data-tag_id]:nth-child(5){margin-right:4px}.top-tagSelector-useTopButton.top-tagSelector-setter_several,.top-tagSelector-useTopButton.top-tagSelector-setter_several.top-as-selector{width:auto}.top-tagSelector-custom{position:relative;display:flex!important;flex-direction:column;flex-wrap:wrap;align-items:stretch!important}.top-tagSelector-custom [data-tag_id]{width:auto;min-height:20%;min-width:50%;flex:1 1 auto}.top-tagSelector_popup .top-popup{-webkit-user-select:none;user-select:none;min-width:220px!important;text-align:left}.top-tagSelector_popup .top-popup_header .top-select{flex-grow:1}
package/core/app.amd.js CHANGED
@@ -1,2 +1,2 @@
1
- define(["require","exports","../.chunks/forms-DDNzqU6o.amd","../.chunks/core-Bzx1xzSh.amd","vue","../utils/clipboard.amd","../utils/string.amd","../utils/route.amd","../.chunks/utils-CWn_G7OO.amd","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd"],(function(E,n,r,g,c,p,f,d,u,m){"use strict";if(typeof c>"u")var c=window.Vue;class S{#s;#t;#e;#a;#c;#i=[];#o=[];#n=[];#r=[];constructor(t){this.#t=t.store,this.#s=this.#t.$id,this.#e=t.options.Page,this.#a=t.options.user,this.#c=t.options.Api,this.#i=t.options.tpaNamesUrlHash||[],this.#o=t.options.tpaNamesStorage||[],this.#n=t.options.tpaNamesStorageLocal||[],this.#r=t.options.tpaNamesGuestLink||[],t.store.genGuestLink=(s,a)=>this.genGuestLink(s,a),this.#a.guest_data?.data||(this.#u(),this.#u(!0),this.#f()),this.#S(),this.#k();const e=r.debounce(()=>{this.#m(),this.#l(),this.#l(!0)});t.store.$subscribe(e)}async genGuestLink(t,e){const s=this.#g();e=Object.assign(e,Object.fromEntries(s));const a=await this.#c.gen(t).setParams(e).call();if(a?.errors)return;const i=a.result;await p.guestLinkToClipboard(i)}#g(){const t=new Map;return this.#r.forEach(e=>{const s=f.camelToSnakeCase(e);t.set(s,this.#t[e])}),t}#h(t){t.forEach((e,s)=>{const a=this.#t[s];if(e!=null&&a!==void 0&&e?.constructor&&e.constructor===a.constructor){if(s.indexOf("date")===0&&!Array.isArray(e)){if(typeof e=="string"&&!/\d\d\d\d-\d\d-\d\d/.test(e))return}this.#t[s]=e}})}#p(t){const e=new Map;return t.forEach((s,a)=>{s!==null&&(s=JSON.stringify(s),e.set(a,s))}),e}#d(t){const e=new Map;return t.forEach((s,a)=>{if(!(s==null||s==="false")){try{if(typeof s=="string"&&!/^\d\d\d\d-\d\d-\d\d$/.test(s)&&(s=JSON.parse(s)),s==null||s==="false")return}catch{}e.set(a,s)}}),e}#f(){let t;try{t=JSON.parse(d.getHash(this.#s))}catch{}if(!t)return;const e=new Map;this.#i.forEach(s=>{const a=t[s];a&&e.set(s,a)}),this.#h(e)}#m(){const t=new Map;this.#i.forEach(a=>{const i=this.#t[a];t.set(a,i)});const e=Object.fromEntries(t),s=JSON.stringify(e);d.setHash(this.#s,s)}#u(t=!1){const e=new Map;let s=this.#o,a="state:"+this.#s;t&&(s=this.#n,a="state:"+this.#s+":"+location.pathname),s.forEach(o=>{const h=localStorage.getItem(a+":"+o);e.set(o,h)});const i=this.#d(e);this.#h(i)}#l(t=!1){const e=new Map;let s=this.#o,a="state:"+this.#s;t&&(s=this.#n,a="state:"+this.#s+":"+location.pathname),s.forEach(o=>{const h=this.#t[o];e.set(o,h)});const i=this.#p(e);s.forEach(o=>{const h=i.get(o);localStorage.setItem(a+":"+o,h)})}#S(){const t=this.#a?.guest_data?.data;if(!t)return;this.#a.id===-1&&(this.#a.positionsReverseDates=t.positionsReverseDates);const e=new Map;this.#r.forEach(i=>{const o=t[i];e.set(i,o)});const s=this.#d(e);this.#h(s);const a=$(".mod_guest_title");if(this.#t.competitorsIds?.length===1&&this.#e.page.data.competitors){let i=this.#e.page.data.competitors.filter(o=>o.id===t.competitorsIds[0]);i.length&&($("a",a).attr("href","http://"+i[0].url),$("a",a).text(i[0].name))}}#k(){this.#t.regionsIndexes&&c.watch(this.#t.regionsIndexes,t=>{if(!t.length)return;t.forEach((a,i)=>t[i]=a);const e=TplProjectSelectorRegion.genSearchersMap(),s=[];e.forEach(a=>{a.regions.forEach(i=>{i.index!==-1&&s.push(i.index)})}),this.#t.regionsIndexes=t.filter(a=>s.includes(a))},{immediate:!0}),this.#t.competitorsIds&&c.watch(this.#t.competitorsIds,t=>{if(!t.length)return;t.forEach((s,a)=>t[a]=s);const e=[this.#e.page.data.project.id];this.#e.page.data.project.competitors.forEach(s=>{s.on>=0&&e.push(s.id)}),this.#t.competitorsIds=t.filter(s=>e.includes(s))},{immediate:!0})}}const k=l=>{const t=l;!t.options.tpaNamesUrlHash?.length&&!t.options.tpaNamesStorage?.length&&!t.options.tpaNamesStorageLocal?.length&&!t.options.tpaNamesGuestLink?.length||new S(t)};n.Core=r.Core,n.i18nPlugin=r.i18n,n.useI18n=r.useI18n,n.useI18nLang=r.useI18nLang,n.corePlugin=g.core,n.useAsyncTopDialog=u.useAsyncTopDialog,n.useTopDialog=u.useTopDialog,n.TopDialogWorker=m.TopDialogWorker,n.piniaTPAPlugin=k,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","../.chunks/forms-DDNzqU6o.amd","../.chunks/core-DzDFXOdI.amd","vue","../utils/clipboard.amd","../utils/string.amd","../utils/route.amd","../.chunks/utils-CWn_G7OO.amd","../.chunks/dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd"],(function(E,n,r,g,c,p,f,d,u,m){"use strict";if(typeof c>"u")var c=window.Vue;class S{#s;#t;#e;#a;#c;#i=[];#o=[];#n=[];#r=[];constructor(t){this.#t=t.store,this.#s=this.#t.$id,this.#e=t.options.Page,this.#a=t.options.user,this.#c=t.options.Api,this.#i=t.options.tpaNamesUrlHash||[],this.#o=t.options.tpaNamesStorage||[],this.#n=t.options.tpaNamesStorageLocal||[],this.#r=t.options.tpaNamesGuestLink||[],t.store.genGuestLink=(s,a)=>this.genGuestLink(s,a),this.#a.guest_data?.data||(this.#u(),this.#u(!0),this.#f()),this.#S(),this.#k();const e=r.debounce(()=>{this.#m(),this.#l(),this.#l(!0)});t.store.$subscribe(e)}async genGuestLink(t,e){const s=this.#g();e=Object.assign(e,Object.fromEntries(s));const a=await this.#c.gen(t).setParams(e).call();if(a?.errors)return;const i=a.result;await p.guestLinkToClipboard(i)}#g(){const t=new Map;return this.#r.forEach(e=>{const s=f.camelToSnakeCase(e);t.set(s,this.#t[e])}),t}#h(t){t.forEach((e,s)=>{const a=this.#t[s];if(e!=null&&a!==void 0&&e?.constructor&&e.constructor===a.constructor){if(s.indexOf("date")===0&&!Array.isArray(e)){if(typeof e=="string"&&!/\d\d\d\d-\d\d-\d\d/.test(e))return}this.#t[s]=e}})}#p(t){const e=new Map;return t.forEach((s,a)=>{s!==null&&(s=JSON.stringify(s),e.set(a,s))}),e}#d(t){const e=new Map;return t.forEach((s,a)=>{if(!(s==null||s==="false")){try{if(typeof s=="string"&&!/^\d\d\d\d-\d\d-\d\d$/.test(s)&&(s=JSON.parse(s)),s==null||s==="false")return}catch{}e.set(a,s)}}),e}#f(){let t;try{t=JSON.parse(d.getHash(this.#s))}catch{}if(!t)return;const e=new Map;this.#i.forEach(s=>{const a=t[s];a&&e.set(s,a)}),this.#h(e)}#m(){const t=new Map;this.#i.forEach(a=>{const i=this.#t[a];t.set(a,i)});const e=Object.fromEntries(t),s=JSON.stringify(e);d.setHash(this.#s,s)}#u(t=!1){const e=new Map;let s=this.#o,a="state:"+this.#s;t&&(s=this.#n,a="state:"+this.#s+":"+location.pathname),s.forEach(o=>{const h=localStorage.getItem(a+":"+o);e.set(o,h)});const i=this.#d(e);this.#h(i)}#l(t=!1){const e=new Map;let s=this.#o,a="state:"+this.#s;t&&(s=this.#n,a="state:"+this.#s+":"+location.pathname),s.forEach(o=>{const h=this.#t[o];e.set(o,h)});const i=this.#p(e);s.forEach(o=>{const h=i.get(o);localStorage.setItem(a+":"+o,h)})}#S(){const t=this.#a?.guest_data?.data;if(!t)return;this.#a.id===-1&&(this.#a.positionsReverseDates=t.positionsReverseDates);const e=new Map;this.#r.forEach(i=>{const o=t[i];e.set(i,o)});const s=this.#d(e);this.#h(s);const a=$(".mod_guest_title");if(this.#t.competitorsIds?.length===1&&this.#e.page.data.competitors){let i=this.#e.page.data.competitors.filter(o=>o.id===t.competitorsIds[0]);i.length&&($("a",a).attr("href","http://"+i[0].url),$("a",a).text(i[0].name))}}#k(){this.#t.regionsIndexes&&c.watch(this.#t.regionsIndexes,t=>{if(!t.length)return;t.forEach((a,i)=>t[i]=a);const e=TplProjectSelectorRegion.genSearchersMap(),s=[];e.forEach(a=>{a.regions.forEach(i=>{i.index!==-1&&s.push(i.index)})}),this.#t.regionsIndexes=t.filter(a=>s.includes(a))},{immediate:!0}),this.#t.competitorsIds&&c.watch(this.#t.competitorsIds,t=>{if(!t.length)return;t.forEach((s,a)=>t[a]=s);const e=[this.#e.page.data.project.id];this.#e.page.data.project.competitors.forEach(s=>{s.on>=0&&e.push(s.id)}),this.#t.competitorsIds=t.filter(s=>e.includes(s))},{immediate:!0})}}const k=l=>{const t=l;!t.options.tpaNamesUrlHash?.length&&!t.options.tpaNamesStorage?.length&&!t.options.tpaNamesStorageLocal?.length&&!t.options.tpaNamesGuestLink?.length||new S(t)};n.Core=r.Core,n.i18nPlugin=r.i18n,n.useI18n=r.useI18n,n.useI18nLang=r.useI18nLang,n.corePlugin=g.core,n.useAsyncTopDialog=u.useAsyncTopDialog,n.useTopDialog=u.useTopDialog,n.TopDialogWorker=m.TopDialogWorker,n.piniaTPAPlugin=k,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=app.amd.js.map
package/core/app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { d as c } from "../.chunks/forms-BpbQYyEQ.es.js";
2
2
  import { C as O, i as P, u as I, a as T } from "../.chunks/forms-BpbQYyEQ.es.js";
3
- import { c as y } from "../.chunks/core-BE1XXQSp.es.js";
3
+ import { c as y } from "../.chunks/core-DoIr-EAf.es.js";
4
4
  import { watch as h } from "vue";
5
5
  import { guestLinkToClipboard as p } from "../utils/clipboard.js";
6
6
  import { camelToSnakeCase as d } from "../utils/string.js";
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-DDNzqU6o.amd","../.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd"],(function(z,d,e,m,f){"use strict";if(typeof e>"u")var e=window.Vue;const y={class:"top-editArea_footer"},k=e.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(t,{emit:o}){const l=t,n=o,i=e.ref(l.defaultValue),s=e.ref(l.isFocused),r=e.computed(()=>i.value!==l.defaultValue),a=p=>{n("submit",p),i.value=l.defaultValue},c=()=>{if(l.forceShowCloseBtn&&!r.value){n("close");return}i.value=l.defaultValue},N=()=>{l.attachToKeyboard&&n("clickOnTitle")};return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-editArea":!0,"top-editArea-attachedToKeyboard":t.attachToKeyboard})},[t.title||p.$slots.caption?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-editArea_caption",onClick:u[0]||(u[0]=v=>N())},[e.renderSlot(p.$slots,"caption",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass({"top-editArea_form":!0,"top-forms-focusable":!0,"top-as-input":!0,"top-error":t.isError,"top-focus":s.value})},[e.createVNode(m._sfc_main$3,{modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=v=>i.value=v),name:t.name,placeholder:t.placeholder,rows:t.rows,minHeight:t.minHeight,expandable:t.expandable,disabled:t.disabled,readonly:t.readonly,isError:t.isError,hint:t.hint,class:"top-editArea_element",onFocus:u[2]||(u[2]=()=>s.value=!0),onBlur:u[3]||(u[3]=()=>s.value=!1),onKeyup:[e.withKeys(c,["esc"]),u[4]||(u[4]=e.withKeys(e.withModifiers(v=>a(i.value),["ctrl"]),["enter"]))]},null,8,["modelValue","name","placeholder","rows","minHeight","expandable","disabled","readonly","isError","hint"]),e.createElementVNode("div",y,[r.value||t.forceShowCloseBtn?(e.openBlock(),e.createBlock(m._sfc_main$1,{key:0,icon:p.$core.state.isMobile?"":"",class:"top-editArea_button",color:"theme",styling:"soft",onClick:c},e.createSlots({_:2},[p.$core.state.isMobile?void 0:{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelText),1)]),key:"0"}]),1032,["icon"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(m._sfc_main$1,{key:1,class:"top-editArea_button",icon:p.$core.state.isMobile?"":"",onClick:u[5]||(u[5]=v=>a(i.value))},e.createSlots({_:2},[p.$core.state.isMobile?void 0:{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.submitText),1)]),key:"0"}]),1032,["icon"])):e.createCommentVNode("",!0)])],2)],2))}}),B={class:"top-editInput"},h=e.defineComponent({__name:"editInput",props:{modelValue:{},alwaysShowSubmitBtn:{type:Boolean},input:{},button:{}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,n=e.ref(l.modelValue);e.watch(()=>l.modelValue,()=>{n.value=l.modelValue});const i=o,s=()=>{i("update:modelValue",n.value)};return(r,a)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(m._sfc_main,e.mergeProps(t.input,{onKeydownCapture:a[0]||(a[0]=e.withKeys(e.withModifiers(c=>n.value=t.modelValue,["stop"]),["esc"])),onKeydown:e.withKeys(e.withModifiers(s,["stop"]),["enter"]),modelValue:n.value,"onUpdate:modelValue":a[1]||(a[1]=c=>n.value=c)}),e.createSlots({_:2},[r.$slots.caption?{name:"caption",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"caption")]),key:"0"}:void 0]),1040,["onKeydown","modelValue"]),n.value!==t.modelValue||t.alwaysShowSubmitBtn?(e.openBlock(),e.createBlock(m._sfc_main$1,e.mergeProps({key:0,icon:"",styling:"soft"},t.button,{onClick:s}),null,16)):e.createCommentVNode("",!0)]))}}),V=e.defineComponent({__name:"optionGroup",props:e.mergeModels({modelValue:{},items:{},size:{default:"s"},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue"),l=t,n=e.ref(null);e.watch(o,()=>{const s=l.items.map(r=>r.value);Array.isArray(o.value)?o.value.find(a=>!s.includes(a))&&(o.value=o.value.filter(a=>s.includes(a))):s.includes(o.value)||(o.value=s[0]??""),n.value?.querySelector(".radioGroup_item-selected")?.scrollIntoView()},{immediate:!0});const i="optionGroup-"+Math.random();return(s,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:n,class:e.normalizeClass({"top-optionGroup":!0,["top-optionGroup-showIndicator_"+Number(t.showIndicator)]:!0,"top-scrollBarXHidding":!0,["top-size_"+t.size]:!!t.size,"top-error":t.isError})},[Array.isArray(o.value)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.items,a=>(e.openBlock(),e.createBlock(m._sfc_main$4,{class:e.normalizeClass({"top-optionGroup_item-selected":o.value.includes(a.value),"top-optionGroup_item":!0}),modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=c=>o.value=c),value:a.value,title:a.title,disabled:a.disabled,isError:t.isError,"data-top-icon":a.icon},e.createSlots({_:2},[a.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),key:"0"}:void 0]),1032,["class","modelValue","value","title","disabled","isError","data-top-icon"]))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.items,a=>(e.openBlock(),e.createBlock(m._sfc_main$5,{class:e.normalizeClass({"top-optionGroup_item-selected":a.value===o.value,"top-optionGroup_item":!0}),modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=c=>o.value=c),name:i,value:a.value,title:a.title,disabled:a.disabled,isError:t.isError,"data-top-icon":a.icon},e.createSlots({_:2},[a.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),key:"0"}:void 0]),1032,["class","modelValue","value","title","disabled","isError","data-top-icon"]))),256))],2))}}),b=e.defineComponent({__name:"radioGroup",props:e.mergeModels({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue");return(l,n)=>(e.openBlock(),e.createBlock(V,{class:"top-radioGroup",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=i=>o.value=i),items:l.$props.items,size:l.$props.size,showIndicator:l.$props.showIndicator,isError:l.$props.isError},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["modelValue","items","size","showIndicator","isError"]))}}),w=e.defineComponent({__name:"checkboxGroup",props:e.mergeModels({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue");return(l,n)=>(e.openBlock(),e.createBlock(V,{class:"top-checkboxGroup",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=i=>o.value=i),items:l.$props.items,size:l.$props.size,showIndicator:l.$props.showIndicator,isError:l.$props.isError},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["modelValue","items","size","showIndicator","isError"]))}}),$=["data-top-icon"],E={class:"top-info_text"},C={key:0,class:"top-info_value"},T=e.defineComponent({__name:"info",props:{icon:{},styling:{default:"default"},size:{default:"default"}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-info":!0,["top-size_"+t.size]:!0,["top-info-styling_"+t.styling]:!0}),"data-top-icon":t.icon},[e.createElementVNode("div",E,[e.renderSlot(o.$slots,"default")]),o.$slots.additional?(e.openBlock(),e.createElementBlock("span",C,[e.renderSlot(o.$slots,"additional")])):e.createCommentVNode("",!0)],10,$))}}),S={key:0,class:"top-policy"},g={class:"top-policy_title"},I=["innerHTML"],M=e.defineComponent({__name:"policy",props:{title:{},description:{},acceptText:{}},emits:["accept"],setup(t,{emit:o}){const l=o,n=e.ref(!0),i=()=>{n.value=!1,l("accept")};return(s,r)=>n.value?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",g,e.toDisplayString(t.title),1),e.createElementVNode("div",{class:"top-policy_description",innerHTML:t.description},null,8,I),e.createVNode(e.unref(m._sfc_main$1),{size:"m",onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.acceptText),1)]),_:1})])):e.createCommentVNode("",!0)}});d.ITEM_ID_ALL=f.ITEM_ID_ALL,d.ITEM_ID_NEW=f.ITEM_ID_NEW,d.TopMenu=f._sfc_main$1,d.TopSelector2=f._sfc_main,d.apiSetSearchParamsFilter=f.apiSetSearchParamsFilter,d.TopCheckboxGroup=w,d.TopEditArea=k,d.TopEditInput=h,d.TopInfo=T,d.TopPolicy=M,d.TopRadioGroup=b,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","vue","../.chunks/forms-DDNzqU6o.amd","../.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd"],(function(z,d,e,m,f){"use strict";if(typeof e>"u")var e=window.Vue;const y={class:"top-editArea_footer"},k=e.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(t,{emit:o}){const l=t,n=o,i=e.ref(l.defaultValue),s=e.ref(l.isFocused),r=e.computed(()=>i.value!==l.defaultValue),a=p=>{n("submit",p),i.value=l.defaultValue},c=()=>{if(l.forceShowCloseBtn&&!r.value){n("close");return}i.value=l.defaultValue},N=()=>{l.attachToKeyboard&&n("clickOnTitle")};return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-editArea":!0,"top-editArea-attachedToKeyboard":t.attachToKeyboard})},[t.title||p.$slots.caption?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-editArea_caption",onClick:u[0]||(u[0]=v=>N())},[e.renderSlot(p.$slots,"caption",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass({"top-editArea_form":!0,"top-forms-focusable":!0,"top-as-input":!0,"top-error":t.isError,"top-focus":s.value})},[e.createVNode(m._sfc_main$3,{modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=v=>i.value=v),name:t.name,placeholder:t.placeholder,rows:t.rows,minHeight:t.minHeight,expandable:t.expandable,disabled:t.disabled,readonly:t.readonly,isError:t.isError,hint:t.hint,class:"top-editArea_element",onFocus:u[2]||(u[2]=()=>s.value=!0),onBlur:u[3]||(u[3]=()=>s.value=!1),onKeyup:[e.withKeys(c,["esc"]),u[4]||(u[4]=e.withKeys(e.withModifiers(v=>a(i.value),["ctrl"]),["enter"]))]},null,8,["modelValue","name","placeholder","rows","minHeight","expandable","disabled","readonly","isError","hint"]),e.createElementVNode("div",y,[r.value||t.forceShowCloseBtn?(e.openBlock(),e.createBlock(m._sfc_main$1,{key:0,icon:p.$core.state.isMobile?"":"",class:"top-editArea_button",color:"theme",styling:"soft",onClick:c},e.createSlots({_:2},[p.$core.state.isMobile?void 0:{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelText),1)]),key:"0"}]),1032,["icon"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(m._sfc_main$1,{key:1,class:"top-editArea_button",icon:p.$core.state.isMobile?"":"",onClick:u[5]||(u[5]=v=>a(i.value))},e.createSlots({_:2},[p.$core.state.isMobile?void 0:{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.submitText),1)]),key:"0"}]),1032,["icon"])):e.createCommentVNode("",!0)])],2)],2))}}),B={class:"top-editInput"},h=e.defineComponent({__name:"editInput",props:{modelValue:{},alwaysShowSubmitBtn:{type:Boolean},input:{},button:{}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,n=e.ref(l.modelValue);e.watch(()=>l.modelValue,()=>{n.value=l.modelValue});const i=o,s=()=>{i("update:modelValue",n.value)};return(r,a)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(m._sfc_main,e.mergeProps(t.input,{onKeydownCapture:a[0]||(a[0]=e.withKeys(e.withModifiers(c=>n.value=t.modelValue,["stop"]),["esc"])),onKeydown:e.withKeys(e.withModifiers(s,["stop"]),["enter"]),modelValue:n.value,"onUpdate:modelValue":a[1]||(a[1]=c=>n.value=c)}),e.createSlots({_:2},[r.$slots.caption?{name:"caption",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"caption")]),key:"0"}:void 0]),1040,["onKeydown","modelValue"]),n.value!==t.modelValue||t.alwaysShowSubmitBtn?(e.openBlock(),e.createBlock(m._sfc_main$1,e.mergeProps({key:0,icon:"",styling:"soft"},t.button,{onClick:s}),null,16)):e.createCommentVNode("",!0)]))}}),V=e.defineComponent({__name:"optionGroup",props:e.mergeModels({modelValue:{},items:{},size:{default:"s"},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue"),l=t,n=e.ref(null);e.watch(o,()=>{const s=l.items.map(r=>r.value);Array.isArray(o.value)?o.value.find(a=>!s.includes(a))&&(o.value=o.value.filter(a=>s.includes(a))):s.includes(o.value)||(o.value=s[0]??""),n.value?.querySelector(".radioGroup_item-selected")?.scrollIntoView()},{immediate:!0});const i="optionGroup-"+Math.random();return(s,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:n,class:e.normalizeClass({"top-optionGroup":!0,["top-optionGroup-showIndicator_"+Number(t.showIndicator)]:!0,"top-scrollBarXHidding":!0,["top-size_"+t.size]:!!t.size,"top-error":t.isError})},[Array.isArray(o.value)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.items,a=>(e.openBlock(),e.createBlock(m._sfc_main$4,{class:e.normalizeClass({"top-optionGroup_item-selected":o.value.includes(a.value),"top-optionGroup_item":!0}),modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=c=>o.value=c),value:a.value,title:a.title,disabled:a.disabled,isError:t.isError,"data-top-icon":a.icon},e.createSlots({_:2},[a.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),key:"0"}:void 0]),1032,["class","modelValue","value","title","disabled","isError","data-top-icon"]))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.items,a=>(e.openBlock(),e.createBlock(m._sfc_main$5,{class:e.normalizeClass({"top-optionGroup_item-selected":a.value===o.value,"top-optionGroup_item":!0}),modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=c=>o.value=c),name:i,value:a.value,title:a.title,disabled:a.disabled,isError:t.isError,"data-top-icon":a.icon},e.createSlots({_:2},[a.label?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),key:"0"}:void 0]),1032,["class","modelValue","value","title","disabled","isError","data-top-icon"]))),256))],2))}}),b=e.defineComponent({__name:"radioGroup",props:e.mergeModels({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue");return(l,n)=>(e.openBlock(),e.createBlock(V,{class:"top-radioGroup",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=i=>o.value=i),items:l.$props.items,size:l.$props.size,showIndicator:l.$props.showIndicator,isError:l.$props.isError},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["modelValue","items","size","showIndicator","isError"]))}}),w=e.defineComponent({__name:"checkboxGroup",props:e.mergeModels({modelValue:{},items:{},size:{},showIndicator:{type:Boolean},isError:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=e.useModel(t,"modelValue");return(l,n)=>(e.openBlock(),e.createBlock(V,{class:"top-checkboxGroup",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=i=>o.value=i),items:l.$props.items,size:l.$props.size,showIndicator:l.$props.showIndicator,isError:l.$props.isError},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["modelValue","items","size","showIndicator","isError"]))}}),$=["data-top-icon"],E={class:"top-info_text"},C={key:0,class:"top-info_value"},T=e.defineComponent({__name:"info",props:{icon:{},styling:{default:"default"},size:{default:"default"}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-info":!0,["top-size_"+t.size]:!0,["top-info-styling_"+t.styling]:!0}),"data-top-icon":t.icon},[e.createElementVNode("div",E,[e.renderSlot(o.$slots,"default")]),o.$slots.additional?(e.openBlock(),e.createElementBlock("span",C,[e.renderSlot(o.$slots,"additional")])):e.createCommentVNode("",!0)],10,$))}}),S={key:0,class:"top-policy"},g={class:"top-policy_title"},I=["innerHTML"],M=e.defineComponent({__name:"policy",props:{title:{},description:{},acceptText:{}},emits:["accept"],setup(t,{emit:o}){const l=o,n=e.ref(!0),i=()=>{n.value=!1,l("accept")};return(s,r)=>n.value?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",g,e.toDisplayString(t.title),1),e.createElementVNode("div",{class:"top-policy_description",innerHTML:t.description},null,8,I),e.createVNode(e.unref(m._sfc_main$1),{size:"m",onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.acceptText),1)]),_:1})])):e.createCommentVNode("",!0)}});d.ITEM_ID_ALL=f.ITEM_ID_ALL,d.ITEM_ID_NEW=f.ITEM_ID_NEW,d.TopMenu=f._sfc_main$1,d.TopSelector2=f._sfc_main,d.apiSetSearchParamsFilter=f.apiSetSearchParamsFilter,d.TopCheckboxGroup=w,d.TopEditArea=k,d.TopEditInput=h,d.TopInfo=T,d.TopPolicy=M,d.TopRadioGroup=b,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=formsExt.amd.js.map
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as y, ref as w, computed as F, createElementBlock as c, openBlock as i, normalizeClass as V, createCommentVNode as b, createElementVNode as k, renderSlot as h, createTextVNode as $, toDisplayString as f, createVNode as z, withKeys as B, withModifiers as g, createBlock as v, createSlots as E, withCtx as p, watch as K, mergeProps as M, mergeModels as A, useModel as C, Fragment as G, renderList as S, unref as L } from "vue";
2
2
  import { g as N, e as I, _ as U, h as q, j as D } from "../.chunks/forms-BpbQYyEQ.es.js";
3
- import { c as ne, I as re, a as ue, _ as de, b as ce } from "../.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js";
3
+ import { c as ne, I as re, a as ue, _ as de, b as ce } from "../.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js";
4
4
  const O = { class: "top-editArea_footer" }, _ = /* @__PURE__ */ y({
5
5
  __name: "editArea",
6
6
  props: {